$darkmode
Go to the source code of this file.
Macros | |
| #define | NETATALK_DIOSZ_STACK 65536 |
| #define | NETATALK_DIOSZ_HEAP (1024*1024) |
Functions | |
| int | netatalk_unlink (const char *name) |
| system unlink with afp error code. More... | |
| int | netatalk_unlinkat (int dirfd, const char *name) |
| int | statat (int dirfd, const char *path, struct stat *st) |
| stat/fsstatat multiplexer More... | |
| DIR * | opendirat (int dirfd, const char *path) |
| opendir wrapper for *at semantics support More... | |
| int | netatalk_rmdir (int dirfd, const char *name) |
| System rmdir with afp error code, but ENOENT is not an error. More... | |
| int | netatalk_rmdir_all_errors (int dirfd, const char *name) |
| system rmdir with afp error code. More... | |
| int | setfilmode (const struct vol *vol, const char *name, mode_t mode, struct stat *st) |
| int | dir_rx_set (mode_t mode) |
| int | unix_rename (int sfd, const char *oldpath, int dfd, const char *newpath) |
| This is equivalent of unix rename() More... | |
| int | copy_file (int sfd, const char *src, const char *dst, mode_t mode) |
| int | copy_file_fd (int sfd, int dfd) |
| int | copy_ea (const char *ea, int sfd, const char *src, const char *dst, mode_t mode) |
| Copy an EA from one file to another. More... | |
| void | become_root (void) |
| void | unbecome_root (void) |
| int | gmem (gid_t gid, int ngroups, gid_t *groups) |
| int | set_groups (AFPObj *obj, struct passwd *pwd) |
| const char * | print_groups (int ngroups, gid_t *groups) |
| #define NETATALK_DIOSZ_HEAP (1024*1024) |
| #define NETATALK_DIOSZ_STACK 65536 |
| void become_root | ( | void | ) |
seteuid(0) and back, if either fails and panic != 0 we PANIC. Nesting is tracked: only the outermost become_root() elevates privileges and only the matching unbecome_root() drops them.
| int copy_ea | ( | const char * | ea, |
| int | dirfd, | ||
| const char * | src, | ||
| const char * | dst, | ||
| mode_t | mode | ||
| ) |
Copy an EA from one file to another.
| int copy_file | ( | int | dirfd, |
| const char * | src, | ||
| const char * | dst, | ||
| mode_t | mode | ||
| ) |
Supports *at semantics, pass dirfd=-1 to ignore this
| int copy_file_fd | ( | int | sfd, |
| int | dfd | ||
| ) |
Copy all file data from one file fd to another
| int dir_rx_set | ( | mode_t | mode | ) |
| int gmem | ( | gid_t | gid, |
| int | ngroups, | ||
| gid_t * | groups | ||
| ) |
| int netatalk_rmdir | ( | int | dirfd, |
| const char * | name | ||
| ) |
System rmdir with afp error code, but ENOENT is not an error.
| int netatalk_rmdir_all_errors | ( | int | dirfd, |
| const char * | name | ||
| ) |
system rmdir with afp error code.
| int netatalk_unlink | ( | const char * | name | ) |
system unlink with afp error code.
| int netatalk_unlinkat | ( | int | dirfd, |
| const char * | name | ||
| ) |
at wrapper for netatalk_unlink
| DIR * opendirat | ( | int | dirfd, |
| const char * | path | ||
| ) |
opendir wrapper for *at semantics support
opendirat chdirs to dirfd if dirfd != -1 before calling opendir on path.
| [in] | dirfd | if != -1, chdir(dirfd) before opendir(path) |
| [in] | path | pathname |
| const char * print_groups | ( | int | ngroups, |
| gid_t * | groups | ||
| ) |
| int set_groups | ( | AFPObj * | obj, |
| struct passwd * | pwd | ||
| ) |
| int setfilmode | ( | const struct vol * | vol, |
| const char * | name, | ||
| mode_t | mode, | ||
| struct stat * | st | ||
| ) |
| int statat | ( | int | dirfd, |
| const char * | path, | ||
| struct stat * | st | ||
| ) |
stat/fsstatat multiplexer
statat mulitplexes stat and fstatat.
| [in] | dirfd | -1 gives AT_FDCWD |
| [in] | path | pathname |
| [in,out] | st | pointer to struct stat |
| void unbecome_root | ( | void | ) |
| int unix_rename | ( | int | sfd, |
| const char * | oldpath, | ||
| int | dfd, | ||
| const char * | newpath | ||
| ) |
This is equivalent of unix rename()
unix_rename mulitplexes rename and renameat.
| [in] | sfd | -1 gives AT_FDCWD |
| [in] | oldpath | guess what |
| [in] | dfd | same as sfd |
| [in] | newpath | guess what |