Home | History | Annotate | only in /src/usr.sbin/ypserv/common
History log of /src/usr.sbin/ypserv/common
RevisionDateAuthorComments
 1.11 03-May-2008  lukem Rename MKPRIVATELIB to LIBISPRIVATE, to make it clearer that this is
a variable that is used by in-tree Makefiles to control behaviour.
(MKsomevar variables are generally intended to be controlled by the end-user)
 1.10 23-May-2004  lukem branches: 1.10.24;
Use MKPRIVATELIB=yes instead of providing an empty libinstall:: target and
setting NOLINT, NOPIC, NOPROFILE (etc)
 1.9 18-Sep-2002  lukem minor makefile delint
 1.8 12-Dec-2001  tv MKfoo=no -> NOfoo
 1.7 13-Mar-1999  lukem set MKLINT=no. noted by NAKAJIMA Yoshihiro <nakayosh@kcn.ne.jp>
 1.6 13-Feb-1999  lukem convert from NOxxx= to MKxxx=no.
include <bsd.own.mk> if testing a MKxxx variable.
 1.5 22-Jan-1999  thorpej Remove old access control list definitions, and remove the home-grown
logging code.
 1.4 08-Jun-1998  lukem convert from in-house read_line to fparseln()
 1.3 11-Oct-1997  mycroft GC some garbage variables.
 1.2 11-Oct-1997  veego Don't install this libraries, we only this during the build.
 1.1 02-Oct-1997  lukem - build common/* once, into a library, rather than recompiling each of
the files multiple times in the other subdirectories (saves about
10% on compilation time)
- clean up the manual pages
 1.10.24.1 18-May-2008  yamt sync with head.
 1.9 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.8 06-Jul-2002  wiz branches: 1.8.30;
ANSIfy, remove __P().
 1.7 09-Dec-2000  thorpej Rewrite this to use getaddrinfo(), and to use the canonical name of the
host rather than the hostname as returned by gethostname() if the hostname
does not appear to be fully qualified.
 1.6 06-Jul-1998  mrg - use an array MAXHOSTNAMELEN+1 size to hold hostnames
- ensure hostname from gethostname() is nul-terminated in all cases
- minor KNF
- use MAXHOSTNAMELEN over various other values/defines
- be safe will buffers that hold hostnames
 1.5 23-Apr-1998  kleink Use <sys/param.h> instead of <sys/types.h>: <netdb.h> and MAXHOSTNAMELEN are
not related to each other, and it should not be assumed that inclusion of the
former makes visible the latter.
 1.4 13-Oct-1997  lukem - hack ypdb_open() to try the standard hash (for sendmail's aliases.db)
if the initial open fails with EFTYPE. if a different database
format is found to be more efficient, just add the code to open it
prior to that of the other formats; this maintains backward
compatibility with older databases whilst providing new functionality...
- add rcsid's
 1.3 30-Jul-1997  jtc Fix files using old TNF copyright notice
 1.2 18-Jul-1997  thorpej Fix compiler warnings (and an awful lot of annoying little bugs).
 1.1 09-Aug-1996  thorpej branches: 1.1.1;
Initial revision
 1.1.1.1 09-Aug-1996  thorpej A ypserv implementation, originally written by Mats O Jansson, with
some changes by me, including misc. cleanup, minor bug fixes, and
brand-new access control list code.
 1.8.30.1 18-May-2008  yamt sync with head.
 1.6 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.5 06-Jul-2002  wiz branches: 1.5.30;
ANSIfy, remove __P().
 1.4 08-Jun-1998  lukem convert from in-house read_line to fparseln()
 1.3 01-Nov-1997  lukem * rewrite read_line(), partially based on get_line in netgroup_mkdb.c:
- use fgetln() instead of fgets()
- store info in internal buffer
- fix \\ support
- count line numbers internally, so \\ lines don't mess up count
* ypdb_store():
- ensure that the length of key or val doesn't exceed YPMAXRECORD
* makedbm, mknetid, revnetgroup, stdethers, stdhosts:
- improve error handling
- take advantage of rewritten read_line(), and cleanup line parsing
- don't print trailing ` ' for key/val pairs with an empty val
* Makefile.yp:
- fix up building of ypservers (from Chuck Cranor)
* ypinit.sh:
- remove leading spaces in variable assignment (from Chuck Cranor)
 1.2 30-Jul-1997  jtc branches: 1.2.2;
Fix files using old TNF copyright notice
 1.1 09-Aug-1996  thorpej branches: 1.1.1;
Initial revision
 1.1.1.1 09-Aug-1996  thorpej A ypserv implementation, originally written by Mats O Jansson, with
some changes by me, including misc. cleanup, minor bug fixes, and
brand-new access control list code.
 1.2.2.1 28-Nov-1997  mellon Pull rev 1.3 up from trunk (lukem)
 1.5.30.1 18-May-2008  yamt sync with head.
 1.4 08-Jun-1998  lukem convert from in-house read_line to fparseln()
 1.3 01-Nov-1997  lukem * rewrite read_line(), partially based on get_line in netgroup_mkdb.c:
- use fgetln() instead of fgets()
- store info in internal buffer
- fix \\ support
- count line numbers internally, so \\ lines don't mess up count
* ypdb_store():
- ensure that the length of key or val doesn't exceed YPMAXRECORD
* makedbm, mknetid, revnetgroup, stdethers, stdhosts:
- improve error handling
- take advantage of rewritten read_line(), and cleanup line parsing
- don't print trailing ` ' for key/val pairs with an empty val
* Makefile.yp:
- fix up building of ypservers (from Chuck Cranor)
* ypinit.sh:
- remove leading spaces in variable assignment (from Chuck Cranor)
 1.2 13-Oct-1997  lukem branches: 1.2.2;
- hack ypdb_open() to try the standard hash (for sendmail's aliases.db)
if the initial open fails with EFTYPE. if a different database
format is found to be more efficient, just add the code to open it
prior to that of the other formats; this maintains backward
compatibility with older databases whilst providing new functionality...
- add rcsid's
 1.1 09-Aug-1996  thorpej branches: 1.1.1;
Initial revision
 1.1.1.1 09-Aug-1996  thorpej A ypserv implementation, originally written by Mats O Jansson, with
some changes by me, including misc. cleanup, minor bug fixes, and
brand-new access control list code.
 1.2.2.1 28-Nov-1997  mellon Pull rev 1.3 up from trunk (lukem)
 1.13 01-Aug-2023  mrg convert explicit length check before unchecked snprintf() with just a
overflow checked snprintf(). for res_debug.c and res_query.c, convert
from sprintf() to snprintf().

tested scp and rcp fail properly with too-long paths.
tested getaddrinfo fails as expected for too-long domains.
tested dig and ping for similar (res_debug.c/res_query.c).
created a temporary fs with quotas to test edquota with a long EDITOR.
did not test ypserv directly, but it's the same pattern.

avoids GCC 12 snprintf() warnings, and reduces total code size.
 1.12 10-Jan-2017  christos need <sys/stat.h>
 1.11 29-Feb-2008  lukem branches: 1.11.46;
Simplify ypdb_open() API and just use it for opening the DB for reading.
Provide a separate ypdb_mktemp() API to open a temporary file read-write.
Use mkstemp() instead of mktemp().

NOTE: makedbm & mkalias tested ok. I couldn't test ypxfer.
 1.10 20-Jun-2005  lukem branches: 1.10.10; 1.10.16;
ypdb_open():
* Clarify what it does (adds YPDB_SUFFIX if it's missing).
* Add some explicit pathname length checks and display a warning if exceeded.
 1.9 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22366, verified by myself.
 1.8 06-Jul-2002  wiz ANSIfy, remove __P().
 1.7 26-Jul-1999  lukem remove superfluous casts
 1.6 25-Jul-1999  lukem because the ypserv struct datum and the db(3) struct DBT are not exactly
the same (datum is { char *, int }, DBT is { void *, size_t /* u_int */ }),
copy info to appropriate temporary variables before calling underlying
db(3) operations.
 1.5 01-Nov-1997  lukem * rewrite read_line(), partially based on get_line in netgroup_mkdb.c:
- use fgetln() instead of fgets()
- store info in internal buffer
- fix \\ support
- count line numbers internally, so \\ lines don't mess up count
* ypdb_store():
- ensure that the length of key or val doesn't exceed YPMAXRECORD
* makedbm, mknetid, revnetgroup, stdethers, stdhosts:
- improve error handling
- take advantage of rewritten read_line(), and cleanup line parsing
- don't print trailing ` ' for key/val pairs with an empty val
* Makefile.yp:
- fix up building of ypservers (from Chuck Cranor)
* ypinit.sh:
- remove leading spaces in variable assignment (from Chuck Cranor)
 1.4 13-Oct-1997  lukem branches: 1.4.2;
- hack ypdb_open() to try the standard hash (for sendmail's aliases.db)
if the initial open fails with EFTYPE. if a different database
format is found to be more efficient, just add the code to open it
prior to that of the other formats; this maintains backward
compatibility with older databases whilst providing new functionality...
- add rcsid's
 1.3 07-Oct-1997  lukem nuke register & unnecessary extern's, factor out common code
 1.2 18-Jul-1997  thorpej Fix compiler warnings (and an awful lot of annoying little bugs).
 1.1 09-Aug-1996  thorpej branches: 1.1.1;
Initial revision
 1.1.1.1 09-Aug-1996  thorpej A ypserv implementation, originally written by Mats O Jansson, with
some changes by me, including misc. cleanup, minor bug fixes, and
brand-new access control list code.
 1.4.2.1 28-Nov-1997  mellon Pull rev 1.5 up from trunk (lukem)
 1.10.16.1 24-Mar-2008  keiichi sync with head.
 1.10.10.1 23-Mar-2008  matt sync with HEAD
 1.11.46.1 20-Mar-2017  pgoyette Sync with HEAD
 1.5 29-Feb-2008  lukem Simplify ypdb_open() API and just use it for opening the DB for reading.
Provide a separate ypdb_mktemp() API to open a temporary file read-write.
Use mkstemp() instead of mktemp().

NOTE: makedbm & mkalias tested ok. I couldn't test ypxfer.
 1.4 07-Aug-2003  agc branches: 1.4.22; 1.4.28;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22366, verified by myself.
 1.3 06-Jul-2002  wiz ANSIfy, remove __P().
 1.2 18-Jul-1997  thorpej Fix compiler warnings (and an awful lot of annoying little bugs).
 1.1 09-Aug-1996  thorpej branches: 1.1.1;
Initial revision
 1.1.1.1 09-Aug-1996  thorpej A ypserv implementation, originally written by Mats O Jansson, with
some changes by me, including misc. cleanup, minor bug fixes, and
brand-new access control list code.
 1.4.28.1 24-Mar-2008  keiichi sync with head.
 1.4.22.1 23-Mar-2008  matt sync with HEAD
 1.5 20-Oct-2009  snj Follow upstream's lead and remove third and fourth clauses (except on
from usr.sbin/mopd/common/pf.c, where only the ad clause is removed,
because it has a shared UCB copyright) on Mats O Jansson's files.

thorpej OK'd usr.sbin/rpc.yppasswdd/yppasswdd_mkpw.c, where he shares
copyright.
 1.4 06-Jul-2002  wiz ANSIfy, remove __P().
 1.3 06-Jun-1999  thorpej Use pidfile(3).
 1.2 22-Jan-1999  thorpej Remove old access control list definitions, and remove the home-grown
logging code.
 1.1 09-Aug-1996  thorpej branches: 1.1.1;
Initial revision
 1.1.1.1 09-Aug-1996  thorpej A ypserv implementation, originally written by Mats O Jansson, with
some changes by me, including misc. cleanup, minor bug fixes, and
brand-new access control list code.
 1.9 30-Aug-2011  plunky Apply casts to cases where xdrproc_t is expected but is not
strictly passed, for example because the second argument is
a different kind of pointer.
 1.8 19-Apr-2009  lukem Fix WARNS=4 issues (-Wshadow -Wcast-qual -Wsign-compare)
 1.7 30-Oct-2004  dsl branches: 1.7.34;
Add (unsigned char) cast to ctype functions
 1.6 10-Dec-2003  agc Modify the licences of code written by Theo De Raadt from a 4-clause
to a 2-clause licence (retaining UCB clauses (1) and (2)), per PR
22409 from Joel Baker, approved by Theo de Raadt, and ratified by
myself - the only discrepancy being the handling of the original
clause 3 in src/usr.sbin/yppoll/yppoll.c.
 1.5 06-Jul-2002  wiz ANSIfy, remove __P().
 1.4 31-Jan-1999  mrg KNF nit.
 1.3 13-Oct-1997  lukem - hack ypdb_open() to try the standard hash (for sendmail's aliases.db)
if the initial open fails with EFTYPE. if a different database
format is found to be more efficient, just add the code to open it
prior to that of the other formats; this maintains backward
compatibility with older databases whilst providing new functionality...
- add rcsid's
 1.2 18-Jul-1997  thorpej Fix compiler warnings (and an awful lot of annoying little bugs).
 1.1 09-Aug-1996  thorpej branches: 1.1.1;
Initial revision
 1.1.1.1 09-Aug-1996  thorpej A ypserv implementation, originally written by Mats O Jansson, with
some changes by me, including misc. cleanup, minor bug fixes, and
brand-new access control list code.
 1.7.34.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.4 19-Apr-2009  lukem Fix WARNS=4 issues (-Wshadow -Wcast-qual -Wsign-compare)
 1.3 10-Dec-2003  agc branches: 1.3.40;
Modify the licences of code written by Theo De Raadt from a 4-clause
to a 2-clause licence (retaining UCB clauses (1) and (2)), per PR
22409 from Joel Baker, approved by Theo de Raadt, and ratified by
myself - the only discrepancy being the handling of the original
clause 3 in src/usr.sbin/yppoll/yppoll.c.
 1.2 06-Jul-2002  wiz ANSIfy, remove __P().
 1.1 09-Aug-1996  thorpej branches: 1.1.1;
Initial revision
 1.1.1.1 09-Aug-1996  thorpej A ypserv implementation, originally written by Mats O Jansson, with
some changes by me, including misc. cleanup, minor bug fixes, and
brand-new access control list code.
 1.3.40.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.6 22-Jan-1999  thorpej Remove old access control list definitions, and remove the home-grown
logging code.
 1.5 24-Jun-1998  kleink Need <time.h> for time().
 1.4 13-Oct-1997  lukem - hack ypdb_open() to try the standard hash (for sendmail's aliases.db)
if the initial open fails with EFTYPE. if a different database
format is found to be more efficient, just add the code to open it
prior to that of the other formats; this maintains backward
compatibility with older databases whilst providing new functionality...
- add rcsid's
 1.3 07-Oct-1997  lukem nuke register & unnecessary extern's, factor out common code
 1.2 17-Apr-1997  christos PR/3504: Brian Baird:
- Do what the manual page says; don't create the log file if it does not exist.
- Limited support for ypserv v1; apparently sunos4 clients use it and sunos5
server provides the same.
 1.1 09-Aug-1996  thorpej branches: 1.1.1;
Initial revision
 1.1.1.1 09-Aug-1996  thorpej A ypserv implementation, originally written by Mats O Jansson, with
some changes by me, including misc. cleanup, minor bug fixes, and
brand-new access control list code.
 1.2 22-Jan-1999  thorpej Remove old access control list definitions, and remove the home-grown
logging code.
 1.1 09-Aug-1996  thorpej branches: 1.1.1;
Initial revision
 1.1.1.1 09-Aug-1996  thorpej A ypserv implementation, originally written by Mats O Jansson, with
some changes by me, including misc. cleanup, minor bug fixes, and
brand-new access control list code.
 1.4 12-Nov-2003  grant s/netbsd.org/NetBSD.org/i
 1.3 06-Jul-2002  wiz ANSIfy, remove __P().
 1.2 13-Oct-1997  lukem - hack ypdb_open() to try the standard hash (for sendmail's aliases.db)
if the initial open fails with EFTYPE. if a different database
format is found to be more efficient, just add the code to open it
prior to that of the other formats; this maintains backward
compatibility with older databases whilst providing new functionality...
- add rcsid's
 1.1 09-Aug-1996  thorpej branches: 1.1.1;
Initial revision
 1.1.1.1 09-Aug-1996  thorpej A ypserv implementation, originally written by Mats O Jansson, with
some changes by me, including misc. cleanup, minor bug fixes, and
brand-new access control list code.

RSS XML Feed