diff options
Diffstat (limited to 'crypto/heimdal/lib/roken/getusershell.c')
-rw-r--r-- | crypto/heimdal/lib/roken/getusershell.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/crypto/heimdal/lib/roken/getusershell.c b/crypto/heimdal/lib/roken/getusershell.c index eb990f3..8def1ca 100644 --- a/crypto/heimdal/lib/roken/getusershell.c +++ b/crypto/heimdal/lib/roken/getusershell.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. * @@ -35,13 +31,14 @@ #include <config.h> #endif -RCSID("$Id: getusershell.c,v 1.10 2000/05/22 09:11:59 joda Exp $"); +RCSID("$Id: getusershell.c 21005 2007-06-08 01:54:35Z lha $"); #ifndef HAVE_GETUSERSHELL #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <ctype.h> #ifdef HAVE_PATHS_H #include <paths.h> #endif @@ -62,6 +59,7 @@ struct aud_rec; #ifdef HAVE_USERCONF_H #include <userconf.h> #endif +#include "roken.h" #ifndef _PATH_SHELLS #define _PATH_SHELLS "/etc/shells" @@ -87,7 +85,7 @@ static char **initshells (void); /* * Get a list of shells from _PATH_SHELLS, if it exists. */ -char * +char * ROKEN_LIB_FUNCTION getusershell() { char *ret; @@ -100,7 +98,7 @@ getusershell() return (ret); } -void +void ROKEN_LIB_FUNCTION endusershell() { if (shells != NULL) @@ -112,7 +110,7 @@ endusershell() curshell = NULL; } -void +void ROKEN_LIB_FUNCTION setusershell() { curshell = initshells(); @@ -179,7 +177,7 @@ initshells() if (*cp == '#' || *cp == '\0') continue; *sp++ = cp; - while (!isspace(*cp) && *cp != '#' && *cp != '\0') + while (!isspace((unsigned char)*cp) && *cp != '#' && *cp != '\0') cp++; *cp++ = '\0'; } |