On Fri, 2 Jan 2026 23:31:49 GMT, Martin Doerr <[email protected]> wrote:

>> 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/UnixLoginModule.java
>  line 154:
> 
>> 152:         if (ss.getUsername() != null) {
>> 153:             // When getpwuid_r fails, username will not be available.
>> 154:             userPrincipal = new UnixPrincipal(ss.getUsername());
> 
> With this change, the test passes on AIX (though the `getpwuid_r` call does 
> not work as expected).
> @JoKern65, @varada1110: The `getpwuid_r` FFM call doesn't set the `result`. 
> The strange thing is that it works when I call it through a C wrapper (same 
> FFM call):
> 
> #include <pwd.h>
> 
> __attribute__((visibility("default"))) int call_getpwuid_r(int uid, struct 
> passwd *pwd,
>                                              char *buf, size_t buflen, struct 
> passwd **result)
> {
>   return getpwuid_r(uid, pwd, buf, buflen, result);
> }
> 
> Any idea?

Have you tried `jextract` on AIX? Does the generated code have the same 
`FunctionDescriptor`?

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/28931#discussion_r2658665306

Reply via email to