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:

-- 
To unsubscribe from this list go to the following URL and read the
instructions:  http://lists.samba.org/mailman/listinfo/samba

Reply via email to