* [Qemu-devel] [PATCH] Fix build error in virtfs-proxy-helper
@ 2012-11-01 21:06 Anthony Liguori
2012-11-01 21:22 ` Eric Blake
0 siblings, 1 reply; 2+ messages in thread
From: Anthony Liguori @ 2012-11-01 21:06 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerhard Wiesinger, Anthony Liguori, M. Mohan Kumar
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] Fix build error in virtfs-proxy-helper
2012-11-01 21:06 [Qemu-devel] [PATCH] Fix build error in virtfs-proxy-helper Anthony Liguori
@ 2012-11-01 21:22 ` Eric Blake
0 siblings, 0 replies; 2+ messages in thread
From: Eric Blake @ 2012-11-01 21:22 UTC (permalink / raw)
To: Anthony Liguori; +Cc: Gerhard Wiesinger, M. Mohan Kumar, qemu-devel
[-- Attachment #1: Type: text/plain, Size: 1356 bytes --]
On 11/01/2012 03:06 PM, Anthony Liguori wrote:
> 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);
This has been reported several times now, with several different patches
proposed. Can we get consensus on which one to use?
https://lists.gnu.org/archive/html/qemu-devel/2012-10/msg02013.html
--
Eric Blake eblake@redhat.com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 617 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-11-01 21:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-01 21:06 [Qemu-devel] [PATCH] Fix build error in virtfs-proxy-helper Anthony Liguori
2012-11-01 21:22 ` Eric Blake
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).