RFR: 8277489: Rewrite JAAS UnixLoginModule with FFM [v2]
Shawn M Emery
duke at openjdk.org
Tue Dec 23 07:35:55 UTC 2025
On Mon, 22 Dec 2025 13:55:20 GMT, Weijun Wang <weijun at openjdk.org> wrote:
>> 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.
It looks like there has been prior work with this, at least with macos, e.g.: src/java.base/macosx/classes/jdk/internal/ffi/generated/errno/errno_h.java
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28931#discussion_r2642257630
More information about the build-dev
mailing list