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

java.security.AccessControlException: access denied ("java.io.FilePer… #10018

Merged
merged 1 commit into from Feb 13, 2020

Conversation

normanmaurer
Copy link
Member

…mission" "/etc/os-release" "read")

Motivation:

Modifications:

  • Wrap the code and execute with an AccessController
  • Ignore SecurityException (by just logging it)
  • Add some more debug logging

Result:

Fixes #10017

@normanmaurer
Copy link
Member Author

/cc @asalamon74 @jasontedor

@normanmaurer normanmaurer added this to the 4.1.46.Final milestone Feb 11, 2020
@normanmaurer
Copy link
Member Author

@netty-bot test this please

@trustin
Copy link
Member

trustin commented Feb 12, 2020

Seems OK, but I guess a user might have configured the security manager to allow access for some of the files you're trying to read, i.e. AccessController.doPrivileged() could be done for each file.

@normanmaurer
Copy link
Member Author

@trustin got it... so one call per file. Makes sense. Let me change it :)

…mission" "/etc/os-release" "read")

Motivation:

Modifications:

- Wrap the code and execute with an AccessController
- Ignore SecurityException (by just logging it)
- Add some more debug logging

Result:

Fixes #10017
@normanmaurer
Copy link
Member Author

@trustin done

@normanmaurer
Copy link
Member Author

@netty-bot test this please

Copy link
Member

@trustin trustin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@normanmaurer normanmaurer merged commit 713e0aa into 4.1 Feb 13, 2020
@normanmaurer normanmaurer deleted the file_exists branch February 13, 2020 10:48
normanmaurer added a commit that referenced this pull request Feb 13, 2020
…mission" "/etc/os-release" "read") (#10018)

Motivation:

Modifications:

- Wrap the code and execute with an AccessController
- Ignore SecurityException (by just logging it)
- Add some more debug logging

Result:

Fixes #10017
ihanyong pushed a commit to ihanyong/netty that referenced this pull request Jul 31, 2020
…mission" "/etc/os-release" "read") (netty#10018)

Motivation:

Modifications:

- Wrap the code and execute with an AccessController
- Ignore SecurityException (by just logging it)
- Add some more debug logging

Result:

Fixes netty#10017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

java.security.AccessControlException: access denied ("java.io.FilePermission" "/etc/os-release" "read")
2 participants