(sc *ssh.ServerConn)
| 63 | } |
| 64 | |
| 65 | func (d *SftpDriver) GetFileSystem(sc *ssh.ServerConn) (sftpd.FileSystem, error) { |
| 66 | userObj, err := op.GetUserByName(sc.User()) |
| 67 | if err != nil { |
| 68 | return nil, err |
| 69 | } |
| 70 | ctx := context.Background() |
| 71 | ctx = context.WithValue(ctx, conf.UserKey, userObj) |
| 72 | ctx = context.WithValue(ctx, conf.MetaPassKey, "") |
| 73 | ctx = context.WithValue(ctx, conf.ClientIPKey, sc.RemoteAddr().String()) |
| 74 | ctx = context.WithValue(ctx, conf.ProxyHeaderKey, d.proxyHeader) |
| 75 | return &sftp.DriverAdapter{FtpDriver: ftp.NewAferoAdapter(ctx)}, nil |
| 76 | } |
| 77 | |
| 78 | func (d *SftpDriver) Close() { |
| 79 | } |
nothing calls this directly
no test coverage detected