-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Minor formatting goofs in ksmbd.conf.example #300
Comments
Please send the patch to us. |
Patch has been sent via email. (I couldn't find a way to enter it here without it getting bogusly formatted -- indentation altered, and the leading '-' of the unified diff getting turned into bullets. Is there a way?) |
This confusion is related to problems caused by commit 785a9d2. Before commit 785a9d2, Similarly, Lines 97 to 106 in 785a9d2
As a result of commit 785a9d2, the description for |
@atheik Okay, Please fix it. I will apply it if you provide the patch to me. |
[PATCH] ksmbd-tools: fix handling of max connections on config reload (click the arrow to expand)From e68f7110ea5ee6e27968daf9fec81d13c89d2407 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Atte=20Heikkil=C3=A4?= <[email protected]>
Date: Sun, 14 May 2023 21:37:17 +0300
Subject: [PATCH] ksmbd-tools: fix handling of max connections on config reload
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
As of commit 785a9d2, `max connections' is both a global parameter and
a share parameter. This introduces a bug where the global parameter
is confused for the share parameter on config reload if a share has not
specified the latter. This bug is identical to the one fixed in commit
a09f767 for the `guest account' global and share parameters. As such,
fix it the same way. Additionally, since the `max connections' *share*
parameter can no longer be given in the global section, remove it from
the ksmbd.conf.example file. Also, fix the `smb3 encryption' default.
Finally, describe both the global parameter and the share parameter in
ksmbd.conf(5) since they are distinct. Omit the use of number suffixes
since they are not supported by the share parameter code path.
Signed-off-by: Atte Heikkilä <[email protected]>
---
ksmbd.conf.5.in | 10 ++++++++--
ksmbd.conf.example | 5 ++---
tools/config_parser.c | 1 +
3 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/ksmbd.conf.5.in b/ksmbd.conf.5.in
index efb9c3f..6fd2bf7 100644
--- a/ksmbd.conf.5.in
+++ b/ksmbd.conf.5.in
@@ -173,10 +173,16 @@ Maximum number of simultaneous sessions to all shares.
Default: \fBmax active sessions = 1024\fR \" KSMBD_CONF_DEFAULT_SESS_CAP
.TP
\fBmax connections\fR (G)
+Maximum number of simultaneous connections to the server.
+With \fBmax connections = 0\fR, the value will be set to the maximum allowed number of 65536. \" KSMBD_CONF_MAX_CONNECTIONS
+
+Default: \fBmax connections = 128\fR \" KSMBD_CONF_DEFAULT_CONNECTIONS
+.TP
+\fBmax connections\fR (S)
Maximum number of simultaneous connections to the share.
-The maximum value is 64k. Values greater than 64k or 0 will be silently set to 64k.
+With \fBmax connections = 0\fR, the value will be set to the maximum allowed number of 65536. \" KSMBD_CONF_MAX_CONNECTIONS
-Default: \fBmax connections = 128\fR
+Default: \fBmax connections = 128\fR \" KSMBD_CONF_DEFAULT_CONNECTIONS
.TP
\fBmax open files\fR (G)
Maximum number of simultaneous open files for a client.
diff --git a/ksmbd.conf.example b/ksmbd.conf.example
index 2e1eda8..c7e70af 100644
--- a/ksmbd.conf.example
+++ b/ksmbd.conf.example
@@ -11,6 +11,7 @@
kerberos service name =
map to guest = never
max active sessions = 1024
+ max connections = 128
max open files = 10000
netbios name = KSMBD SERVER
restrict anonymous = 0
@@ -26,11 +27,10 @@
smb2 max read = 4MB
smb2 max trans = 1MB
smb2 max write = 4MB
- smb3 encryption = no
+ smb3 encryption = auto
smbd max io size = 8MB
tcp port = 445
workgroup = WORKGROUP
- max connections = 128
; share parameters for all sections
browseable = yes
@@ -45,7 +45,6 @@
hide dot files = yes
inherit owner = no
invalid users =
- max connections = 128
oplocks = yes
path =
read list =
diff --git a/tools/config_parser.c b/tools/config_parser.c
index a675b51..ae19db8 100644
--- a/tools/config_parser.c
+++ b/tools/config_parser.c
@@ -598,6 +598,7 @@ static void global_conf_update(struct smbconf_group *group)
return;
g_hash_table_remove(global_group->kv, "guest account");
+ g_hash_table_remove(global_group->kv, "max connections");
g_hash_table_foreach(global_group->kv, append_key_value, group->kv);
}
--
2.40.1
|
@atheik Applied. thanks! |
There are two related formatting goofs in ksmbd.conf.example (3.4.8 ksmbd-tools).
They're very minor; I mention them only because both that file and the ksmdb.conf man page meet a very high standard.
The text was updated successfully, but these errors were encountered: