Commit Graph

84 Commits

Author SHA1 Message Date
Warner Losh
02da3f2280 yppasswdd assumed that a struct x_master_passwd is type punable to a
struct passwd.  This is not the case when sizeof(unsigned long) !=
sizeof(time_t).  Write a dinky function to do the assignment instead
of relying on the punning.  This does slow things down a little (1
extra function call, 11 pointer or int assignments), but is much safer
and machines have been fast enough since the mid 1990s that nobody
will notice the difference.

time_t is a 64-bits int on arm and mips.  Before this change, arm was
silently broken.  I guess there aren't that many ARM machines running
master YP domain servers. :)

The client side doesn't assume this type punning, so it doesn't need
to be fixed.
2009-02-18 22:27:46 +00:00
Rong-En Fan
28e4b62bbe - Whenever a password/shell is changed via rpc.yppasswdd, the daemon leaves
one zombie process because it does not do the cleanup. For a long running
  NIS/YP server, it will have lots of zombie processes on it. Fix that by
  ignoring the SIGCHLD signal since we don't really care about the exit
  status in this case.

PR:		bin/91980
Reported by:	Arjan van der Velde <dj_noresult at hotmail.com>
Submitted by:	Jui-Nan Lin" <jnlin at csie.nctu.edu.tw>
Reviewed by:	delphij
MFC after:	1 month
2008-10-30 01:54:31 +00:00
John Birrell
0aad0f2282 These are the things that the tinderbox has problems with because it
doesn't use the default CFLAGS which contain -fno-strict-aliasing.

Until the code is cleaned up, just add -fno-strict-aliasing to the
CFLAGS of these for the tinderboxes' sake, allowing the rest of the
tree to have -Werror enabled again.
2007-11-20 02:07:30 +00:00
Xin LI
8516925d8a Use socklen_t in place of socket operations, instead of int 2005-05-02 14:02:43 +00:00
Ruslan Ermilov
36a142c455 Expand contractions. 2005-02-13 23:45:54 +00:00
Ruslan Ermilov
0227791b40 Expand *n't contractions. 2005-02-13 22:25:33 +00:00
Ruslan Ermilov
59a3c79da6 Sort sections. 2005-01-18 20:02:45 +00:00
Ruslan Ermilov
8311bc780c Utilize SCRIPTS. 2004-10-18 21:29:20 +00:00
Stefan Farfeleder
b08f8f39ca Remove definition of struct dom_binding, it's non-standard C code and
unnecessary since src/include/rpcsvc/ypclnt.h's revision 1.10.
2004-10-17 19:33:33 +00:00
Ruslan Ermilov
07bfccd71e Mechanically kill hard sentence breaks. 2004-07-02 23:13:00 +00:00
Martin Blapp
5169db8c96 Fix yppasswdproc_update_master_1_svc() too.
Only call pw_mkdb if passfile == _PATH_MASTERPASSWD.
Otherwise, rename master.passwd to a temp filename, rename
the new passwd to master.passwd, and let yppwupdate update
passwd as it sees fit.

Reviewed by:	phk
Tested by:	genesys
2003-06-15 21:24:45 +00:00
Martin Blapp
9d09cc7ac8 Only call pw_mkdb if passfile == _PATH_MASTERPASSWD.
Otherwise, rename master.passwd to a temp filename, rename
the new passwd to master.passwd, and let yppwupdate update
passwd as it sees fit.

PR:		52601, 7968
Reviewed by:	des
Submitted by:	Dan Nelson <dnelson@allantgroup.com>
2003-06-15 10:34:11 +00:00
David E. O'Brien
b728350ee6 Use __FBSDID over rcsid[]. Protect copyright[] where needed. 2003-05-03 21:06:42 +00:00
David E. O'Brien
052238b16c style.Makefile(5) 2003-04-04 17:49:21 +00:00
Martin Blapp
bcb53b1606 Implement nonblocking tpc-connections. rpcgen -m does still
produce backcompatible code.

Reviewed by:	rwatson
Obtained from:	NetBSD
MFC after:	1 day
2003-01-16 07:27:30 +00:00
Jens Schweikhardt
57bd0fc6e8 english(4) police. 2002-12-27 12:15:40 +00:00
Ruslan Ermilov
d2893b161b Drop support for COPY, -c has been the default mode of install(1)
for a long time now.

Approved by:	bde
2002-07-29 09:40:17 +00:00
Ruslan Ermilov
0b87f79976 s/${INSTALL} -c/${INSTALL} ${COPY}/ 2002-07-18 12:07:49 +00:00
Philippe Charnier
490d5836b5 The .Nm utility 2002-07-14 14:47:15 +00:00
Alfred Perlstein
c8c710fd85 de-__P() 2002-07-11 21:28:16 +00:00
Dag-Erling Smørgrav
0c89fa0c34 Unbreak Alpha build. 2002-05-15 09:20:06 +00:00
Alfred Perlstein
40e7772b07 unbreak build: fix multi-line string literal 2002-05-11 04:10:49 +00:00
Alfred Perlstein
a74d1691fe unbreak build: ditch multi-line string literals 2002-05-11 03:54:21 +00:00
Dag-Erling Smørgrav
ba1556b538 Use libutil instead of pw_{copy,util}.c. Clean up a little. Warnsify.
Sponsored by:	DARPA, NAI Labs
2002-05-08 15:42:37 +00:00
Dag-Erling Smørgrav
dc584ddbc5 ANSIfy and remove some dead code.
Sponsored by:	DARPA, NAI Labs
2002-02-06 15:26:07 +00:00
Dag-Erling Smørgrav
ed4d1c46a2 Apply the following mechanical transformations in preparation for
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
2002-02-06 13:30:31 +00:00
Ruslan Ermilov
91bef1104d Do a bit more of prototype cleanup. 2002-02-06 07:34:17 +00:00
Alfred Perlstein
26d0e65f67 Fix the breakage in rpc.yppasswd. Readded the svc_create() and
the registering of the "unix" transport, now it is fixed.

Everywhere, rq_cred is taken to look what authentification we have.
We can not be sure that transp>xp_verf.oa_flavor is also filled in.
This seems to be the same for all sun source. they take the flavor
of rq_cred, instead of transp.

Submitted by: mbr
2002-02-05 18:51:13 +00:00
Alfred Perlstein
2ed07f34d6 tab in pw_mkdb's arg for style. 2002-02-05 18:27:06 +00:00
Alfred Perlstein
09d50db3f9 Constify things to unbreak world.
Submitted by: David Wolfskill <david@catwhisker.org>
2002-02-05 18:25:59 +00:00
Ruslan Ermilov
491a842962 yp(4) -> yp(8).
PR:		docs/30797
2002-01-14 16:59:03 +00:00
Dima Dorfman
a48060a2f7 Spelling police: sucessful -> successful. 2001-11-24 23:41:32 +00:00
David E. O'Brien
90e655ea4e Perform a major cleanup of the usr.sbin Makefiles.
These are not perfectly in agreement with each other style-wise, but they
are orders of orders of magnitude more consistent style-wise than before.
2001-07-20 06:20:32 +00:00
Dima Dorfman
f247324df7 Remove whitespace at EOL. 2001-07-15 08:06:20 +00:00
Brian Somers
7bc6d0158f Fix the type of the NULL arg to execl()
Idea from: Theo de Raadt <deraadt@openbsd.org>
2001-07-09 09:24:06 +00:00
Dima Dorfman
1fecc3ff98 Correct a typo in an error message. 2001-06-16 23:15:15 +00:00
Ruslan Ermilov
345e52e742 - Backout botched attempt to introduce MANSECT feature.
- MAN[1-9] -> MAN.
2001-03-26 14:42:20 +00:00
Alfred Perlstein
392df6bce7 Remove struct cmessage from sys/socket.h and reintroduce the private
definitions.

Requested by: wollman
2001-03-22 20:43:13 +00:00
Andrey A. Chernov
21b3f5311a Unbreak world by removing struct cmessage already define in sys/socket.h 2001-03-22 18:18:32 +00:00
Ruslan Ermilov
c73e22c3d4 Set the default manual section for usr.sbin/ to 8. 2001-03-20 18:17:26 +00:00
Alfred Perlstein
8360efbd6c Bring in a hybrid of SunSoft's transport-independent RPC (TI-RPC) and
associated changes that had to happen to make this possible as well as
bugs fixed along the way.

  Bring in required TLI library routines to support this.

  Since we don't support TLI we've essentially copied what NetBSD
  has done, adding a thin layer to emulate direct the TLI calls
  into BSD socket calls.

  This is mostly from Sun's tirpc release that was made in 1994,
  however some fixes were backported from the 1999 release (supposedly
  only made available after this porting effort was underway).

  The submitter has agreed to continue on and bring us up to the
  1999 release.

  Several key features are introduced with this update:
    Client calls are thread safe. (1999 code has server side thread
    safe)
    Updated, a more modern interface.

  Many userland updates were done to bring the code up to par with
  the recent RPC API.

  There is an update to the pthreads library, a function
  pthread_main_np() was added to emulate a function of Sun's threads
  library.

  While we're at it, bring in NetBSD's lockd, it's been far too
  long of a wait.

  New rpcbind(8) replaces portmap(8) (supporting communication over
  an authenticated Unix-domain socket, and by default only allowing
  set and unset requests over that channel). It's much more secure
  than the old portmapper.

  Umount(8), mountd(8), mount_nfs(8), nfsd(8) have also been upgraded
  to support TI-RPC and to support IPV6.

  Umount(8) is also fixed to unmount pathnames longer than 80 chars,
  which are currently truncated by the Kernel statfs structure.

Submitted by: Martin Blapp <mb@imp.ch>
Manpage review: ru
Secure RPC implemented by: wpaul
2001-03-19 12:50:13 +00:00
Jeroen Ruigrok van der Werven
1a6e52d0e9 Fix typo: seperate -> separate.
Seperate does not exist in the english language.
2001-02-06 11:21:58 +00:00
Ruslan Ermilov
1bfea903ed Prepare for mdoc(7)NG. 2001-01-16 09:39:23 +00:00
Ruslan Ermilov
e97407b4f2 mdoc(7) police: use the new features of the Nm macro. 2000-11-20 20:10:44 +00:00
Ruslan Ermilov
b5c508fba3 Use Fx macro wherever possible. 2000-11-14 11:20:58 +00:00
David Nugent
d73dd62871 Detect and handle comment lines in master.passwd files.
PR:		bin/19664
2000-07-12 11:00:28 +00:00
Jeroen Ruigrok van der Werven
18616dacbb Remove unused include. 2000-04-29 12:47:03 +00:00
Warner Losh
a39ebf9911 remove extern int errno; include errno.h 2000-04-14 06:49:16 +00:00
Sheldon Hearn
4e86fcacf6 Remove more single-space hard sentence breaks. 2000-03-02 14:54:02 +00:00
Sheldon Hearn
f2e366a105 Remove single-space hard sentence breaks. These degrade the quality
of the typeset output, tend to make diffs harder to read and provide
bad examples for new-comers to mdoc.
2000-03-01 14:09:25 +00:00