RFR (S): 8241568: (fs) UserPrincipalLookupService.lookupXXX failure with IOE "Operation not permitted"

Langer, Christoph christoph.langer at sap.com
Fri Mar 27 08:23:28 UTC 2020


Hi,

please review a change to UnixNativeDispatcher.c for doing uid/gid lookup via getpwnam_r/getgrnam_r.

As per the man pages [0], [1], the errno values EBADF or EPERM also mean "The given name or uid/gid was not found." (As well as rc=0 or errno values ENOENT or ESRCH). In the JDK this should translate into a UserPrincipalNotFoundException rather than an IOException. We encountered a system configuration (Ubuntu 18.04 with sssd with services "nss,pam,sudo,ssh", domain against a global active directory) where this would manifest and make test java/nio/file/attribute/PosixFileAttributeView/Basic.java fail.

I propose to fix this the following way: http://cr.openjdk.java.net/~clanger/webrevs/8241568.0/
Bug: https://bugs.openjdk.java.net/browse/JDK-8241568

Please let me know what you think?

Thanks
Christoph

[0] https://linux.die.net/man/3/getpwnam_r
[1] https://linux.die.net/man/3/getgrnam_r

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/nio-dev/attachments/20200327/3830d994/attachment.htm>


More information about the nio-dev mailing list