diff options
author | Sumit Bose <sbose@redhat.com> | 2009-08-27 14:05:36 +0200 |
---|---|---|
committer | Simo Sorce <ssorce@redhat.com> | 2009-08-28 10:59:14 -0400 |
commit | 8d235172e656dd126aa03132acfba6c66f4ce03e (patch) | |
tree | 149b1c03da39d12f197bf6aaf8dfd38b58cbdafd | |
parent | 68ae0e255bc78a022a9b3714ad93a7865a5bef65 (diff) | |
download | sssd-8d235172e656dd126aa03132acfba6c66f4ce03e.tar.gz sssd-8d235172e656dd126aa03132acfba6c66f4ce03e.tar.bz2 sssd-8d235172e656dd126aa03132acfba6c66f4ce03e.zip |
check if gid attribute is empty
-rw-r--r-- | server/providers/ldap/sdap_async.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/server/providers/ldap/sdap_async.c b/server/providers/ldap/sdap_async.c index 4d74061f..852c6d23 100644 --- a/server/providers/ldap/sdap_async.c +++ b/server/providers/ldap/sdap_async.c @@ -1151,6 +1151,12 @@ static struct tevent_req *sdap_save_group_send(TALLOC_CTX *memctx, ret = sysdb_attrs_get_el(state->attrs, opts->group_map[SDAP_AT_GROUP_GID].sys_name, &el); if (ret) goto fail; + if (el->num_values == 0) { + DEBUG(1, ("no gid provided for [%s] in domain [%s].\n", + state->name, dom->name)); + ret = EINVAL; + goto fail; + } errno = 0; l = strtol((const char *)el->values[0].data, NULL, 0); if (errno) { |