aboutsummaryrefslogtreecommitdiff
path: root/libexec/ypxfr/yp_dbwrite.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove $FreeBSD$: one-line .c patternWarner Losh2023-08-161-2/+0
| | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
* spdx: initial adoption of licensing ID tags.Pedro F. Giffuni2017-11-181-1/+3
| | | | | | | | | | | | | | | | | | | | The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point. Initially, only tag files that use BSD 4-Clause "Original" license. RelNotes: yes Differential Revision: https://reviews.freebsd.org/D13133 Notes: svn path=/head/; revision=325966
* Revert r228592, as the non-messy way of fixing ypxfr breaks other ypDimitry Andric2011-12-161-5/+5
| | | | | | | | | | programs (e.g. usr.sbin/rpc.yppasswdd). Spotted by: np MFC after: 1 week Notes: svn path=/head/; revision=228599
* Attempt to fix the numerous incompatible enum conversions inDimitry Andric2011-12-161-5/+5
| | | | | | | | | libexec/ypxfr in the least disruptive way. MFC after: 1 week Notes: svn path=/head/; revision=228592
* Use __FBSDID vs. rcsid[].David E. O'Brien2003-05-041-4/+2
| | | | Notes: svn path=/head/; revision=114626
* ANSIfy and remove some dead code.Dag-Erling Smørgrav2002-02-061-9/+4
| | | | | | | Sponsored by: DARPA, NAI Labs Notes: svn path=/head/; revision=90298
* Apply the following mechanical transformations in preparation forDag-Erling Smørgrav2002-02-061-2/+2
| | | | | | | | | | | | | | | | | | | | ansification and constification: s{\s+__P\((\(.*?\))\)}{$1}g; s{\(\s+}{\(}g; s{\s+\)}{\)}g; s{\s+,}{,}g; s{(\s+)(for|if|switch|while)\(}{$1$2 \(}g; s{return ([^\(].*?);}{return ($1);}g; s{([\w\)])([!=+/\*-]?=)([\w\(+-])}{$1 $2 $3}g; s{\s+$}{\n};g Also add $FreeBSD$ where needed. MFC after: 1 week Notes: svn path=/head/; revision=90297
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50476
* Use full path in synopsis. Sort #includes. Use .Tn for NIS.Philippe Charnier1997-12-081-12/+11
| | | | Notes: svn path=/head/; revision=31626
* Revert $FreeBSD$ to $Id$Peter Wemm1997-02-221-2/+2
| | | | Notes: svn path=/head/; revision=22989
* Make the long-awaited change from $Id$ to $FreeBSD$Jordan K. Hubbard1997-01-141-2/+2
| | | | | | | | | | | 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
* Add support for rpc.ypxfrd and document it in the man page.Bill Paul1996-06-051-7/+11
| | | | | | | | | | | 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
* 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
* Sync with my sources at home (these are really tiny changes):Bill Paul1996-01-061-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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-251-0/+105
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