History log of /freebsd-10-stable/usr.sbin/rpc.yppasswdd/
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
301619 08-Jun-2016 ngie

MFC r300430:

Wrap EXPAND(..) macro with a do-while(0) loop and put a single statement on each line

As a positive side-effect, this eliminates the double semicolons reported by Coverity:
the macro contained a trailing semicolon, in addition to the semicolon placed on
each line where EXPAND(..) was called.

CID: 1194269

291819 04-Dec-2015 bdrewery

MFC r291348:

Use LIBEXECDIR for /usr/libexec.

256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


231994 22-Feb-2012 kevlo

Handle NULL return from crypt(3). Mostly from DragonFly


231118 07-Feb-2012 dim

Consistently set RPCGEN_CPP when running rpcgen, so the C preprocessor
set via ${CPP} is used, instead of always using hardcoded /usr/bin/cpp.

MFC after: 1 week


223492 24-Jun-2011 kevlo

Remove duplicated header files


201390 02-Jan-2010 ed

The last big commit: let usr.sbin/ use WARNS=6 by default.


188766 18-Feb-2009 imp

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.


184459 30-Oct-2008 rafan

- 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


173766 20-Nov-2007 jb

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.


145803 02-May-2005 delphij

Use socklen_t in place of socket operations, instead of int


141851 13-Feb-2005 ru

Expand contractions.


141846 13-Feb-2005 ru

Expand *n't contractions.


140442 18-Jan-2005 ru

Sort sections.


136675 18-Oct-2004 ru

Utilize SCRIPTS.


136620 17-Oct-2004 stefanf

Remove definition of struct dom_binding, it's non-standard C code and
unnecessary since src/include/rpcsvc/ypclnt.h's revision 1.10.


131500 02-Jul-2004 ru

Mechanically kill hard sentence breaks.


116421 15-Jun-2003 mbr

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


116392 15-Jun-2003 mbr

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>


114601 03-May-2003 obrien

Use __FBSDID over rcsid[]. Protect copyright[] where needed.


113091 04-Apr-2003 obrien

style.Makefile(5)


109363 16-Jan-2003 mbr

Implement nonblocking tpc-connections. rpcgen -m does still
produce backcompatible code.

Reviewed by: rwatson
Obtained from: NetBSD
MFC after: 1 day


108317 27-Dec-2002 schweikh

english(4) police.


100872 29-Jul-2002 ru

Drop support for COPY, -c has been the default mode of install(1)
for a long time now.

Approved by: bde


100313 18-Jul-2002 ru

s/${INSTALL} -c/${INSTALL} ${COPY}/


99968 14-Jul-2002 charnier

The .Nm utility


99824 11-Jul-2002 alfred

de-__P()


96644 15-May-2002 des

Unbreak Alpha build.


96391 11-May-2002 alfred

unbreak build: fix multi-line string literal


96389 11-May-2002 alfred

unbreak build: ditch multi-line string literals


96222 08-May-2002 des

Use libutil instead of pw_{copy,util}.c. Clean up a little. Warnsify.

Sponsored by: DARPA, NAI Labs


90298 06-Feb-2002 des

ANSIfy and remove some dead code.

Sponsored by: DARPA, NAI Labs


90297 06-Feb-2002 des

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


90294 06-Feb-2002 ru

Do a bit more of prototype cleanup.


90253 05-Feb-2002 alfred

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


90247 05-Feb-2002 alfred

tab in pw_mkdb's arg for style.


90246 05-Feb-2002 alfred

Constify things to unbreak world.

Submitted by: David Wolfskill <david@catwhisker.org>


89362 14-Jan-2002 ru

yp(4) -> yp(8).

PR: docs/30797


86882 24-Nov-2001 dd

Spelling police: sucessful -> successful.


80029 20-Jul-2001 obrien

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.


79755 15-Jul-2001 dd

Remove whitespace at EOL.


79452 09-Jul-2001 brian

Fix the type of the NULL arg to execl()

Idea from: Theo de Raadt <deraadt@openbsd.org>


78369 16-Jun-2001 dd

Correct a typo in an error message.


74816 26-Mar-2001 ru

- Backout botched attempt to introduce MANSECT feature.
- MAN[1-9] -> MAN.


74660 22-Mar-2001 alfred

Remove struct cmessage from sys/socket.h and reintroduce the private
definitions.

Requested by: wollman


74657 22-Mar-2001 ache

Unbreak world by removing struct cmessage already define in sys/socket.h


74532 20-Mar-2001 ru

Set the default manual section for usr.sbin/ to 8.


74462 19-Mar-2001 alfred

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


72091 06-Feb-2001 asmodai

Fix typo: seperate -> separate.

Seperate does not exist in the english language.


71102 16-Jan-2001 ru

Prepare for mdoc(7)NG.


68965 20-Nov-2000 ru

mdoc(7) police: use the new features of the Nm macro.


68716 14-Nov-2000 ru

Use Fx macro wherever possible.


63014 12-Jul-2000 davidn

Detect and handle comment lines in master.passwd files.
PR: bin/19664


59750 29-Apr-2000 asmodai

Remove unused include.


59218 14-Apr-2000 imp

remove extern int errno; include errno.h


57695 02-Mar-2000 sheldonh

Remove more single-space hard sentence breaks.


57673 01-Mar-2000 sheldonh

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.


54782 18-Dec-1999 peter

Revert the libcrypt/libmd stuff back to how it was. This should not have
happened as it was working around problems elsewhere (ie: binutils/ld
not doing the right thing according to the ELF design). libcrypt has
been adjusted to not need the runtime -lmd. It's still not quite right
(ld is supposed to work damnit) but at least it doesn't impact all the
users of libcrypt in Marcel's cross-build model.


54677 16-Dec-1999 marcel

Add libmd (or move it after libcrypt). We don't want the linker to be
smart because it will definitely get it wrong. This popped up during
cross-linking.


50479 28-Aug-1999 peter

$Id$ -> $FreeBSD$


44791 16-Mar-1999 brian

Host names are case-insensitive.


36639 04-Jun-1998 wpaul

Protect errno in signal handlers, like in portmap.


35910 10-May-1998 bde

Removed bogus dependencies of generated .c files on generated headers.


35466 26-Apr-1998 bde

Fixed `make -j9' by putting generated headers in ${SRCS}. Removed bogus
dependencies of generated .c files on generated headers (these made
`make -JN' work provided `depend' was made first). Sorted sources lists.


34809 23-Mar-1998 charnier

.Sh AUTHOR -> .Sh AUTHORS. Use .An/.Aq.


30377 13-Oct-1997 charnier

Remove multiply defined Id string. Hide sccsid string.


27758 29-Jul-1997 wpaul

Modify rpc.yppasswdd to use the new AF_LOCAL transport in the RPC library
instead of its own kludged up version. This makes the special 'superuser-only'
update procedure work just like a real RPC service.


24428 31-Mar-1997 imp

compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.


22997 22-Feb-1997 peter

Revert $FreeBSD$ to $Id$


21880 20-Jan-1997 wosch

Sort cross references.


21673 14-Jan-1997 jkh

Make the long-awaited change from $Id$ to $FreeBSD$

This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore. This update would have been
insane otherwise.


19779 15-Nov-1996 peter

oops, forgot to commit this. the sockaddr_un init code was missing
initialisers for sun_len and not accounting for it in the sizeof
calculation. Ie: it was potentially sending an unterminated string into
the kernel.


19778 15-Nov-1996 peter

Fix harmless bugs found while hunting for chpass nis failure


19777 15-Nov-1996 peter

Uninitialised length variable passed to accept(), causing random accept()
failures due to EFAULT.

This is screaming out to go into 2.2


19412 04-Nov-1996 wosch

add PATH variable, use it


19138 23-Oct-1996 wpaul

Add extra sanity checking to the in-place update routine. Sometimes you
find two users with the same UID (i.e. root and toor), but yp_mkdb(8)
forbits duplicate keys, so only one of them will end up in the *.byuid
maps (probably toor, since it comes after root in the template file).
If I asked rpc.yppasswdd(8) to change toor's password, it would update
the *.byname maps correctly, but incorrectly modify root's entry in
the *.byuid maps since the only matching record with UID=0 in those
maps belongs to root.

To fix this, we check that both the name and UID are correct before trying
to write new entries to the maps.


19130 23-Oct-1996 wpaul

Make error messages more informative.


19096 22-Oct-1996 wpaul

Two small changes that were in my development sources at home
but never made it here for some reason:

- 'u' option was missing from getopt string
- Use daemon() to become daemonic.


19091 22-Oct-1996 wpaul

Since rpc.yppasswdd(8) also supports adding entries to the
/var/yp/master.passwd template file and it uses the same kind of code
as chpass(1), it may also be vulnerable to the bug from PR #1519.
May as well deal with it since I'm in the area. (yppasswdd in -stable
doesn't do additions, therefore it shouldn't be have this problem.)


18050 05-Sep-1996 bde

Fixed DPADD.


18047 05-Sep-1996 wpaul

When updating a password via the standard RPC handler, reset the password
change time (pw_change) to zero.


17431 04-Aug-1996 wpaul

Fix a couple of bogons. The first two were brought to my attention
by Peter Wemm:

- In yppasswdproc_update_1_svc(), I wasn't paying attention and put
a couple of lines of code _after_ a return() instead of before.
(*blush*)

- The removal of certain temp files didn't always work (this showed
up mostly if you were using /etc/master.passwd as your NIS passwd
template instead of /var/yp/master.passwd). This is because the
whole temp file creation mechanism I was using was tragically
broken (you can't rename across filesystems).

This problem I found myself:

- If you have a very large password database (30,000 or more entries),
there can be a delay of several seconds while pw_copy() copies the
ASCII template file and subsitutes in the modified/new entry. During
this time, the clnt_udp() code in the RPC library may get impatient
and retry its request. This will get queued at the server and be
treated as a second request. By then the password change will have
been completed and the second request will fail (the old password is
no longer valid). To attempt to fix this, we save the IP address and
port of each request and ignore any subsequent requests from the
same IP and same port that arrive within five minutes of each other.


16876 01-Jul-1996 guido

Implement incremental passwd database updates. This is done by ading a '-u'
option to pwd_mkdb and adding this option to utilities invoking it.
Further, the filling of both the secure and insecure databases has been
merged into one loop giving also a performance improvemnet.
Note that I did *not* change the adduser command. I don't read perl
(it is a write only language anyway).
The change will drastically improve performance for passwd and
friends with large passwd files. Vipw's performance won't change.
In order to do that some kind of diff should be made between the
old and new master.passwd and depending the amount of changes, an
incremental or complete update of the databases should be agreed
upon.


16649 23-Jun-1996 wpaul

Whoops: had a couple of hardcoded instances of '/var/yp/' that shouldn't
have been there. Fixed to use yp_dir, which can be set on the command line.


16161 06-Jun-1996 wpaul

Somehow, I truncated yp_dbwrite.c in the SRCS line to yp_dbwrite. Curiously,
this did not stop 'make' from working, but it did break 'make depend.'


16134 05-Jun-1996 wpaul

Added support for in-place updates:

If rpc.yppasswdd is invoked with the -i flag, password changes will
be made to the master.passwd template file and the hash map files
in-place, which means it won't have to run a complete map update.
Instead, it calls /var/yp/Makefile with the 'pushpw' target, which
just pushes the maps to the slaves and runs yp_mkdb -c to tell the
local ypserv to flush its database cache.

The server will check the passwd.byname and passwd.byuid maps to see
if they were built in 'insecure' or 'secure' mode (i.e. with real
encrypted passwords in them or without) and update them accordingly.

This combined with rpc.ypxfrd greatly reduces the amount of time it
takes to complete an NIS password change, especially with very large
passwd databases.


15687 08-May-1996 wpaul

Fix 'multidomain' code. It returns a pointer to memory that it doesn't
really own (and which can end up being mangled later). The manifestation
of this bug is that the first attempt by a user to change their NIS password
succeeds, but all subsequent attempts fail. rpc.yppasswdd also logs
a message about not being able to find a file called
'/var/yp/<some garbage string>/master.passwd.' (Note that for some
bizarre reason, this doesn't happen with the malloc() from FreeBSD 2.1.0.
I suppose this means we can chalk up another victory for phkmalloc. :)

This bug only occurs if you use the -m flag with rpc.yppasswdd.

Fix this by copying the domain name to a static buffer and returning
a pointer to that instead.

Reported by: Jian-Da Li (jdli@csie.nctu.edu.tw)


15135 08-Apr-1996 mpp

Correct some man page xrefs, and some other minor changes to bring some
man pages up to mdoc guidelines and fix some minor formatting glitches.
Also fixed a number of man pages to not abuse the .Xr macro to
display functions and path names and a lot of other junk.


14390 05-Mar-1996 wpaul

Make yppwupdate script redirect stderr to stdout; if we don't do this,
the error messages (if any) from yppush will end up on the system console
instead of the /var/yp/ypupdate.log file.


14241 24-Feb-1996 wpaul

Add securenets support (uses same access control mechanism as ypserv,
also controlled by /var/yp/securenets).

Add -u flag to turn off the privileged port check done by yp_access();
some commercial systems (IRIX, Solaris 2.x, HP-UX, and probably others)
don't use a reserved port for submitting yppasswd updates. If we always
enforce the check, these client systems will be unable to submit updates
to us.

Document securenets support and -u flag in man page.

Like ypserv, you can compile rpc.yppasswdd to use the tcpwrapper package
instead of securenets if you want to.


14063 12-Feb-1996 wpaul

This commit was generated by cvs2svn to compensate for changes in r14062,
which included commits to RCS files with non-trunk default branches.