OpenDNSSEC-signer
1.4.3
|
Go to the source code of this file.
Functions | |
gid_t | privgid (const char *groupname) |
uid_t | privuid (const char *username) |
ods_status | privdrop (const char *username, const char *groupname, const char *newroot, uid_t *puid, gid_t *pgid) |
void | privclose (const char *username, const char *groupname) |
void privclose | ( | const char * | username, |
const char * | groupname | ||
) |
Close privdrop.
[in] | username | username |
[in] | groupname | group name |
Close privdrop.
Definition at line 314 of file privdrop.c.
ods_status privdrop | ( | const char * | username, |
const char * | groupname, | ||
const char * | newroot, | ||
uid_t * | puid, | ||
gid_t * | pgid | ||
) |
Drop privileges.
[in] | username | drop priviliges to this user |
[in] | groupname | drop priviliges to this group |
[in] | newroot | make this the new root directory |
[out] | puid | user id |
[out] | pgid | group id |
Drop privileges.
Definition at line 157 of file privdrop.c.
References ods_log_debug(), ods_log_error(), ODS_STATUS_CHROOT_ERR, ODS_STATUS_MALLOC_ERR, ODS_STATUS_OK, ODS_STATUS_PRIVDROP_ERR, privgid(), and privuid().
gid_t privgid | ( | const char * | groupname | ) |
Privileges. Get the group identifier from a group name.
[in] | groupname | group name |
Get the group identifier from the group name.
Definition at line 114 of file privdrop.c.
References _SC_GETGR_R_SIZE_MAX, and ods_log_error().
Referenced by privdrop().
uid_t privuid | ( | const char * | username | ) |
Get the user identifier from a username.
[in] | username | username |
Get the user identifier from the username.
Definition at line 71 of file privdrop.c.
References _SC_GETPW_R_SIZE_MAX, and ods_log_error().
Referenced by privdrop().