1 | #ifndef SH_CALLS_H
|
---|
2 | #define SH_CALLS_H
|
---|
3 |
|
---|
4 | #define AUD_CHDIR (1UL << 0)
|
---|
5 | #define AUD_CHMOD (1UL << 1)
|
---|
6 | #define AUD_CHOWN (1UL << 2)
|
---|
7 | #define AUD_CREAT (1UL << 3)
|
---|
8 | #define AUD_DUP (1UL << 4)
|
---|
9 | #define AUD_EXEC (1UL << 5)
|
---|
10 | #define AUD_EXIT (1UL << 6)
|
---|
11 | #define AUD_FORK (1UL << 7)
|
---|
12 | #define AUD_KILL (1UL << 8)
|
---|
13 | #define AUD_LINK (1UL << 9)
|
---|
14 | #define AUD_MKDIR (1UL << 10)
|
---|
15 | #define AUD_MKFIFO (1UL << 11)
|
---|
16 | #define AUD_OPEN (1UL << 12)
|
---|
17 | #define AUD_PIPE (1UL << 13)
|
---|
18 | #define AUD_RENAME (1UL << 14)
|
---|
19 | #define AUD_RMDIR (1UL << 15)
|
---|
20 | #define AUD_SETGID (1UL << 16)
|
---|
21 | #define AUD_SETUID (1UL << 17)
|
---|
22 | #define AUD_UNLINK (1UL << 18)
|
---|
23 | #define AUD_UTIME (1UL << 19)
|
---|
24 |
|
---|
25 | #include <sys/types.h>
|
---|
26 | #include <sys/stat.h>
|
---|
27 | #include <sys/socket.h>
|
---|
28 | #include <signal.h>
|
---|
29 | #include <utime.h>
|
---|
30 |
|
---|
31 | /*@-fixedformalarray@*/
|
---|
32 |
|
---|
33 | #include "config_xor.h"
|
---|
34 | #if defined(__GNUC__) && (__GNUC__ >= 3)
|
---|
35 | #undef SH_GNUC_NORETURN
|
---|
36 | #define SH_GNUC_NORETURN __attribute__((noreturn))
|
---|
37 | #else
|
---|
38 | #undef SH_GNUC_NORETURN
|
---|
39 | #define SH_GNUC_NORETURN
|
---|
40 | #endif
|
---|
41 |
|
---|
42 |
|
---|
43 | /* Set aud functions
|
---|
44 | */
|
---|
45 | int sh_aud_set_functions(const char * str_s);
|
---|
46 |
|
---|
47 | #ifdef SH_IPVX_H
|
---|
48 | long int retry_accept(const char * file, int line,
|
---|
49 | int fd, struct sh_sockaddr *serv_addr, int * addrlen);
|
---|
50 | #endif
|
---|
51 |
|
---|
52 | void sh_calls_enable_sub();
|
---|
53 | int sh_calls_set_sub (const char * str);
|
---|
54 |
|
---|
55 | long int retry_stat (const char * file, int line,
|
---|
56 | const char *file_name, struct stat *buf);
|
---|
57 | long int retry_fstat(const char * file, int line,
|
---|
58 | int filed, struct stat *buf);
|
---|
59 | long int retry_lstat_ns(const char * file, int line,
|
---|
60 | const char *file_name, struct stat *buf);
|
---|
61 | long int retry_lstat(const char * file, int line,
|
---|
62 | const char *file_name, struct stat *buf);
|
---|
63 | long int retry_fcntl(const char * file, int line,
|
---|
64 | int fd, int cmd, long arg);
|
---|
65 |
|
---|
66 | long int retry_msleep (int sec, int millisec);
|
---|
67 |
|
---|
68 | long int retry_sigaction(const char * file, int line,
|
---|
69 | int signum, const struct sigaction *act,
|
---|
70 | struct sigaction *oldact);
|
---|
71 |
|
---|
72 | int sh_calls_set_bind_addr (const char *);
|
---|
73 | long int retry_connect(const char * file, int line,
|
---|
74 | int fd, struct sockaddr *serv_addr, int addrlen);
|
---|
75 |
|
---|
76 | long int retry_aud_dup2 (const char * file, int line, int fd, int fd2);
|
---|
77 | long int retry_aud_execve (const char * file, int line,
|
---|
78 | const char *dateiname, char *const argv[],
|
---|
79 | char *const envp[]);
|
---|
80 | long int retry_aud_dup (const char * file, int line,
|
---|
81 | int fd);
|
---|
82 | long int retry_aud_chdir (const char * file, int line,
|
---|
83 | const char *path);
|
---|
84 | long int retry_aud_unlink (const char * file, int line,
|
---|
85 | char * path);
|
---|
86 | long int retry_aud_utime (const char * file, int line,
|
---|
87 | char * path, struct utimbuf *buf);
|
---|
88 |
|
---|
89 | long int aud_open (const char * file, int line, int privs,
|
---|
90 | const char *pathname, int flags, mode_t mode);
|
---|
91 | long int aud_open_noatime (const char * file, int line, int privs,
|
---|
92 | const char *pathname, int flags, mode_t mode,
|
---|
93 | int * o_noatime);
|
---|
94 | /*@noreturn@*/
|
---|
95 | void aud_exit (const char * file, int line, int fd) SH_GNUC_NORETURN;
|
---|
96 | /*@noreturn@*/
|
---|
97 | void aud__exit (const char * file, int line, int fd) SH_GNUC_NORETURN;
|
---|
98 | pid_t aud_fork (const char * file, int line);
|
---|
99 | int aud_pipe (const char * file, int line, int modus[2]);
|
---|
100 | int aud_setuid (const char * file, int line, uid_t uid);
|
---|
101 | int aud_setgid (const char * file, int line, gid_t gid);
|
---|
102 | long int aud_kill (const char * file, int line, pid_t pid, int sig);
|
---|
103 |
|
---|
104 | #endif
|
---|