Difference between revisions of "$ADD HOLDER"

From VSI OpenVMS Wiki
Jump to: navigation, search
(Created page with "'''$ADD_HOLDER''' is a system service that registers the specified user as a holder of the specified identifier with the RIGHTSLIST.DAT|rig...")
 
m (added a link)
 
Line 122: Line 122:
 
* [[$REM_IDENT]]
 
* [[$REM_IDENT]]
 
* [[$REVOKID]]
 
* [[$REVOKID]]
 +
* [http://www.eight-cubed.com/examples/framework.php?file=sys_ident.c Example by James Duff]
  
 
[[Category:System Services]]
 
[[Category:System Services]]

Latest revision as of 07:17, 9 July 2019

$ADD_HOLDER is a system service that registers the specified user as a holder of the specified identifier with the rights database.

Syntax

SYS$ADD_HOLDER id ,holder ,[attrib]

C prototype:

int sys$add_holder (unsigned int id, struct _generic_64 *holder, unsigned int attrib);

Arguments

id

OpenVMS usage: rights_id
Type: longword (unsigned)
Access: read only
Mechanism: by value

Target identifier granted to the specified holder when $ADD_HOLDER completes execution. The id argument is a longword containing the binary value of the target identifier.

holder

OpenVMS usage: rights_holder
Type: quadword (unsigned)
Access: read only
Mechanism: by reference

Holder identifier that is granted access to the target identifier when $ADD_HOLDER completes execution. The holder argument is the address of a quadword data structure that consists of a longword containing the holder’s UIC identifier followed by a longword containing a value of 0.

attrib

OpenVMS usage: mask_longword
Type: longword (unsigned)
Access: read only
Mechanism: by value

Attributes to be placed in the holder record when $ADD_HOLDER completes execution. The attrib argument is a longword containing a bit mask specifying the attributes. A holder is granted a specified attribute only if the target identifier has the attribute. Symbol values are offsets to the bits within the longword. You can also obtain the values as masks with the appropriate bit set using the prefix KGB$M rather than KGB$V. The symbols are defined in the system macro library ($KGBDEF). The symbolic name for each bit position is listed in the following table:

Bit Position Meaning When Set
KGB$V_DYNAMIC Allows holders of the identifier to remove it from or add it to the process rights database by using the DCL command SET RIGHTS_LIST.
KGB$V_HOLDER_HIDDEN Prevents someone from getting a list of users who hold an identifier, unless they own the identifier themselves.
KGB$V_NAME_HIDDEN Allows holders of an identifier to have it translated—either from binary to ASCII or vice versa—but prevents unauthorized users from translating the identifier.
KGB$V_NOACCESS Makes any access rights of the identifier null and void. This attribute is intended as a modifier for a resource identifier or the Subsystem attribute.
KGB$V_RESOURCE Allows holders of an identifier to charge disk space to the identifier. It is used only for file objects.
KGB$V_SUBSYSTEM Allows holders of the identifier to create and maintain protected subsystems by assigning the Subsystem ACE to the application images in the subsystem.

Condition Values Returned

Value Description
SS$_NORMAL The service completed successfully.
SS$_ACCVIO The holder argument cannot be read by the caller.
SS$_BADPARAM The specified attributes contain invalid attribute flags.
SS$_DUPIDENT The specified holder already exists in the rights database for this identifier.

Privileges Required

Write access to the rights database is required.

See also