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 int env_whitelist_from_string(struct su_context* su, const char* str)
{
    char** all = strv_split(str, ",");
    char** one;

    if (!all)
    {
        if (errno == ENOMEM)
            err_oom();
        return -EINVAL;
    }

    STRV_FOREACH(one, all)
    env_whitelist_add(su, *one);
    strv_free(all);
    return 0;
}
/* Creates (add to) whitelist from comma delimited string */
Creates (add to) whitelist from comma delimited string
Creates ( add to ) whitelist from comma delimited string
static int env_whitelist_from_string(struct su_context* su, const char* str)
{
    char** all = strv_split(str, ",");
    char** one;
    if (!all)
    {
        if (errno == ENOMEM)
            err_oom();
        return -EINVAL;
    }
    STRV_FOREACH(one, all)
    env_whitelist_add(su, *one);
    strv_free(all);
    return 0;
}
static int env_whitelist_from_string ( struct su_context * su , const char * str ) { char * * all = strv_split ( str , " " ) ; char * * one ; if ( ! all ) { if ( errno == ENOMEM ) err_oom ( ) ; return - EINVAL ; } STRV_FOREACH ( one , all ) env_whitelist_add ( su , * one ) ; strv_free ( all ) ; return 0 ; }
Creates (add to) whitelist from comma delimited string
Creates ( add to ) whitelist from comma delimited string