Commit Graph

264 Commits

Author SHA1 Message Date
christos 2966117648 PR/47615: Dr. W. Stukenbrock: Always zero out the result structs in the
svc procs to avoid returning stale request data to the client.
XXX: pullup-6,7,8
2018-01-17 03:16:10 +00:00
wiz 01869ca4d2 Remove workaround for ancient HTML generation code. 2017-07-03 21:28:48 +00:00
sevan f7a3540ecf Drop main() prototype. 2017-05-04 16:26:09 +00:00
christos 9009c648c6 need <sys/stat.h> 2017-01-10 21:04:06 +00:00
christos cb4eacf0ac PR/50057: Wolfgang Stukenbrock: yp-map transfer removes SECURE-flag 2015-07-17 15:58:01 +00:00
riastradh 6cb10275d0 Merge riastradh-drm2 to HEAD. 2014-03-18 18:20:35 +00:00
christos 0a77b69ab6 fix unused variable warnings. 2013-10-19 17:16:37 +00:00
wiz a5684d07dd Use Mt for email addresses. 2013-07-20 21:39:55 +00:00
hauke 64a4eb64c6 Commit the patches in Wolfgang Stukenbrock's PR bin/41896.
(1) Do not serve UIDs below MINUID in master.passwd.* maps,
just like in passwd.* maps.

(2) Since stdethers(8) and stdhosts(8) strip comments, we do
not have to do it here, much less inconsistently.
2013-07-19 11:44:51 +00:00
wiz 1ac719d147 Remove unnecessary Bk/Ek pairs from SYNOPSIS.
No effective change except where I used the opportunity to sort options
and/or option descriptions.
2012-04-08 22:00:37 +00:00
joerg 66dd2755f5 Add __printflike attribution to use vprintf and friends with an argument
as format string.
2012-03-15 02:02:20 +00:00
joerg 8583b49ce0 static + __dead 2011-08-30 21:03:31 +00:00
plunky 87d4f6076b 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.
2011-08-30 17:06:20 +00:00
joerg 7293bf2d37 Replace malloc + incorrect memset with calloc. 2011-07-01 03:09:29 +00:00
wiz 5989309eef Add -f to usage, and make it match man page. 2011-04-25 22:54:05 +00:00
wiz 819b5392dd New sentence, new line. Use more markup. 2011-04-25 22:53:09 +00:00
wiz 933a549c56 Make usage match manpage. 2011-04-25 22:51:26 +00:00
wiz 9ebf684514 Remove unimplemented -b option. From YOMURA Masanori. 2011-04-25 22:49:06 +00:00
chuck f46c12c85c remove no-longer-valid wustl email address for me.
no functional change with this commit.
2011-02-01 21:00:25 +00:00
chuck e2bf3ae6ea udpate license clauses on my code to match the new-style BSD licenses.
remove no-longer-valid wustl email address for me.

no functional change with this commit.
2011-02-01 20:58:15 +00:00
joerg 4f69f7fc94 No trailing whitespace 2010-04-05 19:36:29 +00:00
chuck a8036503d8 rev 1.18 un-covered some bugs:
1. add_interdomain and add_secure are optional... not all maps use these
    keys.  if we are unable to add them due to a YPERR_KEY (meaning they
    are not being used), then we should not flag this as a general error.

 2. if we have a failure (status <= 0) we unlink_db() the temp database
    as part of error handling.   but we should not overwrite our error
    status code with the return value from unlink_db() because if the
    unlink_db() works (likely true) than that success will wipe out our
    error code and the calling yppush will think we worked.
2009-11-05 21:26:25 +00:00
chuck fd40ef4f59 yppush RPC is supposed to return yppush_status error/status codes
(e.g. YPPUSH_SUCC, YPPUSH_NOMAP, etc.).

Functions like yp_master, yp_order_host, yp_master_host, and
yp_match_host return YPERR-style error codes.  YPERR-style error
codes do not directly correspond to yppush_status codes, so it
is a bad idea to just directly YPERR codes into the yppush return
status value (it causes failing yppush runs to print confusing
error messages).

Change ypxfr.c to convert the YPERR codes to YPPUSH codes.
2009-11-05 15:23:55 +00:00
christos ffd8793875 no need for YY_NO here. 2009-10-29 14:41:02 +00:00
snj 1a868936e6 Remove 3rd and 4th clauses. Approved by Mats O Jansson (copyright holder). 2009-10-21 00:01:56 +00:00
snj 07ce40632e 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.
2009-10-20 00:51:13 +00:00
snj 0e24aa0d20 Remove third and fourth clauses, as was done upstream in revision 1.25. 2009-10-19 23:25:43 +00:00
lukem d3d3aa621a Fix WARNS=4 issues (-Wshadow -Wcast-qual -Wsign-compare) 2009-04-19 06:06:39 +00:00
chuck 77b3637f18 Disable hostname lookup for ypserv(8) libwrap access control,
as they can cause performance problems while ypserv is blocked
waiting for the DNS to respond.  initially discussed here:

	http://mail-index.netbsd.org/tech-userlevel/2006/11/01/0014.html

This diff is from Doug Needham who found an easy way to get
the desired behavior without having to change libwrap.
2008-05-16 16:41:42 +00:00
lukem 66176dfdff 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)
2008-05-03 14:48:30 +00:00
martin 11a6dbe728 Convert TNF licenses to new 2 clause variant 2008-04-30 13:10:46 +00:00
martin ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
lukem cea4b7cdfd 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.
2008-02-29 03:00:47 +00:00
lukem 3a5ea89a68 Correct the argument order to ypdb_open(). 2008-02-27 01:27:35 +00:00
perry 8b0f9554ff convert __attribute__s to applicable cdefs.h macros 2007-12-15 19:44:37 +00:00
christos 1a9cb96f06 PR/36820: Geoff C. Wing: ypserv maplist functionality broken due to off-by-one
error
2007-08-22 16:49:17 +00:00
tls 4147a3c54a Add new Makefile knob, USE_FORT, which extends USE_SSP by turning on the
FORTIFY_SOURCE feature of libssp, thus checking the size of arguments to
various string and memory copy and set functions (as well as a few system
calls and other miscellany) where known at function entry.  RedHat has
evidently built all "core system packages" with this option for some time.

This option should be used at the top of Makefiles (or Makefile.inc where
this is used for subdirectories) but after any setting of LIB.

This is only useful for userland code, and cannot be used in libc or in
any code which includes the libc internals, because it overrides certain
libc functions with macros.  Some effort has been made to make USE_FORT=yes
work correctly for a full-system build by having the bsd.sys.mk logic
disable the feature where it should not be used (libc, libssp iteself,
the kernel) but no attempt has been made to build the entire system with
USE_FORT and doing so will doubtless expose numerous bugs and misfeatures.

Adjust the system build so that all programs and libraries that are setuid,
directly handle network data (including serial comm data), perform
authentication, or appear likely to have (or have a history of having)
data-driven bugs (e.g. file(1)) are built with USE_FORT=yes by default,
with the exception of libc, which cannot use USE_FORT and thus uses
only USE_SSP by default.  Tested on i386 with no ill results; USE_FORT=no
per-directory or in a system build will disable if desired.
2007-05-28 12:06:17 +00:00
hubertf 1a16cf8d89 - Remove unused ctype.h
- use EXIT_{SUCCESS,FAILURE} constants instead of 0/1
From: Slava Semushin <php-coder@altlinux.ru>
2007-03-10 01:21:08 +00:00
christos 9c32e391e9 strlcpy off by one errors (from gdamore) 2006-10-15 01:10:00 +00:00
elad a754c75075 PR/31956: Andrew Daugherity: Makefile.yp: shadow.byname map should respect
MINUID

Patch applied and verified by francisg@#NetBSD-code, thanks!
2006-10-07 16:54:38 +00:00
christos fb4d7a1a6e - fix pointer problems and unsigned int -> int confusion that lead to
undetected errors.
- factor out the socket creation code so that we don't have 4 copies.
- add -p <port> argument
- fix the majority of the lint problems.
- change all the strncpy's to strlcpy's.
2006-05-20 20:03:28 +00:00
mrg aadd7d4847 sprinkle some -fno-strict-aliasing and -Wno-pointer-sign with GCC4. 2006-05-11 23:16:28 +00:00
mrg 9f5cbae0f8 res_search() takes u_char * as 4th argument - pass one. 2006-05-11 08:44:56 +00:00
bouyer 17cb72c505 In add_secure(), change
(status > 0) to (status == 0 && value). It doesn't make sense to handle value
only if there was an error.
Fix coverity ID 1709.
2006-03-22 19:54:13 +00:00
bouyer d663834226 Fix memory leak if we're adding an existing group name.
Coverity ID 1568.
2006-03-18 14:33:07 +00:00
lukem aa159e4a50 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.
2005-06-20 00:29:42 +00:00
lukem cdd4868c29 tweak filename length check 2005-06-20 00:08:35 +00:00
lukem a0b1a25618 snprintf NUL terminates, so there is no need to explicitly do it afterwards 2005-06-19 23:43:51 +00:00
christos 71abc767dd Use SA_NOCLDWAIT instead of catching the signal and waiting. Avoids signal
races the easy way.
2005-03-30 15:19:10 +00:00
thorpej 5b0ca568cb YP -> NIS 2005-02-26 16:33:46 +00:00