[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 32/81] 9pfs: don't use AT_EMPTY_PATH in local_set_cr
From: |
Michael Roth |
Subject: |
[Qemu-devel] [PATCH 32/81] 9pfs: don't use AT_EMPTY_PATH in local_set_cred_passthrough() |
Date: |
Mon, 20 Mar 2017 18:07:56 -0500 |
From: Greg Kurz <address@hidden>
The name argument can never be an empty string, and dirfd always point to
the containing directory of the file name. AT_EMPTY_PATH is hence useless
here. Also it breaks build with glibc version 2.13 and older.
It is actually an oversight of a previous tentative patch to implement this
function. We can safely drop it.
Reported-by: Mark Cave-Ayland <address@hidden>
Signed-off-by: Greg Kurz <address@hidden>
Tested-by: Mark Cave-Ayland <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
(cherry picked from commit b314f6a077a1dbc0463a5dc41162f64950048e72)
Signed-off-by: Greg Kurz <address@hidden>
Signed-off-by: Michael Roth <address@hidden>
---
hw/9pfs/9p-local.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/9pfs/9p-local.c b/hw/9pfs/9p-local.c
index 09b9b57..f282bb7 100644
--- a/hw/9pfs/9p-local.c
+++ b/hw/9pfs/9p-local.c
@@ -349,7 +349,7 @@ static int local_set_cred_passthrough(FsContext *fs_ctx,
int dirfd,
const char *name, FsCred *credp)
{
if (fchownat(dirfd, name, credp->fc_uid, credp->fc_gid,
- AT_SYMLINK_NOFOLLOW | AT_EMPTY_PATH) < 0) {
+ AT_SYMLINK_NOFOLLOW) < 0) {
/*
* If we fail to change ownership and if we are
* using security model none. Ignore the error
--
2.7.4
- [Qemu-devel] [PATCH 01/81] 9pfs: local: move xattr security ops to 9p-xattr.c, (continued)
- [Qemu-devel] [PATCH 01/81] 9pfs: local: move xattr security ops to 9p-xattr.c, Michael Roth, 2017/03/20
- [Qemu-devel] [PATCH 20/81] 9pfs: local: improve error handling in link op, Michael Roth, 2017/03/20
- [Qemu-devel] [PATCH 23/81] 9pfs: local: chown: don't follow symlinks, Michael Roth, 2017/03/20
- [Qemu-devel] [PATCH 22/81] 9pfs: local: chmod: don't follow symlinks, Michael Roth, 2017/03/20
- [Qemu-devel] [PATCH 28/81] 9pfs: local: drop unused code, Michael Roth, 2017/03/20
- [Qemu-devel] [PATCH 27/81] 9pfs: local: open2: don't follow symlinks, Michael Roth, 2017/03/20
- [Qemu-devel] [PATCH 26/81] 9pfs: local: mkdir: don't follow symlinks, Michael Roth, 2017/03/20
- [Qemu-devel] [PATCH 24/81] 9pfs: local: symlink: don't follow symlinks, Michael Roth, 2017/03/20
- [Qemu-devel] [PATCH 02/81] 9pfs: remove side-effects in local_init(), Michael Roth, 2017/03/20
- [Qemu-devel] [PATCH 31/81] 9pfs: fail local_statfs() earlier, Michael Roth, 2017/03/20
- [Qemu-devel] [PATCH 32/81] 9pfs: don't use AT_EMPTY_PATH in local_set_cred_passthrough(),
Michael Roth <=
- [Qemu-devel] [PATCH 37/81] pci: fix error message for express slots, Michael Roth, 2017/03/20
- [Qemu-devel] [PATCH 03/81] 9pfs: remove side-effects in local_open() and local_opendir(), Michael Roth, 2017/03/20
- [Qemu-devel] [PATCH 39/81] 9pfs: fix crash when fsdev is missing, Michael Roth, 2017/03/20
- [Qemu-devel] [PATCH 42/81] scsi-block: fix direction of BYTCHK test for VERIFY commands, Michael Roth, 2017/03/20
- [Qemu-devel] [PATCH 30/81] 9pfs: fix fd leak in local_opendir(), Michael Roth, 2017/03/20
- [Qemu-devel] [PATCH 33/81] 9pfs: fix O_PATH build break with older glibc versions, Michael Roth, 2017/03/20
- [Qemu-devel] [PATCH 36/81] balloon: Don't balloon roms, Michael Roth, 2017/03/20
- [Qemu-devel] [PATCH 46/81] exec: Add missing rcu_read_unlock, Michael Roth, 2017/03/20
- [Qemu-devel] [PATCH 38/81] virtio: fix vq->inuse recalc after migr, Michael Roth, 2017/03/20
- [Qemu-devel] [PATCH 43/81] ui/vnc: Fix problem with sending too many bytes as server name, Michael Roth, 2017/03/20