예제 #1
0
파일: test_ifp.c 프로젝트: mmsrubar/thesis
void test_attr_allowed(void **state)
{
    const char *whitelist[] = { "name", "gecos", NULL };
    const char *emptylist[] = { NULL };

    assert_true(ifp_attr_allowed(whitelist, "name"));
    assert_true(ifp_attr_allowed(whitelist, "gecos"));

    assert_false(ifp_attr_allowed(whitelist, "password"));

    assert_false(ifp_attr_allowed(emptylist, "name"));
    assert_false(ifp_attr_allowed(NULL, "name"));
}
예제 #2
0
파일: ifpsrv_util.c 프로젝트: abbra/sssd
bool
ifp_is_user_attr_allowed(struct ifp_ctx *ifp_ctx, const char *attr)
{
    return ifp_attr_allowed(ifp_ctx->user_whitelist, attr);
}