Skip to content

unix: setreuid/setregid #2803

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

Merged
merged 1 commit into from
May 28, 2022
Merged
Show file tree
Hide file tree
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
2 changes: 0 additions & 2 deletions libc-test/semver/fuchsia.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1333,10 +1333,8 @@ setfsuid
setgroups
sethostname
setpwent
setregid
setresgid
setresuid
setreuid
settimeofday
shmat
shmatt_t
Expand Down
2 changes: 0 additions & 2 deletions libc-test/semver/linux.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3041,10 +3041,8 @@ setmntent
setns
setpriority
setpwent
setregid
setresgid
setresuid
setreuid
setrlimit
setrlimit64
setservent
Expand Down
2 changes: 2 additions & 0 deletions libc-test/semver/unix.txt
Original file line number Diff line number Diff line change
Expand Up @@ -761,6 +761,8 @@ setpgid
setsid
setsockopt
setuid
setreuid
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: ideally in alphabetical order

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! I'm going to fix once this is merged.

setregid
setvbuf
shm_open
shm_unlink
Expand Down
2 changes: 0 additions & 2 deletions src/unix/haiku/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1768,8 +1768,6 @@ extern "C" {
pub fn endgrent();
pub fn getgrent() -> *mut ::group;
pub fn setgrent();
pub fn setreuid(ruid: ::uid_t, euid: ::uid_t) -> ::c_int;
pub fn setregid(rgid: ::gid_t, egid: ::gid_t) -> ::c_int;
pub fn sigwait(set: *const sigset_t, sig: *mut ::c_int) -> ::c_int;
pub fn pthread_atfork(
prepare: ::Option<unsafe extern "C" fn()>,
Expand Down
2 changes: 0 additions & 2 deletions src/unix/linux_like/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1726,8 +1726,6 @@ extern "C" {
pub fn clearenv() -> ::c_int;
pub fn waitid(idtype: idtype_t, id: id_t, infop: *mut ::siginfo_t, options: ::c_int)
-> ::c_int;
pub fn setreuid(ruid: ::uid_t, euid: ::uid_t) -> ::c_int;
pub fn setregid(rgid: ::gid_t, egid: ::gid_t) -> ::c_int;
pub fn getresuid(ruid: *mut ::uid_t, euid: *mut ::uid_t, suid: *mut ::uid_t) -> ::c_int;
pub fn getresgid(rgid: *mut ::gid_t, egid: *mut ::gid_t, sgid: *mut ::gid_t) -> ::c_int;
pub fn acct(filename: *const ::c_char) -> ::c_int;
Expand Down
2 changes: 2 additions & 0 deletions src/unix/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -901,6 +901,8 @@ extern "C" {
pub fn setpgid(pid: pid_t, pgid: pid_t) -> ::c_int;
pub fn setsid() -> pid_t;
pub fn setuid(uid: uid_t) -> ::c_int;
pub fn setreuid(ruid: uid_t, euid: uid_t) -> ::c_int;
pub fn setregid(rgid: gid_t, egid: gid_t) -> ::c_int;
#[cfg_attr(
all(target_os = "macos", target_arch = "x86"),
link_name = "sleep$UNIX2003"
Expand Down