NetBSD/usr.sbin
wennmach 0269a1249b Problem: rpc.yppasswdd didn't work if invoked with the "-noshell" option.
Reason: In routine make_passwd() in yppasswdd_mkpw.c, fgets() is used
to read master.passwd line-by-line. The lines are then parsed using
pw_scan(), without removing the trailing \n from the line. pw_scan()
fills in the shell name into pw.pw_shell, including the trailing \n.

Subsequently, rpc.yppasswdd calls pw_copy(), which copies master.passwd
to ptmp, updating the entry for pw.pw_name. pw_copy() terminates the
updated entry with an additonal \n, so that there is now an empty line
in ptmp.

Finally, rpc.yppasswdd calls pw_mkdb(3), which exec's /usr/sbin/pwd_mkdb
to install ptmp to master.passwd (and to create the pwd.db and spwd.db
data bases). pwd_mkdb chokes on the empty ptmp line.

Fix: remove the trailing \n from the buffer fgets() returns. As a side
effect, this gets us some additional error checking.

Reviewed by <tron>.
2004-05-12 08:25:53 +00:00
..
ac Remove duplicate include, fixes PR bin/25017 from Jeff Ito. 2004-04-02 09:58:33 +00:00
accton Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 11:25:11 +00:00
altq Now that <math.h> #defines INFINITY as HUGE_VALF (the float version) 2003-10-26 08:08:06 +00:00
amd Add more info that recent amd's want. XXX: this is not cross-build friendly. 2004-01-11 18:37:35 +00:00
apm Add missing "m" option in SYNOPSIS. 2004-03-31 12:00:57 +00:00
apmd Remove unused (unsafe!) MAX macro. From Jeff Ito in PR 23995. 2004-01-06 13:29:55 +00:00
arp Consistently use 'RFC 1234' instead of 'RFC1234' or 'RFC-1234'. 2003-09-07 16:22:20 +00:00
bad144 Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 11:25:11 +00:00
bind use != "no" 2004-01-03 13:46:30 +00:00
bootp SIOCGIFCONF -> getifaddrs conversion 2003-08-18 05:39:52 +00:00
catman Undo a pointless instance of readlink(2) buffer termination. 2004-05-10 19:23:48 +00:00
chown Allow a numeric ID to be preceeded by '#' to avoid the name lookup. 2003-09-25 10:30:10 +00:00
chroot Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 11:25:11 +00:00
chrtbl Homogenize usage messages: make the 'usage' word all lowercase, as this seems 2004-01-05 23:23:32 +00:00
cnwctl
config Be consistent in error messages, and don't use the <err.h> functions. 2003-12-02 05:11:42 +00:00
cron New sentence, new line; use Ev for environment variable; 2004-03-20 18:54:33 +00:00
dev_mkdb Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 11:25:11 +00:00
dhcp support MKSHARE=no 2004-01-12 01:18:12 +00:00
diskpart Homogenize usage messages: make the 'usage' word all lowercase, as this seems 2004-01-05 23:23:32 +00:00
dumpfs Rework previous to avoid checking FS_FLAGS_UPDATED for ffsv2 2004-03-27 11:31:22 +00:00
dumplfs Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 11:25:11 +00:00
edquota Homogenize usage messages: make the 'usage' word all lowercase, as this seems 2004-01-05 23:23:32 +00:00
eeprom Add CPPFLAGS. 2003-05-08 20:24:10 +00:00
envstat add references to ACPI man pages. 2004-04-25 03:13:00 +00:00
eshconfig realloc pedant 2003-09-19 06:22:03 +00:00
etcupdate s/netbsd.org/NetBSD.org/i 2003-11-12 13:31:07 +00:00
faithd fix a typo 2003-11-12 13:31:44 +00:00
fssconfig Replace the statfs() family of system calls with statvfs(). 2004-04-21 01:05:31 +00:00
grfconfig .Nm does not need a dummy argument ("") before punctuation or 2003-02-25 10:34:36 +00:00
grfinfo
gspa use An to markup names. 2003-11-12 13:33:24 +00:00
hilinfo
hprop split MKKERBEROS4 from MKKERBEROS. based on work by lha at stacken.kth.se 2003-07-23 08:01:24 +00:00
ifmcstat
ifwatchd Add support to call scripts at carrier detect/drop time (on network 2004-01-04 22:19:51 +00:00
inetd note that hosts_allow does not affect internal services 2004-04-02 10:13:57 +00:00
installboot When searching for the superblock, don't pick an ffsv1 superblock from the 2004-03-21 21:18:40 +00:00
iopctl The correct capitalisation of 'NetBSD.org' is (you 2003-02-14 16:11:34 +00:00
iostat for -x -I output, use just MB instead of MB/s in header 2004-02-25 03:39:14 +00:00
ipf install ippool(5) manual as well. from peter postma in PR#25053. 2004-04-04 15:59:44 +00:00
irdaattach .Nm does not need a dummy argument ("") before punctuation or 2003-02-25 10:34:36 +00:00
isdn Make "local-phone-dialout" optional. 2004-05-06 21:13:28 +00:00
iteconfig s/netbsd.org/NetBSD.org/i 2003-11-12 13:31:07 +00:00
kadmin
kdc libkrb depends on libdes, patch in private mail from 2003-08-23 23:03:42 +00:00
kgmon Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 11:25:11 +00:00
kstash
ktutil
kvm_mkdb s/netbsd.org/NetBSD.org/i 2003-11-12 13:31:07 +00:00
lastlogin Fixed a bug that made lastlogin ignore the first user argument 2003-12-16 15:40:29 +00:00
link
lpr constify printcapdb 2004-04-24 02:59:19 +00:00
lptctl New sentence, new line. 2004-02-04 14:25:13 +00:00
mailwrapper Revert previous changes. Add a comment to the source explaining the 2003-03-09 08:10:43 +00:00
makefs Allow for ROOTINO when deciding whether their are enough inodes in the 2004-04-26 21:06:55 +00:00
map-mbone Homogenize usage messages: make the 'usage' word all lowercase, as this seems 2004-01-05 23:23:32 +00:00
mdconfig
mdsetimage Now that <bsd.prog.mk> DTRT if HOSTPROG is defined (i.e, it is a no-op), 2003-05-18 07:57:31 +00:00
memswitch Homogenize usage messages: make the 'usage' word all lowercase, as this seems 2004-01-05 23:23:32 +00:00
mld6query - sync up MLD declaration with RFC3542 (s/MLD6/MLD/) 2003-06-06 08:13:43 +00:00
mlxctl use bounded string op 2003-07-13 12:29:20 +00:00
mopd s/the the/the/ (only in sources that aren't regularly imported from 2004-04-23 02:58:27 +00:00
mountd Replace the statfs() family of system calls with statvfs(). 2004-04-21 01:05:31 +00:00
moused s/the the/the/ (only in sources that aren't regularly imported from 2004-04-23 02:58:27 +00:00
mrinfo Homogenize usage messages: make the 'usage' word all lowercase, as this seems 2004-01-05 23:23:32 +00:00
mrouted Consistently use 'RFC 1234' instead of 'RFC1234' or 'RFC-1234'. 2003-09-07 16:22:20 +00:00
mscdlabel
mtrace ignore non-AF_INET addrs. from openbsd 2003-09-23 10:50:51 +00:00
mtree foliage from pack_dev change :-) 2004-05-11 17:11:03 +00:00
ndbootd With recent changes to BPF, pushing the default buffer size to 1MB, running 2004-04-10 17:53:05 +00:00
ndp fflush(stdout) on -A. KAME-PR-584 2004-02-10 14:44:32 +00:00
netgroup_mkdb
nfsd Increase userspace (/usr/sbin/nfsd) limit on nfsd count from 20 to 1024. 2003-12-06 03:01:16 +00:00
ntp Fix dependency for .version. 2004-01-27 02:17:46 +00:00
pcictl Update for new pci_devinfo(3) signature. 2004-04-24 13:41:51 +00:00
pkg_install Bump to 20040510: readlink(2) buffer handling fixes. 2004-05-10 20:39:37 +00:00
powerd Add comma in enumeration; use Aq instead of \*[Lt]\*[Gt]. 2004-05-03 14:23:12 +00:00
pppd np->h_net is not a pointer. 2004-05-09 15:54:59 +00:00
pstat Make pstat -f work on sparc by adjusting the offset of the buffer passed 2004-02-22 12:30:11 +00:00
pvcsif
pvctxctl
pwd_mkdb Overhaul how `build.sh tools' are used: 2003-10-27 00:12:41 +00:00
quot Replace the statfs() family of system calls with statvfs(). 2004-04-21 01:05:31 +00:00
quotacheck fffv2 might not have FS_FLAGS_UPDATED set 2004-03-27 13:11:47 +00:00
quotaon Replace the statfs() family of system calls with statvfs(). 2004-04-21 01:05:31 +00:00
racoon do not compile in print-isakmp.c, as src/dist/tcpdump contains ancient version 2004-04-12 04:01:27 +00:00
rarpd With recent changes to BPF, pushing the default buffer size to 1MB, running 2004-04-10 17:53:05 +00:00
rbootd With recent changes to BPF, pushing the default buffer size to 1MB, running 2004-04-10 17:53:05 +00:00
rdate Homogenize usage messages: make the 'usage' word all lowercase, as this seems 2004-01-05 23:23:32 +00:00
repquota Homogenize usage messages: make the 'usage' word all lowercase, as this seems 2004-01-05 23:23:32 +00:00
rip6query Homogenize usage messages: make the 'usage' word all lowercase, as this seems 2004-01-05 23:23:32 +00:00
rmt Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 11:25:11 +00:00
route6d Let it compile again on sparc/sparc64. 2003-10-31 10:09:55 +00:00
rpc.bootparamd Homogenize usage messages: make the 'usage' word all lowercase, as this seems 2004-01-05 23:23:32 +00:00
rpc.lockd Remove references to University of California from my copyright notices. 2003-10-05 17:48:49 +00:00
rpc.pcnfsd s/netbsd.org/NetBSD.org/i 2003-11-12 13:31:07 +00:00
rpc.statd init_file: copy status_info from static storage so that 2004-01-14 10:29:46 +00:00
rpc.yppasswdd Problem: rpc.yppasswdd didn't work if invoked with the "-noshell" option. 2004-05-12 08:25:53 +00:00
rpcbind Make building IPv6 support controllable by MKINET6 2003-12-07 21:57:22 +00:00
rtadvd Don't compare an int to NULL. 2003-10-21 03:01:44 +00:00
rtsold backout previous change (removal of pidfile(3) call). requested by core. 2004-01-08 02:48:43 +00:00
rwhod Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 11:25:11 +00:00
sa Uppercase CPU, plural is CPUs. 2004-02-13 11:36:08 +00:00
screenblank Homogenize usage messages: make the 'usage' word all lowercase, as this seems 2004-01-05 23:23:32 +00:00
sendmail
sesd s/the the/the/ (only in sources that aren't regularly imported from 2004-04-23 02:58:27 +00:00
sliplogin Don't compare an int to NULL. 2003-10-21 02:53:57 +00:00
slstats
sntp "msntp"->"sntp, and adjust location of runtime data files 2003-12-09 11:15:18 +00:00
spray Remove superfluous .Ek. 2003-06-26 10:10:11 +00:00
sunlabel Homogenize usage messages: make the 'usage' word all lowercase, as this seems 2004-01-05 23:23:32 +00:00
sup s/the the/the/ (only in sources that aren't regularly imported from 2004-04-23 02:58:27 +00:00
sushi s/the the/the/ (only in sources that aren't regularly imported from 2004-04-23 02:58:27 +00:00
syslogd use "volatile sig_atomic_t" for gothup; Havard Eidnes 2004-03-06 20:29:25 +00:00
tadpolectl use bounded string op 2003-07-13 12:08:28 +00:00
tcpdchk use bounded string op 2003-07-14 09:07:22 +00:00
tcpdmatch
tcpdump Rework how MAKEVERBOSE operates: 2003-10-21 10:01:19 +00:00
timed s/transmitts/transmits/ 2004-02-09 15:43:05 +00:00
tpctl Fix some typos. 2004-02-24 15:12:18 +00:00
traceroute do not disclose endian/pid. henning@openbsd 2004-04-22 01:41:22 +00:00
traceroute6 do not disclose endian/pid. henning@openbsd 2004-04-22 01:41:22 +00:00
trpt no need for explicit '?'; openbsd 2003-09-19 08:24:07 +00:00
trsp Move UCB-licensed code from 4-clause to 3-clause licence. 2003-08-07 11:25:11 +00:00
unlink
usbdevs Homogenize usage messages: make the 'usage' word all lowercase, as this seems 2004-01-05 23:23:32 +00:00
user Add -S argument to useradd, usermod and userdel, which allows the use of 2004-01-14 09:35:33 +00:00
videomode use bounded string op 2003-07-13 12:08:28 +00:00
vipw Homogenize usage messages: make the 'usage' word all lowercase, as this seems 2004-01-05 23:23:32 +00:00
vnconfig Replace the statfs() family of system calls with statvfs(). 2004-04-21 01:05:31 +00:00
wiconfig Re-add support for wiconfig wiX -A #, which chooses between OpenSys and 2004-01-23 02:32:52 +00:00
wsconscfg Homogenize usage messages: make the 'usage' word all lowercase, as this seems 2004-01-05 23:23:32 +00:00
wsfontload Homogenize usage messages: make the 'usage' word all lowercase, as this seems 2004-01-05 23:23:32 +00:00
wsmoused Fix two typos, reported as part of PR bin/22581. 2004-03-31 11:15:36 +00:00
wsmuxctl Homogenize usage messages: make the 'usage' word all lowercase, as this seems 2004-01-05 23:23:32 +00:00
ypbind Homogenize usage messages: make the 'usage' word all lowercase, as this seems 2004-01-05 23:23:32 +00:00
yppoll John Brezak (now jbrezak at windows dot microsoft dot com) kindly 2003-12-10 17:10:34 +00:00
ypserv Modify the licences of code written by Theo De Raadt from a 4-clause 2003-12-10 12:06:25 +00:00
ypset Modify the licences of code written by Theo De Raadt from a 4-clause 2003-12-10 12:06:25 +00:00
zdump
zic Now that <bsd.prog.mk> DTRT if HOSTPROG is defined (i.e, it is a no-op), 2003-05-18 07:57:31 +00:00
Makefile Consistently check ${TOOLCHAIN_MISSING} against "no". 2004-01-03 14:04:27 +00:00
Makefile.inc