mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 02:03:56 -06:00
virtfs-proxy-helper.c: remove 'err_out' label in setugid()
'err_out' can be removed and be replaced by 'return -errno' in its only instance in the function. CC: Greg Kurz <groug@kaod.org> Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com> Acked-by: Greg Kurz <groug@kaod.org> Signed-off-by: Greg Kurz <groug@kaod.org>
This commit is contained in:
parent
16724a1730
commit
ff59c5ee78
1 changed files with 1 additions and 3 deletions
|
@ -287,8 +287,7 @@ static int setugid(int uid, int gid, int *suid, int *sgid)
|
||||||
*sgid = getegid();
|
*sgid = getegid();
|
||||||
|
|
||||||
if (setresgid(-1, gid, *sgid) == -1) {
|
if (setresgid(-1, gid, *sgid) == -1) {
|
||||||
retval = -errno;
|
return -errno;
|
||||||
goto err_out;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (setresuid(-1, uid, *suid) == -1) {
|
if (setresuid(-1, uid, *suid) == -1) {
|
||||||
|
@ -322,7 +321,6 @@ err_sgid:
|
||||||
if (setresgid(-1, *sgid, *sgid) == -1) {
|
if (setresgid(-1, *sgid, *sgid) == -1) {
|
||||||
abort();
|
abort();
|
||||||
}
|
}
|
||||||
err_out:
|
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue