Enable net usershares by default at build time
authormathiaz@ubuntu.com <mathiaz@ubuntu.com>
Mon, 6 Jan 2025 18:20:31 +0000 (21:20 +0300)
committerMichael Tokarev <mjt@tls.msk.ru>
Mon, 6 Jan 2025 18:20:31 +0000 (21:20 +0300)
Enable net usershares by default at build time, with a limit of 100, and update
the corresponding documentation.

Bug-Debian: http://bugs.debian.org/443230
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/samba/+bug/128548
Forwarded: not-needed

Gbp-Pq: Name usershare.patch

docs-xml/smbdotconf/misc/usersharemaxshares.xml
lib/param/loadparm.c
source3/param/loadparm.c

index 0d69bb82c92f7734a662c292bd529235e6c954c2..e98585710e5cb2d24c2b94d78ba5149915e74377 100644 (file)
@@ -9,5 +9,5 @@
        </para>
 
 </description>
-<value type="default">0</value>
+<value type="default">100</value>
 </samba:parameter>
index ed5160d547bcbc2528a6ad7ad57ffd2cd8a23b91..d427db992e68ab6750c5ecbcc5e9570777e93e84 100644 (file)
@@ -3055,6 +3055,8 @@ struct loadparm_context *loadparm_init(TALLOC_CTX *mem_ctx)
 
        lpcfg_do_global_parameter(lp_ctx, "init logon delay", "100");
 
+       lpcfg_do_global_parameter(lp_ctx, "usershare max shares", "100");
+
        lpcfg_do_global_parameter(lp_ctx, "usershare owner only", "yes");
 
        lpcfg_do_global_parameter(lp_ctx, "-valid", "yes");
index f9bc1c427961468544002b730ef8a78a65931ed1..ab712b51f7db74a506b1af7969e0a0373372f64f 100644 (file)
@@ -858,7 +858,7 @@ void loadparm_s3_init_globals(struct loadparm_context *lp_ctx,
        lpcfg_string_set(Globals.ctx, &Globals.usershare_path, s);
        TALLOC_FREE(s);
        lpcfg_string_set(Globals.ctx, &Globals.usershare_template_share, "");
-       Globals.usershare_max_shares = 0;
+       Globals.usershare_max_shares = 100;
        /* By default disallow sharing of directories not owned by the sharer. */
        Globals.usershare_owner_only = true;
        /* By default disallow guest access to usershares. */