Gets the security information that is associated with a process.
Standard C library (libc.a)
The sec_getpsecsubroutine gets the security attributes structure for the process that is specified by the pid parameter. If the value of the pid parameter is negative, the information structure of the calling process is retrieved. The credp parameter, which is a pointer to an secattr_t structure, specifies a buffer holding the security attributes structure to be returned.
Item | Description |
---|---|
pid | Specifies the process whose security attributes is to be returned. |
credp | Points to the security attribute structure. |
Item | Description |
---|---|
0 | Successful |
-1 | Unsuccessful |
Item | Description |
---|---|
EINVAL | The value of the credp parameter is NULL or not valid. |
ESRCH | No process has a process ID equal to the value of the pid parameter. |
EPERM | The calling process does not have permissions or privileges. |
EFAULT | The address that the credp parameter points to is not valid. |