Commit Graph

15 Commits

Author SHA1 Message Date
Guido van Rossum 61b705a570 Patch by Fred Gansevles (the module's original author).
This patch fixes 3 small problems.
1) If a map is used which is generated with 'makedbm -a',
   the trailing '\0' is now handled correctely.
2) The nis.maps() function skipped the first map in the output list.
3) The library '-lnsl' is added in Setup.in (needed on Linux glibc2 and
   Solaris systems. Maybe on other systems too?)

[I note that this still doesn't work when you are using NIS+ --GvR]
2000-02-29 15:52:40 +00:00
Guido van Rossum 7e48898d86 Use the t# format where appropriate. Greg Stein. 1998-10-08 02:25:24 +00:00
Guido van Rossum c501583dfa Make gcc -Wall happy. 1998-10-07 16:36:14 +00:00
Guido van Rossum 0cb96de269 Apply two changes, systematically:
(1) Use PyErr_NewException("module.class", NULL, NULL) to create the
    exception object.

(2) Remove all calls to Py_FatalError(); instead, return or
    ignore the errors -- the import code now checks PyErr_Occurred()
    after calling a module's init function, so it's no longer a
    fatal error for the initialization to fail.

Also did some small cleanups, e.g. removed unnecessary test for
"already initialized" from initfpectl(), and unified
initposix()/initnt().

I haven't checked this very thoroughly, so while the changes are
pretty trivial -- beware of untested code!
1997-10-01 04:29:29 +00:00
Barry Warsaw 4bc9d39560 Nailed a couple of memory leaks, caught by Purify. 1997-01-09 22:22:05 +00:00
Barry Warsaw 1abda0fb12 cat and puste errors 1996-12-11 01:00:46 +00:00
Barry Warsaw 3696c524a4 nis_maplist(): Use check of yp_get_default_domain() return value
that's used in other parts of this module.

nis_maps(): use PyArg_NoArgs().
1996-12-11 00:29:14 +00:00
Barry Warsaw adbf4e66df 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.
1996-12-11 00:15:58 +00:00
Guido van Rossum 259552dbd9 Added ``extern int get_default_domain();'' for SGI, to keep gcc -Wall happy. 1996-12-09 18:46:28 +00:00
Guido van Rossum 8a170cbed6 Rearrange include headers (needed on some platforms). 1996-08-08 19:11:41 +00:00
Guido van Rossum b6775db241 Merge alpha100 branch back to main trunk 1994-08-01 11:34:53 +00:00
Guido van Rossum e77a757094 * nismodule.c: database keys and values can contain null bytes. be more
careful about these.
* arraymodule.c: added 8 byte swap; added 'i' format character; added
  reverse() method; rename read/write to fromfile/tofile.
* config.c: Set version to 0.9.9++.
* rotormodule.c (r_rand): declare k1..k5 as unsigned longs so the shifts
  will have a well-defined effect independent of word size.
* bltinmodule.c: renamed bagof() to filter().
1993-11-03 15:01:26 +00:00
Guido van Rossum 234f942aef * Added gmtime/localtime/mktime and SYSV timezone globals to timemodule.c.
Added $(SYSDEF) to its build rule in Makefile.
* cgensupport.[ch], modsupport.[ch]: removed some old stuff.  Also
  changed files that still used it...  And made several things static
  that weren't but should have been...  And other minor cleanups...
* listobject.[ch]: add external interfaces {set,get}listslice
* socketmodule.c: fix bugs in new send() argument parsing.
* sunaudiodevmodule.c: added flush() and close().
1993-06-17 12:35:49 +00:00
Guido van Rossum 3562d52e93 Added error handling and free resources. 1992-08-12 15:26:16 +00:00
Guido van Rossum 9de7a01e0e NIS interface by Fred Gansevles <Fred.Gansevles@cs.utwente.nl>. 1992-08-12 14:57:12 +00:00