From 9b43a2a6462b07075d403dbd5de487cbe7ada92c Mon Sep 17 00:00:00 2001 From: Pavel Březina Date: Thu, 22 Aug 2013 14:04:38 +0200 Subject: sudo: do not fail to store the rule if we can't read usn Resolves: https://fedorahosted.org/sssd/ticket/2052 --- src/providers/ldap/sdap_sudo_cache.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/providers/ldap') 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); -- cgit