summaryrefslogtreecommitdiff
path: root/libexec/ypxfr
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix various man pages to stop abusing the .Bx macro to generate theMike Pritchard2000-01-231-8/+9
| | | | | | | string "FreeBSD". Use the .Fx macro instead. Notes: svn path=/head/; revision=56417
* $Id$ -> $FreeBSD$Peter Wemm1999-08-288-8/+8
| | | | Notes: svn path=/head/; revision=50476
* Fix ypxfr so that it can be run from cron.Bill Paul1999-05-101-4/+4
| | | | | | | Patch submitted by: Dan Nelson <dnelson@emsphone.com> Notes: svn path=/head/; revision=46929
* Fixed printf format errors.Bruce Evans1998-08-021-2/+2
| | | | Notes: svn path=/head/; revision=38024
* Fixed missing dependencies on headers generated by rpcgen, as usual.Bruce Evans1998-05-101-8/+10
| | | | | | | | Removed bogus dependencies of generated .c files on generated headers. Sorted sources lists. Notes: svn path=/head/; revision=35909
* .Sh AUTHOR -> .Sh AUTHORS. Use .An/.Aq.Philippe Charnier1998-03-191-2/+2
| | | | Notes: svn path=/head/; revision=34671
* Use full path in synopsis. Sort #includes. Use .Tn for NIS.Philippe Charnier1997-12-086-104/+163
| | | | Notes: svn path=/head/; revision=31626
* Putting records with zero-length keys into a Berkeley DB hash databaseBill Paul1997-09-301-6/+22
| | | | | | | | | | | | | | | | | | | | is asking for trouble (sequential database enumerations can get caught in an infinite loop). The yp_mkdb(8) utility avoids putting such records into a database, but ypxfr does not. Today I got bit by a NULL entry in one of the amd maps on my network, which is served by a SunOS master. The map was transfered successfully to my FreeBSD slave, but attempting to dump it with ypcat(1) caused ypserv(8) to transmit the same record over and over again, making the map appear to be infinitely large. I finally noticed the problem while testing a new version of amd under development at the Columbia CS department, which began gobbling up insane amounts of memory while trying to swallow the map. To deal with this problem, I'm modifying ypxfr to watch for records with zero-length keys and turn them into something less destructive before writing them to the database. Notes: svn path=/head/; revision=30008
* compare return value from getopt against -1 rather than EOF, per the finalWarner Losh1997-03-281-3/+3
| | | | | | | posix standard on the topic. Notes: svn path=/head/; revision=24349
* Revert $FreeBSD$ to $Id$Peter Wemm1997-02-228-13/+13
| | | | Notes: svn path=/head/; revision=22989
* Make the long-awaited change from $Id$ to $FreeBSD$Jordan K. Hubbard1997-01-148-13/+13
| | | | | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise. Notes: svn path=/head/; revision=21673
* Sort cross references.Wolfram Schneider1997-01-131-3/+3
| | | | Notes: svn path=/head/; revision=21635
* Change declaration of yp_errno from int to enum ypstat so that itBill Paul1996-12-231-2/+3
| | | | | | | | | | matches what's in ypserv/yp_extern.h (which I changed when I added the async DNS stuff). The conflict broke the build of rpc.yppasswdd. Pointed out by: bde Notes: svn path=/head/; revision=20862
* Give ypxfr the ability to detect the presence of the YP_INTERDOMAINBill Paul1996-10-254-7/+91
| | | | | | | | | | | | and YP_SECURE flags so that it can properly add them to newly created maps when needed. This applies only when using the 'standard' method for map transfers. When using rpc.ypxfrd, the whole map is copied verbatim, along with any special entries that may be encoded in it. Also made -Wall a little quieter for ypxfrd_getmap.c. Notes: svn path=/head/; revision=19181
* Add a couple of reserved port checks: don't talk to either ypservBill Paul1996-10-201-5/+24
| | | | | | | | | | | or rpc.ypxfrd processes on remote systems that aren't bound to reserved ports. The servers already do reserved port checks on the clients. Obtained from: scrutinizing the OpenBSD ypxfr sources. (Note that this applies to the ypserv check only; OpenBSD doesn't have an rpc.ypxfrd.) Notes: svn path=/head/; revision=19065
* Fixed DPADD.Bruce Evans1996-09-051-2/+3
| | | | Notes: svn path=/head/; revision=18050
* Fill in new arguments in the ypxfr_getmap structure (byte order,Bill Paul1996-07-041-2/+16
| | | | | | | | db type, filename) and check for new failure codes (db mismatch, endian mismatch). Notes: svn path=/head/; revision=16958
* Take ypxfrd_xdr.c out of SRCS line. It should be included in librpcsvc,Bill Paul1996-06-061-2/+2
| | | | | | | | | | | | which ypxfr links with. (Sorry: left over development bogon.) Just a reminder: you must rebuild librpcsvc before you build this program. Pointed out by: Stephen Hocking Notes: svn path=/head/; revision=16154
* Add support for rpc.ypxfrd and document it in the man page.Bill Paul1996-06-058-40/+230
| | | | | | | | | | | Also generallize the yp_dbwrite functions a little: allow the caller to specify certain flags. I need this mostly for some changes to rpc.yppasswdd to allow in-place updates. Also change Makefile a little to use the same format as ypserv. Notes: svn path=/head/; revision=16132
* phkmalloc doesn't like the call to xdr_free() in ypxfr_get_master().Bill Paul1996-05-071-3/+3
| | | | | | | Nuke it. Notes: svn path=/head/; revision=15671
* Small tweak to yp_put_record(): call the DB put routine with theBill Paul1996-04-281-6/+15
| | | | | | | | | R_NOOVERWRITE flag and process return codes so that we can tell the difference between a failure due to a duplicate database entry and failure due to some other error. Notes: svn path=/head/; revision=15420
* Correct a bunch of man page cross references and generallyMike Pritchard1996-02-111-3/+3
| | | | | | | | | try and silence "manck". ncurses, rpc, and some of the gnu stuff are still a big mess, however. Notes: svn path=/head/; revision=14038
* ypxfr_getmap.c:Bill Paul1996-02-042-13/+35
| | | | | | | | | | | | | | | - Handle 'empty' maps more gracefully. By empty I mean a valid map that just happens not to have any entries in it, such as you would get if you built a map database from an empty file. Previously, trying to ypxfr such a map would yield an 'NIS map/database error' which is not the correct behavior. ypxfr_misc: - Make sure to free() or xdr_free() dynamically allocated memory in ypxfr_get_master() as necessary. Notes: svn path=/head/; revision=13895
* - Fix error reporting when checking order number via NIS: we return zeroBill Paul1996-01-101-14/+22
| | | | | | | | | | | | | | | | | | | on a failure, but if we're checking a corrupt map we could also get back a zero from ypserv without really encountering any actual error. Flag this condition and generate an meaningful error message. - Fix transmission of ypxfr_clear to ypserv: error checking was wrong and we sending YPXFR_YPERR as an error status instead of YPXFR_CLEAR. - To help avoid a race condition (or at least reduce the likelyhood of it occuring), use rename() to move a newly transfered map into place instead of unlink()ing the old one first and then renaming. Da man page sez that rename should do the unlink() for us. This prevents ypserv from returning 'no such map in domain' when asked to query a map which ypxfr has just unlink()ed but not yet replaced. Notes: svn path=/head/; revision=13376
* Sync with my sources at home (these are really tiny changes):Bill Paul1996-01-062-12/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Fix a SEGV condition in ypxfr_main.c that reared its ugly head while I was working on the 'parallel jobs' feature of the new yppush. After we've completed the map transfer and created a local temporary copy, we check the order number of the map on ypserv again to make sure it didn't change while the transfer was in progress (map skew). If for some reason we flat out fail to get the order number from the server, we flag this as an error and bail, telling ypxfr_exit() to clean up our temporary files for us. However, ypxfr_exit() tries to close the database before unkining it, not realizing that it has already been closed prior to the skew check. The second attempt to close the database causes a SEGV somewhere inside the DB code. (Well, it does on my 2.0.5 machine anyway. I haven't seen anyone modify the DB library code in ages, so the condition is probably still there.) To work around this, we deliberately set dbp to NULL after closing the database and check for the condition in ypxfr_exit(), being careful to avoid the second close if we see the NULL. - In yp_dbwrite.c, make yp_open_db_rw() open the database with O_EXLOCK flag set. This probably won't affect much of anything, but I feel better having it there. Notes: svn path=/head/; revision=13276
* Import the new ypxfr, written by yours truly. Functionally equivalentBill Paul1995-12-257-0/+1224
to the old one, except that it supports an additional option (-p path) that lets you specify the top level path wiere your NIS maps live. (ypserv allows you to specify a path like this, so it makes sense that ypxfr should too. ypserv will automagically pass the -p flag to ypxfr if you use a path other than /var/yp when you start it.) This program uses client stub code generated by rpcgen as well as the yp_dblookup.c module from ypserv. Notes: svn path=/cvs2svn/branches/WPAUL/dist/; revision=13007