Lines Matching defs:dirfd
144 static int creat_lnk(int dirfd, char *name1_p, char *name2_p);
145 static int creat_spec(int dirfd);
162 static int openout(int dirfd);
167 static void rstfiles(int over, int dirfd);
170 static void set_tym(int dirfd, char *nam_p, time_t atime, time_t mtime);
1722 creat_lnk(int dirfd, char *name1_p, char *name2_p)
1769 else if (unlinkat(dirfd, get_component(name2_p), 0) < 0)
1821 creat_spec(int dirfd)
1847 if (fchownat(dirfd, ".", Rpw_p->pw_uid,
1854 } else if ((fchownat(dirfd, ".", G_p->g_uid,
1861 if (fchmod(dirfd, G_p->g_mode) != 0) {
1869 if (facl_set(dirfd, aclp) < 0) {
1934 rstfiles(U_KEEP, dirfd);
2015 rstfiles(U_OVER, dirfd);
2023 rstfiles(U_KEEP, dirfd);
2036 rstfiles(U_KEEP, dirfd);
3931 int dirfd;
3955 if ((dirfd = openat(cwd, (pattr == NULL) ? fullname : pattr,
3959 if (fstat(dirfd, &parentstat) == -1) {
3963 (void) close(dirfd);
3966 if ((error = facl_get(dirfd, ACL_NO_TRIVIAL, &aclp)) != 0) {
3970 (void) close(dirfd);
3975 if (fchmod(dirfd, newmode) == -1) {
3981 (void) close(dirfd);
4003 if (fchmod(dirfd, parentstat.st_mode) == -1) {
4010 error = facl_set(dirfd, aclp);
4030 (void) close(dirfd);
5125 * discard the pathname and dirfd
5505 openout(int dirfd)
5535 if (LSTAT(dirfd, nam_p, &DesSt) == 0) {
5602 (void) unlinkat(dirfd,
5615 rstfiles(U_KEEP, dirfd);
5623 (void) unlinkat(dirfd,
5635 rstfiles(U_KEEP, dirfd);
5653 (void) unlinkat(dirfd,
5666 rstfiles(U_KEEP, dirfd);
5673 if ((result = openat(dirfd, get_component(nam_p),
5677 result = retry_open_attr(dirfd,
5692 rstfiles(U_KEEP, dirfd);
5725 if (fchownat(dirfd,
5742 } else if ((fchownat(dirfd, get_component(nam_p),
6088 rstfiles(int over, int dirfd)
6138 (void) unlinkat(dirfd, get_component(nam_p), 0);
6169 if (unlinkat(dirfd, get_component(Over_p), 0)) {
6190 (void) renameat(dirfd, get_component(nam_p),
6191 dirfd, get_component(Over_p));
6215 if (unlinkat(dirfd, get_component(Over_p), 0) < 0) {
6253 if (fchownat(dirfd, get_component(onam_p),
6265 if ((fchownat(dirfd, get_component(onam_p),
6279 set_tym(dirfd, get_component(onam_p),
6327 * Use dirfd since we are updating original file
6746 set_tym(int dirfd, char *nam_p, time_t atime, time_t mtime)
6755 if (futimesat(dirfd, nam_p, times) < 0) {
9292 int dirfd;
9346 dirfd = attropen(filename, ".", O_RDONLY);
9347 if (dirfd == -1)
9350 tmpfd = dup(dirfd);
9352 (void) close(dirfd);
9357 (void) close(dirfd);
9376 if (fstatat(dirfd, dp->d_name, &sb,
9390 if (fstatat(dirfd, dp->d_name,
9405 (void) fchdir(dirfd);
9411 (void) close(dirfd);
9718 unlinkat(int dirfd, char *path, int flag)