Home | History | Annotate | only in /src/lib/libc/yp
History log of /src/lib/libc/yp
RevisionDateAuthorComments
 1.15 02-Mar-2012  christos PR/46111: Wolfgang Stukenbrock: Add yp_setbindtries(3) so that yp operations
don't hang forever if requested.
 1.14 24-Feb-1999  drochner branches: 1.14.70;
use ${ARCHDIR} instead of ${.CURDIR}/arch/${MACHINE_ARCH} where appropriate
libc builds on pmax again
 1.13 18-May-1996  jtc Split yp_first, yp_next, yp_maplist and yperr_prot out of yplib.c.
Use a constant struct timeval for yp timeouts instead of creating
a new struct timeval in each yp function at runtime.
 1.12 15-May-1996  jtc Split yperr_match out of yplib.c; makes many static executables a bit smaller.
 1.11 14-May-1996  jtc Split yp_all, yp_master, and yp_other out of yplib.c; makes some static
executables a bit smaller.
 1.10 14-May-1996  jtc Split yperr_string out of yplib.c; makes many static executables a bit smaller.
 1.9 12-Sep-1995  thorpej Add the manual page links suggested my Luke Mewburn in PR 1449. This
is consistent with at least 2 other operating systems with YP subsystems.
 1.8 27-Feb-1995  cgd clean up Ids
 1.7 22-Dec-1994  cgd specify man pages the new way.
 1.6 28-Oct-1994  deraadt man page from Jason Thorpe
 1.5 04-Dec-1993  cgd update for .S and MACHINE_ARCH
 1.4 07-Oct-1993  cgd make an arch directory in libc, and move all machine dirs into it
 1.3 01-Aug-1993  mycroft Add RCS identifiers.
 1.2 09-Jun-1993  brezak remove yppasswdxdr.c - now part of librpcsvc.a
 1.1 26-Apr-1993  deraadt parts of YP inside libc..
 1.14.70.1 17-Apr-2012  yamt sync with head
 1.5 03-Jan-2024  christos tidy up some extern declarations
 1.4 20-Mar-2012  matt Convert to use C89 prototypes.
Remove use of __P
 1.3 21-Oct-2009  snj branches: 1.3.6;
Remove 3rd and 4th clauses in christos' license. OK christos.
 1.2 21-Jul-1997  jtc If port provides __weak_alias(), provide an Standard C and POSIX pure
identifier namespace by renaming non standard functions and variables
such that they have a leading underscore. The library will use those
names internally. Weak aliases are used to provide the original names
to the API.

This is only the first part of this change. It is most of the functions
which are implemented in C for all NetBSD ports. Subsequent changes are
to add the same support to the remaining C files, to assembly files, and
to the automagically generated assembly source used for system calls.
When all of the above is done, ports with weak alias support should add
a definition for __weak_alias to <sys/cdefs.h>.
 1.1 13-Jul-1997  christos Fix RCSID's
printf -> warnx
Fix gcc warnings
Put locally declared functions in local.h
 1.3.6.1 17-Apr-2012  yamt sync with head
 1.32 20-Mar-2012  matt Convert to use C89 prototypes.
Remove use of __P
 1.31 13-Mar-2012  christos PR/45989: Martin Husemann: lint invocation does include -w only on i386

- turn lint -w for all the platforms after fixing the lint warnings.
- add _DIAGASSERTS() for casts that would assign values to types that
would not fit.
- change types, add casts
- change into ansii prototypes
- turn on _DIAGNOSTIC for libc (during current, to be eliminated for release
builds)

approved by core@
 1.30 11-May-2006  mrg branches: 1.30.44;
xdr sucks. sprinkle some (void *) casts into it's functions taking void **,
and shut up GCC4.
 1.29 29-Nov-2005  christos WARNS=4
 1.28 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.27 04-Dec-2003  keihan netbsd.org -> NetBSD.org
NetBSD.ORG -> NetBSD.org

Now src/lib is done.
 1.26 29-May-2003  christos de-lint pointer casts.
 1.25 22-Jan-2000  mycroft Delint.
Remove trailing ; from uses of __weak_alias(). The macro inserts this if
needed.
 1.24 20-Sep-1999  lukem back out the #ifdef _DIAGNOSTIC argument checks; too many people complained.
_DIAGASSERT() is still retained.
 1.23 16-Sep-1999  lukem * use _DIAGASSERT() to check pointer arguments against NULL and file
descriptors against -1 (as appropriate).
* add actual checks which to detect stuff that would trigger_DIAGASSERT(),
and attempt to return a sane error condition.
* knf some code
* remove some `register' decls.

the first two items result in the addition of code similar to the
following in various functions:

_DIAGASSERT(path != NULL)
#ifdef _DIAGNOSTIC
if (path == NULL) {
errno = EFAULT;
return (-1);
}
#endif
 1.22 31-Jan-1999  christos xdrproc_t casts
 1.21 15-Nov-1998  christos delint
 1.20 04-Nov-1997  thorpej __warn_references and __indr_reference semicolon fixups. From
Chris Demetriou <cgd@pa.dec.com>.
 1.19 20-Oct-1997  thorpej branches: 1.19.2;
Fix the shared library versioning snafu caused by the recent changes
to the stat(2) family and msync(2). This uses a primitive function
versioning scheme.

This reverts the libc shared library major version from 13 to 12, and
adds a few new interfaces to bring us to libc version 12.20.

From Frank van der Linden <fvdl@NetBSD.ORG>.
 1.18 16-Oct-1997  christos Remove obsolete functions
 1.17 21-Jul-1997  jtc If port provides __weak_alias(), provide an Standard C and POSIX pure
identifier namespace by renaming non standard functions and variables
such that they have a leading underscore. The library will use those
names internally. Weak aliases are used to provide the original names
to the API.

This is only the first part of this change. It is most of the functions
which are implemented in C for all NetBSD ports. Subsequent changes are
to add the same support to the remaining C files, to assembly files, and
to the automagically generated assembly source used for system calls.
When all of the above is done, ports with weak alias support should add
a definition for __weak_alias to <sys/cdefs.h>.
 1.16 13-Jul-1997  christos Fix RCSID's
printf -> warnx
Fix gcc warnings
Put locally declared functions in local.h
 1.15 15-Aug-1996  chuck branches: 1.15.2;
fix xdr_ypmap_parms (missing "&"'s in calls to xdr_ypdomain_wrap_string
and xdr_ypmap_wrap_string). prevents segv in ypserv.
 1.14 09-Aug-1996  thorpej Fix some potential type-size problems.
 1.13 18-Jun-1996  christos ypset(8) stopped working; reason:

xdr_ypbind_setdom() would always fail because the test for
xdr_ypdomain_wrap_string() was reversed. Fixed this and in
the process made all the function tests to be of the form:

if (!xdr_foo())
return FALSE;
....
return TRUE;

instead of having some of them like above and others like:
if (xdr_foo() == FALSE)
return FALSE;
...

return xdr_bar();

this is more consistant now and hopefully in the future people
will pattern match correctly and not introduce spurious errors.
 1.12 29-May-1996  thorpej Pull down yp/xdr fixes from release branch.
 1.11 14-May-1996  jtc branches: 1.11.4;
Split yp_all, yp_master, and yp_other out of yplib.c; makes some static
executables a bit smaller.
 1.10 04-Feb-1996  jtc Change conditionals around RCS IDs to be like rest of libc.
From John Birrell <jb@cimlogic.com.au>.
 1.9 14-Jul-1995  christos - Const poisoning
- KNF police
- Detect malloc failures
 1.8 27-Feb-1995  cgd clean up Ids
 1.7 06-Aug-1994  jtc branches: 1.7.2;
Post 1.0 cleanup:
* Include appropriate header files to bring prototypes into scope.
* bcopy -> memcpy
* bzero -> memset
* bcmp -> memcmp
* Tweak yp xdr routines so compiler can do a better job --- saves
at least 5 instructions per function call on the i386.
 1.6 25-May-1994  deraadt correct copyright
 1.5 26-Aug-1993  jtc Declare rcsid strings so they are stored in text segment.
 1.4 12-Jun-1993  deraadt a few typecasts because of the new prototypes
 1.3 16-May-1993  deraadt added my copyright.. how self efacing of me
 1.2 27-Apr-1993  deraadt YP functions are always in libc. They just might not be called by getpwent()
and friends.
 1.1 26-Apr-1993  deraadt parts of YP inside libc..
 1.7.2.2 06-Aug-1994  jtc Post 1.0 cleanup:
* Include appropriate header files to bring prototypes into scope.
* bcopy -> memcpy
* bzero -> memset
* bcmp -> memcmp
* Tweak yp xdr routines so compiler can do a better job --- saves
at least 5 instructions per function call on the i386.
 1.7.2.1 06-Aug-1994  jtc file xdryp.c was added on branch netbsd-1-0 on 1994-08-06 23:07:48 +0000
 1.11.4.4 02-Mar-1997  mycroft Pull up missing type size fixes from trunk.
 1.11.4.3 03-Feb-1997  rat Pullup 1.14 -> 1.15 by request from Jason Thorpe.
Fix xdr_ypmap_parms (missing "&"'s in calls to xdr_ypdomain_wrap_string
and xdr_ypmap_wrap_string). Prevents segv in ypserv.
 1.11.4.2 19-Jun-1996  jtc pulled up from revision 1.13 by christos' request
 1.11.4.1 26-May-1996  jtc yp/xdr fixes from Jason Thorpe
 1.15.2.1 17-Sep-1996  jtc snapshot namespace cleanup: yp
 1.19.2.1 04-Nov-1997  thorpej Pull up from trunk: __warn_references and __indr_reference semicolon fixups.
 1.30.44.1 17-Apr-2012  yamt sync with head
 1.4 09-Jun-1993  mycroft Clean up deleted files.
 1.3 16-May-1993  deraadt added my copyright.. how self efacing of me
 1.2 27-Apr-1993  deraadt YP functions are always in libc. They just might not be called by getpwent()
and friends.
 1.1 26-Apr-1993  deraadt parts of YP inside libc..
 1.14 03-Jan-2024  christos tidy up some extern declarations
 1.13 25-Jun-2012  abs Update old-style definitions to ANSI, remove a couple of register
definitions along the way. Fixed gcc 4.1 build (thank you vax)
 1.12 10-Dec-2003  agc branches: 1.12.56;
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.11 06-Jul-2000  christos add explicit casts to avoid parameter conversion warnings.
 1.10 22-Jan-2000  mycroft Delint.
Remove trailing ; from uses of __weak_alias(). The macro inserts this if
needed.
 1.9 31-Jan-1999  christos xdrproc_t casts
 1.8 15-Nov-1998  christos delint
 1.7 21-Jul-1997  jtc If port provides __weak_alias(), provide an Standard C and POSIX pure
identifier namespace by renaming non standard functions and variables
such that they have a leading underscore. The library will use those
names internally. Weak aliases are used to provide the original names
to the API.

This is only the first part of this change. It is most of the functions
which are implemented in C for all NetBSD ports. Subsequent changes are
to add the same support to the remaining C files, to assembly files, and
to the automagically generated assembly source used for system calls.
When all of the above is done, ports with weak alias support should add
a definition for __weak_alias to <sys/cdefs.h>.
 1.6 13-Jul-1997  christos Fix RCSID's
printf -> warnx
Fix gcc warnings
Put locally declared functions in local.h
 1.5 07-Jul-1997  lukem * implement _yp_invalid_domain, which returns non-zero if the given
domainname isn't RFC1035 compliant. Also ensure that the length <=
YPMAXDOMAIN (which is less than what RFC1035 allows).
* use _yp_invalid_domain in the public front-ends, instead of using
hand-rolled checks
* fix a typo
 1.4 29-May-1996  thorpej branches: 1.4.2;
Pull down yp/xdr fixes from release branch.
 1.3 20-May-1996  cgd branches: 1.3.2;
these files all need to include <string.h>
 1.2 18-May-1996  jtc Use a constant struct timeval for yp timeouts instead of creating
a new struct timeval in each yp function at runtime.
Check arguments and return YPERR_BADARGS if invalid.
 1.1 14-May-1996  jtc Split yp_all, yp_master, and yp_other out of yplib.c; makes some static
executables a bit smaller.
 1.3.2.1 26-May-1996  jtc yp/xdr fixes from Jason Thorpe
 1.4.2.1 17-Sep-1996  jtc snapshot namespace cleanup: yp
 1.12.56.1 30-Oct-2012  yamt sync with head
 1.17 03-Jan-2024  christos tidy up some extern declarations
 1.16 25-Jun-2012  abs Update old-style definitions to ANSI, remove a couple of register
definitions along the way. Fixed gcc 4.1 build (thank you vax)
 1.15 02-Mar-2012  christos PR/46111: Wolfgang Stukenbrock: Add yp_setbindtries(3) so that yp operations
don't hang forever if requested.
 1.14 10-Dec-2003  agc branches: 1.14.56;
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.13 06-Jul-2000  christos add explicit casts to avoid parameter conversion warnings.
 1.12 22-Jan-2000  mycroft Delint.
Remove trailing ; from uses of __weak_alias(). The macro inserts this if
needed.
 1.11 16-Sep-1999  lukem check a couple more args
 1.10 31-Jan-1999  christos xdrproc_t casts
 1.9 15-Nov-1998  christos delint
 1.8 21-Jul-1997  jtc If port provides __weak_alias(), provide an Standard C and POSIX pure
identifier namespace by renaming non standard functions and variables
such that they have a leading underscore. The library will use those
names internally. Weak aliases are used to provide the original names
to the API.

This is only the first part of this change. It is most of the functions
which are implemented in C for all NetBSD ports. Subsequent changes are
to add the same support to the remaining C files, to assembly files, and
to the automagically generated assembly source used for system calls.
When all of the above is done, ports with weak alias support should add
a definition for __weak_alias to <sys/cdefs.h>.
 1.7 13-Jul-1997  christos Fix RCSID's
printf -> warnx
Fix gcc warnings
Put locally declared functions in local.h
 1.6 07-Jul-1997  lukem * implement _yp_invalid_domain, which returns non-zero if the given
domainname isn't RFC1035 compliant. Also ensure that the length <=
YPMAXDOMAIN (which is less than what RFC1035 allows).
* use _yp_invalid_domain in the public front-ends, instead of using
hand-rolled checks
* fix a typo
 1.5 21-May-1997  lukem Don't return allocated memory in an error condition in a char **outXXX argument
(set them to the null pointer instead).
Thus, code that doesn't specificallly attempt to clean up allocated
memory after an error result is returned from yp_...() won't have an
unexpected memory leak (i.e, most 3rd party code)
 1.4 20-May-1997  lukem Some cleanups for [lib/3655]
* Ensure that all 'char **outXXX' pointers aren't the null pointer before use.
* Set *outXXX=NULL before checking any other arguments.
* Document that *outXXX will always be NULL or a malloc(3)ed string
unless outXXX was NULL (in which case YPERR_BADARGS will be returned
and the caller shouldn't attempt to free(*outXXX) if *outXXX != NULL;

These changes should prevent most occurances of coredumps when a bad
argument was given to a yp client function and the caller attempts to
free an outvalue that isn't the null pointer. To be really safe, the
caller probably should set the *outvalue=NULL anyway (ref: PR [lib/3580])
 1.3 23-May-1996  christos branches: 1.3.2;
Avoid using clnt_perror() on the first rpc failure, since it is going to be
retried anyway. Only report it every _yplib_nerrs times.
 1.2 20-May-1996  cgd these files all need to include <string.h>
 1.1 18-May-1996  jtc Split yp_first, yp_next, yp_maplist and yperr_prot out of yplib.c.
Use a constant struct timeval for yp timeouts instead of creating
a new struct timeval in each yp function at runtime.
Check arguments and return YPERR_BADARGS if invalid.
 1.3.2.1 17-Sep-1996  jtc snapshot namespace cleanup: yp
 1.14.56.2 30-Oct-2012  yamt sync with head
 1.14.56.1 17-Apr-2012  yamt sync with head
 1.14 03-Jan-2024  christos tidy up some extern declarations
 1.13 25-Jun-2012  abs Update old-style definitions to ANSI, remove a couple of register
definitions along the way. Fixed gcc 4.1 build (thank you vax)
 1.12 02-Mar-2012  christos PR/46111: Wolfgang Stukenbrock: Add yp_setbindtries(3) so that yp operations
don't hang forever if requested.
 1.11 10-Dec-2003  agc branches: 1.11.56;
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.10 06-Jul-2000  christos add explicit casts to avoid parameter conversion warnings.
 1.9 22-Jan-2000  mycroft Delint.
Remove trailing ; from uses of __weak_alias(). The macro inserts this if
needed.
 1.8 16-Sep-1999  lukem check a couple more args
 1.7 31-Jan-1999  christos xdrproc_t casts
 1.6 21-Jul-1997  jtc If port provides __weak_alias(), provide an Standard C and POSIX pure
identifier namespace by renaming non standard functions and variables
such that they have a leading underscore. The library will use those
names internally. Weak aliases are used to provide the original names
to the API.

This is only the first part of this change. It is most of the functions
which are implemented in C for all NetBSD ports. Subsequent changes are
to add the same support to the remaining C files, to assembly files, and
to the automagically generated assembly source used for system calls.
When all of the above is done, ports with weak alias support should add
a definition for __weak_alias to <sys/cdefs.h>.
 1.5 13-Jul-1997  christos Fix RCSID's
printf -> warnx
Fix gcc warnings
Put locally declared functions in local.h
 1.4 07-Jul-1997  lukem * implement _yp_invalid_domain, which returns non-zero if the given
domainname isn't RFC1035 compliant. Also ensure that the length <=
YPMAXDOMAIN (which is less than what RFC1035 allows).
* use _yp_invalid_domain in the public front-ends, instead of using
hand-rolled checks
* fix a typo
 1.3 29-May-1996  thorpej branches: 1.3.2;
Pull down yp/xdr fixes from release branch.
 1.2 23-May-1996  christos Avoid using clnt_perror() on the first rpc failure, since it is going to be
retried anyway. Only report it every _yplib_nerrs times.
 1.1 18-May-1996  jtc branches: 1.1.4;
Split yp_first, yp_next, yp_maplist and yperr_prot out of yplib.c.
 1.1.4.1 26-May-1996  jtc yp/xdr fixes from Jason Thorpe
 1.3.2.1 17-Sep-1996  jtc snapshot namespace cleanup: yp
 1.11.56.2 30-Oct-2012  yamt sync with head
 1.11.56.1 17-Apr-2012  yamt sync with head
 1.16 03-Jan-2024  christos tidy up some extern declarations
 1.15 25-Jun-2012  abs Update old-style definitions to ANSI, remove a couple of register
definitions along the way. Fixed gcc 4.1 build (thank you vax)
 1.14 02-Mar-2012  christos PR/46111: Wolfgang Stukenbrock: Add yp_setbindtries(3) so that yp operations
don't hang forever if requested.
 1.13 10-Dec-2003  agc branches: 1.13.56;
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.12 06-Jul-2000  christos add explicit casts to avoid parameter conversion warnings.
 1.11 22-Jan-2000  mycroft Delint.
Remove trailing ; from uses of __weak_alias(). The macro inserts this if
needed.
 1.10 31-Jan-1999  christos xdrproc_t casts
 1.9 15-Nov-1998  christos delint
 1.8 21-Jul-1997  jtc If port provides __weak_alias(), provide an Standard C and POSIX pure
identifier namespace by renaming non standard functions and variables
such that they have a leading underscore. The library will use those
names internally. Weak aliases are used to provide the original names
to the API.

This is only the first part of this change. It is most of the functions
which are implemented in C for all NetBSD ports. Subsequent changes are
to add the same support to the remaining C files, to assembly files, and
to the automagically generated assembly source used for system calls.
When all of the above is done, ports with weak alias support should add
a definition for __weak_alias to <sys/cdefs.h>.
 1.7 13-Jul-1997  christos Fix RCSID's
printf -> warnx
Fix gcc warnings
Put locally declared functions in local.h
 1.6 07-Jul-1997  lukem * implement _yp_invalid_domain, which returns non-zero if the given
domainname isn't RFC1035 compliant. Also ensure that the length <=
YPMAXDOMAIN (which is less than what RFC1035 allows).
* use _yp_invalid_domain in the public front-ends, instead of using
hand-rolled checks
* fix a typo
 1.5 21-May-1997  lukem Don't return allocated memory in an error condition in a char **outXXX argument
(set them to the null pointer instead).
Thus, code that doesn't specificallly attempt to clean up allocated
memory after an error result is returned from yp_...() won't have an
unexpected memory leak (i.e, most 3rd party code)
 1.4 20-May-1997  lukem Some cleanups for [lib/3655]
* Ensure that all 'char **outXXX' pointers aren't the null pointer before use.
* Set *outXXX=NULL before checking any other arguments.
* Document that *outXXX will always be NULL or a malloc(3)ed string
unless outXXX was NULL (in which case YPERR_BADARGS will be returned
and the caller shouldn't attempt to free(*outXXX) if *outXXX != NULL;

These changes should prevent most occurances of coredumps when a bad
argument was given to a yp client function and the caller attempts to
free an outvalue that isn't the null pointer. To be really safe, the
caller probably should set the *outvalue=NULL anyway (ref: PR [lib/3580])
 1.3 23-May-1996  christos branches: 1.3.2;
Avoid using clnt_perror() on the first rpc failure, since it is going to be
retried anyway. Only report it every _yplib_nerrs times.
 1.2 18-May-1996  jtc Use a constant struct timeval for yp timeouts instead of creating
a new struct timeval in each yp function at runtime.
Check arguments and return YPERR_BADARGS if invalid.
 1.1 14-May-1996  jtc Split yp_all, yp_master, and yp_other out of yplib.c; makes some static
executables a bit smaller.
 1.3.2.1 17-Sep-1996  jtc snapshot namespace cleanup: yp
 1.13.56.2 30-Oct-2012  yamt sync with head
 1.13.56.1 17-Apr-2012  yamt sync with head
 1.20 03-Jan-2024  christos tidy up some extern declarations
 1.19 20-Mar-2012  matt Convert to use C89 prototypes.
Remove use of __P
 1.18 02-Mar-2012  christos PR/46111: Wolfgang Stukenbrock: Add yp_setbindtries(3) so that yp operations
don't hang forever if requested.
 1.17 29-Nov-2005  christos branches: 1.17.44;
WARNS=4
 1.16 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.15 06-Jul-2000  christos add explicit casts to avoid parameter conversion warnings.
 1.14 22-Jan-2000  mycroft Delint.
Remove trailing ; from uses of __weak_alias(). The macro inserts this if
needed.
 1.13 16-Sep-1999  lukem * use _DIAGASSERT() to check pointer arguments against NULL and file
descriptors against -1 (as appropriate).
* add actual checks which to detect stuff that would trigger_DIAGASSERT(),
and attempt to return a sane error condition.
* knf some code
* remove some `register' decls.

the first two items result in the addition of code similar to the
following in various functions:

_DIAGASSERT(path != NULL)
#ifdef _DIAGNOSTIC
if (path == NULL) {
errno = EFAULT;
return (-1);
}
#endif
 1.12 31-Jan-1999  christos xdrproc_t casts
 1.11 15-Nov-1998  christos delint
 1.10 30-Mar-1998  kleink Need <time.h> for time() prototype.
 1.9 21-Jul-1997  jtc If port provides __weak_alias(), provide an Standard C and POSIX pure
identifier namespace by renaming non standard functions and variables
such that they have a leading underscore. The library will use those
names internally. Weak aliases are used to provide the original names
to the API.

This is only the first part of this change. It is most of the functions
which are implemented in C for all NetBSD ports. Subsequent changes are
to add the same support to the remaining C files, to assembly files, and
to the automagically generated assembly source used for system calls.
When all of the above is done, ports with weak alias support should add
a definition for __weak_alias to <sys/cdefs.h>.
 1.8 13-Jul-1997  christos Fix RCSID's
printf -> warnx
Fix gcc warnings
Put locally declared functions in local.h
 1.7 07-Jul-1997  lukem * implement _yp_invalid_domain, which returns non-zero if the given
domainname isn't RFC1035 compliant. Also ensure that the length <=
YPMAXDOMAIN (which is less than what RFC1035 allows).
* use _yp_invalid_domain in the public front-ends, instead of using
hand-rolled checks
* fix a typo
 1.6 21-May-1997  lukem Don't return allocated memory in an error condition in a char **outXXX argument
(set them to the null pointer instead).
Thus, code that doesn't specificallly attempt to clean up allocated
memory after an error result is returned from yp_...() won't have an
unexpected memory leak (i.e, most 3rd party code)
 1.5 21-May-1997  lukem yp_match() should return errors of the form YPERR_xxx not RPC_xxx.
return YPERR_RESRC instead of RPC_SYSTEMERROR
 1.4 20-May-1997  lukem Some cleanups for [lib/3655]
* Ensure that all 'char **outXXX' pointers aren't the null pointer before use.
* Set *outXXX=NULL before checking any other arguments.
* Document that *outXXX will always be NULL or a malloc(3)ed string
unless outXXX was NULL (in which case YPERR_BADARGS will be returned
and the caller shouldn't attempt to free(*outXXX) if *outXXX != NULL;

These changes should prevent most occurances of coredumps when a bad
argument was given to a yp client function and the caller attempts to
free an outvalue that isn't the null pointer. To be really safe, the
caller probably should set the *outvalue=NULL anyway (ref: PR [lib/3580])
 1.3 23-May-1996  christos branches: 1.3.2;
Avoid using clnt_perror() on the first rpc failure, since it is going to be
retried anyway. Only report it every _yplib_nerrs times.
 1.2 18-May-1996  jtc Use a constant struct timeval for yp timeouts instead of creating
a new struct timeval in each yp function at runtime.
Check arguments and return YPERR_BADARGS if invalid.
 1.1 15-May-1996  jtc Split yperr_match out of yplib.c; makes many static executables a bit smaller.
 1.3.2.1 17-Sep-1996  jtc snapshot namespace cleanup: yp
 1.17.44.1 17-Apr-2012  yamt sync with head
 1.15 03-Jan-2024  christos tidy up some extern declarations
 1.14 25-Jun-2012  abs Update old-style definitions to ANSI, remove a couple of register
definitions along the way. Fixed gcc 4.1 build (thank you vax)
 1.13 02-Mar-2012  christos PR/46111: Wolfgang Stukenbrock: Add yp_setbindtries(3) so that yp operations
don't hang forever if requested.
 1.12 10-Dec-2003  agc branches: 1.12.56;
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.11 06-Jul-2000  christos add explicit casts to avoid parameter conversion warnings.
 1.10 22-Jan-2000  mycroft Delint.
Remove trailing ; from uses of __weak_alias(). The macro inserts this if
needed.
 1.9 31-Jan-1999  christos xdrproc_t casts
 1.8 15-Nov-1998  christos delint
 1.7 21-Jul-1997  jtc If port provides __weak_alias(), provide an Standard C and POSIX pure
identifier namespace by renaming non standard functions and variables
such that they have a leading underscore. The library will use those
names internally. Weak aliases are used to provide the original names
to the API.

This is only the first part of this change. It is most of the functions
which are implemented in C for all NetBSD ports. Subsequent changes are
to add the same support to the remaining C files, to assembly files, and
to the automagically generated assembly source used for system calls.
When all of the above is done, ports with weak alias support should add
a definition for __weak_alias to <sys/cdefs.h>.
 1.6 13-Jul-1997  christos Fix RCSID's
printf -> warnx
Fix gcc warnings
Put locally declared functions in local.h
 1.5 07-Jul-1997  lukem * implement _yp_invalid_domain, which returns non-zero if the given
domainname isn't RFC1035 compliant. Also ensure that the length <=
YPMAXDOMAIN (which is less than what RFC1035 allows).
* use _yp_invalid_domain in the public front-ends, instead of using
hand-rolled checks
* fix a typo
 1.4 23-May-1996  christos branches: 1.4.2;
Avoid using clnt_perror() on the first rpc failure, since it is going to be
retried anyway. Only report it every _yplib_nerrs times.
 1.3 20-May-1996  cgd these files all need to include <string.h>
 1.2 18-May-1996  jtc Use a constant struct timeval for yp timeouts instead of creating
a new struct timeval in each yp function at runtime.
Check arguments and return YPERR_BADARGS if invalid.
 1.1 14-May-1996  jtc Split yp_all, yp_master, and yp_other out of yplib.c; makes some static
executables a bit smaller.
 1.4.2.1 17-Sep-1996  jtc snapshot namespace cleanup: yp
 1.12.56.2 30-Oct-2012  yamt sync with head
 1.12.56.1 17-Apr-2012  yamt sync with head
 1.30 11-Feb-2018  wiz Remove useless macros. Sort errors.
 1.29 07-Feb-2018  pgoyette Fix typos, as reported by Eitan Adler. Update dates.
 1.28 03-Jul-2017  wiz Remove workaround for ancient HTML generation code.
 1.27 03-Feb-2017  abhinav Insert comma between two Nm entries.
Remove Pp before Bd
 1.26 04-Mar-2012  wiz branches: 1.26.14; 1.26.18;
Change macro argument for mdoclint, no effective change.
 1.25 02-Mar-2012  christos PR/46111: Wolfgang Stukenbrock: Add yp_setbindtries(3) so that yp operations
don't hang forever if requested.
 1.24 22-Mar-2010  joerg branches: 1.24.6;
Use .In for header files instead of .Ar Pa and variations.
 1.23 30-Apr-2008  martin branches: 1.23.8;
Convert TNF licenses to new 2 clause variant
 1.22 10-May-2003  wiz branches: 1.22.30;
Misc. fixes from jmc@openbsd.
 1.21 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.20 01-Oct-2002  wiz New sentence, new line. From Robert Elz.
 1.19 04-Sep-2002  wiz heavily, not heaviliy.
 1.18 07-Feb-2002  ross Generate <>& symbolically.
 1.17 06-Feb-2002  ross s/-width Fn xx/-width xx/
The -width argument isn't parsed and can't have attached markup.
 1.16 16-Sep-2001  wiz sort SEE ALSO, add .An.
 1.15 09-Apr-2001  wiz Whitespace fixes.
 1.14 03-Jul-2000  enami branches: 1.14.2;
Substitute the cross reference to portmap(8) with rpcbind(8).
 1.13 29-Nov-1999  hubertf branches: 1.13.4;
You also need <rpc/rpc.h> to compile yp programs.
Noted in PR 8919 by Tom Spindler <dogcow@redback.com>
 1.12 05-Feb-1998  perry branches: 1.12.6;
add LIBRARY section to man page
 1.11 23-Jan-1998  lukem use .Tn YP instead of YP
 1.10 09-Oct-1997  jtc Fix tipo inherited from old version of TNF copyright template.
 1.9 30-Jul-1997  jtc Fix files using old TNF copyright notice
 1.8 07-Jul-1997  lukem * implement _yp_invalid_domain, which returns non-zero if the given
domainname isn't RFC1035 compliant. Also ensure that the length <=
YPMAXDOMAIN (which is less than what RFC1035 allows).
* use _yp_invalid_domain in the public front-ends, instead of using
hand-rolled checks
* fix a typo
 1.7 21-May-1997  lukem Don't return allocated memory in an error condition in a char **outXXX argument
(set them to the null pointer instead).
Thus, code that doesn't specificallly attempt to clean up allocated
memory after an error result is returned from yp_...() won't have an
unexpected memory leak (i.e, most 3rd party code)
 1.6 20-May-1997  lukem Some cleanups for [lib/3655]
* Ensure that all 'char **outXXX' pointers aren't the null pointer before use.
* Set *outXXX=NULL before checking any other arguments.
* Document that *outXXX will always be NULL or a malloc(3)ed string
unless outXXX was NULL (in which case YPERR_BADARGS will be returned
and the caller shouldn't attempt to free(*outXXX) if *outXXX != NULL;

These changes should prevent most occurances of coredumps when a bad
argument was given to a yp client function and the caller attempts to
free an outvalue that isn't the null pointer. To be really safe, the
caller probably should set the *outvalue=NULL anyway (ref: PR [lib/3580])
 1.5 28-Feb-1996  thorpej Copyright assigned to The NetBSD Foundation.
 1.4 12-Sep-1995  thorpej Fix typo pointed out by Luke Mewburn in PR 1449. Kill duplicate RCS id.
 1.3 11-Aug-1995  thorpej Change a few bogus instances of ';' to the syntactically correct ','.
 1.2 27-Feb-1995  cgd clean up Ids
 1.1 28-Oct-1994  deraadt man page from Jason Thorpe
 1.12.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.13.4.1 03-Jul-2000  thorpej Pull up rev. 1.14:
Substitute the cross reference to portmap(8) with rpcbind(8).
 1.14.2.5 18-Oct-2002  nathanw Catch up to -current.
 1.14.2.4 17-Sep-2002  nathanw Catch up to -current.
 1.14.2.3 22-Mar-2002  nathanw Catch up to -current.
 1.14.2.2 08-Mar-2002  nathanw Catch up to -current.
 1.14.2.1 08-Oct-2001  nathanw Catch up to -current.
 1.22.30.1 18-May-2008  yamt sync with head.
 1.23.8.2 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.23.8.1 30-Apr-2008  martin file ypclnt.3 was added on branch christos-time_t on 2008-04-30 13:10:52 +0000
 1.24.6.1 17-Apr-2012  yamt sync with head
 1.26.18.1 21-Apr-2017  bouyer Sync with HEAD
 1.26.14.1 20-Mar-2017  pgoyette Sync with HEAD
 1.9 17-Jun-2015  christos fix error messages
 1.8 25-Jun-2012  abs Update old-style definitions to ANSI, remove a couple of register
definitions along the way. Fixed gcc 4.1 build (thank you vax)
 1.7 29-Nov-2005  christos branches: 1.7.44;
WARNS=4
 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 22-Jan-2000  mycroft Delint.
Remove trailing ; from uses of __weak_alias(). The macro inserts this if
needed.
 1.4 16-Sep-1999  lukem wrap long line
 1.3 21-Jul-1997  jtc If port provides __weak_alias(), provide an Standard C and POSIX pure
identifier namespace by renaming non standard functions and variables
such that they have a leading underscore. The library will use those
names internally. Weak aliases are used to provide the original names
to the API.

This is only the first part of this change. It is most of the functions
which are implemented in C for all NetBSD ports. Subsequent changes are
to add the same support to the remaining C files, to assembly files, and
to the automagically generated assembly source used for system calls.
When all of the above is done, ports with weak alias support should add
a definition for __weak_alias to <sys/cdefs.h>.
 1.2 13-Jul-1997  christos Fix RCSID's
printf -> warnx
Fix gcc warnings
Put locally declared functions in local.h
 1.1 14-May-1996  jtc branches: 1.1.2;
Split yperr_string out of yplib.c; makes many static executables a bit smaller.
 1.1.2.1 17-Sep-1996  jtc snapshot namespace cleanup: yp
 1.7.44.1 30-Oct-2012  yamt sync with head
 1.46 18-Sep-2014  christos make more descriptors that we open as close-on-exec
 1.45 20-Mar-2012  matt Convert to use C89 prototypes.
Remove use of __P
 1.44 02-Mar-2012  christos PR/46111: Wolfgang Stukenbrock: Add yp_setbindtries(3) so that yp operations
don't hang forever if requested.
 1.43 03-Nov-2006  christos branches: 1.43.42;
use FD_CLOEXEC instead of 1.
 1.42 29-Oct-2004  lukem #include "reentrant.h" instead of <threadlib.h>
 1.41 27-May-2004  christos add a simple lock in _yp_check(), to make it re-entrant.
 1.40 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.39 17-Nov-2002  itojun use strlcpy where it is more appropriate.
 1.38 11-Nov-2002  thorpej Fix signed/unsigned comparison warnings.
 1.37 06-Jul-2000  christos branches: 1.37.2;
add explicit casts to avoid parameter conversion warnings.
 1.36 22-Jan-2000  mycroft Delint.
Remove trailing ; from uses of __weak_alias(). The macro inserts this if
needed.
 1.35 20-Sep-1999  lukem back out the #ifdef _DIAGNOSTIC argument checks; too many people complained.
_DIAGASSERT() is still retained.
 1.34 16-Sep-1999  lukem * use _DIAGASSERT() to check pointer arguments against NULL and file
descriptors against -1 (as appropriate).
* add actual checks which to detect stuff that would trigger_DIAGASSERT(),
and attempt to return a sane error condition.
* knf some code
* remove some `register' decls.

the first two items result in the addition of code similar to the
following in various functions:

_DIAGASSERT(path != NULL)
#ifdef _DIAGNOSTIC
if (path == NULL) {
errno = EFAULT;
return (-1);
}
#endif
 1.33 31-Jan-1999  christos xdrproc_t casts
 1.32 27-Jul-1998  mycroft Remove a little lint.
 1.31 23-Jul-1997  lukem Relax checks in _yp_invalid_domain(); yp domains don't have to be
RFC1035 compliant. Still ensure that the give domain isn't empty,
isn't too long, and isn't going to be a security problem.
 1.30 21-Jul-1997  jtc If port provides __weak_alias(), provide an Standard C and POSIX pure
identifier namespace by renaming non standard functions and variables
such that they have a leading underscore. The library will use those
names internally. Weak aliases are used to provide the original names
to the API.

This is only the first part of this change. It is most of the functions
which are implemented in C for all NetBSD ports. Subsequent changes are
to add the same support to the remaining C files, to assembly files, and
to the automagically generated assembly source used for system calls.
When all of the above is done, ports with weak alias support should add
a definition for __weak_alias to <sys/cdefs.h>.
 1.29 13-Jul-1997  christos Fix RCSID's
printf -> warnx
Fix gcc warnings
Put locally declared functions in local.h
 1.28 07-Jul-1997  lukem * implement _yp_invalid_domain, which returns non-zero if the given
domainname isn't RFC1035 compliant. Also ensure that the length <=
YPMAXDOMAIN (which is less than what RFC1035 allows).
* use _yp_invalid_domain in the public front-ends, instead of using
hand-rolled checks
* fix a typo
 1.27 23-Jan-1997  mrg - convert unsafe strcpy(), strcat() and sprintf() to the `n' versions.
- some KNF.
 1.26 21-Jan-1997  thorpej Use a different timeout for the underlying RPC transmission than the
upper-level YP call. This allows the RPC code to retry the transaction,
which is helpful for busy networks.

Problem noted and suggested fix from Michael.Eriksson@era-t.ericsson.se,
and slightly modified by me to compute the RPC timeout one at compile-time,
rather than N times at run-time.

Fixes PR #3117.
 1.25 24-Dec-1996  christos Report yp errors every _yplib_nerrs like the other routines.
 1.24 29-May-1996  thorpej branches: 1.24.2;
Pull down yp/xdr fixes from release branch.
 1.23 23-May-1996  christos Avoid using clnt_perror() on the first rpc failure, since it is going to be
retried anyway. Only report it every _yplib_nerrs times.
 1.22 18-May-1996  jtc branches: 1.22.4;
Split yp_first, yp_next, yp_maplist and yperr_prot out of yplib.c.
Use a constant struct timeval for yp timeouts instead of creating
a new struct timeval in each yp function at runtime.
 1.21 15-May-1996  jtc Split yperr_match out of yplib.c; makes many static executables a bit smaller.
 1.20 14-May-1996  jtc Split yp_all, yp_master, and yp_other out of yplib.c; makes some static
executables a bit smaller.
 1.19 14-May-1996  jtc Split yperr_string out of yplib.c; makes many static executables a bit smaller.
 1.18 09-May-1996  christos Fix PR/2348: infinite loop when RPC_PROCUNAVAIL
 1.17 04-Feb-1996  jtc Change conditionals around RCS IDs to be like rest of libc.
From John Birrell <jb@cimlogic.com.au>.
 1.16 14-Jul-1995  christos - Const poisoning
- KNF police
- Detect malloc failures
 1.15 03-Jun-1995  mycroft Fill in sin_len.
 1.14 27-Feb-1995  cgd clean up Ids
 1.13 28-Sep-1994  deraadt branches: 1.13.2;
check for ypbind.lock file, which indicates yp is alive.
 1.12 20-Sep-1994  deraadt don't print a "not responding" message for first failure.
 1.11 18-Sep-1994  deraadt If the binding file doesn't exist, we need to try RPC to ypbind
to wake it up. This probably fixes my problem with amd.
 1.10 18-Aug-1994  mycroft branches: 1.10.2;
Kill some totally minor ugliness that crept in.
 1.9 06-Aug-1994  jtc Post 1.0 cleanup:
* Include appropriate header files to bring prototypes into scope.
* bcopy -> memcpy
* bzero -> memset
* bcmp -> memcmp
* Tweak yp xdr routines so compiler can do a better job --- saves
at least 5 instructions per function call on the i386.
 1.8 25-May-1994  deraadt correct copyright
 1.7 03-Dec-1993  deraadt sunos compatible /var/yp/binding/ files.
fix const warning
 1.6 26-Aug-1993  jtc Declare rcsid strings so they are stored in text segment.
 1.5 24-Jul-1993  deraadt new header files are more ansi-like
 1.4 12-Jun-1993  deraadt branches: 1.4.2;
a few typecasts because of the new prototypes
 1.3 16-May-1993  deraadt added my copyright.. how self efacing of me
 1.2 27-Apr-1993  deraadt YP functions are always in libc. They just might not be called by getpwent()
and friends.
 1.1 26-Apr-1993  deraadt parts of YP inside libc..
 1.4.2.1 27-Jul-1993  cgd changes from theo that are in the main tree that must go in for 0.9.
 1.10.2.2 18-Aug-1994  mycroft Kill some totally minor ugliness that crept in.
 1.10.2.1 18-Aug-1994  mycroft file yplib.c was added on branch netbsd-1-0 on 1994-08-18 00:45:08 +0000
 1.13.2.1 02-May-1995  jtc #include "namespace.h"
 1.22.4.2 03-Feb-1997  rat Pullup 1.24 -> 1.26 by request from Jason Thorpe.
 1.22.4.1 26-May-1996  jtc yp/xdr fixes from Jason Thorpe
 1.24.2.1 17-Sep-1996  jtc snapshot namespace cleanup: yp
 1.37.2.1 10-Dec-2002  thorpej Sync with HEAD.
 1.43.42.1 17-Apr-2012  yamt sync with head
 1.6 25-Jun-2012  abs Update old-style definitions to ANSI, remove a couple of register
definitions along the way. Fixed gcc 4.1 build (thank you vax)
 1.5 10-Dec-2003  agc branches: 1.5.56;
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.4 22-Jan-2000  mycroft Delint.
Remove trailing ; from uses of __weak_alias(). The macro inserts this if
needed.
 1.3 21-Jul-1997  jtc If port provides __weak_alias(), provide an Standard C and POSIX pure
identifier namespace by renaming non standard functions and variables
such that they have a leading underscore. The library will use those
names internally. Weak aliases are used to provide the original names
to the API.

This is only the first part of this change. It is most of the functions
which are implemented in C for all NetBSD ports. Subsequent changes are
to add the same support to the remaining C files, to assembly files, and
to the automagically generated assembly source used for system calls.
When all of the above is done, ports with weak alias support should add
a definition for __weak_alias to <sys/cdefs.h>.
 1.2 13-Jul-1997  christos Fix RCSID's
printf -> warnx
Fix gcc warnings
Put locally declared functions in local.h
 1.1 18-May-1996  jtc branches: 1.1.2;
Split yp_first, yp_next, yp_maplist and yperr_prot out of yplib.c.
 1.1.2.1 17-Sep-1996  jtc snapshot namespace cleanup: yp
 1.5.56.1 30-Oct-2012  yamt sync with head

RSS XML Feed