Initialize the id_map status in idmap_ldap to avoid surprise
authorBo Yang <boyang@novell.com>
Thu, 26 Feb 2009 09:44:33 +0000 (17:44 +0800)
committerJeremy Allison <jra@samba.org>
Fri, 27 Feb 2009 17:28:46 +0000 (09:28 -0800)
source3/winbindd/idmap_ldap.c

index c86a5023d0c372bae2a427ec872eeff68650fd3e..7224589076e1157b5901c5dcea834f3d16e7c198 100644 (file)
@@ -935,6 +935,10 @@ static NTSTATUS idmap_ldap_unixids_to_sids(struct idmap_domain *dom,
                multi = True;
        }
 
                multi = True;
        }
 
+       for (i = 0; ids[i]; i++) {
+               ids[i]->status = ID_UNKNOWN;
+       }
+
 again:
        if (multi) {
 
 again:
        if (multi) {
 
@@ -1156,6 +1160,10 @@ static NTSTATUS idmap_ldap_sids_to_unixids(struct idmap_domain *dom,
                multi = True;
        }
 
                multi = True;
        }
 
+       for (i = 0; ids[i]; i++) {
+               ids[i]->status = ID_UNKNOWN;
+       }
+
 again:
        if (multi) {
 
 again:
        if (multi) {