Обновить internal/endpoint/endpoint.go
This commit is contained in:
@@ -600,22 +600,8 @@ func (s *Receiver) clientRootFromCtx(ctx context.Context) *zfs.DatasetPath {
|
||||
return s.conf.RootWithoutClientComponent.Copy()
|
||||
}
|
||||
|
||||
var clientIdentity string
|
||||
if s.Test_OverrideClientIdentityFunc != nil {
|
||||
clientIdentity = s.Test_OverrideClientIdentityFunc()
|
||||
} else {
|
||||
var ok bool
|
||||
clientIdentity, ok = ctx.Value(ClientIdentityKey).(string) // no shadow
|
||||
if !ok {
|
||||
panic("ClientIdentityKey context value must be set")
|
||||
}
|
||||
}
|
||||
|
||||
clientRoot, err := clientRoot(s.conf.RootWithoutClientComponent, clientIdentity)
|
||||
if err != nil {
|
||||
panic(fmt.Sprintf("ClientIdentityContextKey must have been validated before invoking Receiver: %s", err))
|
||||
}
|
||||
return clientRoot
|
||||
// Патч: всегда возвращаем только root_fs без client_identity
|
||||
return s.conf.RootWithoutClientComponent.Copy()
|
||||
}
|
||||
|
||||
type subroot struct {
|
||||
|
||||
Reference in New Issue
Block a user