dont leak the /proc/self/setgroups fd

This commit is contained in:
Michael Bishop 2018-04-05 15:24:19 -03:00
parent 5e49fbc4a0
commit 8a344343ba
No known key found for this signature in database
GPG Key ID: C294FC1A485A409A

View File

@ -202,6 +202,7 @@ int main(int argc, char *argv[]) {
int fd_setgroups = open("/proc/self/setgroups", O_WRONLY);
if (fd_setgroups > 0) {
write(fd_setgroups, "deny", 4);
close(fd_setgroups);
}
// map the original uid/gid in the new ns