int open(const char *path, int flags, ...{mode_t mode}); 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); 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)(const void *, const void *)); 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);