[Samba] swat seems broken in HEAD

Billy O'Connor billy at oconnoronline.net
Wed Jun 5 20:45:02 GMT 2002


I have the same condition, would you mind trying out this patch and
tell me if it works for you, both on testparm and swat?  Please don't
check it into cvs yet though, I want to check some more string
conditions before I submit it.

--- samba/source/param/loadparm.c	Thu May 30 20:47:19 2002
+++ samba_test/source/param/loadparm.c	Wed Jun  5 15:58:50 2002
@@ -3422,8 +3422,13 @@
 				break;
 			case P_STRING:
 			case P_USTRING:
-				parm_table[i].def.svalue =
-					strdup(*(char **)parm_table[i].ptr);
+                                if( parm_table[i].ptr ) {
+				    parm_table[i].def.svalue =
+					    strdup(*(char **)parm_table[i].ptr);
+                                }
+                                else {
+                                    parm_table[i].def.svalue = NULL;
+                                }
 				break;
 			case P_GSTRING:
 			case P_UGSTRING:




More information about the samba mailing list