diff options
author | Pavel Reichl <preichl@redhat.com> | 2014-07-21 13:12:07 +0100 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2014-07-22 09:40:11 +0200 |
commit | b011330c77168cdd864aaae54a75214935136c05 (patch) | |
tree | 51e50f4cb51ba05815be236952529e14312d1dd3 /src/providers/simple | |
parent | db18dda869bc6c52a41797b2066cf121cf10f49c (diff) | |
download | sssd-b011330c77168cdd864aaae54a75214935136c05.tar.gz sssd-b011330c77168cdd864aaae54a75214935136c05.tar.xz sssd-b011330c77168cdd864aaae54a75214935136c05.zip |
UTIL: rename find_subdomain_by_object_name
The function was named "find_subdomain" yet it could find both main
domain and subdomain.
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Diffstat (limited to 'src/providers/simple')
-rw-r--r-- | src/providers/simple/simple_access_check.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/providers/simple/simple_access_check.c b/src/providers/simple/simple_access_check.c index 1fcff445f..13c66d58f 100644 --- a/src/providers/simple/simple_access_check.c +++ b/src/providers/simple/simple_access_check.c @@ -50,8 +50,8 @@ simple_check_users(struct simple_ctx *ctx, const char *username, /* First, check whether the user is in the allowed users list */ if (ctx->allow_users != NULL) { for(i = 0; ctx->allow_users[i] != NULL; i++) { - domain = find_subdomain_by_object_name(ctx->domain, - ctx->allow_users[i]); + domain = find_domain_by_object_name(ctx->domain, + ctx->allow_users[i]); if (domain == NULL) { DEBUG(SSSDBG_CRIT_FAILURE, "Invalid user %s!\n", ctx->allow_users[i]); @@ -83,8 +83,8 @@ simple_check_users(struct simple_ctx *ctx, const char *username, /* Next check whether this user has been specifically denied */ if (ctx->deny_users != NULL) { for(i = 0; ctx->deny_users[i] != NULL; i++) { - domain = find_subdomain_by_object_name(ctx->domain, - ctx->deny_users[i]); + domain = find_domain_by_object_name(ctx->domain, + ctx->deny_users[i]); if (domain == NULL) { DEBUG(SSSDBG_CRIT_FAILURE, "Invalid user %s!\n", ctx->deny_users[i]); @@ -122,8 +122,8 @@ simple_check_groups(struct simple_ctx *ctx, const char **group_names, if (ctx->allow_groups && !*access_granted) { matched = false; for (i = 0; ctx->allow_groups[i]; i++) { - domain = find_subdomain_by_object_name(ctx->domain, - ctx->allow_groups[i]); + domain = find_domain_by_object_name(ctx->domain, + ctx->allow_groups[i]); if (domain == NULL) { DEBUG(SSSDBG_CRIT_FAILURE, "Invalid group %s!\n", ctx->allow_groups[i]); @@ -155,8 +155,8 @@ simple_check_groups(struct simple_ctx *ctx, const char **group_names, if (ctx->deny_groups) { matched = false; for (i = 0; ctx->deny_groups[i]; i++) { - domain = find_subdomain_by_object_name(ctx->domain, - ctx->deny_groups[i]); + domain = find_domain_by_object_name(ctx->domain, + ctx->deny_groups[i]); if (domain == NULL) { DEBUG(SSSDBG_CRIT_FAILURE, "Invalid group %s!\n", ctx->deny_groups[i]); @@ -417,7 +417,7 @@ simple_check_get_groups_send(TALLOC_CTX *mem_ctx, DEBUG(SSSDBG_TRACE_LIBS, "Looking up groups for user %s\n", username); /* get domain from username */ - state->domain = find_subdomain_by_object_name(ctx->domain, username); + state->domain = find_domain_by_object_name(ctx->domain, username); if (state->domain == NULL) { DEBUG(SSSDBG_CRIT_FAILURE, "Invalid user %s!\n", username); ret = EINVAL; |