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

Alan Bateman Alan.Bateman at oracle.com
Fri Mar 27 08:35:51 UTC 2020


On 27/03/2020 08:23, Langer, Christoph wrote:
>
> 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/ 
> <http://cr.openjdk.java.net/~clanger/webrevs/8241568.0/>
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8241568 
> <https://bugs.openjdk.java.net/browse/JDK-8241568>
>
> Please let me know what you think?
>
>
I suspect we used the Solaris man page in the original implementation 
and I don't think its backends define as many error codes. So I think 
this change is okay but I'm surprised it hasn't come up before (maybe 
this configuration wasn't common before).  Do you mind splitting the 
really long lines? That will avoid horizontal scrolling of the 
side-by-side diffs when this file is changed in the future.

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


More information about the nio-dev mailing list