aboutsummaryrefslogtreecommitdiffstats
path: root/wrapfuncs.in
blob: 95bb8b9a2fb0ce10ef15b1bb999d3b65e74b2e10 (plain)
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
int open(const char *path, int flags, ...{mode_t mode}); /* flags=0 */
char *getcwd(char *buf, size_t size);
char *getwd(char *buf);
char *get_current_dir_name(void);
int close(int fd);
int link(const char *oldpath, const char *newpath); /* flags=AT_SYMLINK_NOFOLLOW */
int rename(const char *oldpath, const char *newpath); /* flags=AT_SYMLINK_NOFOLLOW */
int renameat(int olddirfd, const char *oldpath, int newdirfd, const char *newpath); /* flags=AT_SYMLINK_NOFOLLOW */
int unlink(const char *path); /* flags=AT_SYMLINK_NOFOLLOW */
int unlinkat(int dirfd, const char *path, int rflags); /* flags=AT_SYMLINK_NOFOLLOW */
int creat(const char *path, mode_t mode);
int __xstat(int ver, const char *path, struct stat *buf);
int __lxstat(int ver, const char *path, struct stat *buf); /* flags=AT_SYMLINK_NOFOLLOW */
int __fxstat(int ver, int fd, struct stat *buf);
int chmod(const char *path, mode_t mode);
int fchmod(int fd, mode_t mode);
int chown(const char *path, uid_t owner, gid_t group);
int fchown(int fd, uid_t owner, gid_t group);
int lchown(const char *path, uid_t owner, gid_t group); /* flags=AT_SYMLINK_NOFOLLOW */
int __fxstatat(int ver, int dirfd, const char *path, struct stat *buf, int flags);
int fchownat(int dirfd, const char *path, uid_t owner, gid_t group, int flags);
int fchmodat(int dirfd, const char *path, mode_t mode, int flags);
int openat(int dirfd, const char *path, int flags, ...{mode_t mode});
int __openat_2(int dirfd, const char *path, int flags);
int __xmknod(int ver, const char *path, mode_t mode, dev_t *dev); /* flags=AT_SYMLINK_NOFOLLOW */
int __xmknodat(int ver, int dirfd, const char *path, mode_t mode, dev_t *dev); /* flags=AT_SYMLINK_NOFOLLOW */
int dup2(int oldfd, int newfd);
int dup(int fd);
int mkdir(const char *path, mode_t mode); /* flags=AT_SYMLINK_NOFOLLOW */
int mkdirat(int dirfd, const char *path, mode_t mode); /* flags=AT_SYMLINK_NOFOLLOW */
int rmdir(const char *path); /* flags=AT_SYMLINK_NOFOLLOW */
int chdir(const char *path);
int fchdir(int dirfd);
int fcntl(int fd, int cmd, ...{struct flock *lock});
int fork(void);
int vfork(void);
# just so we know the inums of symlinks
int symlink(const char *oldname, const char *newpath); /* flags=AT_SYMLINK_NOFOLLOW */
int symlinkat(const char *oldname, int dirfd, const char *newpath); /* flags=AT_SYMLINK_NOFOLLOW */
# needed because glibc stdio does horrible things with inline asm syscalls
FILE *fopen(const char *path, const char *mode);
int fclose(FILE *fp);
FILE *freopen(const char *path, const char *mode, FILE *stream);
int mkstemp(char *template); /* flags=AT_SYMLINK_NOFOLLOW */
# I bet you never knew there were this many of these!
int setfsuid(uid_t fsuid);
int setfsgid(gid_t fsgid);
int seteuid(uid_t euid);
int setegid(gid_t egid);
uid_t getuid(void);
uid_t geteuid(void);
gid_t getgid(void);
gid_t getegid(void);
int setresuid(uid_t ruid, uid_t euid, uid_t suid);
int setresgid(gid_t rgid, gid_t egid, gid_t sgid);
int setuid(uid_t uid);
int setgid(gid_t gid);
int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid);
int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid);
int setreuid(uid_t ruid, uid_t euid);
int setregid(gid_t rgid, gid_t egid);
int setgroups(size_t size, const gid_t *list);
# primarily for use with chroot()
int chroot(const char *path);
ssize_t readlink(const char *path, char *buf, size_t bufsiz); /* flags=AT_SYMLINK_NOFOLLOW */
ssize_t readlinkat(int dirfd, const char *path, char *buf, size_t bufsiz); /* flags=AT_SYMLINK_NOFOLLOW */
int access(const char *path, int mode);
int acct(const char *path);
char *canonicalize_file_name(const char *filename);
int eaccess(const char *path, int mode);
int euidaccess(const char *path, int mode);
FTS *fts_open(char * const *path_argv, int options, int (*compar)(const FTSENT **, const FTSENT **));
int ftw(const char *path, int (*fn)(const char *, const struct stat *, int), int nopenfd);
int nftw(const char *path, int (*fn)(const char *, const struct stat *, int, struct FTW *), int nopenfd, int flag);
int glob(const char *pattern, int flags, int (*errfunc)(const char *, int), glob_t *pglob);
int lutimes(const char *path, const struct timeval *tv);
char *mkdtemp(char *template);
int mkfifo(const char *path, mode_t mode); /* flags=AT_SYMLINK_NOFOLLOW */
int mkfifoat(int dirfd, const char *path, mode_t mode); /* flags=AT_SYMLINK_NOFOLLOW */
char *mktemp(char *template);
long pathconf(const char *path, int name);
char *realpath(const char *name, char *resolved_name);
int remove(const char *path); /* flags=AT_SYMLINK_NOFOLLOW */
DIR *opendir(const char *path);
int scandir(const char *path, struct dirent ***namelist, int (*filter)(const struct dirent *), int (*compar)());
char *tempnam(const char *template, const char *pfx);
char *tmpnam(char *s);
int truncate(const char *path, off_t length);
int utime(const char *path, const struct utimbuf *buf);
int utimes(const char *path, const struct timeval *times);
int execve(const char *filename, char *const *argv, char *const *envp);
# for emulation of passwd utilities
struct passwd *getpwnam(const char *name);
struct passwd *getpwuid(uid_t uid);
int getpwnam_r(const char *name, struct passwd *pwbuf, char *buf, size_t buflen, struct passwd **pwbufp);
int getpwuid_r(uid_t uid, struct passwd *pwbuf, char *buf, size_t buflen, struct passwd **pwbufp);
int getpwent_r(struct passwd *pwbuf, char *buf, size_t buflen, struct passwd **pwbufp);
struct passwd *getpwent(void);
void setpwent(void);
void endpwent(void);
int lckpwdf(void);
int ulckpwdf(void);
int getpw(uid_t uid, char *buf);
struct group *getgrnam(const char *name);
struct group *getgrgid(gid_t gid);
int getgrnam_r(const char *name, struct group *gbuf, char *buf, size_t buflen, struct group **gbufp);
int getgrgid_r(gid_t gid, struct group *gbuf, char *buf, size_t buflen, struct group **gbufp);
struct group *getgrent(void);
int getgrent_r(struct group *gbuf, char *buf, size_t buflen, struct group **gbufp);
void setgrent(void);
void endgrent(void);
int getgrouplist(const char *user, gid_t group, gid_t *groups, int *ngroups);
int getgroups(int size, gid_t *list);
ssize_t getxattr(const char *path, const char *name, void *value, size_t size);
ssize_t lgetxattr(const char *path, const char *name, void *value, size_t size); /* flags=AT_SYMLINK_NOFOLLOW */