addssys Subroutine
Purpose
Adds the SRCsubsys record to the subsystem object class.
Library
System Resource Controller Library (libsrc.a)
Syntax
#include <sys/srcobj.h>
#include <spc.h>
struct SRCsubsys *SRCSubsystem;
Description
The addssys subroutine adds a record to the subsystem object class. You must call the defssys subroutine to initialize the SRCSubsystem buffer before your application program uses the SRCsubsys structure. The SRCsubsys structure is defined in the /usr/include/sys/srcobj.h file.
The executable running with this subroutine must be running with the group system.
Parameters
Item | Description |
---|---|
SRCSubsystem | A pointer to the SRCsubsys structure. |
Return Values
Upon successful completion, the addssys subroutine returns a value of 0. Otherwise, it returns a value of -1 and the odmerrno variable is set to indicate the error, or an SRC error code is returned.
Error Codes
The addssys subroutine fails if one or more of the following are true:
Item | Description |
---|---|
SRC_BADFSIG | Invalid stop force signal. |
SRC_BADNSIG | Invalid stop normal signal. |
SRC_CMDARG2BIG | Command arguments too long. |
SRC_GRPNAM2BIG | Group name too long. |
SRC_NOCONTACT | Contact not signal, sockets, or message queue. |
SRC_NONAME | No subsystem name specified. |
SRC_NOPATH | No subsystem path specified. |
SRC_PATH2BIG | Subsystem path too long. |
SRC_STDERR2BIG | stderr path too long. |
SRC_STDIN2BIG | stdin path too long. |
SRC_STDOUT2BIG | stdout path too long. |
SRC_SUBEXIST | New subsystem name already on file. |
SRC_SUBSYS2BIG | Subsystem name too long. |
SRC_SYNEXIST | New subsystem synonym name already on file. |
SRC_SYN2BIG | Synonym name too long. |
Security
Privilege Control: This command has the Trusted Path attribute. It has the following kernel privilege:
Item | Description |
---|---|
SET_PROC_AUDIT | |
Files Accessed: |
Mode | File |
---|---|
644 | /etc/objrepos/SRCsubsys |
Auditing Events: |
If the auditing subsystem has been properly configured and is enabled, the addssys subroutine generates the following audit record (event) each time the subroutine is executed:
Event | Information |
---|---|
SRC_addssys | Lists the SRCsubsys records added. |
Files
Item | Description |
---|---|
/etc/objrepos/SRCsubsys | SRC Subsystem Configuration object class. |
/dev/SRC | Specifies the AF_UNIX socket file. |
/dev/.SRC-unix | Specifies the location for temporary socket files. |
/usr/include/spc.h | Defines external interfaces provided by the SRC subroutines. |
/usr/include/sys/srcobj.h | Defines object structures used by the SRC. |