From 5268ae8076d2e46a5495017b787c12fc1bcf1703 Mon Sep 17 00:00:00 2001 From: Henrik Riomar Date: Mon, 15 May 2017 23:06:21 +0200 Subject: 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. --- abuild-sudo.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'abuild-sudo.c') diff --git a/abuild-sudo.c b/abuild-sudo.c index 7b6235a..9377756 100644 --- a/abuild-sudo.c +++ b/abuild-sudo.c @@ -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; -- cgit v1.2.3-60-g2f50