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_add(struct su_context* su, const char* name)
{
    const char* env = getenv(name);

    if (!env)
        return 1;
    if (strv_extend(&su->env_whitelist_names, name))
        err_oom();
    if (strv_extend(&su->env_whitelist_vals, env))
        err_oom();
    return 0;
}
/* Adds @name from the current environment to the whitelist. If @name is not
 * set then nothing is added to the whitelist and returns 1.
 */
Adds @name from the current environment to the whitelist. If @name is not
set then nothing is added to the whitelist and returns 1.
Adds @name from the current environment to the whitelist . If @name is not set then nothing is added to the whitelist and returns 1 .
static int env_whitelist_add(struct su_context* su, const char* name)
{
    const char* env = getenv(name);
    if (!env)
        return 1;
    if (strv_extend(&su->env_whitelist_names, name))
        err_oom();
    if (strv_extend(&su->env_whitelist_vals, env))
        err_oom();
    return 0;
}
static int env_whitelist_add ( struct su_context * su , const char * name ) { const char * env = getenv ( name ) ; if ( ! env ) return 1 ; if ( strv_extend ( & su -> env_whitelist_names , name ) ) err_oom ( ) ; if ( strv_extend ( & su -> env_whitelist_vals , env ) ) err_oom ( ) ; return 0 ; }
Adds @name from the current environment to the whitelist.
Adds @name from the current environment to the whitelist .