summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Ambach <ambi@samba.org>2022-05-18 22:07:17 +0200
committerJeremy Allison <jra@samba.org>2022-06-06 16:46:35 +0000
commit5f1f3b0f06327753ee939158c5ef826cc9514249 (patch)
tree91298812e7bbf00e18aef8f463563537e68b151c
parent470d4a3b61bc6924edcfc1453b01d7d6a8a6abdb (diff)
downloadsamba-5f1f3b0f06327753ee939158c5ef826cc9514249.tar.gz
docs-xml: add new parameter volume serial number
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14765 RN: add new smb.conf parameter "volume serial number" to allow overriding the generated default value Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
-rw-r--r--docs-xml/smbdotconf/misc/volumeserialnumber.xml14
-rw-r--r--lib/param/loadparm.c1
-rw-r--r--source3/param/loadparm.c1
3 files changed, 16 insertions, 0 deletions
diff --git a/docs-xml/smbdotconf/misc/volumeserialnumber.xml b/docs-xml/smbdotconf/misc/volumeserialnumber.xml
new file mode 100644
index 00000000000..41cf2c2785e
--- /dev/null
+++ b/docs-xml/smbdotconf/misc/volumeserialnumber.xml
@@ -0,0 +1,14 @@
+<samba:parameter name="volume serial number"
+ context="S"
+ type="integer"
+ xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
+<description>
+ <para>This allows to override the volume serial number
+ (a 32bit value) reported for a share.</para>
+ <para>The special value <emphasis>-1</emphasis> (default) stands for
+ a unique number that is calculated for each share.</para>
+</description>
+
+<value type="default">-1</value>
+<value type="example">0xabcdefgh</value>
+</samba:parameter>
diff --git a/lib/param/loadparm.c b/lib/param/loadparm.c
index ab73fbdda3d..599c4b00966 100644
--- a/lib/param/loadparm.c
+++ b/lib/param/loadparm.c
@@ -2529,6 +2529,7 @@ struct loadparm_context *loadparm_init(TALLOC_CTX *mem_ctx)
lp_ctx->sDefault->aio_write_size = 1;
lp_ctx->sDefault->smbd_search_ask_sharemode = true;
lp_ctx->sDefault->smbd_getinfo_ask_sharemode = true;
+ lp_ctx->sDefault->volume_serial_number = -1;
DEBUG(3, ("Initialising global parameters\n"));
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 1b7b0b06484..2b6e0bb248c 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -256,6 +256,7 @@ static const struct loadparm_service _sDefault =
.smbd_getinfo_ask_sharemode = true,
.spotlight_backend = SPOTLIGHT_BACKEND_NOINDEX,
.honor_change_notify_privilege = false,
+ .volume_serial_number = -1,
.dummy = ""
};