$ADD IDENT

From VSI OpenVMS Wiki
Revision as of 10:32, 8 June 2019 by Darya.zelenina (talk | contribs) (Created page with "'''$ADD_IDENT''' is a system service that Adds the specified identifier to the rights database. =Syntax= SYS$ADD_IDENT name ,[id] ,[attrib] ,[resid] C Pr...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

$ADD_IDENT is a system service that Adds the specified identifier to the rights database.

Syntax

SYS$ADD_IDENT name ,[id] ,[attrib] ,[resid]

C Prototype:

int sys$add_ident (void *name, unsigned int id, unsigned int attrib, unsigned int
                  *resid);

Arguments

name

OpenVMS usage: char-string
Type: character-coded text string
Access: read only
Mechanism: by descriptor–fixed-length string descriptor

Identifier name to be added to the rights database when $ADD_IDENT completes execution. The name argument is the address of a character-string descriptor pointing to the identifier name string. An identifier name consists of 1 to 31 alphanumeric characters, including dollar signs ( $ ) and underscores ( _ ), and must contain at least one nonnumeric character. Any lowercase characters specified are automatically converted to uppercase.

id

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

Identifier to be created when $ADD_IDENT completes execution. The id argument is a longword containing the binary value of the identifier to be created. If the id argument is omitted, $ADD_IDENT selects a unique available value from the general identifier space and returns it in resid, if it is specified.

attrib

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

Attributes placed in the identifier’s record when $ADD_IDENT completes execution. The attrib argument is a longword containing a bit mask that specifies the attributes. 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.

resid

OpenVMS usage: rights_id
Type: longword (unsigned)
Access: write only
Mechanism: by reference

Identifier value assigned by the system when $ADD_IDENT completes execution. The resid argument is the address of a longword in which the system-assigned identifier value is written.

Condition Values Returned

Value Description
SS$_NORMAL The service completed successfully.
SS$_ACCVIO The name argument cannot be read by the caller, or the resid argument cannot be written by the caller.
SS$_BADPARAM The specified attributes contain invalid attribute flags.
SS$_DUPIDENT The specified identifier already exists in the rights database.
SS$_DUPLNAM The specified identifier name already exists in the rights database.
SS$_INSFMEM The process dynamic memory is insufficient for opening the rights database.
SS$_IVIDENT The format of the specified identifier is invalid.
SS$_NORIGHTSDB The rights database does not exist.
RMS$_PRV The user does not have write access to the rights database.

Because the rights database is an indexed file accessed with OpenVMS RMS, this service can also return RMS status codes associated with operations on indexed files. For descriptions of these status codes, see the OpenVMS Record Management Services Reference Manual.

See also