When enumerating users we try to fetch sAMAccountType attribute which
might not be present for whatever reason.
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Uri Simchoni <uri@samba.org>
Autobuild-Date(master): Thu Jun 2 09:04:13 CEST 2016 on sn-devel-144
struct wbint_userinfo *info = &((*pinfo)[count]);
uint32_t group;
uint32_t atype;
+ bool ok;
- if (!ads_pull_uint32(ads, msg, "sAMAccountType", &atype) ||
- ds_atype_map(atype) != SID_NAME_USER) {
- DEBUG(1,("Not a user account? atype=0x%x\n", atype));
+ ok = ads_pull_uint32(ads, msg, "sAMAccountType", &atype);
+ if (!ok) {
+ DBG_INFO("Object lacks sAMAccountType attribute\n");
+ continue;
+ }
+ if (ds_atype_map(atype) != SID_NAME_USER) {
+ DBG_INFO("Not a user account? atype=0x%x\n", atype);
continue;
}