mirror of
https://github.com/rclone/rclone.git
synced 2025-08-13 23:38:51 +02:00
fs: deglobalise the config #4685
This is done by making fs.Config private and attaching it to the context instead. The Config should be obtained with fs.GetConfig and fs.AddConfig should be used to get a new mutable config that can be changed.
This commit is contained in:
@ -145,7 +145,7 @@ func (s *server) serve() (err error) {
|
||||
// An SSH server is represented by a ServerConfig, which holds
|
||||
// certificate details and handles authentication of ServerConns.
|
||||
s.config = &ssh.ServerConfig{
|
||||
ServerVersion: "SSH-2.0-" + fs.Config.UserAgent,
|
||||
ServerVersion: "SSH-2.0-" + fs.GetConfig(s.ctx).UserAgent,
|
||||
PasswordCallback: func(c ssh.ConnMetadata, pass []byte) (*ssh.Permissions, error) {
|
||||
fs.Debugf(describeConn(c), "Password login attempt for %s", c.User())
|
||||
if s.proxy != nil {
|
||||
|
Reference in New Issue
Block a user