23 lines
1001 B
Diff
23 lines
1001 B
Diff
|
diff --git a/libfakeroot.c b/libfakeroot.c
|
||
|
index f867758febd679370e70b493f1003fd3c9450573..977a4d933fa590fc1faefbe63a25e4fad6ebfcf6 100644
|
||
|
--- a/libfakeroot.c
|
||
|
+++ b/libfakeroot.c
|
||
|
@@ -880,7 +880,7 @@ int fchownat(int dir_fd, const char *path, uid_t owner, gid_t group, int flags)
|
||
|
/* If AT_SYMLINK_NOFOLLOW is set in the fchownat call it should
|
||
|
be when we stat it. */
|
||
|
INT_STRUCT_STAT st;
|
||
|
- r=INT_NEXT_FSTATAT(dir_fd, path, &st, (flags & AT_SYMLINK_NOFOLLOW));
|
||
|
+ r=INT_NEXT_FSTATAT(dir_fd, path, &st, (flags & (AT_SYMLINK_NOFOLLOW | AT_EMPTY_PATH | AT_NO_AUTOMOUNT)));
|
||
|
|
||
|
if(r)
|
||
|
return(r);
|
||
|
@@ -1017,7 +1017,7 @@ int fchmodat(int dir_fd, const char *path, mode_t mode, int flags) {
|
||
|
|
||
|
/* If AT_SYMLINK_NOFOLLOW is set in the fchownat call it should
|
||
|
be when we stat it. */
|
||
|
- r=INT_NEXT_FSTATAT(dir_fd, path, &st, flags & AT_SYMLINK_NOFOLLOW);
|
||
|
+ r=INT_NEXT_FSTATAT(dir_fd, path, &st, flags & (AT_SYMLINK_NOFOLLOW | AT_EMPTY_PATH | AT_NO_AUTOMOUNT));
|
||
|
|
||
|
if(r)
|
||
|
return(r);
|