]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commit
mgr/smb: generate smb.conf hosts allow & hosts deny values
authorJohn Mulligan <jmulligan@redhat.com>
Mon, 22 Sep 2025 18:49:31 +0000 (14:49 -0400)
committerJohn Mulligan <jmulligan@redhat.com>
Thu, 29 Jan 2026 17:07:04 +0000 (12:07 -0500)
commitbe1ee044d0a78a5b7d9705b86a70c8fe7a07e9e0
treec0660a0aabde0714bceddc77ddb4fdf6a1f5be23
parent7e5fea1b25d27069cdb73ef655ab9e46ffeb10f3
mgr/smb: generate smb.conf hosts allow & hosts deny values

Using the Share resource hosts_access parameter generate
smb.conf-equivalent configuration for the 'hosts allow' and 'hosts deny'
configuration parms. Note that currently we automatically set hosts deny
to all if *any* hosts allow is set to avoid the possibly surprising
result of explicitly setting hosts to allow and then having the share
continue to allow hosts not explicitly listed.

If needed, in the future we could allow the user to override the
default deny - but I'm trying to keep it real simple for now.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
src/pybind/mgr/smb/handler.py