diff options
Diffstat (limited to 'src/providers/ldap/sdap_sudo_cache.c')
-rw-r--r-- | src/providers/ldap/sdap_sudo_cache.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/providers/ldap/sdap_sudo_cache.c b/src/providers/ldap/sdap_sudo_cache.c index db51d1c37..50bb0bd52 100644 --- a/src/providers/ldap/sdap_sudo_cache.c +++ b/src/providers/ldap/sdap_sudo_cache.c @@ -69,7 +69,11 @@ sdap_save_native_sudorule(TALLOC_CTX *mem_ctx, ret = sysdb_attrs_get_string(attrs, map[SDAP_AT_SUDO_NAME].sys_name, &rule_name); - if (ret != EOK) { + if (ret == ERANGE) { + DEBUG(SSSDBG_OP_FAILURE, ("Warning: found rule that contains none " + "or multiple CN values. It will be skipped.\n")); + return ret; + } else if (ret != EOK) { DEBUG(SSSDBG_OP_FAILURE, ("Could not get rule name [%d]: %s\n", ret, strerror(ret))); return ret; |