Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions samba/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 12.5.5

- Add option for setting smb encrypted parameter

## 12.5.4

- Fix invalid inverted commas in server signing parameter
Expand Down
7 changes: 7 additions & 0 deletions samba/DOCS.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,13 @@ This can cause issues with file systems that do not support xattr such as exFAT.

Defaults to `true`.

### Option: `encryption`

Configure the SMB encryption requirement. This option encrypts all traffic between client and server and prevents guest access if set to required.
Refer to the man page for smb.conf for detailed information about the values: **off**, **desired** and **required**.

Defaults to `desired`.

### 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.
Expand Down
4 changes: 3 additions & 1 deletion samba/config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
version: 12.5.4
version: 12.5.5
slug: samba
name: Samba share
description: Expose Home Assistant folders with SMB/CIFS
Expand Down Expand Up @@ -37,6 +37,7 @@ options:
- ssl
compatibility_mode: false
apple_compatibility_mode: true
encryption: "desired"
server_signing: "default"
veto_files:
- ._*
Expand All @@ -60,6 +61,7 @@ schema:
- "match(^(?i:(addons|addon_configs|backup|config|media|share|ssl))$)"
compatibility_mode: bool
apple_compatibility_mode: bool
encryption: list(off|desired|required)
server_signing: list(default|auto|mandatory|disabled)
veto_files:
- str
Expand Down
12 changes: 10 additions & 2 deletions samba/rootfs/usr/share/tempio/smb.gtpl
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,20 @@
interfaces = lo {{ .interfaces | join " " }}
hosts allow = 127.0.0.1 {{ .allow_hosts | join " " }}

smb encrypt = {{ .encryption }}
{{ if eq .encryption "required" }}
client min protocol = SMB3
client max protocol = SMB3
server min protocol = SMB3
server max protocol = SMB3
server signing = auto
{{ else }}
server signing = {{ .server_signing }}
{{ if .compatibility_mode }}
client min protocol = NT1
server min protocol = NT1
{{ end }}
{{ end }}

mangled names = no
dos charset = CP850
Expand All @@ -31,8 +41,6 @@
vfs objects = catia fruit streams_xattr
{{ end }}

server signing = {{ .server_signing }}

{{ if (has "config" .enabled_shares) }}
[config]
browseable = yes
Expand Down
6 changes: 6 additions & 0 deletions samba/translations/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ configuration:
Enable Samba configurations to improve interoperability with Apple
devices. May cause issues with file systems that do not support xattr
such as exFAT.
encryption:
name: Encryption
description: >-
Configure SMB encryption.
SMB3 protocol is used if set to required.
Compatibility mode option will be ignored in this case.
server_signing:
name: Server signing
description: >-
Expand Down