Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/child.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ pub unsafe fn child_after_clone(child: &ChildInfo) -> ! {
});

child.cfg.gid.as_ref().map(|&gid| {
if libc::setgid(gid) != 0 {
if libc::syscall(libc::SYS_setgid, gid as c_ulong) != 0 {
fail(Err::SetUser, epipe);
}
});
Expand All @@ -138,7 +138,7 @@ pub unsafe fn child_after_clone(child: &ChildInfo) -> ! {
});

child.cfg.uid.as_ref().map(|&uid| {
if libc::setuid(uid) != 0 {
if libc::syscall(libc::SYS_setuid, uid as c_ulong) != 0 {
fail(Err::SetUser, epipe);
}
});
Expand Down