Skip to content

Commit

Permalink
Switched the securitydescriptorcache to uint64 index
Browse files Browse the repository at this point in the history
  • Loading branch information
lkarlslund committed Jun 15, 2022
1 parent 1ba67ae commit 595f776
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion modules/engine/globals.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

var (
securitydescriptorcachemutex sync.RWMutex
securityDescriptorCache = make(map[uint32]*SecurityDescriptor)
securityDescriptorCache = make(map[uint64]*SecurityDescriptor)

// AllRights = make(map[uuid.UUID]*Object) // Extented-Rights from Configuration - rightsGUID -> object
// AllSchemaClasses = make(map[uuid.UUID]*Object) // schemaIdGUID -> object
Expand Down
2 changes: 1 addition & 1 deletion modules/engine/object.go
Original file line number Diff line number Diff line change
Expand Up @@ -1004,7 +1004,7 @@ func (o *Object) cacheSecurityDescriptor(rawsd []byte) error {
}

securitydescriptorcachemutex.RLock()
cacheindex := xxhash.Checksum32(rawsd)
cacheindex := xxhash.Checksum64(rawsd)
if sd, found := securityDescriptorCache[cacheindex]; found {
securitydescriptorcachemutex.RUnlock()
o.sdcache = sd
Expand Down

0 comments on commit 595f776

Please sign in to comment.