-
Notifications
You must be signed in to change notification settings - Fork 5.8k
8344218: Remove calls to SecurityManager and and doPrivileged in java.net.NetworkInterface after JEP 486 integration #22177
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
Conversation
…InterfaceAddresses
👋 Welcome back eirbjo! A progress list of the required criteria for merging this PR into |
@eirbjo This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 25 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
/issue 8344218 |
@eirbjo This issue is referenced in the PR title - it will now be updated. |
/csr |
…longer filters for privileges using SecurityManager
Webrevs
|
* | ||
* @return a byte array containing the address, or {@code null} if | ||
* the address doesn't exist or is not accessible | ||
* the address doesn't exist |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"accessed given the current privileges" relates to OS privileges/capabilities so not security manager related. So I think drop the change the method description, only change to this method should be the removal of the SM permission check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, so "not only security manager related then" :-) The current implementation does return null on checkPermission failure, but yes, there are other ways null may be returned.
I'll remove the method description changes and update the CSR as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, so "not only security manager related then" :-) The current implementation does return null on checkPermission failure, but yes, there are other ways null may be returned.
JEP 486 removed the sentence "If a security manager is set .." and changed the return description. There are platforms where the process needs privileges or capabilities to read the hardware address so that the motive for the description. Thanks for dropping this change from the PR/CSR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to see this code go away.
/integrate |
Going to push as commit b12c5b4.
Your commit was automatically rebased without conflicts. |
Please review this PR which cleans up SecurityManager related code from
java.net.NetworkInterface
after JEP-486.The specification of three methods in NetworkInterface is updated to reflect that these methods no longer use
SecurityManager
to filter their results such that a subset may be returned. A CSR draft has been proposed to fix this leftover from JEP-486.The actual SecurityManager cleanup:
getCheckedInetAddresses
method is removed.getInetAddresses
is updated to returnenumerationFromArray(addrs)
(with no filtering)inetAddresses
is update to returnstreamFromArray(addrs)
(with no filtering)getInterfaceAddresses
is updated to return the list of InterfaceAddresses (with no filtering)getHardwareAddress
is updated to return the result with no permission checkingGHA and tier2 results pending.
Progress
Issues
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/22177/head:pull/22177
$ git checkout pull/22177
Update a local copy of the PR:
$ git checkout pull/22177
$ git pull https://git.openjdk.org/jdk.git pull/22177/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 22177
View PR using the GUI difftool:
$ git pr show -t 22177
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/22177.diff
Using Webrev
Link to Webrev Comment