rgbyrnes added the comment:

We are seeing this too, on RHEL 7.

It happens when /etc/nsswitch.conf has ...

    shadow: files ldap

The ldap nss back end seems to set errno = ENOENT when it gets no response from 
the ldap server.  If we remove ldap (leaving only files), then we see errno = 
EACCES.

Is it correct to insist on EACCES?  The man page cited in the last message says 
only that ...

    The functions that return a pointer return NULL if no more entries are 
available or if an error occurs during processing.  The functions which have 
int as the return value return 0 for success and -1 for failure, with errno set 
to indicate the cause of the error.

getspnam isn't one of the "functions which have int as the return value," so it 
isn't clear whether application code should make any assumptions about errno 
when it returns.

----------
components: +Tests
nosy: +rgbyrnes
type:  -> behavior

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29155>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to