]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Renamed, and bug fixed:
authorBarry Warsaw <barry@python.org>
Wed, 11 Dec 1996 00:15:58 +0000 (00:15 +0000)
committerBarry Warsaw <barry@python.org>
Wed, 11 Dec 1996 00:15:58 +0000 (00:15 +0000)
commitadbf4e66df714efecbf8f3cfd3c849fc043b4323
treebf1ccb6e7cd5ab4257c2758ece5d62a9fc892fe8
parent3f236dee3a5089b1aa460d1b133fa0dbf0a509c2
Renamed, and bug fixed:

Two interesting problems in nis_maplist().  First, it is possible that
clnt_create() will return NULL.  This was being caught, but no Python
error was being set.  I use clnt_spcreateerror() to generate the value
of the exception.

But why would clnt_create() fail?  It's because no server was being
found.  And why was this?  It was because nis_maplist() tried only to
get the NIS master for the first map in the aliases list, which is
passwd.byname, and guess what?  That's the one NIS map CNRI does *not*
export!  So the yp_master() call was failing to return a valid
server.  I now cycle through all the map aliases until I find a valid
master.  If not, a different exception is set.

I'm not sure this is the completely correct way to do all this, but
short of rewriting the entire nismodule.c (to expose the proper API to
Python), it should do the trick.
Modules/nismodule.c