Lines Matching refs:dirfd

142 static int creat_lnk(int dirfd, char *name1_p, char *name2_p);
143 static int creat_spec(int dirfd);
160 static int openout(int dirfd);
165 static void rstfiles(int over, int dirfd);
168 static void set_tym(int dirfd, char *nam_p, time_t atime, time_t mtime);
1717 creat_lnk(int dirfd, char *name1_p, char *name2_p)
1764 else if (unlinkat(dirfd, get_component(name2_p), 0) < 0)
1816 creat_spec(int dirfd)
1842 if (fchownat(dirfd, ".", Rpw_p->pw_uid,
1849 } else if ((fchownat(dirfd, ".", G_p->g_uid,
1856 if (fchmod(dirfd, G_p->g_mode) != 0) {
1864 if (facl_set(dirfd, aclp) < 0) {
1929 rstfiles(U_KEEP, dirfd);
2010 rstfiles(U_OVER, dirfd);
2018 rstfiles(U_KEEP, dirfd);
2031 rstfiles(U_KEEP, dirfd);
3926 int dirfd;
3950 if ((dirfd = openat(cwd, (pattr == NULL) ? fullname : pattr,
3954 if (fstat(dirfd, &parentstat) == -1) {
3958 (void) close(dirfd);
3961 if ((error = facl_get(dirfd, ACL_NO_TRIVIAL, &aclp)) != 0) {
3965 (void) close(dirfd);
3970 if (fchmod(dirfd, newmode) == -1) {
3976 (void) close(dirfd);
3998 if (fchmod(dirfd, parentstat.st_mode) == -1) {
4005 error = facl_set(dirfd, aclp);
4025 (void) close(dirfd);
5120 * discard the pathname and dirfd
5500 openout(int dirfd)
5530 if (LSTAT(dirfd, nam_p, &DesSt) == 0) {
5597 (void) unlinkat(dirfd,
5610 rstfiles(U_KEEP, dirfd);
5618 (void) unlinkat(dirfd,
5630 rstfiles(U_KEEP, dirfd);
5648 (void) unlinkat(dirfd,
5661 rstfiles(U_KEEP, dirfd);
5668 if ((result = openat(dirfd, get_component(nam_p),
5672 result = retry_open_attr(dirfd,
5687 rstfiles(U_KEEP, dirfd);
5720 if (fchownat(dirfd,
5737 } else if ((fchownat(dirfd, get_component(nam_p),
6083 rstfiles(int over, int dirfd)
6133 (void) unlinkat(dirfd, get_component(nam_p), 0);
6164 if (unlinkat(dirfd, get_component(Over_p), 0)) {
6185 (void) renameat(dirfd, get_component(nam_p),
6186 dirfd, get_component(Over_p));
6210 if (unlinkat(dirfd, get_component(Over_p), 0) < 0) {
6248 if (fchownat(dirfd, get_component(onam_p),
6260 if ((fchownat(dirfd, get_component(onam_p),
6274 set_tym(dirfd, get_component(onam_p),
6322 * Use dirfd since we are updating original file
6738 set_tym(int dirfd, char *nam_p, time_t atime, time_t mtime)
6747 if (futimesat(dirfd, nam_p, times) < 0) {
9285 int dirfd;
9339 dirfd = attropen(filename, ".", O_RDONLY);
9340 if (dirfd == -1)
9343 tmpfd = dup(dirfd);
9345 (void) close(dirfd);
9350 (void) close(dirfd);
9369 if (fstatat(dirfd, dp->d_name, &sb,
9383 if (fstatat(dirfd, dp->d_name,
9398 (void) fchdir(dirfd);
9404 (void) close(dirfd);
9711 unlinkat(int dirfd, char *path, int flag)