HP OpenVMS Systemsask the wizard |
The Question is: Wizard - I'm using OpenVMS 7.2-1 (don't think that matters much however)... The command: $ DEFINE FOO BAR creates a logical in my process name table at supervisor mode. I just wrote a program that calls SYS$CRELNM. My program specified LNM$PROCESS for the logical name table, "FOO" for the logical, PSL$C_SUPER for the access mode, and the item list defined the equivalence string as "BAR." I ran my program many times and e ach time the call to SYS$CRELNM returned SS$_NORMAL - yet when I issued a SHOW LOG/PROC after running the program I did not see my "FOO" logical. Then I noticed that if I issue a SET PROC/PRIV=SYSNAM before running my program my "FOO" logical shows up in the process name table after I run my program. To make a long story short after calming down a bit it did dawn on me that yes - the fine manual does say that the access mode argument is maximized with the access mode of the caller (and yes - I was executing in user mode). Oh great wizard (yes I know the SET command is installed with privilege); however, if from DCL I can create a supervisor mode logical in my process name table (I logical which lest I am forgetting something can not affect anyone or anything on the system other than me) why is it that SYS$CRELNM chooses to create my "FOO" logical at user mode in my process name table? The Answer is : OpenVMS System Services will perform the requested task directly, and generally do not provide additional capabilities nor privileges, nor variable length argument lists, nor dynamic string descriptor support, etc. When the sys$crelnm system service is invoked in user-mode code, the system service can and will only define a user-mode logical name for a non-privileged user. It is possible to define a supervisor mode logical name from user-mode code using the RTL routine lib$set_logical. This RTL routine is the callable equivalent of the DCL command DEFINE. If you wish to use the system service to define a supervisor-mode logical name, you must be in supervisor-mode or more privileged code, or you must possess additional privileges.
|