openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/util-linux/2.33.2-r0/util-linux-2.33.2/login-utils/su-common.c
static bool is_restricted_shell(const char* shell)
{
    char* line;

    setusershell();
    while ((line = getusershell()) != NULL)
    {
        if (*line != '#' && !strcmp(line, shell))
        {
            endusershell();
            return false;
        }
    }
    endusershell();

    DBG(MISC, ul_debug("%s is restricted shell (not in /etc/shells)", shell));
    return true;
}
/* Return true if SHELL is a restricted shell (one not returned by
 * getusershell), else false, meaning it is a standard shell.
 */
Return true if SHELL is a restricted shell (one not returned by
getusershell), else false, meaning it is a standard shell.
Return true if SHELL is a restricted shell ( one not returned by getusershell ) else false meaning it is a standard shell .
static bool is_restricted_shell(const char* shell)
{
    char* line;
    setusershell();
    while ((line = getusershell()) != NULL)
    {
        if (*line != '#' && !strcmp(line, shell))
        {
            endusershell();
            return false;
        }
    }
    endusershell();
    DBG(MISC, ul_debug("%s is restricted shell (not in /etc/shells)", shell));
    return true;
}
static bool is_restricted_shell ( const char * shell ) { char * line ; setusershell ( ) ; while ( ( line = getusershell ( ) ) != NULL ) { if ( * line != ' ' && ! strcmp ( line , shell ) ) { endusershell ( ) ; return false ; } } endusershell ( ) ; DBG ( MISC , ul_debug ( " " , shell ) ) ; return true ; }
Return true if SHELL is a restricted shell (one not returned by
 getusershell), else false, meaning it is a standard shell.
Return true if SHELL is a restricted shell ( one not returned by getusershell ) else false meaning it is a standard shell .