smb: add --smb-kerberos-ccache option to set kerberos ccache per smb backend

This commit is contained in:
Sudipto Baral
2025-07-10 05:17:42 -04:00
committed by GitHub
parent b6767820de
commit 2964b1a169
8 changed files with 264 additions and 39 deletions

View File

@@ -107,6 +107,20 @@ Set to 0 to keep connections indefinitely.
Help: "Whether the server is configured to be case-insensitive.\n\nAlways true on Windows shares.",
Default: true,
Advanced: true,
}, {
Name: "kerberos_ccache",
Help: `Path to the Kerberos credential cache (krb5cc).
Overrides the default KRB5CCNAME environment variable and allows this
instance of the SMB backend to use a different Kerberos cache file.
This is useful when mounting multiple SMB with different credentials
or running in multi-user environments.
Supported formats:
- FILE:/path/to/ccache Use the specified file.
- DIR:/path/to/ccachedir Use the primary file inside the specified directory.
- /path/to/ccache Interpreted as a file path.`,
Advanced: true,
}, {
Name: config.ConfigEncoding,
Help: config.ConfigEncodingHelp,
@@ -137,6 +151,7 @@ type Options struct {
Domain string `config:"domain"`
SPN string `config:"spn"`
UseKerberos bool `config:"use_kerberos"`
KerberosCCache string `config:"kerberos_ccache"`
HideSpecial bool `config:"hide_special_share"`
CaseInsensitive bool `config:"case_insensitive"`
IdleTimeout fs.Duration `config:"idle_timeout"`