diff options
Diffstat (limited to 'crypto/heimdal/lib/roken/iruserok.c')
-rw-r--r-- | crypto/heimdal/lib/roken/iruserok.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/crypto/heimdal/lib/roken/iruserok.c b/crypto/heimdal/lib/roken/iruserok.c index 3b3880b..ca93e1c 100644 --- a/crypto/heimdal/lib/roken/iruserok.c +++ b/crypto/heimdal/lib/roken/iruserok.c @@ -10,11 +10,7 @@ * 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 + * 3. 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. * @@ -33,7 +29,7 @@ #ifdef HAVE_CONFIG_H #include <config.h> -RCSID("$Id: iruserok.c,v 1.23 1999/12/05 13:27:05 assar Exp $"); +RCSID("$Id: iruserok.c 17879 2006-08-08 21:50:40Z lha $"); #endif #include <stdio.h> @@ -221,7 +217,7 @@ __ivaliduser(FILE *hostf, unsigned raddr, const char *luser, * * Returns 0 if ok, -1 if not ok. */ -int +int ROKEN_LIB_FUNCTION iruserok(unsigned raddr, int superuser, const char *ruser, const char *luser) { char *cp; @@ -254,7 +250,8 @@ again: * are protected read/write owner only. */ uid = geteuid(); - seteuid(pwd->pw_uid); + if (seteuid(pwd->pw_uid) < 0) + return (-1); hostf = fopen(pbuf, "r"); seteuid(uid); |