freebsd-skq/usr.sbin
Bill Paul 5fe4681564 Fix for memory leak: specify NULL as openinfo parameter when calling
dbopen() to open an NIS map.

Testing with very large maps (e.g. a sample password database with 31,000+
entries) has shown that ypserv will leak memory (ps shows RSS and VSZ
growing to 4000 pages or more) when performing repeated yp_next()s or
a yp_all(). The problem with yp_all() is not immediately obvious since
the ypproc_all service is handled in a child process which exits once
the transfer is finished, but with repeated yp_next()s (like what you
get when you use getpwent() to scroll through the password database),
the parent ypserv grows to enormous size and never shrinks again.

It seems this is related to the HASHINFO parameters I used in yp_dblookup.c,
which I actually stole from pwd_mkdb. Calling dbopen() with the default
parameters (specifying openinfo as NULL) fixes the problem.

I still need to see how this impacts the other NIS tools. I'm also
considering changing from hash to btree databases: the hash database
method doesn't support R_CURSOR, which means yp_next_record() has to
do a lot of ugly work in order to reach an arbitrary location in the
database.
1996-04-11 20:54:15 +00:00
..
ac Correct some man page cross references and file location references. 1996-04-07 00:06:21 +00:00
accton Remove trailing whitespace. 1995-05-30 03:57:47 +00:00
adduser Submitted by: Masafumi NAKANE <masafumi@tky007.tth.expo96.ad.jp> 1996-02-10 17:15:47 +00:00
amd Correct some man page xrefs, and some other minor changes to bring some 1996-04-08 04:18:31 +00:00
apm Open up /dev/apm instead of /dev/apm0. 1996-03-18 20:34:29 +00:00
apmconf Use /dev/apm instead of /dev/apm0. 1996-03-18 20:35:17 +00:00
arp Clean up warnings. 1996-02-08 21:05:52 +00:00
bad144 Commit the longstanding bin/410 & kern/411 fix, in the hope that somebody 1995-12-01 11:07:01 +00:00
bootparamd Change references from rpc.bootparamd to bootparamd. 1996-04-07 23:28:25 +00:00
cdcontrol LBA addition to new commands 1996-02-09 01:16:23 +00:00
chown Remove trailing whitespace. 1995-05-30 03:57:47 +00:00
chroot Get rid of update. Make man page installation work with our scheme 1994-08-05 16:31:05 +00:00
config Count PCI irqs in up to 4 ISAish counters named `pci irqnn' instead of 1996-03-29 15:04:14 +00:00
cron Quick patch to fix a bug where issuing ctl-c while in crontab -e 1996-04-09 20:28:16 +00:00
crunch recording cvs-1.6 file death 1995-12-30 19:02:48 +00:00
ctm Updated howmany() to be once again identical with the namespace-polluting 1996-03-19 15:36:32 +00:00
dev_mkdb Get rid of update. Make man page installation work with our scheme 1994-08-05 16:31:05 +00:00
diskpart Merged type changes and overflow bug fixes from Lite2. 1996-03-19 15:38:44 +00:00
edquota Allow the use of uid ranges when using the "-p" option to allow 1996-03-31 20:57:44 +00:00
eeprom Remove trailing whitespace. 1995-05-30 03:57:47 +00:00
fdcontrol Fix a bunch of spelling errors in a bunch of man pages. 1996-01-30 13:52:50 +00:00
fdformat Fix a bunch of spelling errors in a bunch of man pages. 1996-01-30 13:52:50 +00:00
fdwrite Fix a bunch of spelling errors in a bunch of man pages. 1996-01-30 13:52:50 +00:00
inetd Call setsockopt(SO_PRIVSTATE) to renounce SS_PRIV on all the sockets 1996-02-07 17:15:01 +00:00
iostat Fix a variety of minor typos and cross references in a bunch of 1996-01-20 07:29:11 +00:00
IPXrouted Submitted by: John Hay -- John.Hay@csir.co.za 1996-02-20 23:11:24 +00:00
kbdcontrol Merge RELENG_2_0_5 into HEAD 1995-06-11 19:33:05 +00:00
kbdmap Correct a bunch of man page cross references and generally 1996-02-11 22:38:05 +00:00
kernbb Fix various bogosities. 1995-10-22 19:45:28 +00:00
kgmon Implemented non-statistical kernel profiling. This is based on 1995-12-29 15:30:05 +00:00
kvm_mkdb Remove trailing whitespace. 1995-05-30 03:57:47 +00:00
lpr Correct some man page xrefs, and some other minor changes to bring some 1996-04-08 04:18:31 +00:00
lptcontrol Correct some man page xrefs, and some other minor changes to bring some 1996-04-08 04:18:31 +00:00
lsdev Decend the list of ioaddrs and maddrs for eisa devices and print them out 1996-01-31 18:06:52 +00:00
manctl Fix a bunch of spelling errors in a bunch of man pages. 1996-01-30 13:52:50 +00:00
mixer Make mixer print out all of the current mixer settings by defualt 1996-01-31 18:01:22 +00:00
mkdosfs Attempt to figure out the size of the device/file we are about to 1996-01-30 02:35:08 +00:00
mount_portalfs Remove trailing whitespace. 1995-05-30 06:12:45 +00:00
mountd Correct some man page cross references and file location references. 1996-04-07 00:06:21 +00:00
mrouted Minor tweak to allow the mbone mapper to work again on hosts which are 1996-01-29 16:04:20 +00:00
mtree Correct a bunch of man page cross references and generally 1996-02-11 22:38:05 +00:00
named delete /usr/ucb from PATH 1996-03-12 21:46:08 +00:00
ncrcontrol Correct a bunch of man page cross references and generally 1996-02-11 22:38:05 +00:00
newsyslog Submitted by: charnier@lirmm.fr (Philippe Charnier) 1996-01-16 10:32:04 +00:00
nfsd #include <kerberosIV/des.h> -> #include <des.h> 1996-02-11 09:18:18 +00:00
nologin Fix a bunch of spelling errors. 1996-01-29 23:52:43 +00:00
nslookup Remove support for OSI networking in user-land (#ifdef OSI aor CCITT) 1996-02-06 20:36:15 +00:00
pccard Run indent on all these files to make them more readable. (I also went 1996-04-10 06:49:32 +00:00
pcvt Correct paths for pcvt in FreeBSD. Close PR#1071 1996-03-10 02:16:58 +00:00
pkg_install Correct some man page xrefs, and some other minor changes to bring some 1996-04-08 04:18:31 +00:00
portmap Typo. 1996-02-05 15:35:41 +00:00
ppp Fix editing mistake in last commit...sorry. 1996-04-11 08:24:04 +00:00
pppd Work around the problem that our -current pppd can no longer talk 1996-03-08 01:21:53 +00:00
pppstats Merge pppstats from ppp-2.2 onto mainline.. 1995-10-31 21:41:59 +00:00
pstat From Lite2: file LIST changes. 1996-03-11 05:41:43 +00:00
pwd_mkdb Remove trailing whitespace. 1995-05-30 03:57:47 +00:00
qcamcontrol Add support for /very/ experimental -e (exposure) option. 1996-03-21 08:19:10 +00:00
quot Fix a bunch of spelling errors in a bunch of man pages. 1996-01-30 13:52:50 +00:00
quotaon Get rid of update. Make man page installation work with our scheme 1994-08-05 16:31:05 +00:00
rarpd Fix a bunch of spelling errors in a bunch of man pages. 1996-01-30 13:52:50 +00:00
repquota Remove trailing whitespace. 1995-05-30 03:57:47 +00:00
rmt The rmt protocol didn't allow to pass a file creation mode (permission 1995-04-09 09:20:47 +00:00
rndcontrol Add some missing MLINKS, correct some cross references, correct some 1996-02-09 16:20:10 +00:00
routed Clean up Makefile. Still needs -lcompat for insque/remque. 1996-02-28 18:47:46 +00:00
rpc.lockd Correct the rpc.lockd and rpc.statd man pages to not reference 1996-04-07 08:55:32 +00:00
rpc.statd Correct the rpc.lockd and rpc.statd man pages to not reference 1996-04-07 08:55:32 +00:00
rpc.yppasswdd Correct some man page xrefs, and some other minor changes to bring some 1996-04-08 04:18:31 +00:00
rtprio Correct a bunch of man page cross references and generally 1996-02-11 22:38:05 +00:00
rwhod Correct some man page cross references and file location references. 1996-04-07 00:06:21 +00:00
sa Correct some man page cross references and file location references. 1996-04-07 00:06:21 +00:00
sade Major surgery. 1996-04-07 03:52:36 +00:00
sendmail Add the '8' flag to the smtp and esmtp mailers. This causes sendmail-8.7.5 1996-04-03 03:06:17 +00:00
sgsc Remove trailing whitespace. 1995-05-30 03:57:47 +00:00
sicontrol Fix a bunch of spelling errors in a bunch of man pages. 1996-01-30 13:52:50 +00:00
sliplogin Fix a bunch of spelling errors in a bunch of man pages. 1996-01-30 13:52:50 +00:00
slstat Fix a bunch of spelling errors in a bunch of man pages. 1996-01-30 13:52:50 +00:00
spkrtest recording cvs-1.6 file death 1995-12-30 19:02:48 +00:00
spray Obtained from: NetBSD 1996-01-05 09:09:30 +00:00
sup Oops, accidently committed makefile change, back it out 1996-02-06 19:04:41 +00:00
sysctl Fix a core dump when the user gives "-w" without an "=" 1996-04-10 00:53:22 +00:00
sysinstall Major surgery. 1996-04-07 03:52:36 +00:00
syslogd With the recent 'make install' change in the kernel build makefiles, an 1995-11-14 23:39:39 +00:00
tcpdump Update IGMP printing, removing the obsolete packet header version number & 1996-03-19 17:25:12 +00:00
timed Correct some man page cross references and file location references. 1996-04-07 00:06:21 +00:00
traceroute Bring in LBL traceroute, which has the '-g' option. This is a bugfixed and 1996-03-13 08:04:29 +00:00
trpt Include queue.h in preparation for struct socket changes. 1996-03-11 13:02:44 +00:00
tzsetup Copy /etc/localtime, unless it's already a symlink. 1996-04-01 08:17:49 +00:00
vidcontrol Fix a bunch of spelling errors in a bunch of man pages. 1996-01-30 13:52:50 +00:00
vipw Small NIS tweak: frob pw_error() a little so that it can say either 1995-08-13 16:05:06 +00:00
vnconfig man page link swapfile.8 -> vnconfig.8 1996-02-02 06:14:09 +00:00
watch Properly save and restore the terminal characters! 1996-03-01 18:21:41 +00:00
wormcontrol Mention the currently supported vendor/model strings. 1996-02-02 23:01:17 +00:00
xntpd Second attempt to correct the leap year handling. 1996-01-09 07:59:54 +00:00
xten recording cvs-1.6 file death 1995-12-30 19:02:48 +00:00
ypbind Correct a bunch of man page cross references and generally 1996-02-11 22:38:05 +00:00
yppoll Remove trailing whitespace. 1995-05-30 03:57:47 +00:00
yppush yppush_main.c: 1996-04-03 03:24:03 +00:00
ypserv Fix for memory leak: specify NULL as openinfo parameter when calling 1996-04-11 20:54:15 +00:00
ypset Add a ypset(8) man page. 1996-02-12 05:28:30 +00:00
zic Convert "time zone" to "timezone" in NAME section 1996-02-27 00:27:21 +00:00
Makefile Add rpc.statd and the stub rpc.lockd, as these build and are of some use to 1996-04-04 03:17:48 +00:00
Makefile.inc BSD 4.4 Lite usr.sbin Sources 1994-05-26 05:23:31 +00:00