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

8200468: Port the native GSS-API bridge to Windows #335

Closed
wants to merge 2 commits into from

Conversation

alexeybakhtin
Copy link
Contributor

@alexeybakhtin alexeybakhtin commented Jun 12, 2023

Hello,
I'd like to backport JDK-8200568: port the native GSS-API bridge to Windows to JDK8u
This is a prerequisite of the JDK-6722928 and JDK-8225687

The backport is not clean. I have to to make the following changes:
jdk/make/lib/SecurityLibraries.gmk

  • Patched manually, just removed platform dependency

jdk/src/share/native/sun/security/jgss/wrapper/NativeUtil.c

  • Clean merge except for copyright year

jdk/src/share/native/sun/security/jgss/wrapper/NativeUtil.h

  • Visual Studio 2010-2012 doesn't provide inttypes.h so provide appropriate definitions the header file
  • Manually updated copyright year

jdk/src/share/classes/sun/security/jgss/GSSManagerImpl.java

  • Manually removed platform OS dependency

jdk/src/solaris/native/sun/security/jgss/wrapper/NativeFunc.c is moved to jdk/src/share/native/sun/security/jgss/wrapper/NativeFunc.c

  • All changes applied manually because of JDK-8238388 already applied

jdk/src/solaris/native/sun/security/jgss/wrapper/NativeFunc.h is moved to jdk/src/share/native/sun/security/jgss/wrapper/NativeFunc.h

  • All changes applied clean

jdk/test/sun/security/krb5/auto/BasicProc.java

  • Manually added Windows platform dependency code

jdk/test/java/security/testlibrary/Proc.java

  • Manually extended debug output

All related jtreg tests passed successfully on Windows


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8200468: Port the native GSS-API bridge to Windows (Enhancement - P4)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk8u-dev.git pull/335/head:pull/335
$ git checkout pull/335

Update a local copy of the PR:
$ git checkout pull/335
$ git pull https://git.openjdk.org/jdk8u-dev.git pull/335/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 335

View PR using the GUI difftool:
$ git pr show -t 335

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk8u-dev/pull/335.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Jun 12, 2023

👋 Welcome back abakhtin! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot changed the title Backport 0b6fbf50d24438117c33fa1a7d3633b792c99983 8200468: Port the native GSS-API bridge to Windows Jun 12, 2023
@openjdk
Copy link

openjdk bot commented Jun 12, 2023

This backport pull request has now been updated with issue from the original commit.

@openjdk openjdk bot added backport rfr Pull request is ready for review labels Jun 12, 2023
@mlbridge
Copy link

mlbridge bot commented Jun 12, 2023

Webrevs

Copy link
Member

@gnu-andrew gnu-andrew left a comment

Choose a reason for hiding this comment

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

Mostly looks good but there are a couple of issues:

  • You mention adjusting the copyright header for NativeUtil.c and NativeUtil.h, but I don't see them in the patch. They should be bumped from 2014 to 2018. The other omissions are correct, as the files already have newer copyright headers.
  • The change of the @library line in BasicProc.java is unneeded. There is a Platform class in jdk.testlibrary which can be imported as jdk.testlibrary.Platform. We should aim to resolve this duplication (caused by the JFR import) going forward, but I think for now, the test should stick to one test library. Adding the /lib reference means it could potentially mix the two test libraries together as they have duplicated classes, so please drop the lib and use jdk.testlibrary.Platform for now.
  • In the 11u patch, the pc.env line is outside the !Platform.isWindows block, but seems to be inside in the 8u version.
    11u:
+            if (!Platform.isWindows()) {
+                Files.setPosixFilePermissions(Paths.get(label + ".ccache"),
+                        Set.of(PosixFilePermission.OWNER_READ,
+                                PosixFilePermission.OWNER_WRITE));
+            }
+            pc.env("KRB5CCNAME", "FILE:" + label + ".ccache");

$ find jdk/test/ -name 'Platform.java'
jdk/test/lib/testlibrary/jdk/testlibrary/Platform.java
jdk/test/lib/jdk/test/lib/Platform.java

@alexeybakhtin
Copy link
Contributor Author

Hello Andrew!
Thank you for the review.
I agree with the Platform usage. Switched to the jdk.testlibrary.Platform version.
The rest findings are also fixed.

Copy link
Member

@gnu-andrew gnu-andrew left a comment

Choose a reason for hiding this comment

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

Thanks. It looks good with the additional changes. If you flag with jdk8u-fix-request, I'll approve for 8u too.

What's the end goal here? JDK-6722928? I'm just wondering because that one will need a CSR, essentially a clone of what was done for 11u

@openjdk
Copy link

openjdk bot commented Jun 30, 2023

@alexeybakhtin This change now passes all automated pre-integration checks.

After integration, the commit message for the final commit will be:

8200468: Port the native GSS-API bridge to Windows

Reviewed-by: andrew

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 no new commits pushed to the master branch. If another commit should be pushed before you perform the /integrate command, your PR will be automatically rebased. If you prefer to avoid any potential automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Jun 30, 2023
@alexeybakhtin
Copy link
Contributor Author

What's the end goal here? JDK-6722928? I'm just wondering because that one will need a CSR, essentially a clone of what was done for 11u

Thank you for the review. Yes, you are right. The final goal is to backport the native GSS-API library for Windows on the basis of Windows SSPI APIs (JDK-6722928) and corresponding fixes (like JDK-8225687). The CSR for JDK-6722928 is a part of backport activity, so I'm going to submit it also.

@gnu-andrew
Copy link
Member

Thanks. I've added jdk8u-fix-yes.

It is a little curious that Oracle apparently backported 8225687 to 8u & 11u, but not 6722928, and so there is no CSR in place already. Definitely worth making sure there's plenty of time to allow the CSR to be approved, so thanks for starting on this early in the 8u392 cycle.

@alexeybakhtin
Copy link
Contributor Author

/integrate

@openjdk
Copy link

openjdk bot commented Jul 3, 2023

Going to push as commit 0944384.

@openjdk openjdk bot added the integrated Pull request has been integrated label Jul 3, 2023
@openjdk openjdk bot closed this Jul 3, 2023
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Jul 3, 2023
@openjdk
Copy link

openjdk bot commented Jul 3, 2023

@alexeybakhtin Pushed as commit 0944384.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport integrated Pull request has been integrated
2 participants