For further information about these symbols, see the description of the clsnam argument.
OpenVMS usage: | char_string |
type: | character-coded text string |
access: | read only |
mechanism: | by descriptor--fixed-length string descriptor |
OpenVMS usage: | char_string |
type: | character-coded text string |
access: | read only |
mechanism: | by descriptor--fixed-length string descriptor |
OpenVMS usage: | item_list_3 |
type: | longword (unsigned) |
access: | read only |
mechanism: | by reference |
For each item code, you must include a set of four elements and end the list with a longword containing the value 0 (CHP$_END), as shown in the following diagram.
The following table defines the item descriptor fields.
Descriptor Field | Definition |
---|---|
Buffer length | A word containing a user-supplied integer specifying the length (in bytes) of the associated buffer. The length of the buffer needed depends upon the item code specified in the item code field of the item descriptor. If the value of buffer length is too small, the service truncates the data. |
Item code | A word containing a user-supplied symbolic code specifying the item of information in the associated buffer. |
Buffer address | A longword containing the user-supplied address of the buffer. |
Return length address | A longword containing the address of a word in which $CHECK_ACCESS writes the number of bytes written to the buffer pointed to by bufadr. If the buffer pointed to by bufadr is used to pass information to $CHECK_ACCESS, retlenadr is ignored but must be included. |
OpenVMS usage: | longword |
type: | longword (unsigned) |
access: | read-write |
mechanism: | by reference |
Using the contxt argument keeps the UAF open across all calls, thereby improving the performance of the system on subsequent calls. To close the UAF, you must run down the image.
The resulting contxt value from a $CHECK_ACCESS call can also be used as the input contxt argument to the $GETUAI system service, and vice versa.
OpenVMS usage: | char_string |
type: | character-coded text string |
access: | read only |
mechanism: | by descriptor |
CAPABILITY | QUEUE |
COMMON_EVENT_CLUSTER | RESOURCE_DOMAIN |
DEVICE | SECURITY_CLASS |
FILE | SYSTEM_GLOBAL_SECTION |
GROUP_GLOBAL_SECTION | VOLUME |
LOGICAL_NAME_TABLE |
OpenVMS usage: | char_string |
type: | opaque byte stream or object handle |
access: | read only |
mechanism: | by descriptor |
Object handles vary according to the associated security object class. Currently, the only supported object handles are for the file and device class objects where the object handle is a word or longword channel.
The objpro and objnam arguments are mutually exclusive unless the objpro argument is a simple object handle. The objpro and usrpro arguments are also mutually exclusive unless the objpro argument is an object handle.
OpenVMS usage: | char_string |
type: | opaque byte stream |
access: | read only |
mechanism: | by descriptor |
The $CREATE_USER_PROFILE service can be used to construct a user security profile. The usrpro and usrnam arguments are mutually exclusive. The objpro and usrpro arguments are also mutually exclusive unless the objpro argument is an object handle.
The item codes used with $CHECK_ACCESS are described in the following list and are defined in the $CHPDEF system macro library.
CHP$_ACCESS
A longword bit mask that represents the desired access ($ARMDEF). Only those bits set in CHP$_ACCESS are checked against the protection of the object to determine whether access is granted.The default for CHP$_ACCESS is read. Symbolic representations for the access types associated with the built-in protected classes are found in the $ARMDEF macro.
For example, ARM$M_MANAGE specifies Manage access for the queue class object. Access type names are object class specific and vary from class to class. Because $CHECK_ACCESS performs only a bitwise comparison of access desired to object protection, the original Read, Write, Execute, and Delete names can also be used to specify the first four access types for any object class.
The following table shows the access types available and lists their common interpretations. These symbols are defined in the $ARMDEF system macro library. For more information, see the OpenVMS Guide to System Security.
Access Type Access Permitted ARM$M_READ Allows holders to read an object, perform wildcard directory lookups, display jobs in a queue, or use an associated vector processor. ARM$M_WRITE Allows holders to alter the contents of an object, remove a directory entry, write or extend existing files on a volume, or submit a job to a queue. ARM$M_EXECUTE Allows holders to run an image or command procedure, perform exact directory lookups, issue physical I/O requests to a device, create new files on a volume, or act as operator for a queue. ARM$M_DELETE Allows holders to delete an object, perform logical I/O to a device, or delete a job in a queue. ARM$M_CONTROL Allows holders to display or alter the security characteristics of an object. CHP$_ACMODE
A byte that defines the accessor's processor access mode ($PSLDEF). The following access modes and their symbols are defined in the system macro library ($PSLDEF). Objects supported by the operating system do not consider access mode in determining object access.
Symbol Access Mode PSL$C_USER User PSL$C_SUPER Supervisor PSL$C_EXEC Executive PSL$C_KERNEL Kernel If CHP$_ACMODE is not specified, access mode is not used to determine access.
CHP$_ALARMNAME
Address of a buffer to receive the alarm name from any Alarm ACE contained in the object's ACL. Currently, if a matching Alarm ACE exists, the string SECURITY will be returned. The string returned by CHP$_ALARMNAME can be used as input to the $AUDIT_EVENT system service, using the NSA$_ALARM_NAME item code.CHP$_AUDIT_LIST
A list containing information to be added to any resulting security audit. The bufadr argument points to the beginning of an $AUDIT_EVENT item list. See the itmlst argument of the $AUDIT_EVENT system service for a list of valid security auditing item codes. Note that the NSA$_EVENT_TYPE and NSA$_EVENT_SUBTYPE items are ignored when auditing with $CHECK_ACCESS. The CHP$V_AUDIT flag must be specified.CHP$_AUDITNAME
Address of a buffer to receive the audit name from any Audit ACE contained in the object's ACL. Currently, if a matching Audit ACE exists, the string SECURITY will be returned. The string returned by CHP$_AUDITNAME can be used as input to the $AUDIT_EVENT system service, using the NSA$_AUDIT_NAME item code.CHP$_FLAG
A longword that controls various aspects of the protection check. The symbols in the following table are offsets to the bits within the longword. You can also obtain the values as masks with the appropriate bit set by using the prefix CHP$M rather than CHP$V. These symbols are defined in the system macro library ($CHPDEF).
Symbol Access CHP$V_ALTER Accessor desires write access to object. CHP$V_AUDIT Access audit requested. CHP$V_CREATE Perform the audit as an object creation event. CHP$V_DELETE Perform the audit as an object deletion event. CHP$V_FLUSH Force audit buffer flush. CHP$V_INTERNAL Audit on behalf of the Trusted Computing Base (TCB). Reserved to Digital. CHP$V_MANDATORY Force the object access event to be audited. CHP$V_NOFAILAUD Do not perform audits for failed access. CHP$V_NOSUCCAUD Do not perform audits for successful access. CHP$V_OBSERVE Accessor desires read access to object. CHP$V_SERVER Audit on behalf of a TCB server process. CHP$V_USEREADALL Accessor is eligible for READALL privilege. The default for CHP$_FLAG is CHP$V_OBSERVE.
The primary purpose of the CHP$V_OBSERVE and CHP$V_ALTER flags is as latent support for a mandatory (lattice) security policy, such as that provided by the Security Enhanced VMS (SEVMS) offering.
CHP$_MATCHEDACE
A variable-length data structure containing the first Identifier ACE in the ACL that granted or denied access to the object. The $FORMAT_ACL system service describes the format of an Identifier ACE.CHP$_PRIVUSED
A longword mask of flags that represent the privileges used to gain access.You can also obtain the values as masks with the appropriate bit set by using the prefix CHP$M rather than CHP$V. The symbols are defined in the system macro library ($CHPDEF). The following symbols are offsets to the bits within the longword.
Symbol Meaning CHP$V_SYSPRV SYSPRV was used to gain the requested access. CHP$V_GRPPRV GRPPRV was used to gain the requested access. CHP$V_BYPASS BYPASS was used to gain the requested access. CHP$V_READALL READALL was used to gain the requested access. CHP$V_OPER OPER was used to gain the requested access. CHP$V_GRPNAM GRPNAM was used to gain the requested access. CHP$V_SYSNAM SYSNAM was used to gain the requested access. CHP$V_GROUP GROUP was used to gain the requested access. CHP$V_WORLD WORLD was used to gain the requested access. CHP$V_PRMCEB PRMCEB was used to gain the requested access. CHP$V_UPGRADE UPGRADE was used to gain the requested access. CHP$V_DOWNGRADE DOWNGRADE was used to gain the requested access.
The Check Access service invokes the operating system control protection check mechanism, $CHKPRO, to determine whether a named user is allowed the described access to the named object. A file server, for example, might check the access attributes of a user who attempts to access a file (the object).If the user can access the object, $CHECK_ACCESS returns the SS$_NORMAL status code; otherwise, $CHECK_ACCESS returns SS$_NOPRIV.
The arguments accepted by this service specify the name and class of object being accessed, the name of the user requesting access to the object, the type of access desired, and the type of information to be returned.
The caller can also request that an object access audit be performed if security auditing has been enabled for the object class or if Audit ACEs are contained in the object's ACL. Auditing ACEs include both Alarm ACEs and Audit ACEs. The CHP$V_AUDIT flag requests an access audit. This requires that the caller be in executive or kernel mode or possess the AUDIT privilege.
Normally, $CHECK_ACCESS generates an object access audit when an audit is required. The caller can specify the CHP$V_CREATE flag to force an object creation audit instead of an object access audit. Similarly, the CHP$V_DELETE flag forces an object deletion audit. The CHP$_AUDIT_LIST item code can be used to specify additional information to be included in any resulting audit records.
With certain types of devices, $CHECK_ACCESS can return a false negative, but never a false positive. This is due to additional LOG_IO and PHY_IO privilege checking in the $QIO system service that might override an otherwise unsuccessful access attempt. These privilege checks are not mirrored by the $CHECK_ACCESS system service. The affected devices are those that are non-file-structured or mounted foreign and also either spooled, file-oriented, or shareable. For example, mailbox devices fall into this category because they are non-file-structured and shareable. To accurately duplicate the result that would be obtained if the user had issued a read or write against these devices, it might be necessary to test for these additional privileges using the $CHECK_PRIVILEGE system service. See the OpenVMS I/O User's Reference Manual for further information on access requirements for devices.
Required Access or Privileges
Access to SYSUAF.DAT and RIGHTSLIST.DAT is required. AUDIT privilege is required when requesting a user mode audit.
Required Quota
Related Services
$CHKPRO, $CREATE_USER_PROFILE, $FORMAT_ACL
SS$_NORMAL The service completed successfully; the desired access is granted. SS$_ACCVIO The item list cannot be read by the caller, one of the buffers specified in the item list cannot be written by the caller, or one of the arguments could not be read or written. SS$_BADPARAM Invalid or conflicting combination of parameters. SS$_INSFARG Insufficient information to identify object or user. SS$_INSFMEM Insufficient process memory to execute service. SS$_NOAUDIT Caller lacks privilege to request audit. SS$_NOCALLPRIV Caller lacks privilege to access authorization database. SS$_NOCLASS No matching object class was located. SS$_NOPRIV The desired access is not granted. SS$_UNSUPPORTED Operations on remote object are not supported.
If CHP$V_AUDIT is specified, any error from the $AUDIT_EVENT system service can also be returned.
On Alpha systems, indicates whether floating point is enabled for the current image.
SYS$CHECK_FEN
int sys$check_fen (void);
None.
The Check Floating Point service returns a Boolean value in R0 indicating whether floating point is enabled for the current image.The $CHECK_FEN service returns a value of 1 if the floating point is enabled for the current image. A value of 0 is returned if the floating point is disabled.
Required Access or Privileges
Required Quota
None
Determines whether the caller has the specified privileges or identifier. In addition to checking for a privilege or an identifier, $CHECK_PRIVILEGE determines if the caller's use of privilege needs to be audited.
SYS$CHECK_PRIVILEGE [efn] ,prvadr ,[altprv] ,[flags] ,[itmlst] ,[audsts] ,[astadr] ,[astprm]
int sys$check_privilege (unsigned int efn, struct _generic_64 *prvadr, struct _generic_64 *altprv, unsigned int flags, void *itmlst, unsigned int *audsts, void (*astadr)(__unknown_params), int astprm);
efn
OpenVMS usage: ef_number type: longword (unsigned) access: read only mechanism: by value
Number of the event flag to be set when the audit completes. The efn argument is a longword containing the number of the event flag; however, $CHECK_PRIVILEGE uses only the low-order byte. If efn is not specified, event flag 0 is used.Upon request initiation, $CHECK_PRIVILEGE clears the specified event flag.
prvadr
OpenVMS usage: mask_quadword type: quadword (unsigned) access: read only mechanism: by reference
The privilege or identifier to be checked. The prvadr argument is either the address of a quadword bit array, where each bit corresponds to a privilege, or the address of a quadword identifier.When the array lists privileges, each bit has a symbolic name. The $PRVDEF macro defines these names. You form the bit array by specifying the symbolic name of each desired privilege in a logical OR operation. See the $SETPRV system service for the symbolic name and description of each privilege.
If the caller passes an identifier, the caller must set the NSA$M_IDENTIFIER bit in the flags longword. The identifier structure is defined by the $KGBDEF macro. The identifier attributes (KGB$) are reserved for future use and should be set to 0.
altprv
OpenVMS usage: mask_quadword type: quadword (unsigned) access: read only mechanism: by reference
Alternate privilege mask to check against. The altprv argument is the address of a quadword privilege mask, where each bit corresponds to a privilege. This argument and the flags NSA$M_AUTHPRIV, NSA$M_IDENTIFIER, and NSA$M_PROCPRIV are mutually exclusive.With this argument, $CHECK_PRIVILEGE uses the supplied set of privileges instead of the current, active privileges. Each bit in the mask has a symbolic name, defined by the $PRVDEF macro. You form the bit array by specifying the symbolic name of each desired privilege in a logical OR operation. See the $SETPRV system service for the symbolic name and description of each privilege.
flags
OpenVMS usage: mask_longword type: longword (unsigned) access: read only mechanism: by value
Flags that specify options for the $CHECK_PRIVILEGE operation. The flags argument is a longword bit mask, where each bit corresponds to an option.Each flag option has a symbolic name. The $NSADEF macro defines the following symbolic names. Be aware that the flags NSA$M_AUTHPRIV, NSA$M_IDENTIFIER, and NSA$M_PROCPRIV are mutually exclusive; therefore, you can specify only one of these flag options.
Symbolic Name Description NSA$M_AUTHPRIV Checks the authorized privileges of the process instead of the current (active) privileges. NSA$M_FLUSH Specifies that all messages in the audit server buffer be written to the audit log file. NSA$M_IDENTIFIER Interprets the prvadr argument as the address of an identifier instead of a privilege mask. NSA$M_INTERNAL Specifies that the $CHECK_PRIVILEGE call originates in the context of a trusted computing base (TCB) component. The auditing components use this flag to indicate that internal auditing failures should result in a SECAUDTCB bugcheck. This flag is reserved to Digital. NSA$M_MANDATORY Specifies that an audit is to be performed, regardless of system alarm and audit settings. NSA$M_PROCPRIV Checks the permanent privileges of the process, instead of the privileges in the current (active) mask. NSA$M_SERVER Indicates that the call originates in a TCB server process and that the event should be audited regardless of the state of a process-specific no-audit bit. Trusted servers use this flag to override the no-audit bit when they want to perform explicit auditing on behalf of a client process. This flag is reserved to Digital.
itmlst
OpenVMS usage: item_list_3 type: longword (unsigned) access: read only mechanism: by reference
Item list specifying additional security auditing information to be included in any security audit that is generated by the service. The itmlst argument is the address of a list of item descriptors, each of which describes an item of information. The list of item descriptors is terminated by a longword of 0.The item list is a standard format item list. The following diagram depicts the format of a single item descriptor.
![]()
The following table defines the item descriptor fields.
Descriptor Field Definition Buffer length A word specifying the length of the buffer in bytes. The buffer supplies information to be used by $CHECK_PRIVILEGE. The required length of the buffer varies, depending on the item code specified; each item code description specifies the required length. Item code A word containing a symbolic code describing the nature of the information currently in the buffer or to be returned in the buffer. The location of the buffer is pointed to by the buffer address field. Each item code has a symbolic name. Buffer address A longword containing the address of the buffer that specifies or receives the information. Return length address Not currently used; this field is reserved to Digital. You should specify 0.
Previous | Next | Contents | [Home] | [Comments] | [Ordering info] | [Help]
![]()
4527P007.HTM OSSG Documentation 22-NOV-1996 12:58:51.77Copyright © Digital Equipment Corporation 1996. All Rights Reserved.