[go: up one dir, main page]

File: wrapfunc.inp

package info (click to toggle)
fakechroot 0.6%2B1.2.4
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 348 kB
  • ctags: 336
  • sloc: ansic: 2,730; sh: 245; perl: 80; makefile: 56
file content (134 lines) | stat: -rw-r--r-- 7,301 bytes parent folder | download
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
/* This file lists the functions that are wrapped by libtricks, their     */ 
/* arguments, and the way to call them. This is then used to generate	  */ 
/* the wrapper functions declarations in wrapped.h, the wrapper functions */ 
/* definitions wrapdef.h (actually, only assignments of the function 	  */ 
/* variables), the structure of wraped functions in wrapstruct.h,	  */ 
/* and the temporary definitions (that hold until one of them is executed)*/ 
/* in wraptmpf.h                                                          */ 
/**/                                                                      */
/**/									  */
/* each line of this file lists 4 fields, seperated by a ";".		  */
/* The first field is the name of the wrapped function, then it's return  */
/* value. After that come the function arguments with types, and the last */
/* field contains the function arguments without types.                   */
/**/
open;int;(const char *pathname, int flags, int mode);(pathname, flags, mode)
fopen;FILE *;(const char *pathname, const char *mode);(pathname, mode)
freopen;FILE *;(const char *pathname, const char *mode, FILE *stream);(pathname, mode, stream)

/* __*xstat are used on glibc systems instead of just *xstat. */
/**/

WRAP_LSTAT;int;LSTAT_ARG(int ver, const char *file_name, struct stat *buf);LSTAT_ARG(ver, file_name, buf);LSTAT
WRAP_STAT;int;STAT_ARG(int ver, const char *file_name, struct stat *buf);STAT_ARG(ver, file_name, buf);STAT
WRAP_FSTAT;int;FSTAT_ARG(int ver, int fd, struct stat *buf);FSTAT_ARG(ver, fd, buf);FSTAT

#ifdef STAT64_SUPPORT
WRAP_LSTAT64;int;LSTAT64_ARG(int ver, const char *file_name, struct stat64 *buf);LSTAT64_ARG(ver, file_name, buf);LSTAT64
WRAP_STAT64;int;STAT64_ARG(int ver, const char *file_name, struct stat64 *buf);STAT64_ARG(ver, file_name, buf);STAT64
WRAP_FSTAT64;int;FSTAT_ARG(int ver, int fd, struct stat64 *buf);FSTAT_ARG(ver, fd, buf);FSTAT64
#endif

WRAP_MKNOD;int;MKNOD_ARG(int ver, const char *pathname, mode_t mode, dev_t XMKNOD_FRTH_ARG dev);MKNOD_ARG(ver, pathname, mode, dev);MKNOD

/* opendir;DIR *;(const char *name);(name) */
/*closedir;int;(DIR *dir);(dir)*/
/*readdir;struct dirent *;(DIR *dir);(dir)*/
/*readlink;int;(const char *path, READLINK_BUF_TYPE *buf, READLINK_BUFSIZE_TYPE bufsize);(path, buf, bufsize)*/
/*telldir;off_t;(DIR *dir);(dir)*/

chown;int;(const char *path, uid_t owner, gid_t group);(path, owner, group)
lchown;int;(const char *path, uid_t owner, gid_t group);(path, owner, group)
fchown;int;(int fd, uid_t owner, gid_t group);(fd, owner, group)
chmod;int;(const char *path, mode_t mode);(path, mode)
fchmod;int;(int fd, mode_t mode);(fd, mode)
mkdir;int;(const char *path, mode_t mode);(path, mode)
unlink;int;(const char *pathname);(pathname)
rmdir;int;(const char *pathname);(pathname)
remove;int;(const char *pathname);(pathname)
rename;int;(const char *oldpath, const char *newpath);(oldpath, newpath)
/*__execve;int;(const char *path, char *const argv[], char *const envp[]);(path,argv,envp)*/
/*execve;int;(const char *path, char *const argv[], char *const envp[]);(path,argv,envp)*/

#ifdef FAKEROOT_FAKENET
fork;pid_t;(void);()
vfork;pid_t;(void);()
#endif /* FAKEROOT_FAKENET */

/* for fakeroot */

getuid;uid_t;(void);()
getgid;gid_t;(void);()
geteuid;uid_t;(void);()
getegid;gid_t;(void);()
setuid;int;(uid_t id);(id)
setgid;int;(gid_t id);(id)
seteuid;int;(uid_t id);(id)
setegid;int;(gid_t id);(id)
setreuid;int;(SETREUID_ARG ruid, SETREUID_ARG euid);(ruid, euid)
setregid;int;(SETREGID_ARG rgid, SETREGID_ARG egid);(rgid, egid)
#ifdef HAVE_GETRESUID
getresuid;int;(uid_t *ruid, uid_t *euid, uid_t *suid);(ruid, euid, suid)
#endif /* HAVE_GETRESUID */
#ifdef HAVE_GETRESGID
getresgid;int;(gid_t *rgid, gid_t *egid, gid_t *sgid);(rgid, egid, sgid)
#endif /* HAVE_GETRESGID */
#ifdef HAVE_SETRESUID
setresuid;int;(uid_t ruid, uid_t euid, uid_t suid);(ruid, euid, suid)
#endif /* HAVE_SETRESUID */
#ifdef HAVE_SETRESGID
setresgid;int;(gid_t rgid, gid_t egid, gid_t sgid);(rgid, egid, sgid)
#endif /* HAVE_SETRESGID */
#ifdef HAVE_SETFSUID
setfsuid;uid_t;(uid_t fsuid);(fsuid)
#endif /* HAVE_SETFSUID */
#ifdef HAVE_SETFSGID
setfsgid;gid_t;(gid_t fsgid);(fsgid)
#endif /* HAVE_SETFSGID */
initgroups;int;(const char *user, INITGROUPS_SECOND_ARG group);(user, group)
setgroups;int;(SETGROUPS_SIZE_TYPE size, const gid_t *list);(size, list)

/* for chroot */
readlink;int;(const char *path, READLINK_BUF_TYPE *buf, READLINK_BUFSIZE_TYPE bufsize);(path, buf, bufsize)
opendir;DIR *;(const char *name);(name)
chroot;int;(const char *path);(path)
chdir;int;(const char *path);(path)
getcwd;char *;(char *buf, size_t size);(buf, size)
getwd;char *;(char *buf);(buf)
get_current_dir_name;char *;(void);()
creat;int;(const char *pathname, mode_t mode);(pathname, mode)
open64;int;(const char *pathname, int flags, mode_t mode);(pathname, flags, mode)
creat64;int;(const char *pathname, mode_t mode);(pathname, mode)
utime;int;(const char *filename, const struct utimbuf *buf);(filename, buf)
utimes;int;(char *filename, struct timeval *tvp);(filename, tvp)
symlink;int;(const char *oldpath, const char *newpath);(oldpath, newpath)
link;int;(const char *oldpath, const char *newpath);(oldpath, newpath)
mktemp;char *;(char *template);(template)
mkstemp;int;(char *template);(template)
mkstemp64;int;(char *template);(template)
mkdtemp;char *;(char *template);(template)
tempnam;char *;(const char *dir, const char *pfx);(dir, pfx)
tmpnam;char *;(char *s);(s)
mkfifo;int;(const char *pathname, mode_t mode);(pathname, mode)
execv;int;(const char *path, char *const argv []);(path, argv)
execvp;int;(const char *file, char *const argv []);(file, argv)
execve;int;(const char *filename, char *const argv [], char *const envp[]);(filename, argv, envp)
execl;int;(const char *path, const char *arg, ...);(path, arg)
execlp;int;(const char *file, const char *arg, ...);(file, arg)
execle;int;(const char *path, const char *arg, ...);(path, arg)
access;int;(const char *pathname, int mode);(pathname, mode)
fopen64;FILE *;(const char *pathname, const char *mode);(pathname, mode)
freopen64;FILE *;(const char *pathname, const char *mode, FILE *stream);(pathname, mode, stream)
truncate;int;(const char *path, off_t length);(path, length)
truncate64;int;(const char *path, off64_t length);(path, length)
dlopen;void *;(const char *filename, int flag);(filename, flag)
__open;int;(const char *pathname, int flags, mode_t mode);(pathname, flags, mode)
__open64;int;(const char *pathname, int flags, mode_t mode);(pathname, flags, mode)
setxattr;int;(const char *path, const char *name, const void *value, size_t size, int flags);(path, name, value, size, flags)
lsetxattr;int;(const char *path, const char *name, const void *value, size_t size, int flags);(path, name, value, size, flags)
getxattr;ssize_t;(const char *path, const char *name, void *value, size_t size);(path, name, value, size)
lgetxattr;ssize_t;(const char *path, const char *name, void *value, size_t size);(path, name, value, size)
listxattr;ssize_t;(const char *path, char *list, size_t size);(path, list, size)
llistxattr;ssize_t;(const char *path, char *list, size_t size);(path, list, size)
removexattr;int;(const char *path, const char *name);(path, name)
lremovexattr;int;(const char *path, const char *name);(path, name)