Обновить internal/endpoint/endpoint.go

This commit is contained in:
2026-07-16 08:44:03 +03:00
parent 53dd46c617
commit 71ef236e91
+2 -16
View File
@@ -600,22 +600,8 @@ func (s *Receiver) clientRootFromCtx(ctx context.Context) *zfs.DatasetPath {
return s.conf.RootWithoutClientComponent.Copy() return s.conf.RootWithoutClientComponent.Copy()
} }
var clientIdentity string // Патч: всегда возвращаем только root_fs без client_identity
if s.Test_OverrideClientIdentityFunc != nil { return s.conf.RootWithoutClientComponent.Copy()
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
} }
type subroot struct { type subroot struct {