mirror of
https://gitlab.alpinelinux.org/alpine/abuild.git
synced 2024-12-23 23:42:35 +00:00
abuild-sudo.c: setgid as well
set our gid to root so apk commit hooks run with the same gid as when running "sudo apk add ..." from command line.
This commit is contained in:
parent
79525de509
commit
5268ae8076
@ -97,6 +97,8 @@ int main(int argc, const char *argv[])
|
||||
argv[0] = path;
|
||||
/* set our uid to root so bbsuid --install works */
|
||||
setuid(0);
|
||||
/* set our gid to root so apk commit hooks run with the same gid as for "sudo apk add ..." */
|
||||
setgid(0);
|
||||
execv(path, (char * const*)argv);
|
||||
perror(path);
|
||||
return 1;
|
||||
|
Loading…
Reference in New Issue
Block a user