aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Beisswenger <johannes.beisswenger@cetitec.com>2020-06-26 11:40:31 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-06-26 11:44:05 +0100
commit40462a9b106bae819ed747e855bf438784094f6c (patch)
treed5d0a368fa9bb24fb81b1ac5dc53da10967a57c1
parentb94fa2fc81cde25865ee223ca437d07377229a53 (diff)
downloadpseudo-40462a9b106bae819ed747e855bf438784094f6c.tar.gz
pseudo-40462a9b106bae819ed747e855bf438784094f6c.tar.bz2
pseudo-40462a9b106bae819ed747e855bf438784094f6c.zip
xattr: Fixed corrupting UID&GID when running setfacl -m on a directory
The file mode was accidentally overwritten with only the permission bits, causing the server to falsely assume that the database was corrupted (because the msg_header.mode did not contain S_IFDIR anymore) even though it was the client doing the corruption. In practice that had the effect of leaking the UID of the user, into the pseudo environment. This fixes Bug 13959 -- https://bugzilla.yoctoproject.org/show_bug.cgi?id=13959 Signed-off-by: Johannes Beisswenger <johannes.beisswenger@cetitec.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--ports/linux/xattr/pseudo_wrappers.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ports/linux/xattr/pseudo_wrappers.c b/ports/linux/xattr/pseudo_wrappers.c
index 590af30..3e122d9 100644
--- a/ports/linux/xattr/pseudo_wrappers.c
+++ b/ports/linux/xattr/pseudo_wrappers.c
@@ -197,7 +197,7 @@ static int shared_setxattr(const char *path, int fd, const char *name, const voi
mode |= get_special_bits(path, fd);
pseudo_debug(PDBGF_XATTR, "posix_acl_access translated to mode %04o. Remaining attribute(s): %d.\n",
mode, extra);
- buf.st_mode = mode;
+
/* we want to actually issue a corresponding chmod,
* as well, or else the file ends up 0600 on the
* host. Using the slightly-less-efficient wrap_chmod