xref: /csrg-svn/lib/libc/compat-43/setruid.c (revision 46597)
122108Smckusick /*
222108Smckusick  * Copyright (c) 1983 Regents of the University of California.
335311Sbostic  * All rights reserved.
435311Sbostic  *
542626Sbostic  * %sccs.include.redist.c%
622108Smckusick  */
713506Ssam 
826588Sdonn #if defined(LIBC_SCCS) && !defined(lint)
9*46597Sdonn static char sccsid[] = "@(#)setruid.c	5.5 (Berkeley) 02/23/91";
1035311Sbostic #endif /* LIBC_SCCS and not lint */
1122108Smckusick 
12*46597Sdonn #include <unistd.h>
13*46597Sdonn 
14*46597Sdonn int
15*46597Sdonn #ifdef __STDC__
16*46597Sdonn setruid(uid_t ruid)
17*46597Sdonn #else
1813506Ssam setruid(ruid)
1913506Ssam 	int ruid;
20*46597Sdonn #endif
2113506Ssam {
2213506Ssam 
2313506Ssam 	return (setreuid(ruid, -1));
2413506Ssam }
25