Displaying 1 result from an estimated 1 matches for "next_shell".
2008 Sep 30
5
Corrupted transaction log file / record size too small
...-----------------------------------------------------------------*/
int valid_shell(char *s)
/*
* return 1 if s represents a valid login shell, or 0 otherwise
*
* for our purposes, "valid" means anything returned by getusershell(3),
* or NEWSHELL as a special case
*/
{
char *next_shell;
/** a NULL pointer can't be a valid shell: **/
if (! s) return(0);
/** NEWSHELL is always valid: **/
if (strcmp(s, NEWSHELL) == 0) return(1);
/** okay, we have to consult /etc/shells: **/
while ((next_shell = getusershell()) != NULL)
{
if (strcmp(s, ne...