Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply FilePermCompat.newPermPlusAltPath to limited privileged permission #3186

Merged
merged 1 commit into from
Oct 9, 2018

Conversation

JasonFengJ9
Copy link
Member

Apply FilePermCompat.newPermPlusAltPath to limited privileged permission

Apply FilePermCompat.newPermPlusAltPath to limited privileged permission before checking incoming permission to ensure FilePermission compatibility after JDK-8164705.

Verified manually that the test suite JTReg test: sun/security/util/FilePermCompat/CompatImpact.java now passes. (#3104 fixed a specific sub-test within this test suite)

For what it's worth, following is a standalone testcase after digging deep into the regression test suite:

Test code main with default permission (i.e., without required security permission)

public static void main(String[] args) {
  CodebaseWithPerm.runWithPerm();
}

Code with java.security.AllPermission

public class CodebaseWithPerm {
	public static void runWithPerm() {
		AccessController.doPrivileged((PrivilegedAction<Boolean>)
			() -> new File("xxx").exists(),
			null,
			new FilePermission("/team/jasonf/tbd/xxx", "read"));
	}
}

Not adding this to the automated test since it is already included in the regression test suite.

Reviewer: @pshipton
FYI: @DanHeidinga

Signed-off-by: Jason Feng fengj@ca.ibm.com

Apply FilePermCompat.newPermPlusAltPath to limited privileged permission
before checking incoming permission to ensure FilePermission
compatibility after JDK-8164705.

Signed-off-by: Jason Feng <fengj@ca.ibm.com>
@pshipton
Copy link
Member

pshipton commented Oct 9, 2018

jenkins test all zlinux jdk11

@pshipton
Copy link
Member

pshipton commented Oct 9, 2018

jenkins test extended zlinux jdk11

@pshipton pshipton merged commit cfc118a into eclipse-openj9:master Oct 9, 2018
@JasonFengJ9 JasonFengJ9 deleted the acccheck branch April 4, 2019 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants