diff options
author | Pavel Březina <pbrezina@redhat.com> | 2013-08-22 14:04:38 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2013-08-26 11:50:23 +0200 |
commit | 9b43a2a6462b07075d403dbd5de487cbe7ada92c (patch) | |
tree | 29ff823c47e80dc3aada286182c1598d9485dcc8 /src/providers | |
parent | 59a95122d6bf4e271e79443cfc8caab5831c2ae3 (diff) | |
download | sssd-9b43a2a6462b07075d403dbd5de487cbe7ada92c.tar.gz sssd-9b43a2a6462b07075d403dbd5de487cbe7ada92c.tar.bz2 sssd-9b43a2a6462b07075d403dbd5de487cbe7ada92c.zip |
sudo: do not fail to store the rule if we can't read usn
Resolves:
https://fedorahosted.org/sssd/ticket/2052
Diffstat (limited to 'src/providers')
-rw-r--r-- | src/providers/ldap/sdap_sudo_cache.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/providers/ldap/sdap_sudo_cache.c b/src/providers/ldap/sdap_sudo_cache.c index 50bb0bd5..5cc1dd20 100644 --- a/src/providers/ldap/sdap_sudo_cache.c +++ b/src/providers/ldap/sdap_sudo_cache.c @@ -88,9 +88,10 @@ sdap_save_native_sudorule(TALLOC_CTX *mem_ctx, } ret = sdap_sudo_get_usn(mem_ctx, attrs, map, rule_name, _usn); - if (ret != EOK && ret != ENOENT) { - DEBUG(SSSDBG_OP_FAILURE, ("Could not read USN from %s\n", rule_name)); - return ret; + if (ret != EOK) { + DEBUG(SSSDBG_MINOR_FAILURE, ("Could not read USN from %s\n", rule_name)); + *_usn = NULL; + /* but we will store the rule anyway */ } ret = sysdb_save_sudorule(sysdb_ctx, domain, rule_name, attrs); |