| /freebsd/usr.sbin/pw/ |
| H A D | cpdir.c | 39 copymkdir(int rootfd, char const *dir, int skelfd, mode_t mode, uid_t uid, in copymkdir() argument 56 if (mkdirat(rootfd, dir, mode) != 0) { in copymkdir() 63 if (fchmodat(rootfd, dir, mode & ~pumask, in copymkdir() 67 if (fchownat(rootfd, dir, uid, gid, AT_SYMLINK_NOFOLLOW) == -1) in copymkdir() 69 if (flags > 0 && chflagsat(rootfd, dir, flags, in copymkdir() 104 copymkdir(rootfd, path, fd, st.st_mode & _DEF_DIRMODE, in copymkdir() 113 if (symlinkat(lnk, rootfd, path) != 0) in copymkdir() 115 else if (fchownat(rootfd, path, uid, gid, in copymkdir() 128 destfd = openat(rootfd, path, O_RDWR | O_CREAT | O_EXCL, in copymkdir()
|
| H A D | rm_r.c | 59 rm_r(int rootfd, const char *path, uid_t uid) in rm_r() argument 72 dirfd = openat(rootfd, path, O_DIRECTORY); in rm_r() 97 if (fstatat(rootfd, path, &st, AT_SYMLINK_NOFOLLOW) != 0) in rm_r() 100 if (unlinkat(rootfd, path, 0) == -1) in rm_r() 103 if (unlinkat(rootfd, path, AT_REMOVEDIR) == -1) { in rm_r()
|
| H A D | pwupd.h | 81 int rootfd; member 142 void copymkdir(int rootfd, char const * dir, int skelfd, mode_t mode, uid_t uid, 144 bool rm_r(int rootfd, char const * dir, uid_t uid);
|
| H A D | pw_user.c | 151 mkdir_home_parents(conf.rootfd, pwd->pw_dir); in create_and_populate_homedir() 156 skelfd = openat(conf.rootfd, skeldir, O_DIRECTORY|O_CLOEXEC); in create_and_populate_homedir() 159 copymkdir(conf.rootfd, pwd->pw_dir, skelfd, homemode, pwd->pw_uid, in create_and_populate_homedir() 1009 unlinkat(conf.rootfd, file + 1, 0); in pw_user_del() 1018 fstatat(conf.rootfd, home + 1, &st, 0) != -1) { in pw_user_del() 1019 rm_r(conf.rootfd, home, id); in pw_user_del() 1022 fstatat(conf.rootfd, home + 1, &st, 0) == -1 ? "" : "not " in pw_user_del() 1280 if (fstatat(conf.rootfd, walk, &st, 0) == -1) in pw_user_add() 1489 close(openat(conf.rootfd, path +1, O_RDWR | O_CREAT, 0600)); in pw_user_add() 1490 fchownat(conf.rootfd, path + 1, pwd->pw_uid, pwd->pw_gid, in pw_user_add() [all …]
|
| H A D | pw.c | 215 conf.rootfd = open(conf.rootdir, O_DIRECTORY|O_CLOEXEC); in main() 216 if (conf.rootfd == -1) in main()
|
| /freebsd/contrib/lib9p/example/ |
| H A D | server.c | 46 int rootfd; in main() local 72 rootfd = open(path, O_DIRECTORY); in main() 74 if (rootfd < 0) in main() 77 if (l9p_backend_fs_init(&fs_backend, rootfd, ro) != 0) in main()
|
| /freebsd/tests/sys/capsicum/ |
| H A D | bindat_connectat.c | 44 static int rootfd = -1; variable 59 if (path && path[0] == '/' && rootfd >= 0) { in open() 60 return (openat(rootfd, path + 1, flags, mode)); in open() 72 ATF_REQUIRE((rootfd = open("/", O_EXEC | O_CLOEXEC)) >= 0); in check_capsicum()
|
| /freebsd/usr.sbin/bhyve/ |
| H A D | pci_virtio_9p.c | 253 int rootfd; in pci_vt9p_init() local 264 rootfd = open(value, O_DIRECTORY); in pci_vt9p_init() 265 if (rootfd < 0) { in pci_vt9p_init() 297 if (cap_rights_limit(rootfd, &rootcap) != 0) in pci_vt9p_init() 303 if (l9p_backend_fs_init(&sc->vsc_fs_backend, rootfd, ro) != 0) { in pci_vt9p_init()
|
| /freebsd/contrib/lib9p/backend/ |
| H A D | fs.h | 35 int l9p_backend_fs_init(struct l9p_backend **backendp, int rootfd, bool ro);
|
| H A D | fs.c | 2984 l9p_backend_fs_init(struct l9p_backend **backendp, int rootfd, bool ro) in l9p_backend_fs_init() argument 3035 sc->fs_rootfd = rootfd; in l9p_backend_fs_init()
|