-
Notifications
You must be signed in to change notification settings - Fork 2.2k
refactor: move some c code to go #4309
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 1 commit
7af783a
d7c10a9
36e2a76
8272332
067dc3c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just curious, is there any non async-signal-safe fuction remaining here, as defined in |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -782,20 +782,6 @@ void nsexec(void) | |
prctl(PR_SET_NAME, (unsigned long)"runc:[2:INIT]", 0, 0, 0); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd keep this. It's way simpler the init stage now, but still things can go wrong (specially since we are doing big changes) and it is useful to have this IMHO. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 make sense. |
||
write_log(DEBUG, "~> nsexec stage-2"); | ||
|
||
if (setsid() < 0) | ||
bail("setsid failed"); | ||
|
||
if (setuid(0) < 0) | ||
bail("setuid failed"); | ||
|
||
if (setgid(0) < 0) | ||
bail("setgid failed"); | ||
|
||
if (!config.is_rootless_euid && config.is_setgroup) { | ||
if (setgroups(0, NULL) < 0) | ||
bail("setgroups failed"); | ||
} | ||
|
||
close(syncfd); | ||
|
||
/* Free netlink data. */ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is
requiresRootOrMappingTool()
equivalent toconfig.is_setgroup
?