summaryrefslogtreecommitdiff
path: root/src/providers/ldap/ldap_common.c
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2012-10-09 18:03:24 +0200
committerJakub Hrozek <jhrozek@redhat.com>2012-10-10 15:26:39 +0200
commit245c6b5db07249ecead23263f15c5c68c641134d (patch)
tree885423eeff8fee82643d6fd8420ac4a26a055bcf /src/providers/ldap/ldap_common.c
parentadcb6802e4f6369b48a74c408fd53c4325576071 (diff)
downloadsssd-245c6b5db07249ecead23263f15c5c68c641134d.tar.gz
sssd-245c6b5db07249ecead23263f15c5c68c641134d.tar.bz2
sssd-245c6b5db07249ecead23263f15c5c68c641134d.zip
Fix segfault when ID-mapping an entry without a SID
If there was no SID attribute, then we would have detected it by checking the number of values of an element. We would however happily return EOK in that case and save garbage into the sid_str. This was causing segfault when the entry was supposed to be ID-mapped by had no SID.
Diffstat (limited to 'src/providers/ldap/ldap_common.c')
-rw-r--r--src/providers/ldap/ldap_common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/providers/ldap/ldap_common.c b/src/providers/ldap/ldap_common.c
index 6484556b..da5786fb 100644
--- a/src/providers/ldap/ldap_common.c
+++ b/src/providers/ldap/ldap_common.c
@@ -1491,7 +1491,7 @@ sdap_attrs_get_sid_str(TALLOC_CTX *mem_ctx,
DEBUG(SSSDBG_MINOR_FAILURE,
("No [%s] attribute while id-mapping. [%d][%s]\n",
sid_attr, el->num_values, strerror(ret)));
- return ret;
+ return ENOENT;
}
err = sss_idmap_bin_sid_to_sid(idmap_ctx->map,