mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-09-30 05:51:45 -09:00
package/fakeroot: fix for fchownat/fchmodat
fakeroot does mask out necessary flags, instead pass through
the flags that are supported by fstatat
Upstream BR: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=959876
Signed-off-by: Norbert Lange <nolange79@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
(cherry picked from commit e642e17982)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
committed by
Peter Korsgaard
parent
615422470e
commit
48cb6ed5b8
@@ -0,0 +1,28 @@
|
|||||||
|
Forward supported flags to fstatat, this fixes issues like
|
||||||
|
using an empty path
|
||||||
|
|
||||||
|
Upstream BR: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=959876
|
||||||
|
|
||||||
|
Signed-off-by: Norbert Lange <nolange79@gmail.com>
|
||||||
|
|
||||||
|
diff -burN fakeroot-1.20.2.org/libfakeroot.c fakeroot-1.20.2/libfakeroot.c
|
||||||
|
--- fakeroot-1.20.2.org/libfakeroot.c 2014-10-05 17:16:00.000000000 +0200
|
||||||
|
+++ fakeroot-1.20.2/libfakeroot.c 2020-05-10 22:24:18.896625085 +0200
|
||||||
|
@@ -880,7 +880,7 @@
|
||||||
|
/* 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 @@
|
||||||
|
|
||||||
|
/* 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);
|
||||||
Reference in New Issue
Block a user