diff options
author | Andreas Kling <awesomekling@gmail.com> | 2018-11-05 15:04:19 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2018-11-05 15:05:27 +0100 |
commit | e4611248c431d11d4eda43a366092f576bdb1f83 (patch) | |
tree | 01a11b47b34ca5407e40b4e8e19fbf97af31e3b1 /LibC | |
parent | 60a8144b68150feb0a880795ea210b263fc6c88c (diff) | |
download | serenity-e4611248c431d11d4eda43a366092f576bdb1f83.zip |
Add geteuid() and getegid().
There's no support for set-uid or set-gid executables yet so these don't
actually do anything. It's just nice to get the boilerplate stuff in.
Diffstat (limited to 'LibC')
-rw-r--r-- | LibC/unistd.cpp | 10 | ||||
-rw-r--r-- | LibC/unistd.h | 2 |
2 files changed, 12 insertions, 0 deletions
diff --git a/LibC/unistd.cpp b/LibC/unistd.cpp index 86c9ce237c..7d1b65f1af 100644 --- a/LibC/unistd.cpp +++ b/LibC/unistd.cpp @@ -27,6 +27,16 @@ gid_t getgid() return Syscall::invoke(Syscall::PosixGetgid); } +uid_t geteuid() +{ + return Syscall::invoke(Syscall::PosixGeteuid); +} + +gid_t getegid() +{ + return Syscall::invoke(Syscall::PosixGetegid); +} + pid_t getpid() { return Syscall::invoke(Syscall::PosixGetpid); diff --git a/LibC/unistd.h b/LibC/unistd.h index de1fd85180..f304c555fc 100644 --- a/LibC/unistd.h +++ b/LibC/unistd.h @@ -15,6 +15,8 @@ pid_t setsid(); int setpgid(pid_t pid, pid_t pgid); pid_t getpgid(pid_t); pid_t getpgrp(); +uid_t geteuid(); +gid_t getegid(); uid_t getuid(); gid_t getgid(); pid_t getpid(); |