Commit Graph

74 Commits

Author SHA1 Message Date
wiz 6f7450c1be Whitespace fixes. 2001-04-09 12:09:11 +00:00
christos 473ea2c4e7 add explicit casts to avoid parameter conversion warnings. 2000-07-06 03:14:05 +00:00
enami 8ab9946e10 Substitute the cross reference to portmap(8) with rpcbind(8). 2000-07-03 10:06:24 +00:00
mycroft 605490369c Delint.
Remove trailing ; from uses of __weak_alias().  The macro inserts this if
needed.
2000-01-22 22:19:07 +00:00
hubertf 35c835cfe4 You also need <rpc/rpc.h> to compile yp programs.
Noted in PR 8919 by Tom Spindler <dogcow@redback.com>
1999-11-29 23:28:23 +00:00
lukem d896261208 back out the #ifdef _DIAGNOSTIC argument checks; too many people complained.
_DIAGASSERT() is still retained.
1999-09-20 04:38:56 +00:00
lukem b48252f365 * 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
1999-09-16 11:44:54 +00:00
lukem ec31e06fff wrap long line 1999-09-16 09:54:28 +00:00
lukem b035f7ab5e check a couple more args 1999-09-16 09:53:41 +00:00
drochner a34eb7c1b7 use ${ARCHDIR} instead of ${.CURDIR}/arch/${MACHINE_ARCH} where appropriate
libc builds on pmax again
1999-02-24 15:05:20 +00:00
christos b2a14ab2d3 xdrproc_t casts 1999-01-31 20:46:12 +00:00
christos f4c1479174 delint 1998-11-15 17:10:30 +00:00
mycroft 780ffacdd8 Remove a little lint. 1998-07-27 12:29:21 +00:00
kleink 8d6b3ab02a Need <time.h> for time() prototype. 1998-03-30 15:05:20 +00:00
perry 312aca536f add LIBRARY section to man page 1998-02-05 18:45:17 +00:00
lukem f5d4256de8 use .Tn YP instead of YP 1998-01-23 13:49:10 +00:00
thorpej 2a43f22095 __warn_references and __indr_reference semicolon fixups. From
Chris Demetriou <cgd@pa.dec.com>.
1997-11-04 23:52:05 +00:00
thorpej 14cd99880c 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>.
1997-10-20 22:05:06 +00:00
christos f8b3cbd2c8 Remove obsolete functions 1997-10-16 23:22:31 +00:00
jtc c8f77c0b8b Fix tipo inherited from old version of TNF copyright template. 1997-10-09 07:25:45 +00:00
jtc 990a11b9c6 Fix files using old TNF copyright notice 1997-07-30 23:53:32 +00:00
lukem 23d6c4fa54 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.
1997-07-23 05:29:38 +00:00
jtc 43fa6fe319 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>.
1997-07-21 14:06:24 +00:00
christos e7cc550330 Fix RCSID's
printf -> warnx
Fix gcc warnings
Put locally declared functions in local.h
1997-07-13 20:28:09 +00:00
lukem 42736edb4d * 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
1997-07-07 02:00:30 +00:00
lukem db4fd8d56f 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)
1997-05-21 06:55:25 +00:00
lukem 220410601a yp_match() should return errors of the form YPERR_xxx not RPC_xxx.
return YPERR_RESRC instead of RPC_SYSTEMERROR
1997-05-21 01:48:46 +00:00
lukem 301e6e6c32 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])
1997-05-20 15:25:38 +00:00
mrg 9cd5492c02 - convert unsafe strcpy(), strcat() and sprintf() to the `n' versions.
- some KNF.
1997-01-23 14:01:45 +00:00
thorpej ac6352fdc7 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.
1997-01-21 20:40:07 +00:00
christos 772697e293 Report yp errors every _yplib_nerrs like the other routines. 1996-12-24 15:08:39 +00:00
chuck 3dc0d5258f fix xdr_ypmap_parms (missing "&"'s in calls to xdr_ypdomain_wrap_string
and xdr_ypmap_wrap_string).   prevents segv in ypserv.
1996-08-15 21:43:03 +00:00
thorpej bb516fa80e Fix some potential type-size problems. 1996-08-09 10:06:02 +00:00
christos 1d4349e7c8 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.
1996-06-18 20:05:59 +00:00
thorpej 7a26f6a8ac Pull down yp/xdr fixes from release branch. 1996-05-29 20:00:52 +00:00
christos 409a9590f3 Avoid using clnt_perror() on the first rpc failure, since it is going to be
retried anyway. Only report it every _yplib_nerrs times.
1996-05-23 13:48:59 +00:00
cgd 64331ae191 these files all need to include <string.h> 1996-05-20 15:17:31 +00:00
jtc 159bafea3c Split yp_first, yp_next, yp_maplist and yperr_prot out of yplib.c. 1996-05-18 19:06:39 +00:00
jtc 2039c263f3 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.
1996-05-18 19:03:45 +00:00
jtc 0724069f60 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.
1996-05-18 19:01:19 +00:00
jtc 76bf46a33e 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.
1996-05-18 18:43:24 +00:00
jtc 5d8adb683d Split yperr_match out of yplib.c; makes many static executables a bit smaller. 1996-05-15 05:27:50 +00:00
jtc 7808771d84 Split yp_all, yp_master, and yp_other out of yplib.c; makes some static
executables a bit smaller.
1996-05-14 23:37:27 +00:00
jtc 3b32f2c7c0 Split yperr_string out of yplib.c; makes many static executables a bit smaller. 1996-05-14 13:36:49 +00:00
christos c1a26f1198 Fix PR/2348: infinite loop when RPC_PROCUNAVAIL 1996-05-09 22:52:24 +00:00
thorpej 0ffa7d7b3c Copyright assigned to The NetBSD Foundation. 1996-02-28 00:47:42 +00:00
jtc 6bb5d0a08c Change conditionals around RCS IDs to be like rest of libc.
From John Birrell <jb@cimlogic.com.au>.
1996-02-04 23:26:21 +00:00
thorpej 60f8dae203 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.
1995-09-12 19:40:27 +00:00
thorpej 84b1a32da6 Fix typo pointed out by Luke Mewburn in PR 1449. Kill duplicate RCS id. 1995-09-12 19:33:03 +00:00
thorpej 110b961e86 Change a few bogus instances of ';' to the syntactically correct ','. 1995-08-11 01:10:21 +00:00