This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rgbyrnes
Recipients Gerrit.Holl, r.david.murray, rgbyrnes, serhiy.storchaka
Date 2017-08-03.15:51:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1501775466.0.0.0391424619674.issue29155@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2017-08-03 15:51:06rgbyrnessetrecipients: + rgbyrnes, r.david.murray, Gerrit.Holl, serhiy.storchaka
2017-08-03 15:51:06rgbyrnessetmessageid: <1501775466.0.0.0391424619674.issue29155@psf.upfronthosting.co.za>
2017-08-03 15:51:05rgbyrneslinkissue29155 messages
2017-08-03 15:51:05rgbyrnescreate