From ad8319e7f8f09d328e37374fe0e71c64782fd9aa Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Wed, 5 Aug 2015 20:56:28 -0700 Subject: 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. --- txr.1 | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) (limited to 'txr.1') diff --git a/txr.1 b/txr.1 index 4319540d..4dd6a704 100644 --- a/txr.1 +++ b/txr.1 @@ -29638,6 +29638,53 @@ function reads the contents of that symbolic link and returns it as a string. Otherwise, it fails by throwing an exception of type .codn file-error . +.SS* Unix Credentials + +.coNP Functions @, getuid @, geteuid @ getgid and @ getegid +.synb +.mets (getuid) +.mets (geteuid) +.mets (getgid) +.mets (getegid) +.syne +.desc +These functions directly correspond to the POSIX C library functions +of the same name. They retrieve the real user ID, effective user ID, +real group ID and effective group ID, respectively, of the calling +process. + +.coNP Function @ getgroups +.synb +.mets (getgroups) +.syne +.desc +The +.code getgroups +function retrieves the list of supplementary group IDs of the calling +process by calling the same-named POSIX C library function. + +Whether or not the effective group ID retrieved by +.code getegid +is included in this list is system-dependent. Programs should not +depend on its presence or absence. + +.coNP Functions @, setuid @, seteuid @ setgid and @ setegid +.synb +.mets (setuid << uid ) +.mets (seteuid << uid ) +.mets (setgid << gid ) +.mets (setegid << gid ) +.syne +.desc +These functions directly correspond to the POSIX C library functions +of the same name. They set the real user ID, effective user ID, +real group ID and effective group ID, respectively, of the calling +process. +On success, they return +.code t . +On failure, they throw an exception of type +.codn system-error . + .SS* Unix Signal Handling On platforms where certain advanced features of POSIX signal handling are -- cgit v1.2.3