Skip to content

Commit 05b125b

Browse files
committed
mgr/smb: Disable posix locking in share definition
The prerequisites for supporting durable handles[1] in Samba include disabling the mapping of POSIX locks, as well as setting the `kernel oplocks` and `kernel sharemodes` parameters to disabled. Currently this configuration is hard‑coded, but in the future it could be made conditional and combined with other settings to enable persistent handles on continuously available shares. [1] https://www.samba.org/samba/docs/current/man-html/smb.conf.5.html#DURABLEHANDLES Signed-off-by: Anoop C S <[email protected]>
1 parent bcde113 commit 05b125b

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

qa/suites/orch/cephadm/smb/tasks/deploy_smb_basic.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ tasks:
6060
"disable spoolss" = "yes"
6161
"guest ok" = "no"
6262
"smbd profiling level" = "on"
63+
"posix locking" = "no"
6364
[globals.domain.options]
6465
security = "USER"
6566
workgroup = "STANDALONE1"

qa/suites/orch/cephadm/smb/tasks/deploy_smb_domain.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ tasks:
5959
"disable spoolss" = "yes"
6060
"guest ok" = "no"
6161
"smbd profiling level" = "on"
62+
"posix locking" = "no"
6263
[globals.domain.options]
6364
security = "ads"
6465
workgroup = "DOMAIN1"

src/pybind/mgr/smb/handler.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -721,6 +721,7 @@ def _generate_share(
721721
'kernel share modes': 'no',
722722
'x:ceph:id': f'{share.cluster_id}.{share.share_id}',
723723
'smbd profiling share': 'yes',
724+
'posix locking': 'no',
724725
}
725726
}
726727
if share.comment is not None:

0 commit comments

Comments
 (0)