diff --git a/profile/merge.go b/profile/merge.go index 358f9bf7..a1f7707e 100644 --- a/profile/merge.go +++ b/profile/merge.go @@ -30,7 +30,6 @@ func MergeProfiles(name string, primary *Profile, secondaries ...*Profile) (newP Description: primary.Description, Homepage: primary.Homepage, UsePresentationPath: false, // Disable presentation path. - SecurityLevel: primary.SecurityLevel, Config: primary.Config, Created: nowUnix, } diff --git a/profile/profile-layered.go b/profile/profile-layered.go index 4b89abda..acd88da3 100644 --- a/profile/profile-layered.go +++ b/profile/profile-layered.go @@ -135,8 +135,6 @@ func NewLayeredProfile(localProfile *Profile) *LayeredProfile { // TODO: Load additional profiles. - lp.updateCaches() - lp.CreateMeta() lp.SetKey(runtime.DefaultRegistry.DatabaseName() + ":" + revisionProviderPrefix + localProfile.ScopedID()) @@ -292,9 +290,6 @@ func (lp *LayeredProfile) Update(md MatchingData, createProfileCallback func() * // get global config validity flag lp.globalValidityFlag.Refresh() - // update cached data fields - lp.updateCaches() - // bump revision counter lp.increaseRevisionCounter(false) } @@ -302,17 +297,6 @@ func (lp *LayeredProfile) Update(md MatchingData, createProfileCallback func() * return lp.RevisionCounter } -func (lp *LayeredProfile) updateCaches() { - // update security level - var newLevel uint8 - for _, layer := range lp.layers { - if newLevel < layer.SecurityLevel { - newLevel = layer.SecurityLevel - } - } - atomic.StoreUint32(lp.securityLevel, uint32(newLevel)) -} - // SecurityLevel returns the highest security level of all layered profiles. This function is atomic and does not require any locking. func (lp *LayeredProfile) SecurityLevel() uint8 { return uint8(atomic.LoadUint32(lp.securityLevel)) diff --git a/profile/profile.go b/profile/profile.go index 30702b69..6766acf8 100644 --- a/profile/profile.go +++ b/profile/profile.go @@ -87,12 +87,6 @@ type Profile struct { //nolint:maligned // not worth the effort UsePresentationPath bool // Fingerprints holds process matching information. Fingerprints []Fingerprint - // SecurityLevel is the mininum security level to apply to - // connections made with this profile. - // Note(ppacher): we may deprecate this one as it can easily - // be "simulated" by adjusting the settings - // directly. - SecurityLevel uint8 // Config holds profile specific setttings. It's a nested // object with keys defining the settings database path. All keys // until the actual settings value (which is everything that is not