RFR: 8277489: Rewrite JAAS UnixLoginModule with FFM
Weijun Wang
weijun at openjdk.org
Mon Dec 22 13:57:54 UTC 2025
On Mon, 22 Dec 2025 07:19:07 GMT, Shawn M Emery <duke at openjdk.org> wrote:
>> Rewrite the native calls with FFM.
>
> src/jdk.security.auth/share/classes/com/sun/security/auth/module/UnixSystem.java line 64:
>
>> 62: int groupnum = getgroups(0, MemorySegment.NULL);
>> 63: if (groupnum == -1) {
>> 64: throw new RuntimeException("getgroups returns " + groupnum);
>
> Not a must-have, but would be nice to have a FFM for `errno` to provide better diagnostics.
Good idea. There is a `Linker.Option.captureCallState("errno")` feature and I'll see how to use it.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28931#discussion_r2639956766
More information about the security-dev
mailing list