#include <unistd.h>
#include <errno.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/param.h>
#include <sys/resource.h>
#include <sys/socket.h>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/uio.h>
#include <sys/un.h>
#include <sys/wait.h>
#include <time.h>
#include <bstrlib.h>
#include <pwd.h>
#include <grp.h>
#include <atalk/util.h>
#include <atalk/logger.h>
#include <atalk/cnid_bdb_private.h>
#include <atalk/compat.h>
#include <atalk/errchk.h>
#include <atalk/iniparser_util.h>
#include <atalk/netatalk_conf.h>
#include <atalk/volume.h>
#include "usockfd.h"
Data Structures | |
struct | server |
Macros | |
#define | WEXITSTATUS(stat_val) |
#define | WIFEXITED(stat_val) |
#define | WIFSTOPPED(status) |
#define | WIFSIGNALED(status) |
#define | WTERMSIG(status) |
#define | SWITCH_TO_GID(gid) |
#define | SWITCH_TO_UID(uid) |
#define | DBHOME ".AppleDB" |
#define | DBHOMELEN 8 |
#define | MAXSPAWN 3 |
#define | TESTTIME 10 |
#define | MAXVOLS 4096 |
#define | DEFAULTHOST "localhost" |
#define | DEFAULTPORT "4700" |
Functions | |
static void | daemon_exit (int i) |
static void | sig_handler (int sig) |
static struct server * | test_usockfn (const char *path) |
int | maybe_start_dbd (const AFPObj *obj, char *dbdpn, const char *volpath, const char *username) |
static int | set_dbdir (const char *dbdir, const char *vpath) |
static void | catch_child (int sig _U_) |
static void | set_signal (void) |
static int | setlimits (void) |
static uid_t | uid_from_name (const char *name) |
int | main (int argc, char *argv[]) |
Variables | |
static int | srvfd |
static int | rqstfd |
static volatile sig_atomic_t | sigchild = 0 |
static uint | maxvol |
static struct server | srv [MAXVOLS] |
#define DBHOME ".AppleDB" |
#define DBHOMELEN 8 |
#define DEFAULTHOST "localhost" |
#define DEFAULTPORT "4700" |
#define MAXSPAWN 3 |
#define MAXVOLS 4096 |
#define SWITCH_TO_GID | ( | gid | ) |
#define SWITCH_TO_UID | ( | uid | ) |
#define TESTTIME 10 |
#define WEXITSTATUS | ( | stat_val | ) |
#define WIFEXITED | ( | stat_val | ) |
#define WIFSIGNALED | ( | status | ) |
|
static |
|
static |
int main | ( | int argc | , |
char * | argv[] ) |
int maybe_start_dbd | ( | const AFPObj * | obj, |
char * | dbdpn, | ||
const char * | volpath, | ||
const char * | username ) |
Pass connection request to existing cnid_dbd process or start a new one
[in] | obj | handle |
[in] | dbdpn | Path to cnid_dbd binary |
[in] | volpath | Path of AFP volume |
[in] | username | Optional username, may be NULL |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |