OpenDNSSEC-signer 1.2.1
|
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <syslog.h>
#include <stdarg.h>
#include <errno.h>
#include <pwd.h>
#include <grp.h>
#include <ctype.h>
#include <sys/types.h>
#include "config.h"
#include "util/log.h"
#include "util/privdrop.h"
#include "util/se_malloc.h"
Go to the source code of this file.
Defines | |
#define | _GNU_SOURCE |
#define | _SC_GETPW_R_SIZE_MAX 16384 |
#define | _SC_GETGR_R_SIZE_MAX 16384 |
Functions | |
uid_t | privuid (const char *username) |
gid_t | privgid (const char *groupname) |
int | privdrop (const char *username, const char *groupname, const char *newroot) |
#define _GNU_SOURCE |
Privileges.
Definition at line 36 of file privdrop.c.
#define _SC_GETGR_R_SIZE_MAX 16384 |
Definition at line 61 of file privdrop.c.
Referenced by privgid().
#define _SC_GETPW_R_SIZE_MAX 16384 |
Definition at line 57 of file privdrop.c.
Referenced by privuid().
int privdrop | ( | const char * | username, |
const char * | groupname, | ||
const char * | newroot | ||
) |
Drop privileges.
Definition at line 148 of file privdrop.c.
References privgid(), privuid(), se_free(), se_log_debug(), se_log_error(), and se_malloc().
Referenced by tools_zone_fetcher().
gid_t privgid | ( | const char * | groupname | ) |
Get the group identifier from the group name.
Definition at line 109 of file privdrop.c.
References _SC_GETGR_R_SIZE_MAX, se_calloc(), and se_free().
Referenced by privdrop().
uid_t privuid | ( | const char * | username | ) |
Get the user identifier from the username.
Definition at line 70 of file privdrop.c.
References _SC_GETPW_R_SIZE_MAX, se_calloc(), and se_free().
Referenced by privdrop().