diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2015-03-27 12:30:53 +0100 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2015-04-09 08:35:16 +0200 |
commit | 1aa492ce890f362564bfac21f3cfb0a3e38608bd (patch) | |
tree | 8cbab507804e46c8bb2c7bba0fe8ec26a2957664 /src/responder | |
parent | d338bb46b8c03c33e6182e725911af6d778bcf00 (diff) | |
download | sssd-1aa492ce890f362564bfac21f3cfb0a3e38608bd.tar.gz sssd-1aa492ce890f362564bfac21f3cfb0a3e38608bd.tar.xz sssd-1aa492ce890f362564bfac21f3cfb0a3e38608bd.zip |
ncache: Silence critical error from filter_users when default_domain_suffix is set
When default_domain_suffix is used and filter_users is set (at least
root is always, by default), SSSD tried to add the negcache entry to the
default domain. But since the default domain is not known after start
up, adding the entries fail with a verbose error message.
This patch handles EAGAIN returned from the parsing function while
setting negcache entries gracefully and also makes the debug message in
parsing function more precise.
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
Diffstat (limited to 'src/responder')
-rw-r--r-- | src/responder/common/negcache.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/responder/common/negcache.c b/src/responder/common/negcache.c index 04c9a53f5..3e58c3e7f 100644 --- a/src/responder/common/negcache.c +++ b/src/responder/common/negcache.c @@ -630,7 +630,11 @@ errno_t sss_ncache_prepopulate(struct sss_nc_ctx *ncache, rctx->default_domain, filter_list[i], &domainname, &name); - if (ret != EOK) { + if (ret == EAGAIN) { + DEBUG(SSSDBG_MINOR_FAILURE, + "cannot add [%s] to negcache because the required or " + "default domain are not known yet\n", filter_list[i]); + } else if (ret != EOK) { DEBUG(SSSDBG_CRIT_FAILURE, "Invalid name in filterUsers list: [%s] (%d)\n", filter_list[i], ret); @@ -679,7 +683,11 @@ errno_t sss_ncache_prepopulate(struct sss_nc_ctx *ncache, ret = sss_parse_name_for_domains(tmpctx, domain_list, rctx->default_domain, filter_list[i], &domainname, &name); - if (ret != EOK) { + if (ret == EAGAIN) { + DEBUG(SSSDBG_MINOR_FAILURE, + "Cannot add [%s] to negcache because the required or " + "default domain are not known yet\n", filter_list[i]); + } else if (ret != EOK) { DEBUG(SSSDBG_CRIT_FAILURE, "Invalid name in filterUsers list: [%s] (%d)\n", filter_list[i], ret); @@ -783,7 +791,11 @@ errno_t sss_ncache_prepopulate(struct sss_nc_ctx *ncache, ret = sss_parse_name_for_domains(tmpctx, domain_list, rctx->default_domain, filter_list[i], &domainname, &name); - if (ret != EOK) { + if (ret == EAGAIN) { + DEBUG(SSSDBG_MINOR_FAILURE, + "Cannot add [%s] to negcache because the required or " + "default domain are not known yet\n", filter_list[i]); + } else if (ret != EOK) { DEBUG(SSSDBG_CRIT_FAILURE, "Invalid name in filterGroups list: [%s] (%d)\n", filter_list[i], ret); |