diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-08-05 20:56:28 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-08-05 20:56:28 -0700 |
commit | ad8319e7f8f09d328e37374fe0e71c64782fd9aa (patch) | |
tree | 891d9269c6dc2bc335b8e8fd4446677dae2c67f1 /configure | |
parent | ec6de08243cf8f1a71063fd61082399907d88051 (diff) | |
download | txr-ad8319e7f8f09d328e37374fe0e71c64782fd9aa.tar.gz txr-ad8319e7f8f09d328e37374fe0e71c64782fd9aa.tar.bz2 txr-ad8319e7f8f09d328e37374fe0e71c64782fd9aa.zip |
Adding support for uid and gid manipulation.
* configure: Added check for geteuid and related functions.
* sysif.c (getuid_wrap, geteuid_wrap, getgid_wrap, getegid_wrap,
getgroups_wrap, setuid_wrap, seteuid_wrap, setgid_wrap, setegid_wrap):
New static functions.
(sysif_init): Register intrinsics getuid, geteuid, getgid,
getegid, getgroups, setuid, seteuid, setgid, setegid.
* txr.1: Documented new functions.
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 29 |
1 files changed, 29 insertions, 0 deletions
@@ -2019,6 +2019,35 @@ else printf "no\n" fi +printf "Checking for POSIX geteuid function family ... " + +cat > conftest.c <<! +#include <sys/types.h> +#include <unistd.h> + +int main(int argc, char **argv) +{ + uid_t u = getuid(); + uid_t e = geteuid(); + gid_t g = getgid(); + gid_t h = getegid(); + setuid(u); + seteuid(e); + setgid(g); + setegid(h); + getgroups(0, NULL); + return 0; +} +! + +if conftest ; then + printf "yes\n" + printf "#define HAVE_GETEUID 1\n" >> $config_h + have_unistd=y +else + printf "no\n" +fi + # # Dependent variables # |