diff --git a/samba/CHANGELOG.md b/samba/CHANGELOG.md index 670d21482..111b12f53 100644 --- a/samba/CHANGELOG.md +++ b/samba/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## 12.9.0 + +- Add configuration option to disable WSDD. When disabled, the wsdd service is + not started and the host is no longer advertised for automatic discovery. + Shares remain reachable by hostname or IP address. + ## 12.8.1 - Normalize stored `enabled_shares` values to lower case at startup. Values diff --git a/samba/DOCS.md b/samba/DOCS.md index 7947d44e2..12a67c804 100644 --- a/samba/DOCS.md +++ b/samba/DOCS.md @@ -50,6 +50,7 @@ compatibility_mode: false apple_compatibility_mode: true netbios: true local_master: true +network_discovery: true server_signing: "default" veto_files: - ._* @@ -121,6 +122,17 @@ When NetBIOS is enabled, try and become a local master browser on a subnet. Defaults to `true`. +### Option: `network_discovery` + +Advertise the host on the network using Web Services Dynamic Discovery, so it +appears automatically under Network in Windows File Explorer. Disable this if +you connect to the shares by hostname or IP address and do not want the host +to announce itself on the network. + +Disabling this has no effect on share availability; only on discovery. + +Defaults to `true`. + ### Option: `server_signing` Configure the SMB server signing requirement. This option can improve security by requiring message signing, which helps prevent man-in-the-middle attacks. diff --git a/samba/config.yaml b/samba/config.yaml index 51b16cc48..5b641f332 100644 --- a/samba/config.yaml +++ b/samba/config.yaml @@ -1,5 +1,5 @@ --- -version: 12.8.1 +version: 12.9.0 slug: samba name: Samba share description: Expose Home Assistant folders with SMB/CIFS @@ -35,6 +35,7 @@ options: apple_compatibility_mode: true netbios: true local_master: true + network_discovery: true server_signing: "default" veto_files: - ._* @@ -59,6 +60,7 @@ schema: apple_compatibility_mode: bool netbios: bool local_master: bool + network_discovery: bool server_signing: list(default|auto|mandatory|disabled) veto_files: - str diff --git a/samba/rootfs/etc/s6-overlay/scripts/enable-check.sh b/samba/rootfs/etc/s6-overlay/scripts/enable-check.sh index 4643c916e..555be3b2a 100755 --- a/samba/rootfs/etc/s6-overlay/scripts/enable-check.sh +++ b/samba/rootfs/etc/s6-overlay/scripts/enable-check.sh @@ -1,7 +1,7 @@ #!/command/with-contenv bashio # shellcheck shell=bash # ============================================================================== -# Enable/disable nmbd service per config +# Enable/disable optional services per config # ============================================================================== if bashio::config.true 'netbios'; then touch /etc/s6-overlay/s6-rc.d/user/contents.d/nmbd @@ -10,3 +10,11 @@ else rm -f /etc/s6-overlay/s6-rc.d/user/contents.d/nmbd bashio::log.info "Service nmbd disabled" fi + +if bashio::config.true 'network_discovery'; then + touch /etc/s6-overlay/s6-rc.d/user/contents.d/wsdd + bashio::log.info "Service wsdd enabled" +else + rm -f /etc/s6-overlay/s6-rc.d/user/contents.d/wsdd + bashio::log.info "Service wsdd disabled" +fi diff --git a/samba/translations/en.yaml b/samba/translations/en.yaml index 43ba9a80d..73a6a0eb4 100644 --- a/samba/translations/en.yaml +++ b/samba/translations/en.yaml @@ -41,6 +41,13 @@ configuration: description: >- When NetBIOS is enabled, try and become a local master browser on a subnet. + network_discovery: + name: Enable network discovery + description: >- + Advertise the host with Web Services Dynamic Discovery so it appears + automatically under Network in Windows File Explorer. Disable if you + connect by hostname or IP address and do not want the host to announce + itself on the network. Shares stay reachable either way. server_signing: name: Server signing description: >-