| author | |
| committer | |
| log | 8d4b5662cd3d34f106b0e5b636db8c0d14ed541c |
| tree | 50afcb8d132e30e728e395331779d67f77bbe63f |
| parent | dbf9c7b548a56653c9267dbb615d7119974ecca5 |
3 files changed, 16 insertions(+), 0 deletions(-)
lib/std/c.zig+2| ... | ... | @@ -10713,7 +10713,9 @@ pub extern "c" fn setresuid(ruid: uid_t, euid: uid_t, suid: uid_t) c_int; |
| 10713 | 10713 | pub extern "c" fn setresgid(rgid: gid_t, egid: gid_t, sgid: gid_t) c_int; |
| 10714 | 10714 | pub extern "c" fn setpgid(pid: pid_t, pgid: pid_t) c_int; |
| 10715 | 10715 | pub extern "c" fn getuid() uid_t; |
| 10716 | pub extern "c" fn getgid() gid_t; | |
| 10716 | 10717 | pub extern "c" fn geteuid() uid_t; |
| 10718 | pub extern "c" fn getegid() gid_t; | |
| 10717 | 10719 | pub extern "c" fn getresuid(ruid: *uid_t, euid: *uid_t, suid: *uid_t) c_int; |
| 10718 | 10720 | pub extern "c" fn getresgid(rgid: *gid_t, egid: *gid_t, sgid: *gid_t) c_int; |
| 10719 | 10721 |
lib/std/posix.zig+8| ... | ... | @@ -3557,6 +3557,14 @@ pub fn geteuid() uid_t { |
| 3557 | 3557 | return system.geteuid(); |
| 3558 | 3558 | } |
| 3559 | 3559 | |
| 3560 | pub fn getgid() gid_t { | |
| 3561 | return system.getgid(); | |
| 3562 | } | |
| 3563 | ||
| 3564 | pub fn getegid() gid_t { | |
| 3565 | return system.getegid(); | |
| 3566 | } | |
| 3567 | ||
| 3560 | 3568 | /// Test whether a file descriptor refers to a terminal. |
| 3561 | 3569 | pub fn isatty(handle: fd_t) bool { |
| 3562 | 3570 | if (native_os == .windows) { |
lib/std/posix/test.zig+6| ... | ... | @@ -314,6 +314,12 @@ test "getuid" { |
| 314 | 314 | _ = posix.geteuid(); |
| 315 | 315 | } |
| 316 | 316 | |
| 317 | test "getgid" { | |
| 318 | if (native_os == .windows or native_os == .wasi) return error.SkipZigTest; | |
| 319 | _ = posix.getgid(); | |
| 320 | _ = posix.getegid(); | |
| 321 | } | |
| 322 | ||
| 317 | 323 | test "sigaltstack" { |
| 318 | 324 | if (native_os == .windows or native_os == .wasi) return error.SkipZigTest; |
| 319 | 325 |