forked from allspace/eunfs3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
daemon.h
49 lines (39 loc) · 1.04 KB
/
daemon.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
* UNFS3 server framework
* (C) 2004, Pascal Schmidt
* see file LICENSE for license details
*/
#ifndef UNFS3_DAEMON_H
#define UNFS3_DAEMON_H
#include "nfs.h"
/* exit status for internal errors */
#define CRISIS 99
/* HP-UX does not have seteuid() and setegid() */
#if HAVE_SETEUID == 0 && HAVE_SETRESUID == 1
#define seteuid(u) setresuid(-1, u, -1)
#endif
#if HAVE_SETEGID == 0 && HAVE_SETRESGID == 1
#define setegid(g) setresgid(-1, g, -1)
#endif
/* error handling */
void daemon_exit(int);
void logmsg(int, const char *, ...);
/* remote address */
struct in_addr get_remote(struct svc_req *);
short get_port(struct svc_req *);
int get_socket_type(struct svc_req *rqstp);
/* write verifier */
extern writeverf3 wverf;
void regenerate_write_verifier(void);
/* readdir cookie */
extern cookie3 rcookie;
void change_readdir_cookie(void);
/* options */
extern int opt_detach;
extern char *opt_exports;
extern int opt_cluster;
extern char *opt_cluster_path;
extern int opt_singleuser;
extern int opt_brute_force;
extern int opt_readable_executables;
#endif