diff options
author | sheldonh <sheldonh@FreeBSD.org> | 2000-01-17 15:01:42 +0000 |
---|---|---|
committer | sheldonh <sheldonh@FreeBSD.org> | 2000-01-17 15:01:42 +0000 |
commit | e6afbccaac636bc98c4d4eed8fdb9515bbe328f0 (patch) | |
tree | 22d8e2cced2f73f36c3c495d0d5c83d9f17370ff /lib/libc | |
parent | a90d4cc5174ae340b32aba37a2c0dd6be4e1f6b1 (diff) | |
download | FreeBSD-src-e6afbccaac636bc98c4d4eed8fdb9515bbe328f0.zip FreeBSD-src-e6afbccaac636bc98c4d4eed8fdb9515bbe328f0.tar.gz |
Add manual pages for the newly added setres[ug]id system calls.
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/sys/Makefile.inc | 1 | ||||
-rw-r--r-- | lib/libc/sys/setresuid.2 | 79 |
2 files changed, 80 insertions, 0 deletions
diff --git a/lib/libc/sys/Makefile.inc b/lib/libc/sys/Makefile.inc index 306aafa..382f6a4 100644 --- a/lib/libc/sys/Makefile.inc +++ b/lib/libc/sys/Makefile.inc @@ -134,6 +134,7 @@ MLINKS+=read.2 pread.2 read.2 readv.2 MLINKS+=recv.2 recvfrom.2 recv.2 recvmsg.2 MLINKS+=send.2 sendmsg.2 send.2 sendto.2 MLINKS+=setpgid.2 setpgrp.2 +MLINKS+=setresuid.2 setresgid.2 MLINKS+=setuid.2 setegid.2 setuid.2 seteuid.2 setuid.2 setgid.2 MLINKS+=shmat.2 shmdt.2 MLINKS+=stat.2 fstat.2 stat.2 lstat.2 diff --git a/lib/libc/sys/setresuid.2 b/lib/libc/sys/setresuid.2 new file mode 100644 index 0000000..52ce7c7 --- /dev/null +++ b/lib/libc/sys/setresuid.2 @@ -0,0 +1,79 @@ +.\" Copyright (c) 2000 +.\" Sheldon Hearn. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES +.\" +.\" $FreeBSD$ +.\" +.Dd January 17, 2000 +.Dt SETRESUID 2 +.Os +.Sh NAME +.Nm setresgid , +.Nm setresuid +.Nd set real, effective and saved user or group ID +.Sh SYNOPSIS +.Fd #include <sys/types.h> +.Fd #include <unistd.h> +.Ft int +.Fn setresgid "gid_t rgid" "gid_t egid" "gid_t sgid" +.Ft int +.Fn setresuid "uid_t ruid" "uid_t euid" "uid_t suid" +.Sh DESCRIPTION +The +.Nm setresuid +system call sets the real, +effective and saved user IDs of the current process. +The analogous +.Nm setresgid +sets the real, effective and saved group IDs. +.Pp +Privileged processes may set these IDs +to arbitrary values. +Unprivileged processes are restricted +in that each of the new IDs must match one of the current IDs. +.Pp +Passing -1 as an argument causes the corresponding value +to remain unchanged. +.Sh RETURN VALUES +These functions return the value 0 if successful; +otherwise the value -1 is returned +and the global variable +.Va errno +is set to indicate the error. +.Sh ERRORS +.Bl -tag -width indent +.It Er EPERM +The calling process was not privileged +and tried to change one or more IDs to a value +which was not the current real ID, the current effective ID +nor the current saved ID. +.Sh SEE ALSO +.Xr getegid 2 , +.Xr geteuid 2 , +.Xr getgid 2 , +.Xr getuid 2 , +.Xr isssetugid 2 , +.Xr setgid 2 , +.Xr setregid 2 , +.Xr setreuid 2 , +.Xr setuid 2 , +.Sh STANDARDS +These system calls are not available on many platforms. +They exist in +.Fx +to support Linux binaries linked against GNU libc2. |