#include <errno.h>#include <grp.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <sys/param.h>#include <sys/types.h>#include <sys/wait.h>#include <unistd.h>#include <atalk/logger.h>#include <atalk/util.h>Macros | |
| #define | USE_SETEUID 1 |
Functions | |
| static int | setup_out_fd (void) |
| static void | gain_root_privilege (void) |
| Gain root privilege before doing something. | |
| static void | gain_root_group_privilege (void) |
| Ensure our real and effective groups are zero. | |
| static int | become_user_permanently (uid_t uid, gid_t gid) |
| Become the specified uid and gid - permanently ! | |
| int | afprun (char *cmd, int *outfd) |
| run a command | |
| int | afprun_bg (char *cmd) |
| Run a command in the background without waiting. | |
| #define USE_SETEUID 1 |
| int afprun | ( | char * | cmd, |
| int * | outfd ) |
run a command
| int afprun_bg | ( | char * | cmd | ) |
Run a command in the background without waiting.
|
static |
Become the specified uid and gid - permanently !
|
static |
Ensure our real and effective groups are zero.
|
static |
Gain root privilege before doing something.
|
static |
This is a utility function of afprun().