- Update 'preload modules' documention (bug #304)
authorJelmer Vernooij <jelmer@samba.org>
Tue, 19 Aug 2003 15:18:27 +0000 (15:18 +0000)
committerJelmer Vernooij <jelmer@samba.org>
Tue, 19 Aug 2003 15:18:27 +0000 (15:18 +0000)
- Fix WINS Server List in SWAT (bug #197)
- Don't segfault SWAT when adding shares (bug #254)

docs/docbook/smbdotconf/security/preloadmodules.xml
source/param/loadparm.c
source/web/swat.c

index 7b4e57cff1807ee0f5ec6458561991f01241b406..101d9606fa51c1503d735215ada921a05d5c7d28 100644 (file)
@@ -7,9 +7,6 @@
        be loaded into smbd before a client connects. This improves
        the speed of smbd when reacting to new connections somewhat. </para>
 
-       <para>It is recommended to only use this option on heavy-performance
-       servers.</para> 
-
        <para>Default: <command>preload modules = </command></para>
 
        <para>Example: <command>preload modules = /usr/lib/samba/passdb/mysql.so+++ </command></para>
index 7982b87ffc670b41184522d11a90c6b3a77fe72a..4a2fffc7574492c422d975ad5f9387864d42b1a4 100644 (file)
@@ -4163,12 +4163,11 @@ void lp_remove_service(int snum)
 
 void lp_copy_service(int snum, const char *new_name)
 {
-       char *oldname = lp_servicename(snum);
        do_section(new_name);
        if (snum >= 0) {
                snum = lp_servicenumber(new_name);
                if (snum >= 0)
-                       lp_do_parameter(snum, "copy", oldname);
+                       lp_do_parameter(snum, "copy", lp_servicename(snum));
        }
 }
 
index a1c132a08854b3bda39d45af14c3a9d5e3cc6540..1c892559dd97f5b4971de3796d53985f91f1aa8d 100644 (file)
@@ -737,7 +737,16 @@ static void wizard_page(void)
        d_printf("<td><input type=radio name=\"WINSType\" value=0 %s> Not Used&nbsp;</td>", (winstype == 0) ? "checked" : "");
        d_printf("<td><input type=radio name=\"WINSType\" value=1 %s> Server for client use&nbsp;</td>", (winstype == 1) ? "checked" : "");
        d_printf("<td><input type=radio name=\"WINSType\" value=2 %s> Client of another WINS server&nbsp;</td>", (winstype == 2) ? "checked" : "");
-       d_printf("<tr><td></td><td></td><td></td><td>Remote WINS Server&nbsp;<input type=text size=\"16\" name=\"WINSAddr\" value=\"%s\"></td></tr>",lp_wins_server_list());
+       d_printf("<tr><td></td><td></td><td></td><td>Remote WINS Server&nbsp;<input type=text size=\"16\" name=\"WINSAddr\" value=\"");
+       
+       /* Print out the list of wins servers */
+       if(lp_wins_server_list()) {
+               int i;
+               const char **wins_servers = lp_wins_server_list();
+               for(i = 0; wins_servers[i]; i++) d_printf("%s ", wins_servers[i]);
+       }
+       
+       d_printf("\"></td></tr>");
        if (winstype == 3) {
                d_printf("<tr><td></td><td colspan=3><font color=\"#ff0000\">Error: WINS Server Mode and WINS Support both set in smb.conf</font></td></tr>");
                d_printf("<tr><td></td><td colspan=3><font color=\"#ff0000\">Please Select desired WINS mode above.</font></td></tr>");