[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] Fix build error in virtfs-proxy-helper
From: |
Anthony Liguori |
Subject: |
[Qemu-devel] [PATCH] Fix build error in virtfs-proxy-helper |
Date: |
Thu, 1 Nov 2012 16:06:30 -0500 |
I don't have a kernel with the necessary syscalls so this is completely
untested.
Cc: "M. Mohan Kumar" <address@hidden>
Cc: Gerhard Wiesinger <address@hidden>
Reported-by: Gerhard Wiesinger <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>
---
fsdev/virtfs-proxy-helper.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/fsdev/virtfs-proxy-helper.c b/fsdev/virtfs-proxy-helper.c
index f9a8270..bc50e3e3 100644
--- a/fsdev/virtfs-proxy-helper.c
+++ b/fsdev/virtfs-proxy-helper.c
@@ -286,12 +286,16 @@ static int setfsugid(int uid, int gid)
* We still need DAC_OVERRIDE because we don't change
* supplementary group ids, and hence may be subjected DAC rules
*/
+ int ret;
cap_value_t cap_list[] = {
CAP_DAC_OVERRIDE,
};
- setfsgid(gid);
- setfsuid(uid);
+ ret = setfsgid(gid);
+ g_assert(ret != -1);
+
+ ret = setfsuid(uid);
+ g_assert(ret != -1);
if (uid != 0 || gid != 0) {
return do_cap_set(cap_list, ARRAY_SIZE(cap_list), 0);
--
1.8.0
- [Qemu-devel] [PATCH] Fix build error in virtfs-proxy-helper,
Anthony Liguori <=