RFR: 8277489: Rewrite JAAS UnixLoginModule with FFM [v5]
Maurizio Cimadamore
mcimadamore at openjdk.org
Mon Jan 5 12:28:23 UTC 2026
On Fri, 2 Jan 2026 17:00:37 GMT, Weijun Wang <weijun at openjdk.org> wrote:
>> Rewrite the native calls with FFM.
>
> Weijun Wang has updated the pull request incrementally with one additional commit since the last revision:
>
> fail early on Windows, and more comments
src/jdk.security.auth/share/classes/com/sun/security/auth/module/UnixSystem.java line 90:
> 88: = (ValueLayout.OfLong) LINKER.canonicalLayouts().get("size_t");
> 89:
> 90: private static Linker.Option ccs = Linker.Option.captureCallState("errno");
names of static final fields should be capitalized?
src/jdk.security.auth/share/classes/com/sun/security/auth/module/UnixSystem.java line 121:
> 119: // While we don't need those fields here, the struct needs to be
> 120: // big enough to avoid buffer overflow when `getpwuid_r` is called.
> 121: MemoryLayout.sequenceLayout(100, C_CHAR).withName("dummy"));
maybe use a padding layout here? (assuming you don't want clients to access the bytes in `dummy`)
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28931#discussion_r2661328588
PR Review Comment: https://git.openjdk.org/jdk/pull/28931#discussion_r2661324659
More information about the build-dev
mailing list