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 /txr.1 | |
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 'txr.1')
-rw-r--r-- | txr.1 | 47 |
1 files changed, 47 insertions, 0 deletions
@@ -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 |