From: Anthony Liguori <aliguori@us.ibm.com>
To: qemu-devel@nongnu.org
Cc: Gerhard Wiesinger <lists@wiesinger.com>,
Anthony Liguori <aliguori@us.ibm.com>,
"M. Mohan Kumar" <mohan@in.ibm.com>
Subject: [Qemu-devel] [PATCH] Fix build error in virtfs-proxy-helper
Date: Thu, 1 Nov 2012 16:06:30 -0500 [thread overview]
Message-ID: <1351803990-12983-1-git-send-email-aliguori@us.ibm.com> (raw)
I don't have a kernel with the necessary syscalls so this is completely
untested.
Cc: "M. Mohan Kumar" <mohan@in.ibm.com>
Cc: Gerhard Wiesinger <lists@wiesinger.com>
Reported-by: Gerhard Wiesinger <lists@wiesinger.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
---
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
next reply other threads:[~2012-11-01 21:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-01 21:06 Anthony Liguori [this message]
2012-11-01 21:22 ` [Qemu-devel] [PATCH] Fix build error in virtfs-proxy-helper Eric Blake
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1351803990-12983-1-git-send-email-aliguori@us.ibm.com \
--to=aliguori@us.ibm.com \
--cc=lists@wiesinger.com \
--cc=mohan@in.ibm.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).