Author: vlendec
Date: 2006-11-29 08:11:33 +0000 (Wed, 29 Nov 2006)
New Revision: 19945

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=19945

Log:
Fix a segfault -- lookup_rids needs to init the names even on failure
Modified:
   branches/SAMBA_3_0/source/passdb/lookup_sid.c
   branches/SAMBA_3_0_24/source/passdb/lookup_sid.c


Changeset:
Modified: branches/SAMBA_3_0/source/passdb/lookup_sid.c
===================================================================
--- branches/SAMBA_3_0/source/passdb/lookup_sid.c       2006-11-29 06:26:12 UTC 
(rev 19944)
+++ branches/SAMBA_3_0/source/passdb/lookup_sid.c       2006-11-29 08:11:33 UTC 
(rev 19945)
@@ -406,7 +406,9 @@
 
        if (!winbind_lookup_rids(tmp_ctx, domain_sid, num_rids, rids,
                                 domain_name, &my_names, &my_types)) {
+               *domain_name = "";
                for (i=0; i<num_rids; i++) {
+                       names[i] = "";
                        types[i] = SID_NAME_UNKNOWN;
                }
                return True;

Modified: branches/SAMBA_3_0_24/source/passdb/lookup_sid.c
===================================================================
--- branches/SAMBA_3_0_24/source/passdb/lookup_sid.c    2006-11-29 06:26:12 UTC 
(rev 19944)
+++ branches/SAMBA_3_0_24/source/passdb/lookup_sid.c    2006-11-29 08:11:33 UTC 
(rev 19945)
@@ -406,7 +406,9 @@
 
        if (!winbind_lookup_rids(tmp_ctx, domain_sid, num_rids, rids,
                                 domain_name, &my_names, &my_types)) {
+               *domain_name = "";
                for (i=0; i<num_rids; i++) {
+                       names[i] = "";
                        types[i] = SID_NAME_UNKNOWN;
                }
                return True;

Reply via email to