smb: refresh Kerberos credentials when ccache file changes

This change enhances the SMB backend in Rclone to automatically refresh
Kerberos credentials when the associated ccache file is updated.

Previously, credentials were only loaded once per path and cached
indefinitely, which caused issues when service tickets expired or the
cache was renewed on the server.
This commit is contained in:
Sudipto Baral
2025-07-17 09:34:44 -04:00
committed by GitHub
parent 70226cc653
commit 9c7594d78f
3 changed files with 148 additions and 41 deletions

View File

@ -38,7 +38,7 @@ func (f *Fs) dial(ctx context.Context, network, addr string) (*conn, error) {
d := &smb2.Dialer{}
if f.opt.UseKerberos {
cl, err := createKerberosClient(f.opt.KerberosCCache)
cl, err := NewKerberosFactory().GetClient(f.opt.KerberosCCache)
if err != nil {
return nil, err
}