diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2016-05-01 18:56:11 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2016-05-01 18:56:11 -0700 |
commit | 7f1562fbf9262270b31d1007e400dd6605d81f99 (patch) | |
tree | b8d14ffd980000ca8a4293c279f5e4d8244df6d9 /configure | |
parent | 9bbc744c3b5e0584ad7c9abe244128572a692229 (diff) | |
download | txr-7f1562fbf9262270b31d1007e400dd6605d81f99.tar.gz txr-7f1562fbf9262270b31d1007e400dd6605d81f99.tar.bz2 txr-7f1562fbf9262270b31d1007e400dd6605d81f99.zip |
Adding getresuid, getresuid, getresgid and setresgid.
* configure: Test for these functions.
* sysif.c (getresuid_wrap, getresgid_wrap, setresuid_wrap,
setresgid_wrap): New static function.
(sysif_init): Registered getresuid, setresgid, setresuid and
setresgid intrinsics.
* txr.1: Documented all four functions.
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 26 |
1 files changed, 26 insertions, 0 deletions
@@ -2193,6 +2193,32 @@ else printf "no\n" fi +printf "Checking for {set,get}res{uid,gid} ... " + +cat > conftest.c <<! +#include <sys/types.h> +#include <unistd.h> + +int main(int argc, char **argv) +{ + uid_t ur, ue, us; + gid_t gr, ge, gs; + int gur = getresuid(&ur, &ue, &us); + int ggr = getresgid(&gr, &ge, &gs); + int sur = setresuid(0, 0, 0); + int sgr = setresgid(0, 0, 0); + return 0; +} +! + +if conftest ; then + printf "yes\n" + printf "#define HAVE_SETRESUID 1\n" >> $config_h + have_unistd=y +else + printf "no\n" +fi + printf "Checking for setgroups ... " cat > conftest.c <<! |