diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-08-25 11:58:31 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-08-25 11:58:31 +0000 |
commit | 2e01e21913f63d2717785702c724c6228475f0ae (patch) | |
tree | 519b546324427122acc0e14917e06a24bd93ac50 /lib/libc | |
parent | 4cb4a29cd07c4deb847c4e2d00c2fa7b18a5f0f6 (diff) |
and a man page
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/sys/Makefile.inc | 6 | ||||
-rw-r--r-- | lib/libc/sys/issetugid.2 | 57 |
2 files changed, 61 insertions, 2 deletions
diff --git a/lib/libc/sys/Makefile.inc b/lib/libc/sys/Makefile.inc index d1634173f2c..67365000738 100644 --- a/lib/libc/sys/Makefile.inc +++ b/lib/libc/sys/Makefile.inc @@ -20,7 +20,8 @@ ASM= accept.o access.o acct.o adjtime.o bind.o chdir.o chflags.o chmod.o \ fstatfs.o fsync.o futimes.o getdirentries.o getegid.o geteuid.o \ getfh.o getfsstat.o getgid.o getgroups.o getitimer.o getpeername.o \ getpgrp.o getpid.o getppid.o getpriority.o getrlimit.o getrusage.o \ - getsockname.o getsockopt.o gettimeofday.o getuid.o ioctl.o kill.o \ + getsockname.o getsockopt.o gettimeofday.o getuid.o issetugid.o \ + ioctl.o kill.o \ ktrace.o lfs_bmapv.o lfs_markv.o lfs_segclean.o lfs_segwait.o link.o \ listen.o lstat.o madvise.o mincore.o minherit.o mkdir.o mkfifo.o \ mknod.o mlock.o \ @@ -110,7 +111,8 @@ MAN+= accept.2 access.2 acct.2 adjtime.2 bind.2 brk.2 chdir.2 chflags.2 \ fcntl.2 flock.2 fork.2 fsync.2 getdirentries.2 getfh.2 getfsstat.2 \ getgid.2 getgroups.2 getitimer.2 getlogin.2 getpeername.2 getpgrp.2 \ getpid.2 getpriority.2 getrlimit.2 getrusage.2 getsockname.2 \ - getsockopt.2 gettimeofday.2 getuid.2 intro.2 ioctl.2 kill.2 link.2 \ + getsockopt.2 gettimeofday.2 getuid.2 intro.2 issetugid.2 ioctl.2 \ + kill.2 link.2 \ listen.2 lseek.2 mkdir.2 mkfifo.2 mknod.2 madvise.2 mincore.2 \ minherit.2 mlock.2 \ mmap.2 mount.2 mprotect.2 msync.2 munmap.2 nfssvc.2 open.2 pathconf.2 \ diff --git a/lib/libc/sys/issetugid.2 b/lib/libc/sys/issetugid.2 new file mode 100644 index 00000000000..82987415136 --- /dev/null +++ b/lib/libc/sys/issetugid.2 @@ -0,0 +1,57 @@ +.\" +.\" Copyright (c) 1980, 1991, 1993 +.\" The Regents of the University of California. 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. +.\" 3. All advertising materials mentioning features or use of this software +.\" must display the following acknowledgement: +.\" This product includes software developed by the University of +.\" California, Berkeley and its contributors. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.Dd June 4, 1993 +.Dt GETUID 2 +.Os BSD 4 +.Sh NAME +.Nm issetugid +.Nd is current executable running setuid or setgid +.Sh SYNOPSIS +.Fd #include <unistd.h> +.Ft int +.Fn issetugid void +.Sh DESCRIPTION +The +.Fn issetugid +function returns 1 if the process was made setuid or setgid as +the result of the last +.Fn execve +system call. +Otherwise it returns 0. +.Sh ERRORS +The +.Fn getuid +and +.Fn geteuid +functions are always successful, and no return value is reserved to +indicate an error. |