[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-trivial] [Qemu-devel] [PATCH] virtfs-proxy-helper: check retur
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-trivial] [Qemu-devel] [PATCH] virtfs-proxy-helper: check return code of setfsgid/setfsuid |
Date: |
Wed, 10 Oct 2012 18:17:34 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120911 Thunderbird/15.0.1 |
Il 10/10/2012 18:14, Stefan Weil ha scritto:
>>
>>
>> diff --git a/fsdev/virtfs-proxy-helper.c b/fsdev/virtfs-proxy-helper.c
>> index f9a8270..b34a84a 100644
>> --- a/fsdev/virtfs-proxy-helper.c
>> +++ b/fsdev/virtfs-proxy-helper.c
>> @@ -290,8 +290,12 @@ static int setfsugid(int uid, int gid)
>> CAP_DAC_OVERRIDE,
>> };
>> - setfsgid(gid);
>> - setfsuid(uid);
>> + if (setfsgid(gid) != 0) {
>> + return -1;
>> + }
>
> Wouldn't setfsgid(gid) == gid be also ok?
Of course, it should be < 0. I have no idea how to test this thing...
Paolo
- [Qemu-trivial] [PATCH] virtfs-proxy-helper: check return code of setfsgid/setfsuid, Paolo Bonzini, 2012/10/10
- Re: [Qemu-trivial] [Qemu-devel] [PATCH] virtfs-proxy-helper: check return code of setfsgid/setfsuid, Stefan Weil, 2012/10/10
- Re: [Qemu-trivial] [Qemu-devel] [PATCH] virtfs-proxy-helper: check return code of setfsgid/setfsuid,
Paolo Bonzini <=
- Re: [Qemu-trivial] [Qemu-devel] [PATCH] virtfs-proxy-helper: check return code of setfsgid/setfsuid, Stefan Weil, 2012/10/10
- Re: [Qemu-trivial] [Qemu-devel] [PATCH] virtfs-proxy-helper: check return code of setfsgid/setfsuid, Paolo Bonzini, 2012/10/10
- Re: [Qemu-trivial] [Qemu-devel] [PATCH] virtfs-proxy-helper: check return code of setfsgid/setfsuid, Stefan Weil, 2012/10/10
- Re: [Qemu-trivial] [Qemu-devel] [PATCH] virtfs-proxy-helper: check return code of setfsgid/setfsuid, Stefan Weil, 2012/10/10
- Re: [Qemu-trivial] [Qemu-devel] [PATCH] virtfs-proxy-helper: check return code of setfsgid/setfsuid, M. Mohan Kumar, 2012/10/11
- Re: [Qemu-trivial] [Qemu-devel] [PATCH] virtfs-proxy-helper: check return code of setfsgid/setfsuid, Paolo Bonzini, 2012/10/11
- Re: [Qemu-trivial] [Qemu-devel] [PATCH] virtfs-proxy-helper: check return code of setfsgid/setfsuid, Paolo Bonzini, 2012/10/10
- Re: [Qemu-trivial] [Qemu-devel] [PATCH] virtfs-proxy-helper: check return code of setfsgid/setfsuid, Eric Blake, 2012/10/10
Re: [Qemu-trivial] [Qemu-devel] [PATCH] virtfs-proxy-helper: check return code of setfsgid/setfsuid, Eric Blake, 2012/10/10