<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic System services in an UWSS in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/system-services-in-an-uwss/m-p/4159360#M43455</link>
    <description>Hi All,&lt;BR /&gt;&lt;BR /&gt;A while ago I asked how I could dynamically change identifiers (granted with ATTRIB=DYNAMIC) in a program written in C (thread: &lt;A href="http://forums12.itrc.hp.com/service/forums/questionanswer.do?threadId=1193355)." target="_blank"&gt;http://forums12.itrc.hp.com/service/forums/questionanswer.do?threadId=1193355).&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;I decided to create an UWSS for it, with a different solution for on VAX (simply no disabling at login time; on VAX it's used only very incidentally :)&lt;BR /&gt;&lt;BR /&gt;Now my problem is, in this UWSS I make several system service calls (SYS$GETJPIW, SYS$FIND_HOLDER, SYS$ASCTOID, SYS$GRANTID and SYS$REVOKID), but this results in:&lt;BR /&gt;&lt;BR /&gt;%DCL-W-ACTIMAGE, error activating image SECURESHRP&lt;BR /&gt;-CLI-E-IMGNAME, image file $1$DGA1:[SYS2.SYSCOMMON.][SYSLIB]SECURESHRP.EXE&lt;BR /&gt;-SYSTEM-F-NOSHRIMG, privileged shareable image cannot have outbound calls&lt;BR /&gt;&lt;BR /&gt;I can do without the SYS$ASCTOID, but the others happen to provide the main functionality of my service :-S&lt;BR /&gt;&lt;BR /&gt;Is my approach an option at all, or am I doing something really stupid? Perhaps something in between....&lt;BR /&gt;&lt;BR /&gt;Thnx in advance,&lt;BR /&gt;Oscar</description>
    <pubDate>Tue, 11 Mar 2008 15:10:56 GMT</pubDate>
    <dc:creator>Oscar van Eijk</dc:creator>
    <dc:date>2008-03-11T15:10:56Z</dc:date>
    <item>
      <title>System services in an UWSS</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/system-services-in-an-uwss/m-p/4159360#M43455</link>
      <description>Hi All,&lt;BR /&gt;&lt;BR /&gt;A while ago I asked how I could dynamically change identifiers (granted with ATTRIB=DYNAMIC) in a program written in C (thread: &lt;A href="http://forums12.itrc.hp.com/service/forums/questionanswer.do?threadId=1193355)." target="_blank"&gt;http://forums12.itrc.hp.com/service/forums/questionanswer.do?threadId=1193355).&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;I decided to create an UWSS for it, with a different solution for on VAX (simply no disabling at login time; on VAX it's used only very incidentally :)&lt;BR /&gt;&lt;BR /&gt;Now my problem is, in this UWSS I make several system service calls (SYS$GETJPIW, SYS$FIND_HOLDER, SYS$ASCTOID, SYS$GRANTID and SYS$REVOKID), but this results in:&lt;BR /&gt;&lt;BR /&gt;%DCL-W-ACTIMAGE, error activating image SECURESHRP&lt;BR /&gt;-CLI-E-IMGNAME, image file $1$DGA1:[SYS2.SYSCOMMON.][SYSLIB]SECURESHRP.EXE&lt;BR /&gt;-SYSTEM-F-NOSHRIMG, privileged shareable image cannot have outbound calls&lt;BR /&gt;&lt;BR /&gt;I can do without the SYS$ASCTOID, but the others happen to provide the main functionality of my service :-S&lt;BR /&gt;&lt;BR /&gt;Is my approach an option at all, or am I doing something really stupid? Perhaps something in between....&lt;BR /&gt;&lt;BR /&gt;Thnx in advance,&lt;BR /&gt;Oscar</description>
      <pubDate>Tue, 11 Mar 2008 15:10:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/system-services-in-an-uwss/m-p/4159360#M43455</guid>
      <dc:creator>Oscar van Eijk</dc:creator>
      <dc:date>2008-03-11T15:10:56Z</dc:date>
    </item>
    <item>
      <title>Re: System services in an UWSS</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/system-services-in-an-uwss/m-p/4159361#M43456</link>
      <description>A UWSS is, like its name says, a system service and thus it runs in kernel mode. So there are restrictions, like calling an external image like secureshrp that contains some services like the ones you are calling.&lt;BR /&gt;&lt;BR /&gt;Why a UWSS? This is something I would use from a sharable image instead.&lt;BR /&gt;&lt;BR /&gt;Jur.&lt;BR /&gt;</description>
      <pubDate>Tue, 11 Mar 2008 20:25:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/system-services-in-an-uwss/m-p/4159361#M43456</guid>
      <dc:creator>Jur van der Burg</dc:creator>
      <dc:date>2008-03-11T20:25:02Z</dc:date>
    </item>
    <item>
      <title>Re: System services in an UWSS</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/system-services-in-an-uwss/m-p/4159362#M43457</link>
      <description>Personally, I don't see and [K]ernel in U.W.S.S.&lt;BR /&gt;&lt;BR /&gt;If you're creating an Exec mode UWSS then it executes in Exec mode.&lt;BR /&gt;&lt;BR /&gt;"Simply" drop the /protect on the link and you're away. Obviously you can't create a Kernel mode UWSS and ask it to use RMS, and for definitions of "simply" you should search this (sadly edited) forum and comp.os.vms. Here's one example: -&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://groups.google.com/group/comp.os.vms/msg/0b254f1816eb5ca5" target="_blank"&gt;http://groups.google.com/group/comp.os.vms/msg/0b254f1816eb5ca5&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Cheers Richard Maher</description>
      <pubDate>Tue, 11 Mar 2008 21:01:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/system-services-in-an-uwss/m-p/4159362#M43457</guid>
      <dc:creator>Richard J Maher</dc:creator>
      <dc:date>2008-03-11T21:01:56Z</dc:date>
    </item>
    <item>
      <title>Re: System services in an UWSS</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/system-services-in-an-uwss/m-p/4159363#M43458</link>
      <description>The UWSS privileged shareable image construct is fairly weak as OpenVMS programming mechanisms go and something that probably didn't work out nearly as well as its designers had intended, and it can have its own specific risks.  I prefer to avoid it.  &lt;BR /&gt;&lt;BR /&gt;There are a few folks around that find the UWSS interface valuable and that do use it, and find it valuable.  I've encountered far too much pain with it to use it (lightly), though I have used it on a very few occasions.  There are often better solutions.&lt;BR /&gt;&lt;BR /&gt;The easiest here is probably to install the main image with the requisite privileges.&lt;BR /&gt;&lt;BR /&gt;Somewhat different, but entirely functional, is to implement and use a subsystem identifier.  This allows the application to grant an identifier, which can then be used to control access (directly, or possibly paired with another identifier) using an ACL on the target file(s) or other of the target objects.&lt;BR /&gt;&lt;BR /&gt;Or launch an installed image as a subprocess and pass over or command.  Or use DECnet task-to-task to launch a server process...  In either case, the installed (executable) can call&lt;BR /&gt;&lt;BR /&gt;If you do want to use the UWSS construction, absolutely everything involved in the outbound call must be installed protected or you'll get the NOSHRIMG message.  And what you're calling needs to work correctly from inner-mode environments.&lt;BR /&gt;&lt;BR /&gt;Part of the inherent "fun" of creating and maintaining and securing a UWSS is that a UWSS is privileged-mode code; the code is fully privileged because it is executing in an executive or kernel-mode environment, not because the code has privileges.  And inner-mode code has its coding requirements, lest a security hole be created.  It's this that is at the core of the NOSHRIMG check.&lt;BR /&gt;&lt;BR /&gt;Poke around on the 'net NOSHRIMG topics and you should easily find some of my previous postings on this topic.  Caution: you will encounter various (and potentially NSFW) responses to some my previous postings on this topic.&lt;BR /&gt;&lt;BR /&gt;Stephen Hoffman&lt;BR /&gt;HoffmanLabs LLC.</description>
      <pubDate>Tue, 11 Mar 2008 21:02:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/system-services-in-an-uwss/m-p/4159363#M43458</guid>
      <dc:creator>Hoff</dc:creator>
      <dc:date>2008-03-11T21:02:12Z</dc:date>
    </item>
    <item>
      <title>Re: System services in an UWSS</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/system-services-in-an-uwss/m-p/4159364#M43459</link>
      <description>Oscar,&lt;BR /&gt;&lt;BR /&gt;  You can call system services from a UWSS. The trouble here is some of the routines you're trying to call aren't "real" system services! SECURESHRP is effectively another UWSS containing routines:&lt;BR /&gt;&lt;BR /&gt;SYS$$SHOW_LOGICAL_NAMES&lt;BR /&gt;SYS$$SEND_SECSRV_MESSAGE&lt;BR /&gt;SYS$FINISH_UAI&lt;BR /&gt;SYS$CREATE_USER_PROFILE&lt;BR /&gt;SYS$SETUAI&lt;BR /&gt;SYS$GETUAI&lt;BR /&gt;SYS$CHECK_ACCESS&lt;BR /&gt;SYS$CHANGE_CLASS&lt;BR /&gt;SYS$REM_IDENT&lt;BR /&gt;SYS$REM_HOLDER&lt;BR /&gt;SYS$MOD_IDENT&lt;BR /&gt;SYS$MOD_HOLDER&lt;BR /&gt;SYS$FIND_HOLDER&lt;BR /&gt;SYS$FIND_HELD&lt;BR /&gt;SYS$CREATE_RDB&lt;BR /&gt;SYS$ADD_IDENT&lt;BR /&gt;SYS$ADD_HOLDER&lt;BR /&gt;&lt;BR /&gt;So, it's $FIND_HOLDER that's causing you trouble. &lt;BR /&gt;&lt;BR /&gt;If you want to persue the UWSS path, try hard coding a test case for whatever $FIND_HOLDER is doing for you and see if everything else works. Maybe you can make assumptions to skip that step? Otherwise, get hold of the sources and see what it's doing to see if you can reimplement it (more than likely it has to do with privileged access to SYSUAF).</description>
      <pubDate>Tue, 11 Mar 2008 23:29:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/system-services-in-an-uwss/m-p/4159364#M43459</guid>
      <dc:creator>John Gillings</dc:creator>
      <dc:date>2008-03-11T23:29:52Z</dc:date>
    </item>
    <item>
      <title>Re: System services in an UWSS</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/system-services-in-an-uwss/m-p/4159365#M43460</link>
      <description>Thanks for your answers!&lt;BR /&gt;Some of the suggestions where also given in the thread I referred to; for now I don't see an other practical solution.&lt;BR /&gt;&lt;BR /&gt;But in the service I wrote was simply too much code (I tried it all in one module); moving everything (but the $GRANTID an $REVOKID) to a seperate module which is part of the main program, seems to do the trick!&lt;BR /&gt;&lt;BR /&gt;Oscar</description>
      <pubDate>Wed, 12 Mar 2008 14:22:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/system-services-in-an-uwss/m-p/4159365#M43460</guid>
      <dc:creator>Oscar van Eijk</dc:creator>
      <dc:date>2008-03-12T14:22:18Z</dc:date>
    </item>
    <item>
      <title>Re: System services in an UWSS</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/system-services-in-an-uwss/m-p/4159366#M43461</link>
      <description>Oscar,&lt;BR /&gt;&lt;BR /&gt;&amp;gt;  moving everything (but the $GRANTID an &lt;BR /&gt;&amp;gt;$REVOKID) to a seperate module which is &lt;BR /&gt;&amp;gt;part of the main program, seems to do the &lt;BR /&gt;&amp;gt;trick!&lt;BR /&gt;&lt;BR /&gt;  That's a fairly general principle when writing privileged code - do as little as possible inside the privileged part.&lt;BR /&gt;&lt;BR /&gt;  Look in SYS$SHARE and you'll see several pairs of shareable images, for example SECURESHR &amp;amp; SECURESHRP, MAILSHR &amp;amp; MAILSHRP  The "P" image contains the privileged operations, the other image is the public interface, and all the non-privileged code.&lt;BR /&gt;&lt;BR /&gt;Have your outer layer do all the legwork, build some kind of data structure to describe what needs to be done (for example, an item list), then dispatch it to the privileged code to the the actual work. You'll still need to do the security checks in the lower layer, but things like translations are already done.</description>
      <pubDate>Sun, 16 Mar 2008 22:03:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/system-services-in-an-uwss/m-p/4159366#M43461</guid>
      <dc:creator>John Gillings</dc:creator>
      <dc:date>2008-03-16T22:03:07Z</dc:date>
    </item>
    <item>
      <title>Re: System services in an UWSS</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/system-services-in-an-uwss/m-p/4159367#M43462</link>
      <description>Marvellous!&lt;BR /&gt;&lt;BR /&gt;If I understand you correctly, you've  written a System Service that takes any identifier and grants it to the process. (Maybe you even ask for a PID as well?)&lt;BR /&gt;&lt;BR /&gt;Sounds delighful. Please let me know what it's called so I can keep an eye out for it.&lt;BR /&gt;&lt;BR /&gt;When you're told "not to call out from inner-mode" the alternative is *not* to "do it in user-mode instead" but rather to duplicate the code for the callout routine in-line in the UWSS. Eg: If you don't think it's safe to call $getuai then you must open SYSUAF yourself in Exec-Mode and do your own retrieval in the UWSS and *not* ask some insecure user-mode code and/or memory to be the custodian of your data/parameters.&lt;BR /&gt;&lt;BR /&gt;Once again, for your requirements, I'd suggest dropping the /PROTECT and /NOSYSSHR from the link command, but seeing as how you are using C (a language that is ill-suited to UWSSs) you can never be sure just which RTLs the compiler will call out to.&lt;BR /&gt;&lt;BR /&gt;Regards Richard Maher&lt;BR /&gt;&lt;BR /&gt;PS. When looking fo advice I suggest it might help to ask for advice and example from people who've actually written UWSSs.</description>
      <pubDate>Mon, 17 Mar 2008 22:16:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/system-services-in-an-uwss/m-p/4159367#M43462</guid>
      <dc:creator>Richard J Maher</dc:creator>
      <dc:date>2008-03-17T22:16:33Z</dc:date>
    </item>
  </channel>
</rss>

