keep the shared weaving cache out of the world-writable temp directory#360
Open
nabhan06 wants to merge 1 commit into
Open
keep the shared weaving cache out of the world-writable temp directory#360nabhan06 wants to merge 1 commit into
nabhan06 wants to merge 1 commit into
Conversation
Signed-off-by: sayed nabhan <nabhan@bugqore.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Shared weaving cache defaults to /tmp
With
-Daj.weaving.cache.enabled=true -Daj.weaving.cache.impl=sharedand no explicitaj.weaving.cache.dir,SimpleCacheFactory.PATH_DEFAULTputs the cache in the system temp directory, which every local user can write to.StoreableCachingMap.initdeserializescache.idxfrom there,readFromPathreads the paths it holds, and those bytes come back out ofAj.preProcessas the class definition (plusinitializeClasscallsdefineClasson the generated-class entries), so a second local account picks what any woven class runs.Default is now a per-user directory below
java.io.tmpdircreated with owner-only permissions, and a cache directory that is a symlink or is reachable by group or other is refused rather than used. Anyone who already setsaj.weaving.cache.dirto a private directory is unaffected; a directory that fails the check logs to stderr and turns the cache off instead of weaving from it.