Merge pull request #32 from input-output-hk/dont-leak-setgroups

dont leak the /proc/self/setgroups fd
This commit is contained in:
Matthew Justin Bauer 2018-04-05 13:56:41 -05:00 committed by GitHub
commit 107eec3dc9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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