History log of /freebsd-9.3-release/libexec/
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
267655 20-Jun-2014 gjb

Remove svn:mergeinfo carried over from stable/9.

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


/freebsd-9.3-release/COPYRIGHT
/freebsd-9.3-release/MAINTAINERS
/freebsd-9.3-release/Makefile
/freebsd-9.3-release/Makefile.inc1
/freebsd-9.3-release/ObsoleteFiles.inc
/freebsd-9.3-release/UPDATING
/freebsd-9.3-release/bin
/freebsd-9.3-release/bin/cat
/freebsd-9.3-release/bin/cp
/freebsd-9.3-release/bin/csh
/freebsd-9.3-release/bin/date
/freebsd-9.3-release/bin/dd
/freebsd-9.3-release/bin/df
/freebsd-9.3-release/bin/ed
/freebsd-9.3-release/bin/expr
/freebsd-9.3-release/bin/getfacl
/freebsd-9.3-release/bin/kenv
/freebsd-9.3-release/bin/ln
/freebsd-9.3-release/bin/mkdir
/freebsd-9.3-release/bin/mv
/freebsd-9.3-release/bin/pkill
/freebsd-9.3-release/bin/ps
/freebsd-9.3-release/bin/pwait
/freebsd-9.3-release/bin/rcp
/freebsd-9.3-release/bin/rm
/freebsd-9.3-release/bin/setfacl
/freebsd-9.3-release/bin/sh
/freebsd-9.3-release/bin/sleep
/freebsd-9.3-release/bin/test
/freebsd-9.3-release/bin/uuidgen
/freebsd-9.3-release/cddl
/freebsd-9.3-release/cddl/contrib
/freebsd-9.3-release/cddl/contrib/dtracetoolkit
/freebsd-9.3-release/cddl/contrib/opensolaris
/freebsd-9.3-release/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/llquantize
/freebsd-9.3-release/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print
/freebsd-9.3-release/cddl/contrib/opensolaris/cmd/zfs
/freebsd-9.3-release/cddl/contrib/opensolaris/cmd/zpool
/freebsd-9.3-release/cddl/contrib/opensolaris/lib/libdtrace/common
/freebsd-9.3-release/cddl/contrib/opensolaris/lib/libzfs
/freebsd-9.3-release/cddl/lib
/freebsd-9.3-release/cddl/lib/drti
/freebsd-9.3-release/cddl/lib/libdtrace
/freebsd-9.3-release/cddl/usr.bin/zinject
/freebsd-9.3-release/contrib
/freebsd-9.3-release/contrib/bind9
/freebsd-9.3-release/contrib/binutils
/freebsd-9.3-release/contrib/bmake
/freebsd-9.3-release/contrib/bsnmp
/freebsd-9.3-release/contrib/bsnmp/snmp_mibII
/freebsd-9.3-release/contrib/bzip2
/freebsd-9.3-release/contrib/compiler-rt
/freebsd-9.3-release/contrib/dialog
/freebsd-9.3-release/contrib/diff
/freebsd-9.3-release/contrib/ee
/freebsd-9.3-release/contrib/expat
/freebsd-9.3-release/contrib/file
/freebsd-9.3-release/contrib/gcc
/freebsd-9.3-release/contrib/gcclibs
/freebsd-9.3-release/contrib/gdb
/freebsd-9.3-release/contrib/gdtoa
/freebsd-9.3-release/contrib/gnu-sort
/freebsd-9.3-release/contrib/gperf
/freebsd-9.3-release/contrib/groff
/freebsd-9.3-release/contrib/less
/freebsd-9.3-release/contrib/libarchive
/freebsd-9.3-release/contrib/libarchive/cpio
/freebsd-9.3-release/contrib/libarchive/libarchive
/freebsd-9.3-release/contrib/libarchive/libarchive_fe
/freebsd-9.3-release/contrib/libarchive/tar
/freebsd-9.3-release/contrib/libc++
/freebsd-9.3-release/contrib/libc-pwcache
/freebsd-9.3-release/contrib/libc-vis
/freebsd-9.3-release/contrib/libcxxrt
/freebsd-9.3-release/contrib/libpcap
/freebsd-9.3-release/contrib/libstdc++
/freebsd-9.3-release/contrib/libucl
/freebsd-9.3-release/contrib/llvm
/freebsd-9.3-release/contrib/llvm/tools/clang
/freebsd-9.3-release/contrib/mknod
/freebsd-9.3-release/contrib/mtree
/freebsd-9.3-release/contrib/ncurses
/freebsd-9.3-release/contrib/netcat
/freebsd-9.3-release/contrib/ntp
/freebsd-9.3-release/contrib/nvi
/freebsd-9.3-release/contrib/one-true-awk
/freebsd-9.3-release/contrib/openbsm
/freebsd-9.3-release/contrib/openpam
/freebsd-9.3-release/contrib/openresolv
/freebsd-9.3-release/contrib/opie
/freebsd-9.3-release/contrib/pf
/freebsd-9.3-release/contrib/pnpinfo
/freebsd-9.3-release/contrib/sendmail
/freebsd-9.3-release/contrib/tcpdump
/freebsd-9.3-release/contrib/tcsh
/freebsd-9.3-release/contrib/telnet
/freebsd-9.3-release/contrib/tnftp
/freebsd-9.3-release/contrib/top
/freebsd-9.3-release/contrib/top/install-sh
/freebsd-9.3-release/contrib/traceroute
/freebsd-9.3-release/contrib/tzcode
/freebsd-9.3-release/contrib/tzcode/stdtime
/freebsd-9.3-release/contrib/tzcode/zic
/freebsd-9.3-release/contrib/tzdata
/freebsd-9.3-release/contrib/unvis
/freebsd-9.3-release/contrib/vis
/freebsd-9.3-release/contrib/wpa
/freebsd-9.3-release/contrib/xz
/freebsd-9.3-release/crypto/heimdal
/freebsd-9.3-release/crypto/openssh
/freebsd-9.3-release/crypto/openssl
/freebsd-9.3-release/etc
/freebsd-9.3-release/etc/mtree
/freebsd-9.3-release/etc/rc.d
/freebsd-9.3-release/games/bcd
/freebsd-9.3-release/games/caesar
/freebsd-9.3-release/games/factor
/freebsd-9.3-release/games/fortune
/freebsd-9.3-release/games/fortune/fortune
/freebsd-9.3-release/games/grdc
/freebsd-9.3-release/games/morse
/freebsd-9.3-release/games/number
/freebsd-9.3-release/games/pom
/freebsd-9.3-release/games/random
/freebsd-9.3-release/gnu/lib
/freebsd-9.3-release/gnu/lib/csu
/freebsd-9.3-release/gnu/lib/libgcc
/freebsd-9.3-release/gnu/lib/libgomp
/freebsd-9.3-release/gnu/lib/libstdc++
/freebsd-9.3-release/gnu/lib/libsupc++
/freebsd-9.3-release/gnu/usr.bin/binutils
/freebsd-9.3-release/gnu/usr.bin/binutils/libbinutils
/freebsd-9.3-release/gnu/usr.bin/cc/c++
/freebsd-9.3-release/gnu/usr.bin/cc/cc_tools
/freebsd-9.3-release/gnu/usr.bin/cc/include
/freebsd-9.3-release/gnu/usr.bin/gdb
/freebsd-9.3-release/gnu/usr.bin/gdb/kgdb
/freebsd-9.3-release/gnu/usr.bin/gperf
/freebsd-9.3-release/gnu/usr.bin/groff
/freebsd-9.3-release/gnu/usr.bin/send-pr
/freebsd-9.3-release/include
/freebsd-9.3-release/include/arpa
/freebsd-9.3-release/kerberos5
/freebsd-9.3-release/kerberos5/lib/libgssapi_krb5
/freebsd-9.3-release/lib
/freebsd-9.3-release/lib/Makefile
/freebsd-9.3-release/lib/bind
/freebsd-9.3-release/lib/clang
/freebsd-9.3-release/lib/clang/include
/freebsd-9.3-release/lib/csu
/freebsd-9.3-release/lib/libarchive
/freebsd-9.3-release/lib/libbluetooth
/freebsd-9.3-release/lib/libc
/freebsd-9.3-release/lib/libc++
/freebsd-9.3-release/lib/libc/stdtime
/freebsd-9.3-release/lib/libc/sys
/freebsd-9.3-release/lib/libc/uuid
/freebsd-9.3-release/lib/libcam
/freebsd-9.3-release/lib/libcompiler_rt
/freebsd-9.3-release/lib/libcrypt
/freebsd-9.3-release/lib/libcxxrt
/freebsd-9.3-release/lib/libdwarf
/freebsd-9.3-release/lib/libedit
/freebsd-9.3-release/lib/libelf
/freebsd-9.3-release/lib/libexpat
/freebsd-9.3-release/lib/libfetch
/freebsd-9.3-release/lib/libgeom
/freebsd-9.3-release/lib/libgpib
/freebsd-9.3-release/lib/libgssapi
/freebsd-9.3-release/lib/libiconv_modules
/freebsd-9.3-release/lib/libipsec
/freebsd-9.3-release/lib/libjail
/freebsd-9.3-release/lib/libkiconv
/freebsd-9.3-release/lib/libkvm
/freebsd-9.3-release/lib/libmagic
/freebsd-9.3-release/lib/libmemstat
/freebsd-9.3-release/lib/libncp
/freebsd-9.3-release/lib/libnetbsd
/freebsd-9.3-release/lib/libnetgraph
/freebsd-9.3-release/lib/libopie
/freebsd-9.3-release/lib/libpam
/freebsd-9.3-release/lib/libpcap
/freebsd-9.3-release/lib/libpmc
/freebsd-9.3-release/lib/libproc
/freebsd-9.3-release/lib/libprocstat
/freebsd-9.3-release/lib/libradius
/freebsd-9.3-release/lib/librpcsec_gss
/freebsd-9.3-release/lib/librpcsvc
/freebsd-9.3-release/lib/librt
/freebsd-9.3-release/lib/libsbuf
/freebsd-9.3-release/lib/libsm
/freebsd-9.3-release/lib/libstand
/freebsd-9.3-release/lib/libstdbuf
/freebsd-9.3-release/lib/libtacplus
/freebsd-9.3-release/lib/libthr
/freebsd-9.3-release/lib/libthr/thread/thr_setprio.c
/freebsd-9.3-release/lib/libthr/thread/thr_setschedparam.c
/freebsd-9.3-release/lib/libthread_db
/freebsd-9.3-release/lib/libucl
/freebsd-9.3-release/lib/libulog
/freebsd-9.3-release/lib/libusb
/freebsd-9.3-release/lib/libusbhid
/freebsd-9.3-release/lib/libutil
/freebsd-9.3-release/lib/libvgl
/freebsd-9.3-release/lib/libypclnt
/freebsd-9.3-release/lib/libz
/freebsd-9.3-release/lib/msun
/freebsd-9.3-release/lib/ncurses/form
/freebsd-9.3-release/lib/ncurses/menu
/freebsd-9.3-release/lib/ncurses/ncurses
/freebsd-9.3-release/lib/ncurses/panel
atrun
bootpd
comsat
ftpd
getty
mail.local
pppoed
rbootd
rshd
rtld-elf
save-entropy
smrsh
tftpd
ypxfr
/freebsd-9.3-release/release
/freebsd-9.3-release/release/doc
/freebsd-9.3-release/release/doc/en_US.ISO8859-1/hardware
/freebsd-9.3-release/release/ia64
/freebsd-9.3-release/release/picobsd/tinyware/passwd
/freebsd-9.3-release/rescue
/freebsd-9.3-release/rescue/rescue
/freebsd-9.3-release/sbin
/freebsd-9.3-release/sbin/atacontrol
/freebsd-9.3-release/sbin/atm/atmconfig
/freebsd-9.3-release/sbin/bsdlabel
/freebsd-9.3-release/sbin/camcontrol
/freebsd-9.3-release/sbin/ccdconfig
/freebsd-9.3-release/sbin/ddb
/freebsd-9.3-release/sbin/devd
/freebsd-9.3-release/sbin/devfs
/freebsd-9.3-release/sbin/dhclient
/freebsd-9.3-release/sbin/dump
/freebsd-9.3-release/sbin/dumpfs
/freebsd-9.3-release/sbin/fdisk
/freebsd-9.3-release/sbin/fdisk_pc98
/freebsd-9.3-release/sbin/fsck_ffs
/freebsd-9.3-release/sbin/fsck_msdosfs
/freebsd-9.3-release/sbin/fsdb
/freebsd-9.3-release/sbin/fsirand
/freebsd-9.3-release/sbin/gbde
/freebsd-9.3-release/sbin/geom
/freebsd-9.3-release/sbin/geom/class/mirror
/freebsd-9.3-release/sbin/geom/class/multipath
/freebsd-9.3-release/sbin/geom/class/part
/freebsd-9.3-release/sbin/geom/class/raid
/freebsd-9.3-release/sbin/geom/class/raid3
/freebsd-9.3-release/sbin/geom/class/sched
/freebsd-9.3-release/sbin/geom/class/virstor
/freebsd-9.3-release/sbin/ggate
/freebsd-9.3-release/sbin/growfs
/freebsd-9.3-release/sbin/gvinum
/freebsd-9.3-release/sbin/hastctl
/freebsd-9.3-release/sbin/hastd
/freebsd-9.3-release/sbin/ifconfig
/freebsd-9.3-release/sbin/init
/freebsd-9.3-release/sbin/ipf
/freebsd-9.3-release/sbin/ipfw
/freebsd-9.3-release/sbin/iscontrol
/freebsd-9.3-release/sbin/kldload
/freebsd-9.3-release/sbin/mca
/freebsd-9.3-release/sbin/md5
/freebsd-9.3-release/sbin/mdconfig
/freebsd-9.3-release/sbin/mdmfs
/freebsd-9.3-release/sbin/mount
/freebsd-9.3-release/sbin/mount_cd9660
/freebsd-9.3-release/sbin/mount_msdosfs
/freebsd-9.3-release/sbin/mount_nfs
/freebsd-9.3-release/sbin/mount_ntfs
/freebsd-9.3-release/sbin/mount_nullfs
/freebsd-9.3-release/sbin/mount_unionfs
/freebsd-9.3-release/sbin/natd
/freebsd-9.3-release/sbin/newfs
/freebsd-9.3-release/sbin/newfs_msdos
/freebsd-9.3-release/sbin/nvmecontrol
/freebsd-9.3-release/sbin/ping6
/freebsd-9.3-release/sbin/quotacheck
/freebsd-9.3-release/sbin/rcorder
/freebsd-9.3-release/sbin/reboot
/freebsd-9.3-release/sbin/recoverdisk
/freebsd-9.3-release/sbin/restore
/freebsd-9.3-release/sbin/route
/freebsd-9.3-release/sbin/routed/rtquery
/freebsd-9.3-release/sbin/savecore
/freebsd-9.3-release/sbin/setkey
/freebsd-9.3-release/sbin/shutdown
/freebsd-9.3-release/sbin/swapon
/freebsd-9.3-release/sbin/sysctl
/freebsd-9.3-release/sbin/tunefs
/freebsd-9.3-release/sbin/umount
/freebsd-9.3-release/secure/lib/libcrypt
/freebsd-9.3-release/secure/lib/libcrypto
/freebsd-9.3-release/secure/lib/libssh
/freebsd-9.3-release/secure/lib/libssl
/freebsd-9.3-release/secure/libexec/ssh-keysign
/freebsd-9.3-release/secure/usr.bin/openssl
/freebsd-9.3-release/secure/usr.bin/ssh
/freebsd-9.3-release/secure/usr.sbin/sshd
/freebsd-9.3-release/share
/freebsd-9.3-release/share/doc
/freebsd-9.3-release/share/doc/bind9
/freebsd-9.3-release/share/doc/smm
/freebsd-9.3-release/share/dtrace
/freebsd-9.3-release/share/examples
/freebsd-9.3-release/share/examples/csh
/freebsd-9.3-release/share/examples/cvsup
/freebsd-9.3-release/share/examples/diskless
/freebsd-9.3-release/share/examples/etc
/freebsd-9.3-release/share/examples/kld/dyn_sysctl
/freebsd-9.3-release/share/examples/ppp
/freebsd-9.3-release/share/examples/printing
/freebsd-9.3-release/share/examples/scsi_target
/freebsd-9.3-release/share/examples/ses
/freebsd-9.3-release/share/i18n/csmapper
/freebsd-9.3-release/share/info
/freebsd-9.3-release/share/man
/freebsd-9.3-release/share/man/man3
/freebsd-9.3-release/share/man/man4
/freebsd-9.3-release/share/man/man4/run.4
/freebsd-9.3-release/share/man/man4/runfw.4
/freebsd-9.3-release/share/man/man5
/freebsd-9.3-release/share/man/man7
/freebsd-9.3-release/share/man/man8
/freebsd-9.3-release/share/man/man9
/freebsd-9.3-release/share/misc
/freebsd-9.3-release/share/mk
/freebsd-9.3-release/share/mk/bsd.arch.inc.mk
/freebsd-9.3-release/share/mk/bsd.sys.mk
/freebsd-9.3-release/share/skel
/freebsd-9.3-release/share/syscons
/freebsd-9.3-release/share/syscons/keymaps
/freebsd-9.3-release/share/termcap
/freebsd-9.3-release/share/zoneinfo
/freebsd-9.3-release/sys
/freebsd-9.3-release/sys/amd64/include/xen
/freebsd-9.3-release/sys/boot
/freebsd-9.3-release/sys/boot/forth
/freebsd-9.3-release/sys/boot/i386/efi
/freebsd-9.3-release/sys/boot/i386/gptboot
/freebsd-9.3-release/sys/boot/ia64/efi
/freebsd-9.3-release/sys/boot/ia64/ski
/freebsd-9.3-release/sys/boot/powerpc/boot1.chrp
/freebsd-9.3-release/sys/boot/powerpc/ofw
/freebsd-9.3-release/sys/cddl/contrib/opensolaris
/freebsd-9.3-release/sys/conf
/freebsd-9.3-release/sys/contrib/dev/acpica
/freebsd-9.3-release/sys/contrib/dev/run
/freebsd-9.3-release/sys/contrib/octeon-sdk
/freebsd-9.3-release/sys/contrib/pf
/freebsd-9.3-release/sys/contrib/x86emu
/freebsd-9.3-release/sys/dev
/freebsd-9.3-release/sys/dev/e1000
/freebsd-9.3-release/sys/dev/isp
/freebsd-9.3-release/sys/dev/ixgbe
/freebsd-9.3-release/sys/dev/puc
/freebsd-9.3-release/sys/dev/usb/wlan/if_run.c
/freebsd-9.3-release/sys/dev/usb/wlan/if_runreg.h
/freebsd-9.3-release/sys/fs
/freebsd-9.3-release/sys/fs/ntfs
/freebsd-9.3-release/sys/modules
/freebsd-9.3-release/sys/modules/ixgbe
/freebsd-9.3-release/sys/net
/freebsd-9.3-release/sys/netpfil
/freebsd-9.3-release/sys/sys
/freebsd-9.3-release/tools
/freebsd-9.3-release/tools/build
/freebsd-9.3-release/tools/build/options
/freebsd-9.3-release/tools/diag
/freebsd-9.3-release/tools/kerneldoc
/freebsd-9.3-release/tools/regression
/freebsd-9.3-release/tools/regression/aio/aiotest
/freebsd-9.3-release/tools/regression/bin/sh
/freebsd-9.3-release/tools/regression/bin/test
/freebsd-9.3-release/tools/regression/doat
/freebsd-9.3-release/tools/regression/fifo
/freebsd-9.3-release/tools/regression/fsx
/freebsd-9.3-release/tools/regression/lib/libc
/freebsd-9.3-release/tools/regression/netinet
/freebsd-9.3-release/tools/regression/pipe
/freebsd-9.3-release/tools/regression/security/cap_test
/freebsd-9.3-release/tools/regression/sockets
/freebsd-9.3-release/tools/regression/usr.sbin
/freebsd-9.3-release/tools/regression/usr.sbin/etcupdate
/freebsd-9.3-release/tools/test
/freebsd-9.3-release/tools/test/auxinfo
/freebsd-9.3-release/tools/test/pthread_vfork
/freebsd-9.3-release/tools/tools
/freebsd-9.3-release/tools/tools/ath
/freebsd-9.3-release/tools/tools/bootparttest
/freebsd-9.3-release/tools/tools/cxgbetool
/freebsd-9.3-release/tools/tools/ether_reflect
/freebsd-9.3-release/tools/tools/mcgrab
/freebsd-9.3-release/tools/tools/nanobsd
/freebsd-9.3-release/tools/tools/netmap
/freebsd-9.3-release/tools/tools/syscall_timing
/freebsd-9.3-release/tools/tools/sysdoc
/freebsd-9.3-release/tools/tools/umastat
/freebsd-9.3-release/tools/tools/vimage
/freebsd-9.3-release/tools/tools/zfsboottest
/freebsd-9.3-release/usr.bin
/freebsd-9.3-release/usr.bin/apply
/freebsd-9.3-release/usr.bin/ar
/freebsd-9.3-release/usr.bin/at
/freebsd-9.3-release/usr.bin/bc
/freebsd-9.3-release/usr.bin/bmake
/freebsd-9.3-release/usr.bin/brandelf
/freebsd-9.3-release/usr.bin/bsdiff
/freebsd-9.3-release/usr.bin/c89
/freebsd-9.3-release/usr.bin/c99
/freebsd-9.3-release/usr.bin/calendar
/freebsd-9.3-release/usr.bin/calendar/calendars
/freebsd-9.3-release/usr.bin/chpass
/freebsd-9.3-release/usr.bin/clang
/freebsd-9.3-release/usr.bin/comm
/freebsd-9.3-release/usr.bin/compress
/freebsd-9.3-release/usr.bin/cpio
/freebsd-9.3-release/usr.bin/csup
/freebsd-9.3-release/usr.bin/ctlstat
/freebsd-9.3-release/usr.bin/cut
/freebsd-9.3-release/usr.bin/dc
/freebsd-9.3-release/usr.bin/dig
/freebsd-9.3-release/usr.bin/du
/freebsd-9.3-release/usr.bin/ee
/freebsd-9.3-release/usr.bin/fetch
/freebsd-9.3-release/usr.bin/find
/freebsd-9.3-release/usr.bin/finger
/freebsd-9.3-release/usr.bin/fstat
/freebsd-9.3-release/usr.bin/gcore
/freebsd-9.3-release/usr.bin/gprof
/freebsd-9.3-release/usr.bin/grep
/freebsd-9.3-release/usr.bin/gzip
/freebsd-9.3-release/usr.bin/hexdump
/freebsd-9.3-release/usr.bin/host
/freebsd-9.3-release/usr.bin/indent
/freebsd-9.3-release/usr.bin/ipcrm
/freebsd-9.3-release/usr.bin/join
/freebsd-9.3-release/usr.bin/kdump
/freebsd-9.3-release/usr.bin/killall
/freebsd-9.3-release/usr.bin/ktrace
/freebsd-9.3-release/usr.bin/ktrdump
/freebsd-9.3-release/usr.bin/last
/freebsd-9.3-release/usr.bin/lastcomm
/freebsd-9.3-release/usr.bin/ldd
/freebsd-9.3-release/usr.bin/less
/freebsd-9.3-release/usr.bin/lex
/freebsd-9.3-release/usr.bin/limits
/freebsd-9.3-release/usr.bin/locale
/freebsd-9.3-release/usr.bin/lock
/freebsd-9.3-release/usr.bin/lockf
/freebsd-9.3-release/usr.bin/login
/freebsd-9.3-release/usr.bin/lsvfs
/freebsd-9.3-release/usr.bin/m4
/freebsd-9.3-release/usr.bin/mail
/freebsd-9.3-release/usr.bin/make
/freebsd-9.3-release/usr.bin/makewhatis
/freebsd-9.3-release/usr.bin/man
/freebsd-9.3-release/usr.bin/minigzip
/freebsd-9.3-release/usr.bin/ministat
/freebsd-9.3-release/usr.bin/mkcsmapper
/freebsd-9.3-release/usr.bin/mkesdb
/freebsd-9.3-release/usr.bin/mklocale
/freebsd-9.3-release/usr.bin/mktemp
/freebsd-9.3-release/usr.bin/msgs
/freebsd-9.3-release/usr.bin/mt
/freebsd-9.3-release/usr.bin/ncal
/freebsd-9.3-release/usr.bin/ncplist
/freebsd-9.3-release/usr.bin/ncplogin
/freebsd-9.3-release/usr.bin/netstat
/freebsd-9.3-release/usr.bin/newgrp
/freebsd-9.3-release/usr.bin/nfsstat
/freebsd-9.3-release/usr.bin/nslookup
/freebsd-9.3-release/usr.bin/passwd
/freebsd-9.3-release/usr.bin/pr
/freebsd-9.3-release/usr.bin/printf
/freebsd-9.3-release/usr.bin/procstat
/freebsd-9.3-release/usr.bin/protect
/freebsd-9.3-release/usr.bin/rctl
/freebsd-9.3-release/usr.bin/rlogin
/freebsd-9.3-release/usr.bin/rpcgen
/freebsd-9.3-release/usr.bin/rsh
/freebsd-9.3-release/usr.bin/rwho
/freebsd-9.3-release/usr.bin/script
/freebsd-9.3-release/usr.bin/sed
/freebsd-9.3-release/usr.bin/seq
/freebsd-9.3-release/usr.bin/sockstat
/freebsd-9.3-release/usr.bin/split
/freebsd-9.3-release/usr.bin/stat
/freebsd-9.3-release/usr.bin/stdbuf
/freebsd-9.3-release/usr.bin/su
/freebsd-9.3-release/usr.bin/systat
/freebsd-9.3-release/usr.bin/tail
/freebsd-9.3-release/usr.bin/talk
/freebsd-9.3-release/usr.bin/tar
/freebsd-9.3-release/usr.bin/tftp
/freebsd-9.3-release/usr.bin/top
/freebsd-9.3-release/usr.bin/touch
/freebsd-9.3-release/usr.bin/truss
/freebsd-9.3-release/usr.bin/unvis
/freebsd-9.3-release/usr.bin/unzip
/freebsd-9.3-release/usr.bin/usbhidaction
/freebsd-9.3-release/usr.bin/usbhidctl
/freebsd-9.3-release/usr.bin/users
/freebsd-9.3-release/usr.bin/uuencode
/freebsd-9.3-release/usr.bin/vacation
/freebsd-9.3-release/usr.bin/vis
/freebsd-9.3-release/usr.bin/vmstat
/freebsd-9.3-release/usr.bin/w
/freebsd-9.3-release/usr.bin/wall
/freebsd-9.3-release/usr.bin/who
/freebsd-9.3-release/usr.bin/whois
/freebsd-9.3-release/usr.bin/write
/freebsd-9.3-release/usr.bin/xinstall
/freebsd-9.3-release/usr.bin/xlint
/freebsd-9.3-release/usr.bin/yes
/freebsd-9.3-release/usr.sbin
/freebsd-9.3-release/usr.sbin/Makefile
/freebsd-9.3-release/usr.sbin/ac
/freebsd-9.3-release/usr.sbin/acpi/acpidump
/freebsd-9.3-release/usr.sbin/adduser
/freebsd-9.3-release/usr.sbin/amd
/freebsd-9.3-release/usr.sbin/ancontrol
/freebsd-9.3-release/usr.sbin/apmd
/freebsd-9.3-release/usr.sbin/arp
/freebsd-9.3-release/usr.sbin/authpf
/freebsd-9.3-release/usr.sbin/bluetooth/ath3kfw
/freebsd-9.3-release/usr.sbin/bluetooth/bthidd
/freebsd-9.3-release/usr.sbin/bluetooth/hccontrol
/freebsd-9.3-release/usr.sbin/bluetooth/sdpd
/freebsd-9.3-release/usr.sbin/boot0cfg
/freebsd-9.3-release/usr.sbin/bootparamd
/freebsd-9.3-release/usr.sbin/bsdconfig
/freebsd-9.3-release/usr.sbin/bsdinstall
/freebsd-9.3-release/usr.sbin/bsdinstall/scripts
/freebsd-9.3-release/usr.sbin/bsnmpd
/freebsd-9.3-release/usr.sbin/bsnmpd/modules/snmp_hostres
/freebsd-9.3-release/usr.sbin/bsnmpd/modules/snmp_wlan
/freebsd-9.3-release/usr.sbin/bsnmpd/tools/bsnmptools
/freebsd-9.3-release/usr.sbin/btxld
/freebsd-9.3-release/usr.sbin/burncd
/freebsd-9.3-release/usr.sbin/cdcontrol
/freebsd-9.3-release/usr.sbin/chkgrp
/freebsd-9.3-release/usr.sbin/config
/freebsd-9.3-release/usr.sbin/cpucontrol
/freebsd-9.3-release/usr.sbin/crashinfo
/freebsd-9.3-release/usr.sbin/cron
/freebsd-9.3-release/usr.sbin/cron/crontab
/freebsd-9.3-release/usr.sbin/crunch
/freebsd-9.3-release/usr.sbin/ctladm
/freebsd-9.3-release/usr.sbin/ctm/ctm_dequeue
/freebsd-9.3-release/usr.sbin/daemon
/freebsd-9.3-release/usr.sbin/diskinfo
/freebsd-9.3-release/usr.sbin/edquota
/freebsd-9.3-release/usr.sbin/etcupdate
/freebsd-9.3-release/usr.sbin/flowctl
/freebsd-9.3-release/usr.sbin/freebsd-update
/freebsd-9.3-release/usr.sbin/fwcontrol
/freebsd-9.3-release/usr.sbin/gpioctl
/freebsd-9.3-release/usr.sbin/gssd
/freebsd-9.3-release/usr.sbin/i2c
/freebsd-9.3-release/usr.sbin/ifmcstat
/freebsd-9.3-release/usr.sbin/inetd
/freebsd-9.3-release/usr.sbin/iostat
/freebsd-9.3-release/usr.sbin/ip6addrctl
/freebsd-9.3-release/usr.sbin/jail
/freebsd-9.3-release/usr.sbin/jls
/freebsd-9.3-release/usr.sbin/kbdcontrol
/freebsd-9.3-release/usr.sbin/kbdmap
/freebsd-9.3-release/usr.sbin/keyserv
/freebsd-9.3-release/usr.sbin/kgmon
/freebsd-9.3-release/usr.sbin/kldxref
/freebsd-9.3-release/usr.sbin/lpr
/freebsd-9.3-release/usr.sbin/lpr/filters
/freebsd-9.3-release/usr.sbin/lpr/lpd
/freebsd-9.3-release/usr.sbin/makefs
/freebsd-9.3-release/usr.sbin/memcontrol
/freebsd-9.3-release/usr.sbin/mergemaster
/freebsd-9.3-release/usr.sbin/mfiutil
/freebsd-9.3-release/usr.sbin/mixer
/freebsd-9.3-release/usr.sbin/mountd
/freebsd-9.3-release/usr.sbin/moused
/freebsd-9.3-release/usr.sbin/mptutil
/freebsd-9.3-release/usr.sbin/mtest
/freebsd-9.3-release/usr.sbin/mtree
/freebsd-9.3-release/usr.sbin/named
/freebsd-9.3-release/usr.sbin/ndiscvt
/freebsd-9.3-release/usr.sbin/ndp
/freebsd-9.3-release/usr.sbin/newsyslog
/freebsd-9.3-release/usr.sbin/nfscbd
/freebsd-9.3-release/usr.sbin/nfsd
/freebsd-9.3-release/usr.sbin/nmtree
/freebsd-9.3-release/usr.sbin/ntp
/freebsd-9.3-release/usr.sbin/pc-sysinstall
/freebsd-9.3-release/usr.sbin/pciconf
/freebsd-9.3-release/usr.sbin/pkg
/freebsd-9.3-release/usr.sbin/pkg_install
/freebsd-9.3-release/usr.sbin/pkg_install/add
/freebsd-9.3-release/usr.sbin/pkg_install/info
/freebsd-9.3-release/usr.sbin/pkg_install/updating
/freebsd-9.3-release/usr.sbin/pmcannotate
/freebsd-9.3-release/usr.sbin/pmccontrol
/freebsd-9.3-release/usr.sbin/pmcstat
/freebsd-9.3-release/usr.sbin/portsnap
/freebsd-9.3-release/usr.sbin/portsnap/portsnap
/freebsd-9.3-release/usr.sbin/powerd
/freebsd-9.3-release/usr.sbin/ppp
/freebsd-9.3-release/usr.sbin/pw
/freebsd-9.3-release/usr.sbin/pwd_mkdb
/freebsd-9.3-release/usr.sbin/rarpd
/freebsd-9.3-release/usr.sbin/route6d
/freebsd-9.3-release/usr.sbin/rpc.lockd
/freebsd-9.3-release/usr.sbin/rpc.statd
/freebsd-9.3-release/usr.sbin/rpc.yppasswdd
/freebsd-9.3-release/usr.sbin/rpc.ypupdated
/freebsd-9.3-release/usr.sbin/rpc.ypxfrd
/freebsd-9.3-release/usr.sbin/rrenumd
/freebsd-9.3-release/usr.sbin/rtadvctl
/freebsd-9.3-release/usr.sbin/rtadvd
/freebsd-9.3-release/usr.sbin/rtprio
/freebsd-9.3-release/usr.sbin/rtsold
/freebsd-9.3-release/usr.sbin/rwhod
/freebsd-9.3-release/usr.sbin/sa
/freebsd-9.3-release/usr.sbin/sade
/freebsd-9.3-release/usr.sbin/sendmail
/freebsd-9.3-release/usr.sbin/service
/freebsd-9.3-release/usr.sbin/services_mkdb
/freebsd-9.3-release/usr.sbin/setfib
/freebsd-9.3-release/usr.sbin/smbmsg
/freebsd-9.3-release/usr.sbin/syslogd
/freebsd-9.3-release/usr.sbin/sysrc
/freebsd-9.3-release/usr.sbin/tcpdrop
/freebsd-9.3-release/usr.sbin/tcpdump
/freebsd-9.3-release/usr.sbin/timed
/freebsd-9.3-release/usr.sbin/timed/timed
/freebsd-9.3-release/usr.sbin/traceroute6
/freebsd-9.3-release/usr.sbin/tzsetup
/freebsd-9.3-release/usr.sbin/uhsoctl
/freebsd-9.3-release/usr.sbin/usbdump
/freebsd-9.3-release/usr.sbin/utxrm
/freebsd-9.3-release/usr.sbin/vidcontrol
/freebsd-9.3-release/usr.sbin/vipw
/freebsd-9.3-release/usr.sbin/wake
/freebsd-9.3-release/usr.sbin/watch
/freebsd-9.3-release/usr.sbin/watchdogd
/freebsd-9.3-release/usr.sbin/wlandebug
/freebsd-9.3-release/usr.sbin/wpa
/freebsd-9.3-release/usr.sbin/wpa/hostapd
/freebsd-9.3-release/usr.sbin/wpa/wpa_supplicant
/freebsd-9.3-release/usr.sbin/yp_mkdb
/freebsd-9.3-release/usr.sbin/ypbind
/freebsd-9.3-release/usr.sbin/yppush
/freebsd-9.3-release/usr.sbin/ypserv
/freebsd-9.3-release/usr.sbin/zic
267654 20-Jun-2014 gjb

Copy stable/9 to releng/9.3 as part of the 9.3-RELEASE cycle.

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


267243 08-Jun-2014 nwhitehorn

MFC r260913,266895:
Add a new flag to /etc/ttys: onifconsole. This is equivalent to "on" if the
device is an active kernel console and "off" otherwise. This is designed to
allow serial-booting x86 systems to provide a login prompt on the serial line
by default without providing one on all systems by default. Set this flag
on x86 systems for ttyu0.

Comments and suggestions by: grehan, dteske, jilles
Approved by: re (gjb)
Relnotes: yes


266659 25-May-2014 kib

MFC r266411:
Fix LD_LIBMAP.

Approved by: re (gjb)


264719 21-Apr-2014 kib

MFC r264481:
Add dwarf annotations to the amd64 _rtld_bind_start to allow debuggers
to unwind around the calls from PLT to binder.


263832 27-Mar-2014 brueffer

MFC: r263121

Re-format the license to conform to our BSD license template as much
as possible. This does not change the wording in any way.

Remove the 3rd clause ("advertising clause") of the BSD license as
permitted by the University of Berkeley on July 22, 1999. While the
clause itself mentions Lawrence Berkeley Laboratory, UCB is the sole
copyright holder of this file.

Reviewed by: imp, emaste, eadler


263031 11-Mar-2014 des

MFH (r251810): fix installation from read-only .OBJDIR
MFH (r255384): add PRIVATELIB for internal-use shred libraries
MFH (r255385, r255413): add a stock libmap32.conf
MFH (r255765): always support directory mapping; rewrite libmap man page


262545 27-Feb-2014 davidxu

MFC r262277:

malloc_aligned() may not leave enough space for pointer to allocated memory,
saving the pointer will overwrite bytes belongs to another memory block
unexpectly, to fix the problem, use (allocated address + sizeof(void *)) as
initial value, and slip to next aligned address, so maximum extra bytes is
sizeof(void *) + align - 1.

Tested by: Andre Albsmeier < mail at ma17 dot ata dot myota dot orgndre >

MFC r262334:

Increase alignment to size of pointer if the alignment is too small.
Some modules do not align data at least to size of pointer, they uses a
smaller alignment, but our pointer should be aligned to its native
boundary, otherwise on some platforms, hardware alignment checking
will cause bus error.


262285 21-Feb-2014 brueffer

MFC: r261885

In sgetpwnam(), save and free pw_class like all other char members
of struct passwd. This fixes spurious "login_getclass: unknown class"
errors.

PR: 186439
Submitted by: UEMURA Tetsuya <t_uemura at macome.co.jp>


259293 13-Dec-2013 kib

MFC r259044:
For variant II static TLS, properly align tls segments.

MFC r259072:
Cast Elf_Addr to void * to match the free_aligned() argument type.


259291 13-Dec-2013 kib

MFC r259043:
Build an allocator for the aligned memory on top of the rtld-private
malloc.


256436 14-Oct-2013 kib

MFC r256101:
Implement support for the interpose dso flag.


250170 02-May-2013 kib

MFC r250075:
Properly terminate the result string for intermediate results.


250040 29-Apr-2013 kib

MFC r249525:
Rewrite origin_subst_one() to get rid of the wrong limit on the length
of the resulting string.


247846 05-Mar-2013 tijl

MFC r247396:

Map libraries linked with -Ttext-segment=base_addr at base_addr.
Normal libraries have base address 0 and are unaffected by this change.

PR: 176216
Submitted by: Damjan Jovanovic <damjan.jov@gmail.com>
Reviewed by: kib


247650 02-Mar-2013 marius

MFC: r235857

mdoc: Only use macros inside a reference block.


247644 02-Mar-2013 marius

MFC: r246106, r246139

Mark tftp_log() as __printflike() and deal with the fallout.


247641 02-Mar-2013 marius

MFC: r229780 (partial)

Spelling fixes for libexec/


247638 02-Mar-2013 marius

MFC: r241720 (partial)

Fix warnings found by -Wmising-variable-declarations.


247637 02-Mar-2013 marius

MFC: r235643

Properly use LDADD & DPADD to link against libwrap.


247333 26-Feb-2013 dim

MFC r246880:

Since clang 3.2 now has an option to suppress warnings about implicitly
promoted K&R parameters, remove the workarounds added for sendmail
components in r228558.


246253 02-Feb-2013 antoine

MFC r244686 to stable/9:
Use correct size in snprintf.
Remove unused buffer.

PR: 174631
Submitted by: Henning Petersen


242990 13-Nov-2012 mjg

MFC r242372:
atrun(8): scale default load average limit with the number of CPUs

Previously atrun refused to run jobs if load average was not below fixed limit of 1.5.

PR: 173175
Approved by: trasz (mentor)


242166 27-Oct-2012 eadler

MFC r241848:
Check the return error of set[e][ug]id. While this can never fail in the
current version of FreeBSD, this isn't guarenteed by the API.
Custom security modules, or future implementations of the setuid and
setgid may fail.

Approved by: cperciva (implicit)


241226 05-Oct-2012 jilles

MFC r240974: atrun: Do not assume that MAXLOGNAME <= 100.

The reserved space for fmt was exactly sufficient for a two-digit value of
MAXLOGNAME - 1.

PR: bin/171815
Submitted by: Jeremy Huddleston Sequoia


241205 04-Oct-2012 dougb

MFC r240090:

Improve file rotation


240801 22-Sep-2012 kib

MFC r240686:
Do not reference z_nodeflib for !objgiven case, thus fixing LD_PRELOAD
for a non-absolute path.

PR: bin/171604


240582 17-Sep-2012 eadler

MFC r240506:
Bump date missed in r202756

PR: docs/171624
Approved by: cperciva (implicit)


240308 10-Sep-2012 kib

MFC r238471:
Implement DT_RUNPATH and -z nodefaultlib.

MFC note: The ld_library_path_rpath default value was flipped to true,
effectively reverting rtld back to the pre-patch behaviour, unless
LD_LIBRARY_PATH_RPATH environment variable is set and its value is 0/N/n.


239471 21-Aug-2012 kan

MFC r239470: Do not call process_nodelete with NULL object pointer.

The place where the function is called can be reached if object loading
and relocation fails too, in which case obj pointer will be NULL. Do not
call process_nodelete then, or crash will follow.

Pointy hat to: kan


239439 20-Aug-2012 kan

MFC r239253: Pospone the DF_1_NODELETE processing until object DAG is
fully loaded.

Trying to up the reference from the load loop risks missing
dependencies that have not been loaded yet.


239435 20-Aug-2012 kan

MFC r239019: Parse notes only after object structure had been allocated.


239432 20-Aug-2012 emaste

MFC r231973: Avoid error log for transfer stop w/o error code.

A number of tftp clients, including the one in Intel's pxe boot loader,
may intentionally stop a transfer using error code 0 (i.e., EUNDEF).
These are not real errors. Avoid spamming log files with these by
logging them at level LOG_DEBUG instead.

Discussed on -hackers with an initial patch proposal; this change is an
improved approach suggested by kan@.


238481 15-Jul-2012 des

MFH r236751: document sha256 / sha512 support
MFH r236892: remove mention of auth.conf from programs that don't use it
MFH r236963: remove dead code relating to auth.conf
MFH r236965 r236966 r236967 r237005 r237006 r237011: retire auth.conf

Approved by: re


238133 05-Jul-2012 kib

MFC r237659:
Ensure that for the object which is a dependency for some filtee,
relocations are performed before the object's initializer is called.

Approved by: re (kensmith)


237712 28-Jun-2012 kib

MFC r237058:
Eliminate the static buffer used to read the first page of the mapped
object, and eliminate the pread(2) call as well. Mmap the first
page of the object temporaly, and unmap it on error or last use.
Potentially, this leaves one-page gap between succeeding dlopen(3),
but there are other mmap(2) consumers as well.

Fix several cases were the whole mapping of the object leaked on error.

Use MAP_PREFAULT_READ for mmap(2) calls which map real object pages


237394 21-Jun-2012 marius

MFC: r231618, r233231 (partial)

Add thread-local storage support for ARM to rtld-elf

Reviewed by: cognet
Obtained from: NetBSD


237216 18-Jun-2012 eadler

MFC r233648:
Remove trailing whitespace per mdoc lint warning

Approved by: cperciva (implicit)


236523 03-Jun-2012 bapt

MFC: 234851, 235059

Add two special directives to libmap.conf:
include <file>:
Parse the contents of file before continuing with the current file.
includedir <dir>:
Parse the contents of every file in dir that ends in .conf before continuing
with the current file.
Any file or directory encountered while processing include or includedir
directives will be parsed exactly once, even if it is encountered multiple
times.

Approved by: des (mentor)


235396 13-May-2012 kib

MFC r234840:
Split the symlook_obj1 into a loop iterating over the ELF object symbol
hash elements, and a helper matched_symbol() which match the given hash
entry and request, performing needed type and version checks.

MFC r234841:
Add GNU hash support for rtld.

MFC r235054:
Work around a situation where symlook_obj() could be called for the
object for which digest_dynamic1() was not done yet. Just return
EINVAL and do not try to dereference NULL buckets hash array.


234454 19-Apr-2012 kib

MFC r234170:
Propagate the current state of rtld_bind_lock to dlopen_object() calls
through the filter loading call chain. This fixes attempts to
write-lock the already locked rtld_bind_lock when filter loading is
initiated by relocation of dlopening dso.


234012 08-Apr-2012 kib

MFC r233927:
Properly handle absent AT_CANARY aux entry.


233987 07-Apr-2012 kib

MFC r233431:
Remove libssp_nonshared from the rtld linking set. The only use for the
library was definition for the weak alias of __stack_chk_fail.


233986 07-Apr-2012 kib

MFC r233430:
Provide short-circuit exit(3) implementation for rtld.


233935 06-Apr-2012 kib

MFC r233361:
Remove superfluous extern keywords.


233934 06-Apr-2012 kib

MFC r233360:
Centralize the calculation of the top source directory.


233933 06-Apr-2012 kib

MFC r233357:
Implement xstrdup() using strlen()/xmalloc()/memcpy() already
presented in rtld, instead of pulling in libc strdup().


233922 05-Apr-2012 kib

MFC r233307:
Use xmalloc() instead of malloc() in the places where malloc() calls
are assumed to not fail.

Make the xcalloc() calling conventions follow the calloc(3) calling
conventions and replace unchecked calls to calloc() with calls to
xcalloc().

Remove redundand declarations from xmalloc.c, which are already
present in rtld.h.


233921 05-Apr-2012 kib

MFC r233306:
Remove the fragments which are not needed on FreeBSD.


233833 03-Apr-2012 kib

MFC r233655:
Add a special case in do_dlsym() for TLS stored symbols.

MFC r233674:
Fix ia64 build after r233655.


233832 03-Apr-2012 kib

MFC r233546:
Prevent rtld_verify_object_versions() from being called several times
for the same object.


233831 03-Apr-2012 kib

MFC r233231:
Fix several problems with our ELF filters implementation.

Do not relocate twice an object which happens to be needed by loaded
binary (or dso) and some filtee opened due to symbol resolution when
relocating need objects. Record the state of the relocation
processing in Obj_Entry and short-circuit relocate_objects() if
current object already processed.

Do not call constructors for filtees loaded during the early
relocation processing before image is initialized enough to run
user-provided code. Filtees are loaded using dlopen_object(), which
normally performs relocation and initialization. If filtee is
lazy-loaded during the relocation of dso needed by the main object,
dlopen_object() runs too earlier, when most runtime services are not
yet ready.

Postpone the constructors call to the time when main binary and
depended libraries constructors are run, passing the new flag
RTLD_LO_EARLY to dlopen_object(). Symbol lookups callers inform
symlook_* functions about early stage of initialization with
SYMLOOK_EARLY. Pass flags through all functions participating in
object relocation.

Use the opportunity and fix flags argument to find_symdef() in
arch-specific reloc.c to use proper name SYMLOOK_IN_PLT instead of
true, which happen to have the same numeric value.

MFC r233777 (by kan):
Do not try to adjust stacks if dlopen_object is called too early.

MFC r233778 (by kan):
Remove extra blank line from revious commit.

MFC note: the ARM and MIPS TLS support is not merged back, so the chunks
from r233231 which fix misuse of flags in calls to find_symdef() in
the corresponding relocation type handlers were not applied. When TLS
support is merged, the rest of r233231 should be applied too.


233697 30-Mar-2012 kib

MFC r232974:
Stop using strerror(3) in rtld, which brings in msgcat and stdio.
Directly access sys_errlist array of errno messages with private
rtld_strerror() function.


233696 30-Mar-2012 kib

MFC r232862:
Do not use stdio for libmap.conf read. Directly map the file and
parse lines from the mappings.


233695 30-Mar-2012 kib

MFC r232861:
Provide rtld-private implementations of __stack_chk_guard,
__stack_chk_fail() and __chk_fail() symbols, to be used by functions
linked from libc_pic.a.


233694 30-Mar-2012 kib

MFC r232831:
Add support for preinit, init and fini arrays to rtld.
Only binaries marked with proper ABI note gets array ctr/dtrs called.

MFC r232856:
When iterating over the dso program headers, the object is not initialized
yet, and object segments are not yet mapped. Only parse the notes that
appear in the first page of the dso (as it should be anyway), and use
the preloaded page content.

MFC r232857 (by dim):
Fix a warning/error with clang.

MFC r232859 (by dim):
Amend r232857, now dropping the casts entirely, as they were not
necessary at all.


233170 19-Mar-2012 kib

MFC r233041:
Remove write-only variable.


233063 17-Mar-2012 kib

MFC r232777:
Optimize tls_get_addr_common().


233029 16-Mar-2012 kib

MFC r232729:
Remove the use of toupper() from rtld_printf.c.


232930 13-Mar-2012 dim

MFC r232263:

Define several extra macros in bsd.sys.mk and sys/conf/kern.pre.mk, to
get rid of testing explicitly for clang (using ${CC:T:Mclang}) in
individual Makefiles.

Instead, use the following extra macros, for use with clang:
- NO_WERROR.clang (disables -Werror)
- NO_WCAST_ALIGN.clang (disables -Wcast-align)
- NO_WFORMAT.clang (disables -Wformat and friends)
- CLANG_NO_IAS (disables integrated assembler)
- CLANG_OPT_SMALL (adds flags for extra small size optimizations)

As a side effect, this enables setting CC/CXX/CPP in src.conf instead of
make.conf! For clang, use the following:

CC=clang
CXX=clang++
CPP=clang-cpp


232863 12-Mar-2012 kib

MFC r232572:
Use hand-made isspace1() macro which is enough to detect spaces in
libmap.conf.

MFC r232590 (by pluknet):
Rename isspace1() macro to the more appropriate rtld_isspace().


231820 16-Feb-2012 kib

MFC r231582:
Add missed EOL when die() was converted to use rtld_fdputstr() instead
of errx().

PR: bin/165075


231812 16-Feb-2012 eadler

MFC r22990[45] and r229907-r229919:

- fix a variety of warnings produced by gcc46 when compiling world

Approved by (cperciva)


231702 14-Feb-2012 dim

MFC r231118:

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


231579 13-Feb-2012 kib

MFC r230784:
Add support for GNU RELRO.


230410 21-Jan-2012 kib

MFC r229768:
Implement fdlopen(3), an rtld interface to load shared object by file
descriptor.


229769 07-Jan-2012 kib

MFC r229508:
Postpone the resolution of IRELATIVE relocations and IFUNC-targeted
relocations until tls is initialized and stacks permissions correctly
set. This allows the ifunc to call malloc(3) and some other heavy
services.

Add debug banner.


229503 04-Jan-2012 kib

MFC r228435:
Add support for STT_GNU_IFUNC and R_MACHINE_IRELATIVE GNU extensions to
rtld on 386 and amd64.

MFC r228503:
Postpone the resolution for irelative/ifunc right before initializers
are called, and drop bind lock around calls to dispatcher. Use
initlist to iterate over the objects instead of the ->next, due to
drop of the bind lock in iteration.

For i386/reloc.c:reloc_iresolve(), fix calculation of the dispatch
function address for dso, by taking into account possible non-zero
relocbase.

MFC r228635 (by nwhitehorn):
Fix RTLD on PowerPC after r228435. Changing the order of init_pltgot()
caused the icache to be invalidated at the wrong time, resulting in
an icache full of nonsense in the PLT section.


229461 04-Jan-2012 eadler

MFC r227458, r226436:

- change "is is" to "is" or "it is"
- change "the the" to "the"
- other typo fixes

Approved by: lstewart


229142 31-Dec-2011 dim

MFC r228600:

Fix the incompatible enum conversions in libexec/ypxfr in another, more
messy way, so as to not disrupt other yp programs: just add casts to
convert the incompatible enums, as the numerical values are the same
(either by accident, design, or the phase of the moon at that time).


229140 31-Dec-2011 dim

MFC r228587:

In libexec/rbootd/utils.c, use the correct printf length modifiers for
u_int32_t and size_t.


229139 31-Dec-2011 dim

MFC r228586:

In libexec/pppoed/pppoed.c, use the correct printf length modifier for a
size_t.


229138 31-Dec-2011 dim

MFC r228584:

In libexec/bootpd/tools/bootptest/print-bootp.c, use the correct printf
length modifier for the difference between two pointers.


229137 31-Dec-2011 dim

MFC r228582:

In libexec/getty/chat.c, replace && with & in chat_send(). The intent
is to test if the CHATDEBUG_SEND bit is set in the chat_debug global.


229136 31-Dec-2011 dim

MFC r228581:

In libexec/bootpd/bootpgw/bootpgw.c, add a cast for the remaining
minutes of activity, to avoid a warning on platforms where time_t is a
32-bit integer.


229113 31-Dec-2011 nwhitehorn

MFC r228646:
Additional icache paranoia: non-PLT relocations can modify the text segment.
It is then important to make sure the icache is synchronized again to
prevent (rare) random seg faults and illegal instructions.


229112 31-Dec-2011 dim

MFC r228558, r228585, r228588, r228652, r228707:

Unfortunately, clang gives warnings about sendmail code that cannot be
turned off yet. Since this is contrib code, and we don't really care
about the warnings, just make them non-fatal for now.

MFC r228590:

Fix typos in the comments about clang warnings in several
sendmail-related Makefiles.

Spotted by: arundel

MFC r228708:

In usr.bin/vacation/Makefile, fix a typo in the comment about clang
warnings.

Spotted by: arundel


229017 30-Dec-2011 kib

MFC r228375:
Typo.


228843 23-Dec-2011 cperciva

Fix a problem whereby a corrupt DNS record can cause named to crash. [11:06]

Add an API for alerting internal libc routines to the presence of
"unsafe" paths post-chroot, and use it in ftpd. [11:07]

Fix a buffer overflow in telnetd. [11:08]

Make pam_ssh ignore unpassphrased keys unless the "nullok" option is
specified. [11:09]

Add sanity checking of service names in pam_start. [11:10]

Approved by: so (cperciva)
Approved by: re (bz)
Security: FreeBSD-SA-11:06.bind
Security: FreeBSD-SA-11:07.chroot
Security: FreeBSD-SA-11:08.telnetd
Security: FreeBSD-SA-11:09.pam_ssh
Security: FreeBSD-SA-11:10.pam


227965 25-Nov-2011 kib

MFC r227660:
Fix fd leak.

Approved by: re (bz)


227305 07-Nov-2011 marius

MFC: r227006, r227281, r227282

Add a PCI front-end to esp(4) allowing it to support AMD Am53C974 and
replace amd(4) with the former in the amd64, i386 and pc98 GENERIC kernel
configuration files. Besides duplicating functionality, amd(4), which
previously also supported the AMD Am53C974, unlike esp(4) is no longer
maintained and has accumulated enough bit rot over time to always cause
a panic during boot as long as at least one target is attached to it
(see PR 124667).

PR: 124667
Approved by: re (kib)
Obtained from: NetBSD (based on)


227208 06-Nov-2011 brueffer

MFC: r226937

Fix a misplaced parenthesis.

Approved by: re (kib)


226215 10-Oct-2011 kib

MFC r226156:
Handle the R_386_TLS_TPOFF32 relocation.

Approved by: re (bz)


226214 10-Oct-2011 kib

MFC r226155:
Setting up TLS block for the main thread must be done after the
relocations are processed.

Approved by: re (bz)


225736 23-Sep-2011 kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by: re (implicit)


225699 20-Sep-2011 kib

Restore the writing of the .bss sections of the dsos (not the main
executable) after r190885. The whole region for the dso is mmaped with
MAP_NOCORE flag, doing only mprotect(2) over .bss prevented it from
writing .bss to core files.

Revert the optimization of using mprotect(2) to establish .bss, overlap
the section with mmap(2).

Reported by: attilio
Reviewed by: attilio, emaste
Approved by: re (bz)
MFC after: 2 weeks


225582 15-Sep-2011 kib

Use the proper dynamic tls block to calculate the tls variable address
in case tls data generation was updated.

PR: misc/160721
Submitted by: "Thinker K.F. Li" <thinker codemud net>
Tested by: flo
Approved by: re (bz)
MFC after: 1 week


225417 06-Sep-2011 kib

Do not use the function pointers for the internal operation of rtld_printf()
functions. The _rtld_error() function might be called early during the rtld
bootstrap, in which case function pointers are not yet functional on ia64
due to required relocations not yet performed.

Reported, reviewed and tested by: marcel
Approved by: re (bz)


225366 03-Sep-2011 dim

When libexec/rtld-elf/rtld.c is compiled with clang, the r_debug_state()
function (a hook necessary for gdb support), is inlined, but since the
function contains no code, no calls to it are generated. When gdb is
debugging a dynamically linked program, this causes backtraces to be
corrupted.

Fix it by marking the function __noinline, and inserting an empty asm
statement, that pretends to clobber memory. This forces the compiler to
emit calls to r_debug_state() throughout rtld.c.

Approved by: re (kib)


225152 24-Aug-2011 kib

Rtld links with the specially built pic static libc library to get some
C runtime services, like printf(). Unfortunately, the multithread-safeness
measures in the libc do not work in rtld environment.

Rip the kernel printf() implementation and use it in the rtld instead of
libc version. This printf does not require any shared global data and thus
is mt-safe. Systematically use rtld_printf() and related functions, remove
the calls to err(3).

Note that stdio is still pulled from libc due to libmap implementaion using
fopen(). This is safe but unoptimal, and can be changed later.

Reported and tested by: pgj
Diagnosed and reviewed by: kan (previous version)
Approved by: re (bz)


224537 31-Jul-2011 rodrigc

Pull in some wording to the tftpd.8 man page
from NetBSD, with some slight changes:

=========================================================================================
http://cvsweb.netbsd.org/bsdweb.cgi/src/libexec/tftpd/tftpd.8?only_with_tag=MAIN#rev1.22

Revision 1.22 or diffs], Fri Jan 8 21:05:14 2010 UTC (18 months, 2 weeks ago) by christos

Patrick Welche <prlw1@cam.ac.uk>
- add -p pathsep option
- make wrap to zero work, but produce a warning
While here:
- fix gcc warnings, in particular variable clobbered warnings
(compiling with fewer warnings does not really fix the problem)
=========================================================================================

These wording changes clarify the default rollover behavior
as a "kludge". Also, the block numbers and octet counts for 65535 blocks
and 32767 blocks are more accurate than the existing documented numbers.

Requested by: Pawan Gupta <pawang at juniper dot net>
Obtained from: Juniper Networks
Approved by: re (kib)


224536 31-Jul-2011 rodrigc

In the old TFTP server, there was an undocumented behavior where
the block counter would rollover to 0 if a file larger
than 65535 blocks was transferred. With the default block size
of 512 octets per block, this is a file size of approximately 32 megabytes.

The new TFTP server code would report an error and stop transferring
the file if a file was larger than 65535 blocks.

This patch restores the old TFTP server's behavior to the new
TFTP server code. If a TFTP client transfers a file larger
than 65535 blocks, and does *not* specify the "rollover" option,
then automatically rollover the block counter to 0 every time
we reach 65535 blocks.

This restores interoperability with the FreeBSD 6 TFTP client.
Without this change, if a FreeBSD 6 TFTP client tried to
retrieve a file larger than 65535 blocks from a FreeBSD 9 TFTP server
, the transfer would fail.
The same file could be retrieved successfully if the same FreeBSD 6
TFTP client was used against a FreeBSD 6 TFTP server.

Approved by: re (kib)
Tested by: Pawan Gupta <pawang at juniper dot net>,
Obtained from: Juniper Networks


223491 24-Jun-2011 rodrigc

Acknowledge Edwin Groothuis for the major rewrite he
did of the tftpd and tftp code to support TFTP blocksize.


223487 24-Jun-2011 rodrigc

Bring back synchnet() implementation from older
tftp implementation. The synchnet() function
was converted to a no-op when the new TFTP implementation
was committed to FreeBSD. However, this function, as it was
in the older code, is needed
in order to synchronize between the tftpd server and tftp clients,
which may be buggy.

Specifically, we had a buggy TFTP client which would send
TFTP ACK packets for non-TFTP packets, which would cause
the count of packets to get out of whack, causing transfers
to fail with the new TFTPD implementation.

Obtained from: Juniper Networks
Submitted by: Santhanakrishnan Balraj <sbalraj at juniper dot net>


223450 22-Jun-2011 rodrigc

Update references to RFC's that the newer TFTP implementation supports.


223445 22-Jun-2011 rodrigc

Fix typo.

Reported by: Nick Mann <njm at njm dot me dot uk>


223444 22-Jun-2011 rodrigc

Clarify tftpd's -d flag in the new TFTP implementation.
Bump date.


223434 22-Jun-2011 trasz

Add LOGIN_SETCPUMASK and LOGIN_SETLOGINCLASS to the setusercontext(3)
calls in ftpd(8).


223367 21-Jun-2011 ed

Minor cleanups to ulog-helper:

- Remove unneeded linking against libmd. libulog depends on this
library, but the ulog-helper tool itself does not.

- Change the comment at the top to mention utmpx instead of utmp, wtmp
and lastlog.

- Simply use user_from_uid() to translate to a username string.

- Put variable declarations together.


223262 18-Jun-2011 benl

Fix clang warnings.

Approved by: philip (mentor)


223137 16-Jun-2011 rodrigc

Clarify that the TFTP blocksize (RFC2348) or non-standard
TFTP rollover option can be used to transfer larger files.


222859 08-Jun-2011 nwhitehorn

Compile RTLD with global dot symbols on 64-bit PowerPC, as a crutch for
GDB's ability to locate r_debug_state (which is actually the only function
that need be compiled this way).


222825 07-Jun-2011 jh

Remove a gratuitous newline. This should be a non-functional change.

PR: bin/153667
Submitted by: Craig Leres
MFC after: 1 week


222326 26-May-2011 rodrigc

Fix tftp_log() usage.


220004 25-Mar-2011 avg

rtld: eliminate double call to close(2) that may occur in load_object

The second close(2) call resulted in heisenbugs in some multi-threaded
applications where e.g. dlopen(3) call in one thread could close a file
descriptor for a file having been opened in other thread concurrently.

My litmus test for this issue was an openoffice.org build.

Reviewed by: jhb
MFC after: 2 weeks


219533 11-Mar-2011 marius

- Add support for TLS relocations.
- Emitt an error when encountering an unsupported and in case of the
kernel also for unaligned relocations.
- Fix R_SPARC_LOX10 relocations. Apparently these are hardly ever used.


219532 11-Mar-2011 marius

- Remove clause 3 and 4 from TNF licenses. [1]
- Add the _RF_X committed in r212998 also to the tables in the sparc64
reloc.c in order reduce differences between the kernel and the userland
source. This results in no functional change though.
- Fix further inconsistencies in the abbreviations of the names of the
relocations.
- Further whitespace fixes.

Obtained from: NetBSD [1]


219386 07-Mar-2011 nwhitehorn

Remove dead code that snuck in from the 32-bit PowerPC version of this
file. The error being checked for does not exist on 64-bit systems.


219340 06-Mar-2011 marius

- With the addition of TLS support binutils started to make the addend
values for resolved symbols relative to relocbase instead of sections
so detect this case and handle as appropriate, which allows using
kernel modules linked with affected versions of binutils. Actually I
think this is a bug in binutils but given that apparently nobody
complained for nearly six years and powerpc has basically the same
workaround I decided to put it in for the sparc64 kernel, too.
- Fix R_SPARC_HIX22 relocations. Apparently these are hardly ever used.


219339 06-Mar-2011 marius

- Consistently abbreviate the names of the relocations.
- End sentences with dots.
- Fix whitespace.


218890 20-Feb-2011 nwhitehorn

Remove a hack made obsolete by the binutils 2.17 merge.


218824 18-Feb-2011 nwhitehorn

Turn off default generation of userland dot symbols on powerpc64 now that
we have a binutils that supports it. Kernel dot symbols remain on to assist
DDB.


218476 09-Feb-2011 kib

Use sigsetjmp/siglongjmp with disabled signal mask access for
lock upgrade in rtld. There is no need to care about the mask,
which causes a lot of unneeded sigprocmask(2) calls during each
symbol lookup.


218099 30-Jan-2011 kib

Fix grammar in comment.

Pointy hat to: kib
MFC after: 1 week


218098 30-Jan-2011 kib

Make ldd(1) work when versioned dependency file is cannot be loaded.
Instead of aborting in locate_dependency(), propagate the error to
caller. The rtld startup function does the right thing with an error
from rtld_verify_versions(), depending on the mode of operation.

Reported by: maho
In collaboration with: kan
MFC after: 1 week


218051 28-Jan-2011 kan

Eliminate the use of symlook_needed function in favor of DAGS.

Place elements on DAG lists in breadth-first order. This allows us to
walk pre-built list in all cases where breadth-first dependency chain
enumeration is required.

Fix dlsym on special handle obtained by dlopen(NULL, ...) to do what
comment claims it does. Take advantage of recently added symlook_global
function to iterate over main objects and global DAGs lists properly in
search of a symbol. Since rtld itself provides part of the global
namespace, search rtld_obj too.

Remove recursion from init_dag and symlook_needed functions. Use
symlook_needed for ELF filtee processing only and change lookup order
used in the function to match the order used by Solaris runtime linker
under same circumstances. While there, fix weak symbol handling in the
loop so that we return the first weak symbol definition if no strong one
was found, instead of the last one.

Reviewed by: kib
MFC after: 1 month


218025 28-Jan-2011 pluknet

Remove SuperH architecture from a comment as we do not support it.
Presumably it was leaked from NetBSD together with rtld-elf mips support.

Approved by: kib (mentor)
MFC after: 3 days


217851 25-Jan-2011 kib

When loading dso without PT_GNU_STACK phdr, only call
__pthread_map_stacks_exec() on architectures that allow executable
stacks.

Reported and tested by: marcel (ia64)


217849 25-Jan-2011 kib

Fix get_program_var_addr() when type of the resolved symbol is functional.
Use make_function_pointer then, otherwise ia64 is broken.

Reported and tested by: marcel


217722 22-Jan-2011 kib

Add my copyright.

Discussed with: kan


217397 14-Jan-2011 kib

Mark rtld on PowerPC as not requiring executable stack.

Reviewed and tested by: nwhitehorn


217223 10-Jan-2011 kib

get_program_var_addr() must prefer the strong symbol to the weak
one. Search global objects, together with main object and
dependencies, for the requested symbol.

Move the common code from symlook_default() into new helper
symlook_global(), and use it both in symlook_global() and
get_program_var_addr().

Supply lock state to get_program_var_addr().

Reviewed by: kan
Tested by: Mykola Dzham <i levsha me>


217153 08-Jan-2011 kib

In rtld, read the initial stack access mode from AT_STACKPROT as set
by kernel, and parse PT_GNU_STACK phdr from linked and loaded dsos.

If the loaded dso requires executable stack, as specified by PF_X bit
of p_flags of PT_GNU_STACK phdr, but current stack protection does not
permit execution, the __pthread_map_stacks_exec symbol is looked up
and called. It should be implemented in libc or threading library and
change the protection mode of all thread stacks to be executable.

Provide a private interface _rtld_get_stack_prot() to export the stack
access mode as calculated by rtld.

Reviewed by: kan


217103 07-Jan-2011 kib

Add section .note.GNU-stack for assembly files used by 386 and amd64.


217026 05-Jan-2011 dim

Sort -mno-(mmx|3dnow|sse|sse2|sse3) options consistently throughout the
tree.

Submitted by: arundel


216977 04-Jan-2011 dim

On amd64 and i386, tell the compiler to refrain from generating SSE,
3DNow, MMX and floating point instructions in rtld-elf.

Otherwise, _rtld_bind() (and whatever it calls) could possibly clobber
function arguments that are passed in SSE/3DNow/MMX/FP registers,
usually floating point values. This can happen, for example, when clang
generates SSE code for memset() or memcpy() calls.

One symptom of this is sshd dying early on amd64 with "PRNG not seeded",
which is ultimately caused by libcrypto.so.6 calling RAND_add() with a
double parameter. That parameter is passed via %xmm0, which gets wiped
out by an SSE memset() in _rtld_bind().

Reviewed by: kib, kan


216975 04-Jan-2011 dim

Remove '-elf' from build flags for libexec/rtld-elf for amd64 and i386.
ELF has been the default format for almost 12 years now.


216945 04-Jan-2011 emaste

Make format string a string literal. (Discovered by clang.)

MFC After: 1 week


216943 04-Jan-2011 emaste

Handle failure from ftpd_popen in statfilecmd().

Reviewed by: attilio
MFC after: 1 week


216939 03-Jan-2011 nwhitehorn

Add support for R_PPC64_UADDR64 relocations.


216932 03-Jan-2011 csjp

expand checkuser() to support the propagation of error codes back to
the caller. Currently, checkuser() does not differentiate between the
failure to open the file and the absence of a user in the file. Check
to see if there was an error opening the file. If there are any errors,
terminate the connection. Currently, the only exception to this rule
is ENOENT, since there is nothing that says the /etc/ftpuser
and /etc/ftpchroot has to exist.

MFC after: 3 weeks


216780 28-Dec-2010 nwhitehorn

Fix an error in the ABI in rtld_bind_start(). When passing arguments to a
C function, the caller's stack frame must have room to store all of the
arguments to that function. While here, fix stack frame alignment issues.

Without this change, the compiler will save r3 and r4 into the caller's
stack frame before calling setjmp() in _rtld_bind(). These would then
overwrite arguments to the newly-bound function, causing eventual failures.


216728 27-Dec-2010 kan

Fix an apparent cop-and-paste mistake in previous commit.

This makes dlsym(RTLD_DEFAULT) work properly again.


216695 25-Dec-2010 kib

Implement support for ELF filters in rtld. Both normal and auxillary
filters are implemented.

Filtees are loaded on demand, unless LD_LOADFLTR environment variable
is set or -z loadfltr was specified during the linking. This forces
rtld to upgrade read-locked rtld_bind_lock to write lock when it
encounters an object with filter during symbol lookup.

Consolidate common arguments of the symbol lookup functions in the
SymLook structure. Track the state of the rtld locks in the
RtldLockState structure. Pass local RtldLockState through the rtld
symbol lookup calls to allow lock upgrades.

Reviewed by: kan
Tested by: Mykola Dzham <i levsha me>, nwhitehorn (powerpc)


216694 25-Dec-2010 kib

Add a hook to pass debug flags to the build of rtld when doing make in
the rtld directory.

Reviewed by: kan


216584 20-Dec-2010 charnier

Add __unused


216583 20-Dec-2010 charnier

Add __unused


216582 20-Dec-2010 charnier

Add __unused. Ansi prototypes.


216560 19-Dec-2010 charnier

add __unused


216489 16-Dec-2010 jh

If dlclose() is called recursively from a _fini() function, the inner
dlclose() call may unload the object of the outer call prematurely
because objects are unreferenced before _fini() calls.

Fix this by unreferencing objects after calling objlist_call_fini() in
dlclose(). Therefore objlist_call_fini() now calls the fini function if
the reference count of an object is 1. In addition we must restart the
list_fini traversal after every _fini() call because another dlclose()
call might have modified the reference counts.

Add an XXX comment to objlist_call_fini() about possible race with
dlopen().

PR: 133246, 149464
Reviewed by: kan, kib


216227 06-Dec-2010 kevlo

Fix double ;;


216226 06-Dec-2010 glebius

Catch up with kernel using time_uptime to drive ARP timeouts.

Noticed by: jilles


215148 11-Nov-2010 dim

Use -fPIC to build libexec/rtld-elf on sparc64, so it will also be able
to link with newer binutils, without overflowing the GOT.

Obtained from: projects/binutils-2.17


215034 09-Nov-2010 brucec

Fix typos.

PR: bin/148894
Submitted by: olgeni


214777 04-Nov-2010 kib

In r214728, if dlopen() is called for the object that has been already
loaded as a dependency and marked -z nodlopen, object' DAG is already
initialized by load_needed_objects(). Due to this, the init_dag() call
from dlopen() does not increment refcount for the object [1].

Change init_dag() to not increment DAG refcount. Require explicit calls
to ref_dag() to increment, and assert that ref_dag() and unref_dag()
are called for root that has dag initialized. To fix the noted issue,
unconditionally call both init_dag() and ref_dag() in dlopen() for the
case when the object was already loaded, making it similar to the case
of newly loaded object.

Noted by: jh [1]
Reviewed by: jh, kan
MFC after: 6 days


214776 04-Nov-2010 kib

Fix style.

MFC after: 6 days


214728 03-Nov-2010 kib

If dlopen() is called for the dso that has been already loaded as a
dependency, then the dso never has its DAG initialized. Empty DAG
makes ref_dag() call in dlopen() a nop, and the dso refcount is off
by one.

Initialize the DAG on the first dlopen() call, using a boolean flag
to prevent double initialization.

From the PR (edited):
Assume we have a library liba.so, containing a function a(), and a
library libb.so, containing function b(). liba.so needs functionality
from libb.so, so liba.so links in libb.so.

An application doesn't know about the relation between these libraries,
but needs to call a() and b(). It dlopen()s liba.so and obtains a
pointer to a(), then it dlopen()s libb.so and obtains a pointer to b().

As soon as the application doesn't need a() anymore, it dlclose()s liba.so.

Expected result: the pointer to b() is still valid and can be called
Actual result: the pointer to b() has become invalid, even though the
application did not dlclose() the handle to libb.so. On calling b(), the
application crashes with a segmentation fault.

PR: misc/151861
Based on patch by: jh
Reviewed by: kan
Tested by: Arjan van Leeuwen <freebsd-maintainer opera com>
MFC after: 1 week


214680 02-Nov-2010 ed

Add a new libc function: cfmakesane(3).

I've noticed various terminal emulators that need to obtain a sane
default termios structure use very complex `hacks'. Even though POSIX
doesn't provide any functionality for this, extend our termios API with
cfmakesane(3), which is similar to the commonly supported cfmakeraw(3),
except that it fills the termios structure with sane defaults.

Change all code in our base system to use this function, instead of
depending on <sys/ttydefaults.h> to provide TTYDEF_*.


214194 22-Oct-2010 marcel

Unbreak ia64.

With r169630 I disabled symbol versioning because it broke rtld. With
r211706 rtld got broken for ia64 & powerpc64. It was fixed for powerpc64
with r212497. In between, r211749 removed the exports table because the
version script handled the exports. But wait, symbol versioning was
disabled on ia64.

With exports controlled by the version script and symbol versioning
disabled, all symbols are exported and too many symbols bind to the
definition in rtld. Let's just say that waird things happen.

So, enable symbol versioning on ia64 and apply a work-around for the
SIGSEGV that triggered r169630 to begin with: when rtld relocates
itself, it comes across r_debug_state and for some reason can't find the
definition. This causes a failure, relocation aborts and null pointers
galore. The work-around is to ignore the missing definition when rtld
is relocating itself and keep going.

Maybe with the next binutils this will all go away. Maybe not, in
which case I still need to figure out why r_debug_state cannot be found.

BTW: r_debug_state is in the symbol map -- I don't think any other rtld
symbols that rtld references are in the symbol map...


214054 19-Oct-2010 uqs

mdoc: drop even more redundant .Pp calls

No change in rendered output, less mandoc lint warnings.

Tool provided by: Nobuyuki Koganemaru n-kogane at syd.odn.ne.jp


213573 08-Oct-2010 uqs

mdoc: drop redundant .Pp and .LP calls

They have no effect when coming in pairs, or before .Bl/.Bd


213488 06-Oct-2010 delphij

Use a defined FreeBSD version.

MFC after: 3 days


213406 04-Oct-2010 nwhitehorn

Fix two subtle problems in PPC32 RTLD. The first is a concurrency issue
where long PLT calls in multi-threaded environments could end up with
incorrect jmptab values. The second is that, after the addition of extended
PLT support, I forgot to update the PLT icache synchronization code to cover
the extended PLT instead of just the basic PLT.

MFC after: 10 days


213102 24-Sep-2010 marius

Remove the duplicate logging of failed read requests, whose error message
also was inappropriate as it triggered for every EACCESS and ENOTFOUND, not
just the case the -n option is intended to deal with and thus really spammed
us with ~20 messages in the default configuration when booting a diskless
FreeBSD client, introduced with r207608 again.

MFC after: 1 week


213099 24-Sep-2010 marius

Make WARNS=6 clean.

MFC after: 1 week


213075 23-Sep-2010 marius

Try to adhere to style.Makefile(5).

MFC after: 3 days


212665 15-Sep-2010 imp

Move the pfrom initialization from before the setjmp to after the
setjmp to avoid warnings on the powerpc build...


212651 15-Sep-2010 rpaulo

Remove an explicit assignment of the CFLAGS variable intended for
debugging purposes only.


212497 12-Sep-2010 nwhitehorn

Check for undefined weak symbols during PLT binding on powerpc64, and do
not attempt to copy NULL function descriptors. This fixes LD_BIND_NOW on
powerpc64 after r211706.

Reviewed by: kib


211936 28-Aug-2010 brucec

Fix incorrect usage of 'assure' and 'insure'.

Approved by: rrs (mentor)


211785 24-Aug-2010 nwhitehorn

Make RTLD work on powerpc64 again. If there is a sub-directory named
MACHINE_ARCH, use that specific one, otherwise use MACHINE_CPUARCH.

Reviewed by: imp


211749 24-Aug-2010 kib

Remove exports table. Export control by the version script is enough.

Reviewed by: kan
MFC after: 3 weeks


211725 23-Aug-2010 imp

MFtbemd:

Prefer MACHNE_CPUARCH to MACHINE_ARCH in most contexts where you want
to test of all the CPUs of a given family conform.


211706 23-Aug-2010 kib

On shared object unload, in __cxa_finalize, call and clear all installed
atexit and __cxa_atexit handlers that are either installed by unloaded
dso, or points to the functions provided by the dso.

Use _rtld_addr_phdr to locate segment information from the address of
private variable belonging to the dso, supplied by crtstuff.c. Provide
utility function __elf_phdr_match_addr to do the match of address against
dso executable segment.

Call back into libthr from __cxa_finalize using weak
__pthread_cxa_finalize symbol to remove any atfork handler which
function points into unloaded object.

The rtld needs private __pthread_cxa_finalize symbol to not require
resolution of the weak undefined symbol at initialization time. This
cannot work, since rtld is relocated before sym_zero is set up.

Idea by: kan
Reviewed by: kan (previous version)
MFC after: 3 weeks


211705 23-Aug-2010 kib

Introduce implementation-private rtld interface _rtld_addr_phdr, which
fills struct dl_phdr_info for the shared object that contains the
specified address, if any.

Idea and reviewed by: kan
MFC after: 3 weeks


211414 17-Aug-2010 kib

Provide the starting image with the pointer to ELF aux vector. It is
written into the __elf_aux_vector variable, if the symbol is present.

Idea from: kan
Tested by: marius (sparc64)
MFC after: 1 month


211413 17-Aug-2010 kib

Use the newly provided aux vectors to get pagesize and osreldate information.
Use local version of getpagesize(), rtld_getpagesize() in private allocator.
Override the __getosreldate() previously fetched from libc_pic.a with
local version that uses aux value if present. Note that __getosreldate()
is used by rtld indirectly, by mmap(2) libc wrapper.

To be able to utilize aux, split digest_dynamic() for use by init_rtld()
into two parts, where the first one does not call malloc(), and the
second part uses it. init_rtld() is able to initialize global variables
before digest_dynamic2() calls. In particular, pagesize and osreldate are
set up from the aux values.

Now, rtld avoids (two) sysctl calls in startup.

Tested by: marius (sparc64)
MFC after: 1 month


211159 11-Aug-2010 neel

Add parentheses around the argument 'x' used in the __bswapXX(x) macros. Revert
r211130 in favor of this more general fix.

This fixes a compilation error for mips 64-bit little endian build.
libexec/rtld-elf/mips/reloc.c:196: warning: right shift count >= width of type

Suggested by: stefanf, jchandra, bde


211130 10-Aug-2010 neel

Fix compilation error for 64-bit little endian build:
libexec/rtld-elf/mips/reloc.c:196: warning: right shift count >= width of type

When the expression '(r_info) >> 32' was passed to bswap32() it was promptly
changed to '(uint32_t)(r_info) >> 32' which is not what we intended.


211056 08-Aug-2010 ed

Remove unneeded use of struct timezone.

We can safely call gettimeofday() without passing a struct timezone.
We're not using it at all.


210933 06-Aug-2010 joel

Fix typos and spelling mistakes.


210838 04-Aug-2010 joel

Fix typo.


210629 29-Jul-2010 jchandra

64 bit support for MIPS rtld.

- Handle the case where pltgot[1] is 64 bit.
- use 'ifdef __mips_n64' instead of 'ELFSIZE == 64' to detect 64 bit compile.


209885 10-Jul-2010 nwhitehorn

RTLD support for powerpc64. A few small modifications to the Makefile
and symbol map are required to support various consequences of the dot
symbol scheme:

- Symbols beginning with a dot are reserved, so start private symbols with
an underscore.
- In order to set RTLD breakpoints, gdb must be able to locate the text
entry point, not the data section function descriptor, so add
.r_debug_state to the symbol map on powerpc64.

Obtained from: projects/ppc64


209558 28-Jun-2010 nwhitehorn

Revert r209544. It papers over a binutils bug, and is not even a reliable
fix for it.

The bug occurs when using the --as-needed flag to ld in the presence of
synthetic linker-generated symbols that reference symbols defined in
linked-to shared libraries with versioned symbols. When the only symbols
used from a library fall into this category, ld will drop the DT_NEEDED
entry for it, but retain the versioning information. This bug is best
fixed/hacked around in binutils, not in rtld.

Discussed with: kan


209544 26-Jun-2010 nwhitehorn

Ignore versioned dependencies on shared objects to which we do not link.
This fixes an error with files like this created by GNU ld under certain
circumstances.


209239 16-Jun-2010 jchandra

Merge jmallett@'s n64 work into HEAD - changeset 3

Update rtld MIPS code to use assembly macros that work on o32/n64.

Changes from http://svn.freebsd.org/base/user/jmallett/octeon

Approved by: rrs(mentor), jmallett


208763 03-Jun-2010 kan

Plug possible memory leak.

Found by: Coverity
MFC after: 2 weeks


208733 02-Jun-2010 uqs

mdoc: use literal text, not a column table to present the
configuration file snippet.


208256 18-May-2010 rdivacky

Only use the cache after the early stage of loading. This is
because calling mmap() etc. may use GOT which is not set up
yet. Use calloc() instead of mmap() in cases where this
was the case before (sparc64, powerpc, arm).

Submitted by: Dimitry Andric (dimitry andric com)
Reviewed by: kan
Approved by: ed (mentor)


207736 07-May-2010 mckusick

Merger of the quota64 project into head.

This joint work of Dag-Erling Smørgrav and myself updates the
FFS quota system to support both traditional 32-bit and new 64-bit
quotas (for those of you who want to put 2+Tb quotas on your users).

By default quotas are not compiled into the kernel. To include them
in your kernel configuration you need to specify:

options QUOTA # Enable FFS quotas

If you are already running with the current 32-bit quotas, they
should continue to work just as they have in the past. If you
wish to convert to using 64-bit quotas, use `quotacheck -c 64';
if you wish to revert from 64-bit quotas back to 32-bit quotas,
use `quotacheck -c 32'.

There is a new library of functions to simplify the use of the
quota system, do `man quotafile' for details. If your application
is currently using the quotactl(2), it is highly recommended that
you convert your application to use the quotafile interface.
Note that existing binaries will continue to work.

Special thanks to John Kozubik of rsync.net for getting me
interested in pursuing 64-bit quota support and for funding
part of my development time on this project.


207614 04-May-2010 imp

Bring in new files from edwin's tftp


207608 04-May-2010 imp

Go ahead and merge the work edwin@ on tftpd into the tree. It is a
lot better than what's in the tree now. Edwin tested it at a prior
employer, but can't test it today. I've found that it works a lot
better with the various uboot versions that I've used in my embedded
work. Here's the pkg-descr from the port that describes the changes:

It all started when we got some new routers, which told me the
following when trying to upload configuration or download images
from it: The TFTP server doesn't support the blocksize option.

My curiousity was triggered, it took me some reading of RFCs and
other documentation to find out what was possible and what could
be done. Was plain TFTP very simple in its handshake, TFTP with
options was kind of messy because of its backwards capability: The
first packet returned could either be an acknowledgement of options,
or the first data packet.

Going through the source code of src/libexec/tftpd and going through
the code of src/usr.bin/tftp showed that there was a lot of duplicate
code, and the addition of options would only increase the amount
of duplicate code. After all, both the client and the server can
act as a sender and receiver.

At the end, it ended up with a nearly complete rewrite of the tftp
client and server. It has been tested against the following TFTP
clients and servers:

- Itself (yay!)
- The standard FreeBSD tftp client and server
- The Fedora Core 6 tftp client and server
- Cisco router tftp client
- Extreme Networks tftp client

It supports the following RFCs:

RFC1350 - THE TFTP PROTOCOL (REVISION 2)
RFC2347 - TFTP Option Extension
RFC2348 - TFTP Blocksize Option
RFC2349 - TFTP Timeout Interval and Transfer Size Options
RFC3617 - Uniform Resource Identifier (URI) Scheme and Applicability
Statement for the Trivial File Transfer Protocol (TFTP)

It supports the following unofficial TFTP Options as described at
http://www.compuphase.com/tftp.htm:

blksize2 - Block size restricted to powers of 2, excluding protocol headers
rollover - Block counter roll-over (roll back to zero or to one)

From the tftp program point of view the following things are changed:

- New commands: "blocksize", "blocksize2", "rollover" and "options"
- Development features: "debug" and "packetdrop"

If you try this tftp/tftpd implementation, please let me know if
it works (or doesn't work) and against which implementaion so I can
get a list of confirmed working systems.

Author: Edwin Groothuis <edwin@FreeBSD.org>


206040 01-Apr-2010 des

Forgot to initialize the debug variable.

MFC after: 2 weeks


206038 01-Apr-2010 des

Add a debugging option (-d)
Add a -k option which fingerd(8) passes through to finger(1).

MFC after: 2 weeks


205656 25-Mar-2010 delphij

Check that gl_pathc is bigger than zero before derefencing gl_pathv.
When gl_pathc == 0, the content of gl_pathv is undefined.

PR: bin/144761
Submitted by: David BERARD <contact davidberard fr>
Obtained from: OpenBSD
MFC after: 1 week


205606 24-Mar-2010 gahr

- Remove const'ness from dlerror(3) prototype, for consistency with POSIX.

Approved by: cognet
MFC after: 1 week


205076 12-Mar-2010 uqs

Fix several typos in macros or macro misusage.

Found by: make manlint
Reviewed by: ru
Approved by: philip (mentor)


204687 04-Mar-2010 imp

Updated rtld for n32 support.

Submitted by: jmallet@
Obtained from: NetBSD


204352 26-Feb-2010 ru

Fixed static linkage.


204211 22-Feb-2010 nwhitehorn

Support the extended PLT format used when objects have more than 8192
PLT relocations on PPC32.


203973 16-Feb-2010 imp

The NetBSD Foundation has granted permission to remove clauses 3 and 4.

Obtained from: NetBSD


203947 16-Feb-2010 marcel

Improve TLS variant I:
o Use obj->tlsinitsize to determine whether there's initialized data.
o If obj->tlssize > obj->tlsinitsize, then bzero uninitialized data.
o Don't exclude variant I from the work-around in free_tls_offset().


203698 09-Feb-2010 ed

Set ut_line to "ftpd" for ftpd.

This makes it a little easier to figure out which application was
responsible for this log entry. Ideally we should add an ut_process or
something similar.

Suggested by: Vincent Poy <vincepoy gmail com>


202756 21-Jan-2010 ed

Remove stale references to utmp(5) and its corresponding filenames.

I removed utmp and its manpage, but not other manpages referring to it.


202604 18-Jan-2010 ed

Really disable wtmp logging when chrooting.

Also perform a small cleanup to ftpd_logwtmp(). Just use a NULL
parameter for the username to indicate a logout, instead of an empty
string.

Reported by: Alexey Shuvaev <shuvaev physik uni-wuerzburg de>


202274 14-Jan-2010 ed

Phase out ttyslot(3).

The ttyslot() function was originally part for SUSv1, marked LEGACY in
SUSv2 and removed later on. This function only makes sense when using
utmp(5), because it was used to determine the offset of the record for
the controlling TTY. It makes little sense to keep it here, because the
new utmpx file format doesn't index based on TTY slots.


202210 13-Jan-2010 ed

Port all apps in libexec/ from libulog to utmpx.


202209 13-Jan-2010 ed

Port ftpd to utmpx.

Unfortunately I have to partially wreck its functionality, though. ftpd
used to keep a file descriptor to the wtmp, which allowed it to work
from within a chroot. The current utmpx implementation doesn't offer a
way to do this. Maybe we can address this in the future, if it turns out
to be a real issue.


202208 13-Jan-2010 ed

Port comsat to utmpx.

It seems comsat stats the utmpx database each 15 seconds to see whether
it has been changed. I am changing this behaviour to look at the utmpx
database upon processing. I don't want to allow direct interference with
the database files. I also wonder whether this optimization has any
measurable performance benefit nowadays.


202207 13-Jan-2010 ed

Remove `dead code' from rlogind.

- It shouldn't call logwtmp(). Applications like login(1) already make
sure both login and logout entries are written to the storage.
- There's no need to restore permissions on the pseudo-terminal, since
it should be garbage collected by the kernel.


201380 02-Jan-2010 ed

Make WARNS=6 the default for libexec/.

Just like bin/ and sbin/, I think setting WARNS to the highest value
possible will make it more attractive for people to fix warnings.

- The WARNS variable is set in the Makefile in the directory of the
application itself, making it more likely that it will be removed out
of curiosity to see what happens.
- New applications will most likely build with WARNS=6 out of the box,
because the author would more likely fix the warnings during
development than lower WARNS.

Unfortunately almost all apps in libexec require a lowered value of
WARNS.


201379 02-Jan-2010 ed

Fix several warnings.

- Add __unused keywords.
- Don't shadow a global variable called cr.
- Make the global cr variable const.


201217 29-Dec-2009 ed

ANSIfy ldconfig and the aout bits it still uses from rtld-aout.

(Why is aout support still there?)


201192 29-Dec-2009 ed

Make rpc.ruserd work with utmpx/libulog.

Because strings are now null-terminated, I've decided to just use an
array of utmpx structures, instead of the separated strings. This means
we just copy the entire utmpx structure and point to the strings within
the structures directly.


201146 28-Dec-2009 ed

Perform cleanups to rpc.rusersd:

- Perform whitespace fixes. Use tabs instead of 8 spaces.
- Make it build at WARNS=6.


201022 26-Dec-2009 ed

Modify the sources to make WARNS=6 work.


201017 26-Dec-2009 ed

Unbreak the build.

I increased the WARNS, but it looks like it breaks certain architectures
with more strict alignment requirements (mips, sparc64, ia64).

Pointy hat to: me


200983 25-Dec-2009 ed

Let talkd use utmpx instead of utmp.

Because strings are null terminated now, there is no need to copy
ut_line into a separate buffer first. Also enable WARNS.


200982 25-Dec-2009 ed

Don't use UT_NAMESIZE here to determine the maximum username length.


200085 03-Dec-2009 ed

Repair breakage to last-minute API change.

I changed ulog_log{in,out} to return a void, but forgot to change
ulog-helper as well.

Reported by: stefanf


200062 03-Dec-2009 ed

Add a new library: libulog.

One of the things I really want to do, is to get rid of the limitations
of our current utmp(5) mechanism:

- It only allows 8 byte TTY device names.
- The hostname only allows 16 bytes of storage.

I'm not a big fan of <utmpx.h>, but I think we should at least try to
add parts of it. Unfortunately we cannot implement <utmpx.h>, because we
miss various fields, such as ut_id, ut_pid, etc. The API provided by
libulog shares some similarities with <utmpx.h>, so it shouldn't be too
hard to port these applications eventually. In most simple cases, it
should just be a matter of removing the ulog_ prefix everywhere.

As a bonus, it also implements a function called ulog_login_pseudo(),
which allows unprivileged applications to write log entries, provided
they have a valid file descriptor to a pseudo-terminal master device.

libulog will allow a smoother transition to a new file format by adding
a library interface to deal with utmp/wtmp/lastlog files. I initially
thought about adding the functionality to libutil, but because I'm not
planning on keeping this library around forever, we'd better keep it
separated.

Next items on the todo list:

1. Port applications in the base system (and ports) to libulog, instead
of letting them use <utmp.h>.
2. Remove <utmp.h>, implement <utmpx.h> and reimplement this library on
top.
3. Port as many applications as possible back to <utmpx.h>.


199979 01-Dec-2009 cperciva

Fix local root vulnerability.

Security: Advisory will be coming soon.
X-MFC-After: 30 seconds


199877 28-Nov-2009 kib

Allow to load not-openable dso when tracing. This fixes ldd on such dso or
dso linked to non-openable object.
Remove '\n' at the end of error message.
End comments with dot.

MFC after: 3 weeks (together with r199829)


199829 26-Nov-2009 kib

Implement rtld part of the support for -z nodlopen (see ld(1)).

Reviewed by: kan
MFC after: 3 weeks


199828 26-Nov-2009 kib

Flag controlling origin expansion in DT_FLAGS is DF_ORIGIN, not DF_1_ORIGIN.

Reviewed by: kan
MFC after: 3 days


199270 14-Nov-2009 rwatson

Fix white space in rtld runtime error printf.

MFC after: 3 days


197931 10-Oct-2009 kib

Calculate relocation base for the main object, and apply the relocation
adjustment for all virtual addresses encoded into the ELF structures of
it. PIE binary could and should be loaded at non-zero mapbase.

For sym_zero pseudosymbol used as a return value from find_symdef()
for undefined weak symbols, st_value also should be adjusted, since
_rtld_bind corrects symbol values by relocbase.

Discussed with: bz
Reviewed by: kan
Tested by: bz (i386, amd64), bsam (linux)
MFC after: some time


197808 06-Oct-2009 rwatson

In rtld's map_object(), use pread(..., 0) rather than read() to read the
ELF header from the front of the file. As all other I/O on the binary
is done using mmap(), this avoids the need for seek privileges on the
file descriptor during run-time linking.

MFC after: 1 month
Sponsored by: Google


197531 26-Sep-2009 des

printerr_reply() has never been used for as long as we've had this code in
our tree (13+ years). This is an excellent argument for aggressive use
of "static".


197508 25-Sep-2009 des

Other minor style issues.


197506 25-Sep-2009 des

Slight style cleanup.


196787 03-Sep-2009 remko

Do the first step in removing lukemftpd from the base system. Disconnect
it from the build.

If you are using the FTP daemon, please consider using the port ftp/tnftpd
which is the same FTP server, but newer and might have more/better
functionality.

This results in us providing only one ftp daemon by default.

Reviewed by: bz
Approved by: imp (mentor, implicit)
MFC after: 3 days
Silence from: obrien


195745 17-Jul-2009 kib

Implement RTLD_NOLOAD flag for dlopen(3).

Requested and tested by: jkim
Reviewed by: kan
Approved by: re (kensmith)


195743 17-Jul-2009 kib

Only perform .bss mapping and cleaning operations when segment file size
is not equal to its memory size.

This eliminates unneeded clearing of the text segment that often
happens due to text end not being page-aligned.

For instance,
$ readelf -l /lib/libedit.so.6
Program Headers:
Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
LOAD 0x000000 0x00000000 0x00000000 0x139e1 0x139e1 R E 0x1000
LOAD 0x014000 0x00014000 0x00014000 0x00f04 0x00f14 RW 0x1000
DYNAMIC 0x014cc4 0x00014cc4 0x00014cc4 0x000d0 0x000d0 RW 0x4
$ procstat -v $$ (for /bin/sh)
68585 0x28097000 0x280aa000 r-x 6 0 21 14 CN vn /lib/libedit.so.6
68585 0x280aa000 0x280ab000 r-x 1 0 1 0 CN vn /lib/libedit.so.6 <==
68585 0x280ab000 0x280ac000 rwx 1 0 1 0 CN vn /lib/libedit.so.6
Note the splitted map entry marked by '<=='.

Reviewed by: kan
Approved by: re (kensmith)
MFC after: 1 month


195697 14-Jul-2009 kan

Second attempt at eliminating .text relocations in shared libraries
compiled with stack protector.

Use libssp_nonshared library to pull __stack_chk_fail_local symbol into
each library that needs it instead of pulling it from libc. GCC
generates local calls to this function which result in absolute
relocations put into position-independent code segment, making dynamic
loader do extra work every time given shared library is being relocated
and making affected text pages non-shareable.

Reviewed by: kib
Approved by: re (kib)


195152 29-Jun-2009 kan

Back out previous revision until better tested fix is ready.

Approved by: re (impliciti, by approving previos check-in)


195151 28-Jun-2009 kan

Eliminate .text relocations in shared libraries compiled with stack protector.

Use libssp_nonshared library to pull __stack_chk_fail_local symbol into
each library that needs it instead of pulling it from libc. GCC generates
local calls to this function which result in absolute relocations put into
position-independent code segment, making dynamic loader do extra work everys
time given shared library is being relocated and making affected text pages
non-shareable.

Reviewed by: kib
Approved by: re (kensmith)


194705 23-Jun-2009 ed

Fix a typo in the same comment, one line below.

Submitted by: bf1783 googlemail com


194689 23-Jun-2009 ed

Fix typo in comment.

Submitted by: Christoph Mallon


194531 20-Jun-2009 kan

Allow order of initialization of loaded shared objects to be
altered through their .init code. This might happen if init
vector calls dlopen on its own and that dlopen causes some not
yet initialized object to be initialized earlier as part of that
dlopened DAG.

Do not reset module reference counts to zero on final fini vector
run when process is exiting. Just add an additional parameter to
force fini vector invocation regardless of current reference count
value if object was not destructed yet. This allows dlclose called
from fini vector to proceed normally instead of failing with handle
validation error.

Reviewed by: kib
Reported by: venki kaps


194298 16-Jun-2009 kan

FreeBSD returns main object handle from dlopen(NULL, ...) calls.
dlsym seaches using this handle are expected to look for symbol
definitions in all objects loaded at the program start time along
with all objects currently in RTLD_GLOBAL scope.

Discussed with: kib
Reported by: Maho NAKATA
MFC after: 2 weeks


192922 27-May-2009 dfr

Increase the size of the static TLS area slightly (required for the NVidia's
OpenGL driver on amd64).


192776 26-May-2009 dougb

Per the man page:
The makekey utility has been deprecated and will be removed in a future
release of FreeBSD.

Actually removing it was approved back on 10/29/2007 by re (kensmith) but
I dropped the ball on actually removing it. It's doubtful that it's become
more relevant/useful in the intervening time.


191517 26-Apr-2009 ed

Remove empty directories from the HEAD.

Discussed with: developers, imp


191303 20-Apr-2009 rwatson

Prefer <sys/param.h> to <machine/param.h> for the definition of
CACHE_LINE_SIZE.

Submitted by: bde
MFC after: 2 weeks


191292 19-Apr-2009 rwatson

Explicitly include machine/param.h for CACHE_LINE_SIZE.

MFC after: 2 weeks


191291 19-Apr-2009 rwatson

Now that the kernel defines CACHE_LINE_SIZE in machine/param.h, use
that definition in the custom locking code for the run-time linker
rather than local definitions.

Pointed out by: tinderbox
MFC after: 2 weeks


190885 10-Apr-2009 kib

Currently, when mapping an object, rtld reserves the whole address space
for the mapping by the object' file with the protection and mode of
the first loadable segment over the whole region. Then, it maps other
segments at the appropriate addresses inside the region.

On amd64, due to default alignment of the segments being 1Gb, the
subsequent segment mappings leave the holes in the region, that usually
contain mapping of the object' file past eof. Such mappings prevent
wiring of the address space, because the pages cannot be faulted in.

Change the way the mapping of the ELF objects is constructed, by first
mapping PROT_NONE anonymous memory over the whole range, and then
mapping the segments of the object over it. Take advantage of this new
order and allocate .bss by changing the protection of the range instead
of remapping.

Note that we cannot simply keep the holes between segments, because
other mappings may be made there. Among other issues, when the dso is
unloaded, rtld unmaps the whole region, deleting unrelated mappings.

The kernel ELF image activator does put the holes between segments, but
this is not critical for now because kernel loads only executable image
and interpreter, both cannot be unloaded. This will be fixed later, if
needed.

Reported and tested by: Hans Ottevanger <fbsdhackers beasties demon nl>
Suggested and reviewed by: kan, alc


190883 10-Apr-2009 kib

Update comment to the reality, rtld supports any number of loadable segments.
Fix spacing.

Reviewed by: kan


190828 07-Apr-2009 obrien

Move variable externs into extern.h so they are checked against the definitions.


190673 03-Apr-2009 kib

Allow the NULL, RTLD_SELF and RTLD_NEXT handles to work with dlfunc(3).
dlfunc() called dlsym() to do the work, and dlsym() determines the dso
that originating the call by the return address. Due to this, dlfunc()
operated as if the caller is always the libc.

To fix this, move the dlfunc() to rtld, where it can call the internal
implementation of dlsym, and still correctly fetch return address.
Provide usual weak stub for the symbol from libc for static binaries.
dlfunc is put to FBSD_1.0 symver namespace in the ld.so export to
override dlfunc@FBSD_1.0 weak symbol, exported by libc.

Reported, analyzed and tested by: Tijl Coosemans <tijl ulyssis org>
PR: standards/133339
Reviewed by: kan


190624 01-Apr-2009 kib

Document RTLD_NODELETE, -z nodelete and -z origin support.


190601 31-Mar-2009 cognet

Use RTF_LLDATA.


190543 30-Mar-2009 kib

Implement support for RTLD_NODELETE flag for dlopen() and -z nodelete
static linker option. Do it by incrementing reference count on the loaded
object and its dependencies.

Reviewed by: davidxu, kan


190505 28-Mar-2009 kib

Do not dereference NULL pointer. refobj is NULL for the objects that are
preloaded.

Reported and tested by: ed


190324 23-Mar-2009 delphij

Support for a new environment variable, LD_ELF_HINTS_PATH for overriding
the rtld hints file. This environment variable would be unset if the
process is considered as tainted with setuid/setgid. This feature gives
a convenient way of using a custom set of shared library that is not
located in the default location and switch back.

Feature requested by: iXsystems
Original patch by: John Hixson
MFC after: 2 weeks


189959 18-Mar-2009 kib

Implement the dynamic string token substitution in the rpath and
soneeded pathes. The $ORIGIN, $OSNAME, $OSREL and $PLATFORM tokens
are supported. Enabling the substitution requires DF_ORIGIN flag in
DT_FLAGS or DF_1_ORIGIN if DF_FLAGS_1, that may be set with -z origin
gnu ld flag. Translation is unconditionally disabled for setuid/setgid
processes.

The $ORIGIN translation relies on the AT_EXECPATH auxinfo supplied
by kernel.

Requested by: maho
Tested by: maho, pho
Reviewed by: kan


188895 21-Feb-2009 ru

Fix build when WITH_SSP is set explicitly.

Submitted by: Jeremie Le Hen


187913 30-Jan-2009 maxim

o Fix typo: indentical -> identical.

PR: docs/131149
Submitted by: Patrick Oonk
MFC after: 1 week


187366 17-Jan-2009 ed

Fix handling of pts(4) device names in comsat(8). Also catch fork() errors.

Pseudo-terminals allocated with posix_openpt(2) will have more slashes
in their path names than comsat(8) allows, so allow slashes when the
character device name starts with "pts/".

This patch is loosely based on NetBSD's changes, revision 1.33. Because
it also included the changes to fork(), I imported them here as well.
Maybe we could import even more fixes from the other BSD's?

Original commit message from the NetBSD folks:

PR/30170: Markus W Kilbinger: src/libexec/comsat complains
about: '/' in "/dev/pts/1"

Reported by: Robert Huff <roberthuff rcn com>


186405 23-Dec-2008 cperciva

Prevent cross-site forgery attacks on ftpd(8) due to splitting
long commands into multiple requests. [08:12]

Avoid calling uninitialized function pointers in protocol switch
code. [08:13]

Merry Christmas everybody...

Approved by: so (cperciva)
Approved by: re (kensmith)
Security: FreeBSD-SA-08:12.ftpd, FreeBSD-SA-08:13.protosw


186119 15-Dec-2008 qingli

This main goals of this project are:
1. separating L2 tables (ARP, NDP) from the L3 routing tables
2. removing as much locking dependencies among these layers as
possible to allow for some parallelism in the search operations
3. simplify the logic in the routing code,

The most notable end result is the obsolescent of the route
cloning (RTF_CLONING) concept, which translated into code reduction
in both IPv4 ARP and IPv6 NDP related modules, and size reduction in
struct rtentry{}. The change in design obsoletes the semantics of
RTF_CLONING, RTF_WASCLONE and RTF_LLINFO routing flags. The userland
applications such as "arp" and "ndp" have been modified to reflect
those changes. The output from "netstat -r" shows only the routing
entries.

Quite a few developers have contributed to this project in the
past: Glebius Smirnoff, Luigi Rizzo, Alessandro Cerri, and
Andre Oppermann. And most recently:

- Kip Macy revised the locking code completely, thus completing
the last piece of the puzzle, Kip has also been conducting
active functional testing
- Sam Leffler has helped me improving/refactoring the code, and
provided valuable reviews
- Julian Elischer setup the perforce tree for me and has helped
me maintaining that branch before the svn conversion


185558 02-Dec-2008 kib

Provide custom simple allocator for rtld locks in libthr. The allocator
does not use any external symbols, thus avoiding possible recursion into
rtld to resolve symbols, when called.

Reviewed by: kan, davidxu
Tested by: rink
MFC after: 1 month


185369 27-Nov-2008 kib

Add two rtld exported symbols, _rtld_atfork_pre and _rtld_atfork_post.
Threading library calls _pre before the fork, allowing the rtld to
lock itself to ensure that other threads of the process are out of
dynamic linker. _post releases the locks.

This allows the rtld to have consistent state in the child. Although
child may legitimately call only async-safe functions, the call may
need plt relocation resolution, and this requires working rtld.

Reported and debugging help by: rink
Reviewed by: kan, davidxu
MFC after: 1 month (anyway, not before 7.1 is out)


184935 13-Nov-2008 ed

Convert telnetd(8) to use posix_openpt(2).

Some time ago I got some reports MPSAFE TTY broke telnetd(8). Even
though it turned out to be a different problem within the TTY code, I
spotted a small issue with telnetd(8). Instead of allocating PTY's using
openpty(3) or posix_openpt(2), it used its own PTY allocation routine.
This means that telnetd(8) still uses /dev/ptyXX-style devices.

I've also increased the size of line[]. Even though 16 should be enough,
we already use 13 bytes ("/dev/pts/999", including '\0'). 32 bytes gives
us a little more freedom.

Also enable -DSTREAMSPTY. Otherwise telnetd(8) strips the PTY's pathname
to the latest slash instead of just removing "/dev/" (e.g. /dev/pts/0 ->
0, instead of pts/0).

Reviewed by: rink


184638 04-Nov-2008 des

Whitespace and style fixes, build at WARNS level 6.

MFC after: 3 weeks


183841 13-Oct-2008 imp

This code has no copyright. It is fairly obvious to me that we're a
derivitive of NetBSD's mips_reloc.c, so pull in the copyright notice
from there.

Also, a minor tweak to load/store pointers. Other changes from NetBSD
likely would be useful too...

Obtained from: NetBSD


183739 10-Oct-2008 imp

MFp4: Fix a bug in the mips relocation code that prevents shared images
from working.

From p4 filelog of the upstream file in p4

//depot/projects/mips2-jnpr/src/libexec/rtld-elf/mips/reloc.c
... #6 change 140737 edit on 2008/04/27 by gonzo@gonzo_jeeves (text+ko)

o Looks like handler for R_MIPS_REL32 brought by CS 137942
is broken for tradmips. Code from NetBSD's
libexec/ld.elf_so/arch/mips/mips_reloc.c works just fine.

... #3 change 137942 edit on 2008/03/17 by rrs@rrs-mips2-jnpr (text+ko)

Any relocation symbol lookup if its 0. It looks like
this is the way the compiler indicates you need to
look in another shared library. When we hit these
as we relocate a object we will do the symbol
lookups and setup the relocation table with the
right value.

Submitted by: rrs@, gonzo@


183737 10-Oct-2008 kan

Allow strong symbols to override weak ones for lookups done through
dlsym with RTLD_NEXT/RTLD_SELF handles.

Allow symbols from ld-elf.so to be located this way too.

Based on report and original patch from sobomax@.


183242 21-Sep-2008 sam

add new build knobs and jigger some existing controls to improve
control over the result of buildworld and installworld; this especially
helps packaging systems such as nanobsd

Reviewed by: various (posted to arch)
MFC after: 1 month


183061 16-Sep-2008 davidxu

Allow multiple locks to be acquired by detecting corresponding
bit flag, otherwise if a thread acquired a lock, another thread
or the current thread itself can no longer acquire another lock
because thread_mask_set() return whole flag word, this results
bit leaking in the word and misbehavior in later locking and
unlocking.


182698 03-Sep-2008 kan

Make sure internal rtld malloc routines are not called from unlocked
contexts as rtld's malloc is not thread safe and is only supposed to be
called with exclusive bind lock already held.

The originating PR submitted a patch on top of different pre-requisite
workaroud for unsafe dlopen calls, and the patch was midief slighlty to apply
to stock sources for the purpose of this commit. Running rtld malloc from
unlocked contexts is a bug on its own.

PR: 126950
Submited by: Oleg Dolgov


182105 24-Aug-2008 ed

Remove the now unneeded pt_chown utility.

Before we had a posix_openpt() that allocated PTY's with proper
permissions in place, we used this set-uid utility to change the
ownership of PTY slave devices to the real user ID of the process. This
utility was used to implement grantpt().

In my first designs of the MPSAFE TTY layer, I replaced this by adding
an ioctl() called TIOCGRANTPT, which was used to change the ownership.
I left the pt_chown utility, because older C libraries needed it to work
properly.

After some discussions back in June I changed the PTY code to set
permissions properly upon creation. Fortunately the previous grantpt()
implementation changed permissions by hand when pt_chown is not
installed, which always succeeds. This means grantpt() still works
properly, even though the set-uid utility is missing.

I've done tests with FreeBSD 5.2.1, FreeBSD 6.3 and FreeBSD 7.0 jails.
All of them still work if I remove pt_chown.

Reviewed by: philip (ex-mentor)


181269 04-Aug-2008 cperciva

Mark functions as __dead2 in order to help the LLVM static checker
understand which code paths aren't possible.

This commit eliminates 117 false positive bug reports of the form
"allocate memory; error out if pointer is NULL; use pointer".


180012 25-Jun-2008 ru

Enable GCC stack protection (aka Propolice) for userland:
- It is opt-out for now so as to give it maximum testing, but it may be
turned opt-in for stable branches depending on the consensus. You
can turn it off with WITHOUT_SSP.
- WITHOUT_SSP was previously used to disable the build of GNU libssp.
It is harmless to steal the knob as SSP symbols have been provided
by libc for a long time, GNU libssp should not have been much used.
- SSP is disabled in a few corners such as system bootstrap programs
(sys/boot), process bootstrap code (rtld, csu) and SSP symbols themselves.
- It should be safe to use -fstack-protector-all to build world, however
libc will be automatically downgraded to -fstack-protector because it
breaks rtld otherwise.
- This option is unavailable on ia64.

Enable GCC stack protection (aka Propolice) for kernel:
- It is opt-out for now so as to give it maximum testing.
- Do not compile your kernel with -fstack-protector-all, it won't work.

Submitted by: Jeremie Le Hen <jeremie@le-hen.org>


179710 10-Jun-2008 jhb

Use sysctl to fetch stats from the kernel instead of reading variables
directly via libkvm.

PR: kern/122875, bin/123014
Tested by: Danny Braniss danny cs.huji.ac.il
MFC after: 1 week


179012 15-May-2008 bms

Make the meaning of the %A format specifier, as passed to
LD_TRACE_LOADED_OBJECTS_FMT[12], more obvious for users like me.


178828 07-May-2008 dfr

Fix conflicts after heimdal-1.1 import and add build infrastructure. Import
all non-style changes made by heimdal to our own libgssapi.


178807 06-May-2008 kib

Fix the problem with the C++ exception handling for the multithreaded
programs.

From the PR description:
The gcc runtime's _Unwind_Find_FDE function, invoked during exception
handling's stack unwinding, is not safe to execute from within multiple
threads. FreeBSD' s dl_iterate_phdr() however permits multiple threads
to pass through it though. The result is surprisingly reliable infinite
looping of one or more threads if they just happen to be unwinding at
the same time.

Introduce the new lock that is write locked around the dl_iterate_pdr,
thus providing required exclusion for the stack unwinders.

PR: threads/123062
Submitted by: Andy Newman <an at atrn org>
Reviewed by: kan
MFC after: 2 weeks


177924 04-Apr-2008 imp

MFp4: Add mips support for dynamic linking.

This code came from the merged mips2 and Juniper mips repositories.
Warner Losh, Randall Seager, Oleksandr Tymoshenko and Olivier Houchard
worked to merge, debug and integrate this code. This code may also
contain code derived from NetBSD.


177626 26-Mar-2008 brueffer

Fix some "in in" typos in comments.

PR: 121490
Submitted by: Anatoly Borodin <anatoly.borodin@gmail.com>
Approved by: rwatson (mentor), jkoshy
MFC after: 3 days


174128 01-Dec-2007 rwatson

For un-prototyped static inline functions declared in pthread_md.h on
sparc64, use ANSI function headers and specifically indicate the lack of
arguments with 'void'. Otherwise, warnings are generated at WARNS=3 for
libkse, leading to a compile failure with -Werror.


173854 23-Nov-2007 edwin

Add "with" to make the line go smoother.


173852 23-Nov-2007 edwin

Add the -W options, which acts the same as -w but will generate
unique names based on the submitted filename, a strftime(3) format
string and a two digit sequence number.

By default the strftime(3) format string is %Y%m%d (YYYYMMDD), but
this can be changed by the -F option.

PR: bin/106049 (based on patch in that PR)
Approved by: grog@ (mentor)


173745 19-Nov-2007 jb

Include an extra header to get a function prototype.


173220 31-Oct-2007 yar

Add a hackish knob to skip rtld, NO_RTLD. In conjunction with
src/Makefile.inc1 rev. 1.590, it can allow installing a world
cross-built for a different arch over the live system. The procedure
is more or less as follows:

cp -R /rescue /rescue.old
make installkernel TARGET_ARCH=foo
make -DNO_RTLD installworld TARGET_ARCH=foo
^^^^^^^^^
PATH=/rescue.old
chflags noschg /libexec/ld-elf.so.1
cp /usr/obj/foo/usr/src/libexec/rtld/ld-elf.so.1 /libexec
chflags schg /libexec/ld-elf.so.1
<ditto for ld-elf32.so.1 if installing for amd64>
reboot


172708 16-Oct-2007 marius

- Fix the handling of R_SPARC_OLO10, which is a bit of a special case
in the way we implement handling of relocations.
As for the kernel part this fixes the loading of lots of modules,
which failed to load due to unresolvable symbols when built after
the GCC 4.2.0 import. This wasn't due to a change in GCC itself
though but one of several changes in configuration done along the
import. Specfically, HAVE_AS_REGISTER_PSEUDO_OP, which causes GCC
to denote global registers used for scratch purposes and in turn
GAS uses R_SPARC_OLO10 relocations for, is now defined.
While at it replace some more ELF_R_TYPE which should have been
ELF64_R_TYPE_ID but didn't cause problems so far.
- Sync a sanity check between kernel and rtld(1) and change it to be
maintenance free regarding the type used for the lookup table.
- Sprinkle const on lookup tables.
- Use __FBSDID.

Reported and tested by: yongari
MFC after: 5 days


172402 01-Oct-2007 ru

Fixed static linkage (build with -DNO_SHARED).

Approved by: re (kensmith)


171562 24-Jul-2007 delphij

Stop mentioning /usr/X11R6.

Approved by: re (hrs)


171462 15-Jul-2007 marcel

Unbreak the dynamic linker by not creating a cache for rtld-elf
itself. It needs mmap(2), which now needs getosreldate(3) and
which in turn uses a global variable to cache the result. This
cannot be done before linking is done.

See also: ../sparc64/reloc.c:1.15
Approved by: re (kensmith)


171432 13-Jul-2007 kensmith

Cache does not serve any purpose when rtld is relocating itself, do
not bother allocating one.

Submitted by: kan
Approved by: re (bmah)


171385 11-Jul-2007 kan

Add r_debug_state to the list of symbols exported from rtld. GDB needs to
be able to find it in order to trap shared library events from rtld.

Approved by: re (rwatson)


171195 04-Jul-2007 scf

Significantly reduce the memory leak as noted in BUGS section for
setenv(3) by tracking the size of the memory allocated instead of using
strlen() on the current value.

Convert all calls to POSIX from historic BSD API:
- unsetenv returns an int.
- putenv takes a char * instead of const char *.
- putenv no longer makes a copy of the input string.
- errno is set appropriately for POSIX. Exceptions involve bad environ
variable and internal initialization code. These both set errno to
EFAULT.

Several patches to base utilities to handle the POSIX changes from
Andrey Chernov's previous commit. A few I re-wrote to use setenv()
instead of putenv().

New regression module for tools/regression/environ to test these
functions. It also can be used to test the performance.

Bump __FreeBSD_version to 700050 due to API change.

PR: kern/99826
Approved by: wes
Approved by: re (kensmith)


171173 03-Jul-2007 mlaier

Link pf 4.1 to the build:
- move ftp-proxy from libexec to usr.sbin
- add tftp-proxy
- new altq mtag link

Approved by: re (kensmith)


170881 17-Jun-2007 yar

Note PAM support in atrun(8).
Sort FILES section while there.
Touch document date.


170773 15-Jun-2007 yar

Add PAM support to atrun(8).


170769 15-Jun-2007 yar

Actually use new features of perr() and perrx().


170768 15-Jun-2007 yar

Catch up with perr() becoming variadic.


170767 15-Jun-2007 yar

Make perr() variadic and add perrx() to use in cases where
errno is irrelevant. Some code duplication can be reduced
if perr() is variadic and perrx() is available.


170741 14-Jun-2007 yar

Use a single setusercontext(3) instead of a bunch of basic syscalls.
Besides aesthetic benefits, that makes at(1) jobs subject to such
login.conf(5) settings as resource limits.


170739 14-Jun-2007 yar

Spotted another copy of the loony error message.


170728 14-Jun-2007 yar

Fix an error message that was beside the point.


170726 14-Jun-2007 yar

Fix a typical off-by-one error that can result in an unterminated string:

strncpy(dst, src, sizeof(dst));

by substituting the safer strlcpy() for strncpy().

X-Security: none (the source string isn't user-supplied)


170240 03-Jun-2007 bz

Correct a typo.

PR: 106049
Submitted by: edwin (as part of a larger patch)


169663 17-May-2007 csjp

Update the man page to reflect that certain variables will be unset in
the case that the program is set-user-ID or set-group-ID. Add missing
annotations for LIBMAP and LIBMAP_DISABLE.


169661 17-May-2007 csjp

In the event a process is tainted (setuid/setgid binaries), un-set any
potentially dangerous environment variables all together. It should be
noted that the run-time linker will not honnor these environment variables
if the process is tainted currently. However, once a child of the tainted
process calls setuid(2), it's status as being tainted (as defined by
issetugid(2)) will be removed. This could be problematic because
subsequent activations of the run-time linker could honnor these
dangerous variables.

This is more of an anti foot-shot mechanism, there is nothing I am
aware of in base that does this, however there may be third party
utilities which do, and there is no real negative impact of clearing
these environment variables.

Discussed on: secteam
Reviewed by: cperciva
PR: kern/109836
MFC after: 2 weeks


169630 16-May-2007 marcel

Don't enable symbol versioning on ia64 for now. It causes
symbol lookup failures that later result in null-pointer
dereferences. This needs looking into, but since we're
close to release it's possible that it's not resolved before
that time.


169629 16-May-2007 marcel

We don't need --export-dynamic for ld-elf.so.1, because it's a
shared object.


169524 13-May-2007 deischen

Enable symbol versioning by default. Use WITHOUT_SYMVER to disable it.
Warning, after symbol versioning is enabled, going back is not easy
(use WITHOUT_SYMVER at your own risk).

Change the default thread library to libthr.

There most likely still needs to be a version bump for at least the
thread libraries. If necessary, this will happen later.


169501 12-May-2007 pav

Remove %m formatter, it's ifdef 0'ed in the code from the very beginning

MFC after: 1 week


169500 12-May-2007 pav

Expand documentation for LD_TRACE_LOADED_OBJECTS_FMT? variables

PR: docs/66265 (inspired by)
Submitted by: Michel Lavondes <fox@vader.aacc.cc.md.us>
MFC after: 1 week


169276 05-May-2007 davidxu

Fix a TLS memory leak.

PR: threads/112297
MFC: 1 week


169177 01-May-2007 ache

Back out all POSIXified *env() changes.

Not because I admit they are technically wrong and not because of bug
reports (I receive nothing). But because I surprisingly meets so
strong opposition and resistance so lost any desire to continue that.

Anyone who interested in POSIX can dig out what changes and how
through cvs diffs.


169171 01-May-2007 deischen

Catch up with the private namespace change (s/FBSDprivate/FBSDprivate_1.0).


169121 30-Apr-2007 ache

Prepare for upcoming POSIXed putenv() rewrite:
don't allow putenv() arg be on the stack, replace putenv() with setenv()


169095 29-Apr-2007 kan

Retire rtld-specific Versions.def. Symbols exported by rtld are supposed
to override weak symbols exported by libc, so by definition these two
are using the same symbol version names.

Reflect the reality by referring to libc's Versions.def directly.


169093 29-Apr-2007 deischen

Give the private version namespace a number to match libc.


169092 29-Apr-2007 deischen

Use C comments since we now preprocess these files with CPP.


168899 20-Apr-2007 trhodes

Remove references to S/Key and list OPIE.


168871 19-Apr-2007 yar

Reword the description of the UTF8 option (-8) so I can swear
to myself that I understand it.

Bump document date.


168849 18-Apr-2007 yar

Add support for RFC 2389 (FEAT) and RFC 2640 (UTF8) to ftpd(8).

The support for RFC 2640 (UTF8) is optional and rudimentary.
The server just advertises its capability to handle UTF-8 file
names and relies on its own 8-bit cleanness, as well as on
the backward compatibility of UTF-8 with ASCII. So uploaded
files will have UTF-8 names, but the initial server contents
should be prepared in UTF-8 by hand, no on-the-fly conversion
of file names will be done.

PR: bin/111714
Submitted by: Zhang Weiwu <see email in the PR>
MFC after: 1 week


168558 09-Apr-2007 kan

Bring rtld exports in line with corresponding symbols exported from
libc.

Disable SYMVER_DEFAULT n rtld until its implications are understood
better.


168480 07-Apr-2007 kan

Remove reference to FBSDprivate version. We do not use it in this
module yet.


168479 07-Apr-2007 kan

Catch up on rtld's special status. Since it does not appear on
main object list, its versioning information needs to be examined
separately.

This hopefully fixes problems that people running with SYMVER_ENABLED
are experiencing.


168319 03-Apr-2007 kan

Prepare rtld for symbol versioning. Disable it by default for now.


168312 03-Apr-2007 kan

Implement dl_iterate_phdr function.
Convert boolean flags in internal Obj_Entry structure into bitfields.
Properly check for loaded segment alignment in map_object.


168311 03-Apr-2007 kan

Use u_int for variable manipulated by atomic ops to match atomic
ops function prototypes.


166598 09-Feb-2007 yar

Let automatic TCP send buffer sizing do its job for ftpd(8): stop
setting the SO_SNDBUF socket option. Using a hard-coded value for
it was a poor idea anyway in the face of diverse network conditions.


166205 23-Jan-2007 jhb

Document LD_UTRACE.

MFC after: 3 days


165916 09-Jan-2007 jhb

Add various utrace's for use with ktrace to the ELF runtime linker. To
activate the traces, set the LD_UTRACE (or LD_32_UTRACE) environment
variable. This also includes code in kdump(8) to parse the traces.

Reviewed by: kan, jdp
MFC after: 2 weeks


163118 08-Oct-2006 kmacy

Fix TLS on sparc64 for statically and dynamically linked binaries
Approved by: rwatson (mentor)
Reviewed by: jmg and marcel


162449 19-Sep-2006 jkim

Clean up white spaces and fix style(9).


162438 19-Sep-2006 kib

Fix the buggy rev. 1.117. dagmembers are only initialized for dlopen'ed
dso that are actually loading. If dso a.so depends on b.so, then dlsym
with handle from dlopen("b.so") will fail unconditionally.

Correct implementation shall use the Obj_Entry.needed list to walk
dependencies DAG.

Test provided by: jkim
Tested (prev. version) by: jkim, Nicolas Blais <nb_root at videotron ca>, h.blanke at chello nl
Pointy hat to: kib
Approved by: kan (mentor)


162387 17-Sep-2006 ru

Markup fixes.


162156 08-Sep-2006 kib

When looking up the symbol by dlsym, look it not only in the object
given as dso handle, but also in the implicit dependencies of that dso.

Also, const-ify the read-only parameter objlist of symlook_list.

Reported by: "Simon 'corecode' Schubert" <corecode at fs ei tum de>
Approved by: kan (mentor)
X-MFC-After: 6.2


161800 01-Sep-2006 marcel

Fix the variant I allocation for KSE: Allow a larger TCB and assume
that the documented TCB is at the tail of the extended TCB. In other
words, the base of the TCB has a negative offset from the TLS.


161799 01-Sep-2006 marcel

o Fix the static TLS relocation. We were subtracting the size of
the TCB.
o Use NULL for null pointer argument.
o Replace magic 8 with TLS_TCB_SIZE.


161798 01-Sep-2006 marcel

Use NULL for null-pointer argument.


161783 31-Aug-2006 marcel

Replace magic 16 with TLS_TCB_SIZE.


161772 31-Aug-2006 obrien

Not needed any more, vendor sources have PAM support.


161769 31-Aug-2006 obrien

Catch up with the import of ftpd.c rev 1.1.1.6.


161768 31-Aug-2006 obrien

FreeBSD doesn't have the simple pidfile(3), so craft it using FreeBSD's
primitives.


161728 30-Aug-2006 marcel

Prevent dead code elimination for the TP assignmient by using inline
assembly.


161683 28-Aug-2006 dougb

1. Attempt to take one bullet out of the foot-shooting gun by silently
ignoring errors when sourcing rc.conf* files. The most common error
occurs when users put a command of some sort into those files.
(ifconfig is a popular choice)

2. Make the file rotation logic simpler by starting one down from
the "top" of the list, rather than at the top.

3. Try to make file rotation more secure by calling unlink(1) on all
new file names before rotating an old file to the new name, rather than
merely calling 'rm -f' on any files that exceed the number of files
to save.


161526 22-Aug-2006 ru

Remove alpha left-overs.


161046 07-Aug-2006 yar

- Improve and extend mark-up.
- Don't use full path in .Nm (we just don't do that).
- Correct some frivolous and poorly rendering language,
such as using possessive case for .Nm or .Fl .
- Use the same capitalization for "user ID" as in setuid(2) and getuid(2).
- Bring SEE ALSO in accord with the text.

MFC after: 5 days


160969 04-Aug-2006 delphij

In symlook_obj(): fix _rtld_error output.

MFC After: 2 weeks


160866 31-Jul-2006 yar

inetd and telnetd are not included in the standard release
crunched floppies, but they can be included as options in
src/release/picobsd (omitted by default though.) Therefore
preserve the RELEASE_CRUNCH knob in their Makefiles, but
tell its real purpose in a comment.


160854 31-Jul-2006 yar

Stop enforcing dependencies between MK_* options at Makefile level.
All the dependencies are satisfied now in <bsd.own.mk>.


160853 31-Jul-2006 yar

telnetd(8) doesn't really go to the crunched floppies,
so its Makefile needn't test for RELEASE_CRUNCH.

Suggested by: ru


160778 28-Jul-2006 yar

The lukemftpd code depends on INET6. Therefore MK_INET6_SUPPORT
should be respected.


160743 27-Jul-2006 yar

Respect MK_INET6_SUPPORT.
Apply style.Makefile(5).


160742 27-Jul-2006 yar

Cook CFLAGS by the modern recipe:
- use WARNS;
- respect MK_INET6_SUPPORT.


159276 05-Jun-2006 yar

Fix compilation of ftpcmd.y without -DINET6.
Respect MK_INET6_SUPPORT in Makefile.

Requested by: Attila Nagy <bra at fsn dot hu>
MFC after: 1 week


157261 29-Mar-2006 des

*thwack*! all the world's not i386.

Pointy hat to: des


157220 28-Mar-2006 des

Don't use dbg if it isn't defined (such as when this file is used by
code outside of rtld-elf)


157219 28-Mar-2006 des

Use C99's varadic macro syntax instead of gcc's.


157199 28-Mar-2006 davidxu

Er, forgot to clear tls space to zero for Variant II.


157198 28-Mar-2006 davidxu

Allocate space for thread pointer, this allows thread library to access
its pointer from begin, and simplifies _get_curthread() in libthr.


157169 27-Mar-2006 pav

- Document LD_32_* environment variables
- Mention 32-bit files in FILES section

MFC after: 1 week


156813 17-Mar-2006 ru

Reimplementation of world/kernel build options. For details, see:

http://lists.freebsd.org/pipermail/freebsd-current/2006-March/061725.html

The src.conf(5) manpage is to follow in a few days.

Brought to you by: imp, jhb, kris, phk, ru (all bugs are mine)


156156 01-Mar-2006 ume

- Reduce needless DNS query by lookup only appropriate address
family. [1]
- Specify appropriate hints to getaddrinfo(3). [1]
- Obtain address family from peername in inet mode.

Submitted by: Rostislav Krasny <rosti.bsd__at__gmail.com> [1]
Tested by: yar, Rostislav Krasny <rosti.bsd__at__gmail.com>
MFC after: 1 week


155084 31-Jan-2006 peter

Fix a malloc overrun in 32-bit compat libmap lookup code.


154997 29-Jan-2006 yar

Touch .Dd because the last commit was content-related.


154958 28-Jan-2006 marcel

s/DT_IA64_PLT_RESERVE/DT_IA_64_PLT_RESERVE/


154957 28-Jan-2006 marcel

s/R_IA64_/R_IA_64_/


154634 21-Jan-2006 yar

In the daemon code, check for and report possible errors
from accept(2) and fork(2). Also close all unneeded fds
in the child process, namely listening sockets for all
address families and the fd initially obtained from accept(2).
(The main ftpd code operates on stdin/stdout anyway as it
has been designed for running from inetd.)

MFC after: 5 days


154631 21-Jan-2006 yar

The daemon's child shouldn't go on with the for loop
over ctl_sock's -- it is solely the parent daemon's
job. So just break out of the loop in the child.

MFC after: 5 days


154630 21-Jan-2006 yar

Use pidfile(3) provided by libutil to manage the deamon's pid file.

By default, create a pid file at the standard location, /var/run/ftpd.pid,
in accord with the expected behavior of a stock system daemon.

MFC after: 5 days


154491 17-Jan-2006 marcel

s/R_IA64_/R_IA_64_/g as per the ia64 psABI.


154248 12-Jan-2006 jasone

In preparation for a new malloc implementation:

* Add posix_memalign().

* Move calloc() from calloc.c to malloc.c. Add a calloc() implementation in
rtld-elf in order to make the loader happy (even though calloc() isn't
used in rtld-elf).

* Add _malloc_prefork() and _malloc_postfork(), and use them instead of
directly manipulating __malloc_lock.

Approved by: phk, markm (mentor)


153893 30-Dec-2005 ceri

Don't be sexist - fix a typo.


153706 24-Dec-2005 trhodes

Make tv_sec a time_t on all platforms but alpha. Brings us more in line with
POSIX. This also makes the struct correct we ever implement an i386-time64
architecture. Not that we need too.

Reviewed by: imp, brooks
Approved by: njl (acpica), des (no objects, touches procfs)
Tested with: make universe


153703 24-Dec-2005 kan

Make lookups for relocations from old unversioned binaries return
oldest versioned symbol available. Do not accept hidden symbols for
all other versions.

Use "<obj->path>: <error message>" for all error messages in new
functions to make them more consistent.


153686 23-Dec-2005 kan

Remove debugging statement that slipped into lone of the previous commits
unintentionally.


153648 22-Dec-2005 kan

Initialize object dagmembers list before checking version dependencies.


153515 18-Dec-2005 kan

Implement ELF symbol versioning using GNU semantics. This code aims
to be compatible with symbol versioning support as implemented by
GNU libc and documented by http://people.redhat.com/~drepper/symbol-versioning
and LSB 3.0.

Implement dlvsym() function to allow lookups for a specific version of
a given symbol.


153504 18-Dec-2005 marcel

Make our ELF64 type definitions match standards. In particular this
means:
o Remove Elf64_Quarter,
o Redefine Elf64_Half to be 16-bit,
o Redefine Elf64_Word to be 32-bit,
o Add Elf64_Xword and Elf64_Sxword for 64-bit entities,
o Use Elf_Size in MI code to abstract the difference between
Elf32_Word and Elf64_Word.
o Add Elf_Ssize as the signed counterpart of Elf_Size.

MFC after: 2 weeks


153503 18-Dec-2005 marcel

Explicitly cast ELF_R_TYPE() to the right type.


152320 11-Nov-2005 jhb

Fix a bug in dlinfo(RTLD_DI_SERINFOSIZE) requests. For each search path
we included the length of the path in the returned size but not the length
of the associated Dl_serpath structure. Without this fix, programs
attempting to allocate a structure to hold the search path information
would allocate too small of a buffer and rtld would overrun the buffer
while filling it via a subsequent RTLD_DI_SERINFO request.

Submitted by: "William K. Josephson" wkj at morphisms dot net
Reviewed by: jdp
MFC after: 2 weeks


151326 14-Oct-2005 ru

Style: move .PATH to where it belongs.


147673 29-Jun-2005 peter

Clean out the leftovers from the i386_set_gsbase() TLS conversion.

Like on libthr, there is an i386_set_gsbase() stub implementation here
to avoid libc.so.5 issues. This should likely be a weak symbol and I
expect this will be fixed soon.

Approved by: re


147365 14-Jun-2005 ru

Removed trailing whitespace.

Approved by: re (blanket)


147364 14-Jun-2005 ru

Bump document date on behalf of a recent change.

Approved by: re (blanket)


147270 10-Jun-2005 nectar

Remove rexecd(8), a server that implements a particularly insecure
method of executing commands remotely. There are no rexec clients in
the FreeBSD tree, and the client function rexec(3) is present only in
libcompat. It has been documented as "obsolete" since 4.3BSD, and its
use has been discouraged in the man page for over 10 years.


147225 10-Jun-2005 des

Remove kludges intended to support src trees with partial obj trees.

Discussed with: ru


146968 04-Jun-2005 marius

MFNetBSD: src/libexec/ld.elf_so/arch/sparc64/mdreloc.c 1.26 (partial)

Fix an obvious bug in the 64-bit PLT fixup: the SLLX was by 12 bits, when
it should be 32.

MFC after: 1 month


146886 02-Jun-2005 marcel

Fix the load64 and store64 macros, created to handle 8-byte unaligned
loads and stores (resp.) The ldq_u and stq_u instruction mask off the
lower 3 bits of the final address before loading from or storing to
the address, so as to avoid unaligned loads and stores. They do not
themselves allow loads from or stores to unaligned addresses. Replace
the macro definitions by a packed struct dereference.

Submitted by: Richard Henderson (rth at twiddle dot net)


146827 31-May-2005 maxim

o Missed colon in getopt(3) argument makes tftpd(8) crash. Fix that.

PR: misc/81732
Submitted by: Denis Grudkin
MFC after: 2 weeks


146672 27-May-2005 eivind

Fixup of last commit: Use the name X instead of XFree86 for the server binary,
thus being compatible with both XFree86 and X.org.

Noticed by: danfe


146666 27-May-2005 eivind

Make the example for using xterm as a login manager to match the X of the
noughties, not eighties.


146370 19-May-2005 dfr

Align the stack to a 16 byte boundary before calling _rtld so that we can
safely initialise shared libraries that use SSE in their init sections.

MFC After: 1 week


146341 18-May-2005 keramida

Switch to WARNS=2 instead of tinkering directly with CFLAGS (level 2 was
picked because higher warn levels are broken for ftp-proxy at the moment).

Approved by: mlaier


146286 16-May-2005 obrien

Enable lukemftpd for 6.0-RELEASE.


146187 13-May-2005 ume

NI_WITHSCOPEID cleanup. Neither RFC 2553 nor RFC 3493 defines
NI_WITHSCOPEID, and our getaddrinfo(3) does nothing special
for it, now.


146075 11-May-2005 jmallett

Spell SHUT_RDWR as SHUT_RDWR not 2 as the how argument to shutdown(2).


146074 11-May-2005 jmallett

Spell SHUT_RDWR as SHUT_RDWR not 1+1 as the how argument to shutdown(2).


145967 06-May-2005 delphij

Prevent usage of nested externs.


145593 27-Apr-2005 davidxu

Fix compilation problem.


145568 26-Apr-2005 peter

Stop calling _amd64_set_gsbase() for COMPAT_32BIT. The amd64 kernel
implements i386_set_gsbase(), so there is no need for the variation.


145177 17-Apr-2005 das

s/int/size_t/ as appropriate.

Noticed by: bde


145038 14-Apr-2005 peter

Attempt to use i386_set_gsbase(), and gracefully fall back to LDT methods
if the direct access methods are not implemented.


144889 11-Apr-2005 dougb

The script mistakenly ignores the entropy_save_sz variable from
rc.conf[.local]. Fix this, and leave the default as 2048.

Update the copyright year to include the present.

Update the assignment of the copyright to be me personally,
instead of "The FreeBSD Project" which is not a legal entity,
and therefore not a proper assignee. My intention remains the
same however, that this code continue to be BSD licensed, and
freely available to anyone that wants it under those terms.

PR: conf/75722
Submitted by: Nicolas Rachinsky <list@rachinsky.de>


144795 08-Apr-2005 des

Revert parts of previous commits and use a temporary variable to avoid
an invalid type pun.


144764 07-Apr-2005 cognet

No need to provide atomic_cmpset_32() anymore.


144754 07-Apr-2005 nectar

An array was mistaken for a pointer in the previous commit.

Noticed by: tinderbox, stefanf
Pointy hat to: nectar


144716 06-Apr-2005 stefanf

Include gettytab.h before extern.h so that the declarations of struct
gettyflags, gettynums and gettystrs are available.


144680 05-Apr-2005 nectar

Correct type mismatch introduced in last commit.

Noticed by: Steve Kargl <sgk@troutmask.apl.washington.edu>


144668 05-Apr-2005 nectar

DES pointed out that the PAM layer may change the target user name
during authentication. Thus we need to call getpwnam *after* the user
has been authenticated. Colin mentioned that we should also move the
check for root in that case.


144326 30-Mar-2005 dfr

When allocating TLS and DTV, make sure that any unused slots in the DTV
are initialised to zero. When freeing TLS, don't attempt to free DTV
slots which were not used.

Pointed out by: Joerg Sonnenberger
X-MFC-After: After the branch, probably


144180 27-Mar-2005 nectar

When PAM support was added to rexecd in revision 1.29 (just prior to
5.0-RELEASE), a visually elusive bug was introduced. A comparison
operator was changed to assignment. As a result, rexecd behaved
always as if the `-i' option had been specified. It would allow root
logins. This commit corrects the situation in the obvious way.

A separate bug was introduced at the same time. The PAM library
functions are called between the invocation of getpwnam(3) and the use
of the returned static object. Since many PAM library functions
result in additional getpwnam(3) calls, the contents of the returned
static object could be changed from under rexecd. With this commit,
getpwnam_r(3) is used instead.

Other PAM-using applications should be reviewed for similar errors in
getpw* usage.

Security: rexecd's documented default policy of disallowing root
logins was not enforced.
Reviewed by: cperciva


144062 24-Mar-2005 cperciva

If "dangerous" environment variables (LD_PRELOAD, LD_LIBMAP,
LD_LIBMAP_DISABLE, LD_LIBRARY_PATH) are used, then make sure the
libraries being loaded aren't on a noexec-mounted filesystem.

This is a compromise position: I'm assuming that nobody will be silly
enough to set the noexec mount flag on part of the default library
path, in order to avoid adding extra overhead into the common case
(where those environment variables aren't used).

Discussed with: csjp, secteam
MFC after: 1 week


143907 21-Mar-2005 das

Use sysconf(_SC_ARG_MAX) instead of NCARGS.


143893 20-Mar-2005 davidxu

Add locking code for tls routines.


143107 03-Mar-2005 ru

Install rlogind(8). Pointy hat is available on request.


143026 02-Mar-2005 trhodes

Wrap BSD r* commands in NO_RCMDS.
Change NO_RCMDNS to NO_RCMDS and do the switch in bsd.compat.mk.

Discussed with: ru, nectar


142900 01-Mar-2005 ume

correct WARNS=6 fix to use cast to (void *).
use of struct sockaddr_strage * is thought as not good manner. :)


142645 27-Feb-2005 dfr

Attempt to free any static TLS space used by a shared library when it
is unloaded. This allows applications which load and unload libraries
like libGL.so.1 several times to work properly.

MFC after: 2 days


142593 26-Feb-2005 cognet

Only provide the dummy, non-atomic atomic_cmpset_32() if
ARM_HAS_ATOMIC_CMPSET_32 isn't defined.


142329 23-Feb-2005 des

If what we have is a struct sockaddr_storage * and what we want is a
struct sockaddr_storage *, there's no point in casting it prematurely
to a struct sockaddr *. This unbreaks WARNS=6 on sparc64.


142317 23-Feb-2005 des

Make WARNS=6-clean.


141967 16-Feb-2005 yar

Add some consistency checks to the signal-related code.

MFC: along with rev. 1.202


141966 16-Feb-2005 yar

A call to maskurg() makes sense only when a transfer is under way,
the function will emit an annoying log message otherwise.

Reported by: kris
MFC: along with rev. 1.202


141922 14-Feb-2005 stefanf

- Use socklen_t.
- No need for 'fromlen' to have file scope.
- Remove an unused variable.


141918 14-Feb-2005 stefanf

Fix most cases where the address of an int is passed to a function expecting a
socklen_t * argument.


141851 13-Feb-2005 ru

Expand contractions.


141846 13-Feb-2005 ru

Expand *n't contractions.


141589 09-Feb-2005 ru

Sync program's usage() with manpage's SYNOPSIS.


141588 09-Feb-2005 ru

Removed Kerberos remnants.


141585 09-Feb-2005 ru

The only user of this utility (share/man/man0) was removed 2+ years ago.


141232 04-Feb-2005 mdodd

Description from Dan:

Another handy libmap patch. Lets you do stuff like this:

LD_LIBMAP="libpthread.so.1=libthr.so.1" mythreadedapp

If you already have a program-specific override in libmap.conf, note
that you must use a program-specific override in LD_LIBMAP:

LD_LIBMAP="[mythreadedapp],libpthread.so.1=libthr.so.1" mythreadedapp

PR: bin/74471
Submitted by: Dan Nelson <dnelson AT allantgroup.com>
MFC after: 2 weeks


141230 04-Feb-2005 mdodd

style(9)


140941 28-Jan-2005 ru

Let bsd.prog.mk set SRCS and MAN to their default values.


140473 19-Jan-2005 yar

Respect the `logging' flag.

Pointed out by: Nick Leuta
MFC after: 3 days


140472 19-Jan-2005 yar

Improve handling SIGURG and OOB commands on the control channel.

The major change is to process STAT sent as an OOB command w/o
breaking the current data transfer. As a side effect, this gives
better error checking in the code performing data transfers.

A lesser, but in no way cosmetic, change is using the flag `recvurg'
in the only signal-safe way that has been blessed by SUSv3. The
other flag, `transflag,' becomes private to the SIGURG machinery,
serves debugging purposes only, and may be dropped in the future.

The `byte_count' global variable is now accounting bytes actually
transferred over the network. This can give status messages looking
strange, like "X of Y bytes transferred," where X > Y, but that has
more sense than trying to compensate for combinations of data formats
on the server and client when transferring ASCII type data. BTW,
getting the size of a file in advance is unreliable for a number of
reasons in the first place. See question 18.8 of the Infrequently
Asked Questions in comp.lang.c for details.

PR: bin/52072
Tested by: Nick Leuta (earlier versions), a stress-testing tool (final)
MFC after: 1 month


140414 18-Jan-2005 ru

Sort sections.


140241 14-Jan-2005 delphij

64-bit clean + WARNS=6:
- Convert the (char *) cast+cast backs magic to
memcpy(3). Without this, the resulting code
is potentially risky with higher optimization
levels.
- Avoid same name when calling local variables,
as well as global symbols. This reduces
confusion for both human and compiler.
- Add necessary casts, consts
- Use new style function defination.
- Minor style.Makefile(5) tweak
- Bump WARNS?= from 0 to 6

** for the aout code: changes are intentionally limited
to ease maintaince.


140072 11-Jan-2005 trhodes

Restore these files to make ldconfig(8) happy.


140038 11-Jan-2005 trhodes

Remove a.out runtime linker. It doesn't build and was removed from the
build over two years ago by peter.

The binary a.out version of ld.so can be obtained from misc/compat22 or
src/lib/compat/compat22.

Discussed on: -arch
Voted yes: jhb, ru, linimon, delphij


139981 10-Jan-2005 yar

Replace err(3) calls when in daemon mode by syslog(3), too.
A daemon has no stderr to send its complains to.

Pointed out by: Nick Leuta
MFC after: 1 week


139126 21-Dec-2004 ru

NOPAM -> NO_PAM


139115 21-Dec-2004 ru

NOINET6 -> NO_INET6


139113 21-Dec-2004 ru

NOCRYPT -> NO_CRYPT


139106 21-Dec-2004 ru

NODOCCOMPRESS -> NO_DOCCOMPRESS
NOINFO -> NO_INFO
NOINFOCOMPRESS -> NO_INFOCOMPRESS
NOLINT -> NO_LINT
NOPIC -> NO_PIC
NOPROFILE -> NO_PROFILE


139103 21-Dec-2004 ru

Start the dreaded NOFOO -> NO_FOO conversion.

OK'ed by: core


138911 16-Dec-2004 yar

Do a small style(9) fix before I'm hacking the code itself.


138910 16-Dec-2004 yar

free(3) is void already.


138747 12-Dec-2004 yar

Never emit a message to stderr: use syslog instead.
When in inetd mode, this prevents bogus messages from
appearing on the control channel. When running as a
daemon, we shouldn't write to the terminal we used to
have at all.

PR: bin/74823
MFC after: 1 week


138023 23-Nov-2004 cognet

Implement a dummy atomic_cmpset_32(). It should be safe to use it in rtld as
the signals are masked anyway.


137987 22-Nov-2004 yar

When looking for a virtual host to handle the connection,
stop the search on the first match for efficiency.

Submitted by: Nick Leuta


137986 22-Nov-2004 yar

Calling pam_chauthtok() isn't really needed since
an FTP user has no chance to change password anyway.

Submitted by: Nick Leuta


137985 22-Nov-2004 yar

Don't log the chroot dir on every command since it's constant for a session.
Log it once at the beginning of the session instead. OTOH, log wd each
time for the sake of better auditing and consistent log format.

Proposed by: Nick Leuta <skynick -at- mail.sc.ru>


137984 22-Nov-2004 yar

Always log remote IP.

PR: bin/59773


137983 22-Nov-2004 yar

Treat host name buffers consistently.


137862 18-Nov-2004 yar

Make chrootdir global and use it in log messages
regarding restricted users.

MFC after: 2 weeks


137861 18-Nov-2004 yar

Nitpicking on style(9) and whitespace.

Tested with: md5(1)


137859 18-Nov-2004 yar

Use __FBSDID.


137853 18-Nov-2004 yar

Don't say, "file: permission denied," if the operation
is disabled entirely.


137852 18-Nov-2004 yar

Use uniform punctuation, capitalization, and language style
in server messages wherever this doesn't contradict to a particular
message format.


137851 18-Nov-2004 yar

Apply __printflike() to the appendf() prototype so the compiler
can detect format errors.


137850 18-Nov-2004 yar

Fix perror_reply() vs. reply() usage.


137849 18-Nov-2004 yar

'\n' needs not to appear in reply() strings.


137848 18-Nov-2004 yar

Log pathname arguments to ftp commands as the user specified them;
add the working directory pathname to the log message if any of
such arguments isn't absolute. This has advantage over the old
way of logging that an admin can see what users are actually trying
to do, and where. The old code was also not too robust when it
came to a chrooted session and an absolute pathname.

Pointed out by: Nick Leuta
MFC after: 2 weeks


137847 18-Nov-2004 yar

Use S_ISDIR() macro instead of a hand-rolled test.


137839 18-Nov-2004 yar

getcwd() won't leave a error string in the buffer, unlike getwd().


137830 17-Nov-2004 yar

Use POSIX functions instead of legacy ones:
getwd() -> getcwd()
wait3() -> waitpid()


137811 17-Nov-2004 yar

Kill more unneeded casts found.

Noticed by: Nick Leuta <skynick -at- mail.sc.ru> (some of them)


137785 16-Nov-2004 jhb

Remove 80386 support from the ELF run time linker.


137729 15-Nov-2004 yar

Don't invent ways of capitalization orthogonal to the English grammar.


137728 15-Nov-2004 yar

RFC 959 states that the following codes should be used
for status replies on file system objects:

212 Directory status.
213 File status.

Reported by: Oleg Koreshkov <okor -at- zone.salut.ru>
MFC after: 1 week


137705 14-Nov-2004 ru

So do it like we do in usr.bin/tip/tip/Makefile. ;)


137703 14-Nov-2004 schweikh

Revert previous commit. As ru explains:

In the old world (as the surrounding comment in makefile says), there
was the /usr/libexec/ld-elf.so.1 binary which is now a symlink to
/libexec/ld-elf.so.1. To symlink, we need to make sure that the
_target_ (and the target is /usr/libexec/ld-elf.so.1) doesn't have
"schg" flag set. A real solution is to protect the chflags call only if
target exists, like we do in usr.bin/tip/tip/Makefile.

Requested by: ru


137688 14-Nov-2004 schweikh

Avoid an (ignored) error by invoking chflags on the link target, not the
symlink.

PR: kern/73016
Submitted by: John E. Hein <jhein@timing.com>
MFC after: 1 week


137675 13-Nov-2004 bz

Add knob NO_NIS (fka NO_YP_LIBC) and make world compileable when set.
If turned on no NIS support and related programs will be built.

Lost parts rediscovered by: Danny Braniss <danny at cs.huji.ac.il>
PR: bin/68303
No objections: des, gshapiro, nectar
Reviewed by: ru
Approved by: rwatson (mentor)
MFC after: 2 weeks


137660 13-Nov-2004 yar

Using off_t to pass a block size is obvious overkill.
The size_t type is better suited for that, particularly because
the "blksize" argument is to be passed to malloc() and read().
On 64-bit archs it's more to a style issue, but the good style
of coding in C is also important.


137659 13-Nov-2004 yar

Kill ancient casts to integral types left from the K&R era.
They're unneeded and sometimes erroneous now.


137619 12-Nov-2004 jhb

Remove these unused files before any other archs include the same bogus
file.


137293 06-Nov-2004 peter

The 32 bit compatability ld-elf32.so.1 cannot use i386_set_ldt() when
running on an amd64 kernel. Use the recently exposed direct %fs/%gs set
routines instead for the TLS setup of 32 bit binaries.


137164 03-Nov-2004 ru

Introduce the PRECIOUSPROG knob in bsd.prog.mk, similar
to PRECIOUSLIB from bsd.lib.mk. The side effect of this
is making installing the world under jail(8) possible by
using another knob, NOFSCHG.

Reviewed by: oliver


137145 03-Nov-2004 yar

Fix logxfer() by using realpath(3) instead of playing with getwd(3).
Previously logxfer() used to record bogus pathnames to the log
in some cases, namely, when cwd was / or "name" was absolute.

Noticed by: Nick Leuta
MFC after: 2 weeks


137132 02-Nov-2004 yar

Replace the last occurence of (long long) and %qd with
(intmax_t) and %jd, which is the right way to printf
an off_t in the presence of <stdint.h>.

Submitted by: Nick Leuta


137122 02-Nov-2004 ssouhlal

Implement TLS relocations for powerpc.

Approved by: grehan (mentor)


137121 02-Nov-2004 ssouhlal

Do the TLS offset allocations before relocations, as otherwise there
can be overlap in the TLS offsets, if the relocations are done in a
certain order.

Approved by: dfr, grehan (mentor)


137108 01-Nov-2004 yar

OpenPAM allows passing a NULL "pamh" to pam_strerror() to indicate
that the creation of a PAM context has failed.

N.B. This does not apply to pam_strerror() in RELENG_4, it
will mishandle a NULL "pamh".

Discussed with: des


137078 30-Oct-2004 yar

- Stop shadowing global "pamh" by a local variable in auth_pam().
- Stop calling pam_strerror() with NULL pamh.
- Add a missing call to pam_end().

PR: bin/59776
Submitted by: Nick Leuta <see PR for email>
MFC after: 2 weeks


137076 30-Oct-2004 yar

Describe the semantics of the sgetpwnam() helper function
in the comment above it so that nobody will save pointers
returned inside "struct passwd" across the calls to the function.


136929 24-Oct-2004 yar

Log the actual number of bytes sent on the wire to /var/log/ftpd
instead of the disk size of the file sent. Since the log file
is intended to provide data for anonymous ftp traffic accounting,
the disk size of the file isn't really informative in this case.

PR: bin/72687
Submitted by: Oleg Koreshkov
MFC after: 1 week


136910 24-Oct-2004 ru

For variables that are only checked with defined(), don't provide
any fake value.


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.


136556 15-Oct-2004 yar

We must not fall back to the old way (read-write)
if sendfile() transferred some data before throwing
a error condition because sendfile() won't move the
file offset for read() to start from.

MFC after: 2 weeks


136555 15-Oct-2004 yar

Clean-up around sendfile(): drop an excessive check for error condition.


136554 15-Oct-2004 yar

Account for the fact that sendfile(2) may hit the end of file
prematurely, e.g., if the file has been truncated by someone else.

PR: bin/72649
Submitted by: Oleg Koreshkov (portions)
MFC after: 2 weeks


136196 06-Oct-2004 schweikh

Correct grammos. Added BUGS: may mishandle nonstandard manual pages,
especially third party junk^Wpages, like emulators/mtools(1) and friends.


135941 29-Sep-2004 imp

Report once that the device isn't there, but keep trying. Don't
filter the errno values. They don't make as much sense as they used
to given how we do devices in /dev.


135883 28-Sep-2004 cognet

Don't try to relocate the dynamic loader in reloc_non_plt(). It has already
been done before.


135882 28-Sep-2004 cognet

Use add instead of saving the sp in a register.


135738 24-Sep-2004 maxim

Indent.


135737 24-Sep-2004 maxim

o Merge rev. 1.5 libexec/ftpd/ftpd.c from DragonflyBSD:

Do not unconditionally fork() after accept(). accept() can
return -1 due to an interrupted system call (i.e. SIGCHLD).
If we fork in that case ftpd can get into an
accept()/SIGCHLD/fork/[fail]/repeat loop.

Reported-by: fabian <fabian.duelli@bluewin.ch>

Obtained from: DragonflyBSD
MFC after: 1 month


135680 23-Sep-2004 cognet

Add stubs for TLS.
Arbitraly choose the 2nd variant until I figure out which one I should use.


135571 22-Sep-2004 trhodes

Remove named-xfer, it does not exist in BIND 9.


135549 21-Sep-2004 des

Switch from BIND 8 to BIND 9.

Submitted by: (in part) dougb@, trhodes@
Reviewed by: dougb@, trhodes@, re@
MFC after: 5 days


134102 21-Aug-2004 maxim

Avoid accidental use of ANSI C trigraphs.

Spotted by: Pawel Worach
Obtained from: NetBSD (rev. 1.11, 1.13)


134094 21-Aug-2004 obrien

Add some details about our wonderful system.


133941 18-Aug-2004 obrien

Turn on the FreeBSD login user capabilities database support.


133862 16-Aug-2004 marius

Instead of "OpenFirmware", "openfirmware", etc. use the official spelling
"Open Firmware" from IEEE 1275 and OpenFirmware.org (no pun intended).

Ok'ed by: tmm


133196 06-Aug-2004 cperciva

Join the 21st century: Cryptography is no longer an optional component
of releases. The -DNOCRYPT build option still exists for anyone who
really wants to build non-cryptographic binaries, but the "crypto"
release distribution is now part of "base", and anyone installing from a
release will get cryptographic binaries.

Approved by: re (scottl), markm
Discussed on: freebsd-current, in late April 2004


133133 04-Aug-2004 dfr

Add stubs for powerpc TLS.

Submitted by: ssouhlal


133063 03-Aug-2004 dfr

Add support for Thread Local Storage.


132932 31-Jul-2004 yar

ftpd(8) seems to be WARNS=2 clean now.

Tested on: i386, ia64, amd64, sparc64, alpha


132931 31-Jul-2004 yar

Change ``(foo *)0'' to ``NULL'' where it's possible
(and it appears possible throughout ftpd(8) source.)

It is not a mere issue of style: Null pointers in C
seem to have been mistaken one way or another quite often.


132930 31-Jul-2004 yar

Kill a small herd of casts to off_t where they were not needed.
Thank Fortune, the C compiler can figure out by itself the proper
conversion for assignments, comparisons, and prototyped function
arguments.


132929 31-Jul-2004 yar

Printf(3) off_t values through conversion to intmax_t since
we've got <stdint.h> et al now. (This makes ftpd(8) WARNS=2 clean.)


132926 31-Jul-2004 yar

Kill an unused variable (heading to WARNS=2.)


132925 31-Jul-2004 yar

Convert a couple of bogus null statements to the right form.
(Heading to WARNS=2.)


132894 30-Jul-2004 yar

Ditto for (gid_t).


132893 30-Jul-2004 yar

Kill casts to (uid_t) obviously left from the K&R era.
Prototyping library functions in header files has rendered
them superfluous.


132891 30-Jul-2004 yar

Add a comment to explain that the loop around the call to bind(2)
is not a hack, but it has a clear purpose.


132889 30-Jul-2004 yar

Open a socket for a data transfer in active mode using euid
of the current user, not root. This will allow neat things
like matching anonymous FTP data traffic with a single ipfw(8)
rule:
ipfw add ... tcp from any to any uid ftp

Note that the control connection socket still belongs to the
user ftpd(8) was started from, usually root.

PR: bin/65928
Submitted by: Eugene Grosbein <eugen at grosbein.pp.ru>
MFC after: 1 month


132848 29-Jul-2004 kan

Call nmatch function with parameters casted to types the function actually
expects.


131990 11-Jul-2004 stefanf

Fix a few cases that relied on 'implicit int' (constraint violation in C99).


131754 07-Jul-2004 ru

mdoc(7) fixes.


131575 04-Jul-2004 stefanf

Consistently use __inline instead of __inline__ as the former is an empty macro
in <sys/cdefs.h> for compilers without support for inline.


131505 03-Jul-2004 ru

Deal with double whitespace.


131487 02-Jul-2004 ru

Mechanically kill hard sentence breaks.


131472 02-Jul-2004 ru

Removed trailing whitespace.


131358 30-Jun-2004 csjp

The call to setuid(2) subsequently causes setgroups(2) to fail. setgroups(2)
requires super-user access in order to complete successfully.
Move setgroups(2) to execute before setuid(2) so that it is successful.


131091 25-Jun-2004 phk

Nuke COMPAT_43


130839 21-Jun-2004 brian

Call tzset() at startup.

Submitted by: Andrzej ToboÃ…a <ato@iem.pw.edu.pl>


130834 21-Jun-2004 brian

o Reduce path names in RRQ and WRQ packets by:

Reducing "/+./" strings to "/"
Reducing "/[^/]+/../" to "/"

o Don't send an OACK when the result of the [RW]RQ is an error.

These changes allow tftpd to interact with pxelinux.bin from the syslinux
package.

Whilst the path reducing code doesn't properly handle situations where the
path component before the "/../" is a symlink to (say) ".", I would suggest
that it does the right thing in terms of the clients perception of what
their path string actually represents. This seems better than using
realpath() and breaking environments where symlinks point outside of the
directory hierarchy that tftpd is configured to allow.


130661 18-Jun-2004 tmm

Fix the problem that surfaced with the new binutils import on sparc64
(and that is for now being worked around by a binutils patch).

The rtld code tested &_DYNAMIC against 0 to see whether rtld itself
was built as PIC or not. While the sparc64 MD code did not rely
on the preset value of the GOT slot for _DYNAMIC any more due
to previous binutils changes, it still used to not be 0, so
that this check did work. The new binutils do however initialize
this slot with 0. As a consequence, rtld would not properly initialize
itself and crash.
Fix that by introducing a new macro, RTLD_IS_DYNAMIC, to take the role
of this test. For sparc64, it is implemented using the rtld_dynamic()
code that was already there. If an architecture does not provide its
own implementation, we default to the old check.

While being there, mark _DYNAMIC as a weak symbol in the sparc64
rtld_start.S. This is needed in the LDSCRIPT case, which is however
not currently supported for want of an actual ldscript.

Sanity checked with md5 on alpha, amd64, i386 and ia64.


130649 17-Jun-2004 cognet

This comment should have been removed in the previous commit.

Spotted out by: marcus, simon


130646 17-Jun-2004 cognet

Woohoo !
the latest binutils import mades this gross hack useless, so just remove it.


130635 17-Jun-2004 obrien

Commit a crude hack so we get sparc64 snapshots working again with a
stable ld.so. We need to revisit the rtld-elf/sparc64/rtld_start.S
rev. 1.5 and rtld-elf/sparc64/rtld_machdep.h rev. 1.5, which was
suppose to allow stock Binutils 2.13 (and later) to be used.


130622 17-Jun-2004 obrien

Fall out from Binutils 2.15: don't bulid the ld.so on Sparc64.


130496 14-Jun-2004 bms

Whitespace.


130495 14-Jun-2004 bms

Do not depend on the global 'sockt' being initialized to 0;
instead, use the symbolic constant STDIN_FILENO, as this is
a daemon invoked from inetd.
Remove 'sockt' as it is not referenced.


130428 13-Jun-2004 obrien

Simplify conditional compilation logic some.


129792 28-May-2004 eik

give out a little more information in case of a missing dependency

PR: 56549
Submitted by: edwin
Reviewed by: joerg, ru
Approved by: joerg
MFC after: 2 weeks


129683 25-May-2004 mdodd

- Close fd if fdopen(fd) fails.
- Format return () to resemble the one 5 lines up.


129680 24-May-2004 mdodd

Add two new flags: -w, which allows new files to be created,
and -U, which allows the umask to be set.

Obtained from: Patton Electronics, Co.


129658 24-May-2004 stefanf

Include <stdlib.h> for exit() and abort() prototypes.

Approved by: das (mentor)


129652 24-May-2004 stefanf

Include <netinet/in.h> for ntoh*() and hton*() prototypes.

Approved by: das (mentor)


129638 24-May-2004 mdodd

Support basename and path based constrained matches.

eg:
[foo]
...

matches any executable 'foo'

[/usr/bin/foo/]
...

matches any executable under the directory /usr/bin/foo/

Exact matches continue to function as before.

PR: bin/66769
Submitted-by: Dan Nelson


129307 16-May-2004 ru

Markup fixes.


129306 16-May-2004 ru

Markup nit.


129304 16-May-2004 ru

There's no such beast like AF_INET4, even when powered by whiskey.


129303 16-May-2004 ru

Bump document date for the latest change.
Minor markup tweaks.


129258 15-May-2004 cognet

Work around a problem somewhere with binutils (?) on arm, hopefully without
breaking any other arch this time.


129242 14-May-2004 se

Fix breakage caused by alphabetically sorting SRCS: rtld_start.S must come first!
The previous version made all shared binaries dump core.


129204 14-May-2004 cognet

Import arm bits for rtld-elf.

Obtained from: NetBSD


129170 13-May-2004 tjr

Handle variable argument lists correctly in reply() and lreply().
In particular, do not pass the same va_list to both vprintf() and
vsyslog() without first reinitializing it. This fixes ftpd -d
on amd64.


127864 04-Apr-2004 mux

Cast the terminating NULL to char * in the execl() call.

Submitted by: Stefan Farfeleder <stefan@fafoe.narf.at>


127579 29-Mar-2004 dfr

If we change obj_rtld.path after initialising __progname, make sure we
change __progname to point at the new storage otherwise it ends up
pointing at freed memory which leads to confusing garbled error messages.


127560 29-Mar-2004 pjd

Make fingerd(8) WARNS2 clean.


127254 21-Mar-2004 peter

More stack alignment fixes. Arrange so we call _rtld() in ld-elf.so.1
with the correct alignment. This is important because this calls to
library static constructors are made from here. The bug in the old crt*.s
files hid this because in this case, two wrongs do indeed make a right.
Also, call _rtld_bind() with the correct alignment, because it calls back
into the pthread library locking functions. If things happen just
the wrong way, we get a SIG10 due to the broken stack alignment.


127250 21-Mar-2004 peter

Add initial support for compiling a special 32 bit version of
ld-elf.so.1 on 64 bit systems. Most of this involves using alternate
paths, environment variables and diagnostic messages.

The build glue is seperate.


126952 14-Mar-2004 bde

Fixed a misspelling of 0 as NULL.


126756 08-Mar-2004 mlaier

Link pf to the build and install:
This adds the former ports registered groups: proxy and authpf as well as
the proxy user. Make sure to run mergemaster -p in oder to complete make
installworld without errors.

This also provides the passive OS fingerprints from OpenBSD (pf.os) and an
example pf.conf.

For those who want to go without pf; it provides a NO_PF knob to make.conf.

__FreeBSD_version will be bumped soon to reflect this and to be able to
change ports accordingly.

Approved by: bms(mentor)


126643 05-Mar-2004 markm

Make NULL a (void*)0 whereever possible, and fix the warnings(-Werror)
that this provokes. "Wherever possible" means "In the kernel OR NOT
C++" (implying C).

There are places where (void *) pointers are not valid, such as for
function pointers, but in the special case of (void *)0, agreement
settles on it being OK.

Most of the fixes were NULL where an integer zero was needed; many
of the fixes were NULL where ascii <nul> ('\0') was needed, and a
few were just "other".

Tested on: i386 sparc64


126385 28-Feb-2004 mlaier

Add skeleton build dirs for pf userland:
libexec/ftp-proxy - ftp proxy for pf
sbin/pfctl - equivalent to sbin/ipf
sbin/pflogd - deamon logging packets via if_pflog in pcap format
usr.sbin/authpf - authentification shell to modify pf rulesets

Bring along some altq headers used to satisfy pfctl/authpf compile. This
helps to keep the diff down and will make it easy to have a altq-patchset
use the full powers of pf.

Also make sure that the pf headers are installed.

This does not link anything to the build. There will be a NO_PF switch for
make.conf once pf userland is linked.

Approved by: bms(mentor)


126236 25-Feb-2004 kan

Do not depend on existence of _end symbol in obj_from_addr, use
obj->mapbase and obj->mapsize instead.

Prompted by: OpenOffice debugging session at last BSDCon.


125868 16-Feb-2004 das

Don't pass a pointer to a 'long' to a function that expects an 'int *'.

Submitted by: Roop Nanuwa <roop@hqst.com>
PR: 62615


125769 13-Feb-2004 roam

Add the '-h hostname' to usage(), too.
While I'm here, sync the usage() synopsis with the manual page synopsis:
make the [-i | -s] explicit and sort the options alphabetically.

Reminded by: ru
MFC after: 3 days


125654 10-Feb-2004 roam

Document the '-h hostname' option, which seems to have been present
ever since rev. 1.1 of bootpd.c.
While I'm here, rearrange the synopsis a bit: sort the options and
clarify that -i and -s are mutually exclusive.

Reported by: Atanas Buchvarov <nasko@nove.bg>
MFC after: 3 days


125570 07-Feb-2004 yar

NULL looks better than (char *)0 unless we're passing
an unprototyped argument to a function.


125569 07-Feb-2004 yar

Deny attempts to rename a file from guest users if the policy
says they may not modify existing files through FTP.

Renaming a file is effectively a way to modify it.
For instance, if a malicious party is unable to delete or overwrite
a sensitive file, they can nevertheless rename it to a hidden name
and then upload a troyan horse under the guise of the old file name.


125568 07-Feb-2004 yar

perror_reply() should not be used where errno isn't meaningful.


125565 07-Feb-2004 yar

Work around a bug in some clients by never returning raw directory
contents in reply to a RETR command. Such clients consider RETR
as a way to tell a file from a directory. Mozilla is an example.

PR: bin/62232
Submitted by: Bob Finch <bob+freebsd <at> nas <dot> com>
MFC after: 1 week


125503 05-Feb-2004 ru

Fixed style of DPADD and LDADD assignments as per style.Makefile(5).


125433 04-Feb-2004 ru

Removed unnecessary dependencies on librpcsvc.

Prodded by: des


125431 04-Feb-2004 ru

Put libdevstat before libkvm, because the former depends on the latter.


125428 04-Feb-2004 ru

- Added the NOPAM knob, for consistency with ${.CURDIR}/../ftpd.
- Unbreak -DNOPAM -DNOSHARED build by putting -lmd after -lopie.

(Static build with PAM remains broken.)


125397 03-Feb-2004 fjoe

Fix "warning: value computed is not used".

Found by: gcc 2.95.4 [FreeBSD]


125337 02-Feb-2004 ru

Removed duplicate -lutil.


125336 02-Feb-2004 ru

Reorder dependencies to fix static NOPAM build.

Submitted by: lorder(1)


124687 18-Jan-2004 charnier

add missing setusershell() calls.

PR: bin/2442
Reviewed by: Friedemann Becker <zxmxy33@mail.uni-tuebingen.de>


124587 16-Jan-2004 ru

- Build things in pure dictionary order (see sort(1)).

- Unify the conditional assignments section so that architectural
exclusions come first, then options and !options, sorted by the
option name, also in directory order, then architecture specific
sections, sorted by the architecture name, with i386 being a
traditional exception.

Prodded by: bde


124229 07-Jan-2004 anholt

man ftpd says that "by default, anonymous users cannot modify existing files."
However, the code did allow deletion of files. Make deleting require the -m
flag, too.

PR: bin/60809
Submitted by: Alexander Melkov <melkov@comptek.ru>


124020 31-Dec-2003 dfr

Initialise some uninitialised variables.

Thanks to: valgrind


123616 17-Dec-2003 obrien

Document what the PAM believers failed to do (and should have),
which is how to rsh as root into a machine.


123481 12-Dec-2003 peter

Fix dynamic linking a bit more.. enough that mozilla-firebird works if you
dig up the patches for amd64 support for it.

Note to self: do not put a 64 bit value in a 32 bit space.


123458 11-Dec-2003 peter

Revert last change. ../rtld.c uses CACHE_LINE_SIZE too.
Change it to 64 while here.

Reported by: ps


123437 11-Dec-2003 peter

Only define CACHE_LINE_SIZE in one place..


123436 11-Dec-2003 peter

CACHE_LINE_SIZE is 64 on athlon and amd64 chips, not 32. This should
probably be 128 since that is what the hardware prefetch fill size is
on both the p3, p4 and athlon* cpus.


122916 20-Nov-2003 sobomax

Fix a bug which causes wrong filename being written into the syslog
in the case when client sends request with RFC2347 options.

Approved by: re
MFC After: 2 weeks


122758 15-Nov-2003 harti

Replace all uses of the old netgraph constants NG_*LEN by the new
constants NG_*SIZ that include the trailing NUL byte. This change
is mostly mechanical except for the replacement of a couple of snprintf()
and sprintf() calls with strlcpy.


122751 15-Nov-2003 yar

If a file to send in ASCII mode already has CRLF as end-of-line,
don't add excessive CR on the wire.

PR: bin/59285
Submitted by: Andrey Beresovsky <and at rsu.ru>
MFC after: 1 week


122665 14-Nov-2003 tobez

Sync comment with code's reality.

MFC after: 1 week


121538 26-Oct-2003 peter

Tidy up some xdrproc_t related warnings.


121537 26-Oct-2003 peter

Pacify gcc warning with a Douglas Adams reference.


120996 11-Oct-2003 tjr

Make the warning message stand out more.


120936 09-Oct-2003 tjr

Warn users that makekey may disappear in a future release now that the
last in-tree consumer has gone.


120548 28-Sep-2003 tjr

Use the new style struct sockaddr instead of osockaddr in system calls
so that talkd works without COMPAT_43.

Obtained from: NetBSD (christos), Rumi Szabolcs


120059 14-Sep-2003 ume

Don't depend on IPv4-mapped IPv6 address to bind to both IPv4
and IPv6.

Wrote at: Hakone.
Powered by: Warner Losh's scotch whisky.
Requested by: nork


120039 13-Sep-2003 mdodd

Retire the WITH_LIBMAP compile knob; libmap is now a standard feature.


120038 13-Sep-2003 mdodd

Change libmap.c:lm_init() to return a status value; 0 for success
(libmap available) and 1 for failure. Assign this return to the
global 'libmap_disable' variable in rtld.c.

This totally prevents any libmap functions from being called after
lm_init() if no config file is present.


119975 11-Sep-2003 obrien

Deal with the LOGIN_NAME_MAX issue in the NetBSD->FreeBSD
translation^H^H^Hhack layer.


119961 10-Sep-2003 obrien

Add a dependancy on 'nbsd2fbsd.h'


119893 08-Sep-2003 ru

mdoc(7): Use the new feature of the .In macro.


119632 01-Sep-2003 kan

Eliminate last three uses of varargs.h in the tree. These three files
were including varargs.h file but did not use any of its macros,
so they escaped the clean-up before.


119602 31-Aug-2003 ceri

Add a note that the -u option can be overridden by settings in login.conf(5).

PR: docs/56017
Submitted by: Josef El-Rayes <j.el-rayes@daemon.li>


119416 24-Aug-2003 obrien

Remove a useless '/'.


119255 22-Aug-2003 imp

Very minor style nit: sort include files alphabetically.


119053 17-Aug-2003 gordon

Forgot one instance of ld-elf.so.1. Convert to ${PROG}

Pointed out by: obrien


119046 17-Aug-2003 gordon

Don't forget to honor DESTDIR. Also switch over to using PROG instead of
the binary name directly.


119044 17-Aug-2003 gordon

Don't forget to chflags noschg the existing binary so we can symlink
over it safely.

Pointed out by: yosimoto@waishi.jp


119014 17-Aug-2003 gordon

As long threatened, stage 2 of making a dynamically-linked root a reality.
Install rtld into /libexec.


119013 17-Aug-2003 gordon

Prepend /lib to the builtin library search path in rtld.


117973 24-Jul-2003 markm

Make sure that a "make release" (more accurately the bit that makes
the crunched binary) get a non-cryptographic telnet. This is overkill
in that it covers stuff that is not normally used in a crunched binary.


117953 24-Jul-2003 markm

Ensure that for the cryptographic instances of *telnet*, the "crypto"
distribution is used. This only affects release-building.


117813 20-Jul-2003 markm

Test correct macro for "without crypto" option(s).


117738 18-Jul-2003 yar

Prototype defttymode() instead of just declaring it.


117675 16-Jul-2003 markm

Very big makeover in the way telnet, telnetd and libtelnet are built.

Previously, there were two copies of telnet; a non-crypto version
that lived in the usual places, and a crypto version that lived in
crypto/telnet/. The latter was built in a broken manner somewhat akin
to other "contribified" sources. This meant that there were 4 telnets
competing with each other at build time - KerberosIV, Kerberos5,
plain-old-secure and base. KerberosIV is no longer in the running, but
the other three took it in turns to jump all over each other during a
"make buildworld".

As the crypto issue has been clarified, and crypto _calls_ are not
a problem, crypto/telnet has been repo-copied to contrib/telnet,
and with this commit, all telnets are now "contribified". The contrib
path was chosen to not destroy history in the repository, and differs
from other contrib/ entries in that it may be worked on as "normal"
BSD code. There is no dangerous crypto in these sources, only a
very weak system less strong than enigma(1).

Kerberos5 telnet and Secure telnet are now selected by using the usual
macros in /etc/make.conf, and the build process is unsurprising and
less treacherous.


117352 09-Jul-2003 yar

Block SIGURG while reading from the control channel.

Rationale:

SIGURG is configured by ftpd to interrupt system calls, which is useful
during data transfers. However, SIGURG could interrupt I/O on the
control channel as well, which was mistaken for the end of the session.

A practical example could be aborting the download of a tiny file,
when the abort sequence reached ftpd after ftpd had passed the file
data to the system and returned to its command loop.

Reported by: ceri
MFC after: 1 week


117351 09-Jul-2003 yar

Improve error handling in getline():
- always check the return value from getc(3) for EOF;
- if the attempt to read the TELNET command byte has
returned EOF, exit from the loop instead of using
the EOF value as a normal character.

MFC after: 1 week


117349 09-Jul-2003 yar

Make a malloced copy of "chrootdir" even if it points to an absolute
pathname inside "residue" so "chrootdir" can be simply freed later.

PR: bin/53435
Submitted by: Yutaka Ishihara <yutaka at fandc.co.jp>
MFC after: 1 week


117299 07-Jul-2003 gshapiro

Remove MAINTAINER= lines from individual Makefiles in favor of the
MAINTAINER file (which already had entries for sendmail).


117211 04-Jul-2003 jake

Avoid using the global offset table to get the address of _DYNAMIC in
rtld. When _DYNAMIC is referenced normally from C the global offset
table is used implicitly, but newer versions of binutils don't initialize
it statically in the binary, so this doesn't work until rtld is relocated,
which _DYNAMIC is needed for... So, as on other systems with the same
problem, we disassemble a call instruction to _DYNAMIC in order to get
its address.


116655 21-Jun-2003 yar

Don't declare unneeded extern variables,
leave alone specifying a wrong type for one of them.


116582 19-Jun-2003 mdodd

Fix warnings on 64 bit platforms.

Noticed by: jake


116568 19-Jun-2003 mdodd

Add function prototypes.


116566 19-Jun-2003 mdodd

LD_DUMP_REL_PRE and LD_DUMP_REL_POST don't output to stderr; don't
claim that they do.


116563 19-Jun-2003 mdodd

Provide a mechanism for dumping relocation information.

Setting the LD_DUMP_REL_PRE or LD_DUMP_REL_POST environment variables
cause rtld-elf to output a table of all relocations.

This is useful for debugging.


116558 19-Jun-2003 mdodd

Move MD function prototypes together.


116557 19-Jun-2003 mdodd

Fix warnings; no parameters in function prototypes.


116539 18-Jun-2003 mdodd

Avoid a NULL pointer dereference.


116533 18-Jun-2003 yar

- Use the initial terminal mode instead of the current mode
as the source of defaults for terminal device parameters.

- Do duplucate code reduction and simplification enabled by
the above.

Reviewed by: green
MFC after: 1 month


116513 18-Jun-2003 mdodd

Include libmap.h for prototypes.


116511 18-Jun-2003 mdodd

- Add support for DT_FLAGS.
- Define various things from the most recent ELF spec.


116506 17-Jun-2003 dougb

More correctly spell "-static" as "NOSHARED?=YES"


116482 17-Jun-2003 yar

Improve the manpage language a bit.
A PPP login program is started _automatically_ (i.e., without
human intervention) even with the "pl" capability unset, as soon
as a PPP frame is detected. But with "pl" set, a PPP login program
is started independently of the result of PPP detection (which is
rendered unnecessary then,) i.e. _unconditionally_.


116470 17-Jun-2003 dougb

Link named-xfer -static. This is the only binary that needs to be
statically compiled for named to work chroot'ed, and we'd like
to be able to do that from /etc/rc.d without additional user
intervention.


116439 16-Jun-2003 yar

If ftpd is run with an -h option (hide host-specific info,)
don't reveal the info in reply to the SYST command.

Get rid of using the "unix" macro at the same time. It was a rather
poor way to check if the system was Unix since there were quite a
few Unix clones out there whose cc didn't define "unix" (e.g.,
NetBSD.) It was also sensitive to the C standard used, which caused
unnecessary trouble: With -std=c99, it should have been "__unix__",
and so on.

PR: bin/50690
Submitted by: Alex Semenyaka <alexs _at_ snark.ratmir.ru>
MFC after: 1 week


116371 15-Jun-2003 jmg

fix a couple typos in the comments

From NetBSD's bootpd (in src/usr.sbin/bootp)


116370 15-Jun-2003 jmg

fix bootpd to use fd_set. For some reason on Sparc, using int with
select is broken.


116346 14-Jun-2003 obrien

Remove MAINTAINER lines.


116329 14-Jun-2003 green

In the last clean-up of this code, the fact that the default tty mode
information could only be gleaned from the the tty descriptor itself
was neglected, so never did the tty's default settings get copied from
the kernel. Specifically, this caused all manner of ctrl-keys to not
work. Fix this by calling dogettytab() in all the proper places, and
retrieving the terminfo temporarily in dogettytab().


116164 10-Jun-2003 yar

Read gettytab(5) soon enough to fill in all necessary values.
Re-read gettytab(5) only if needed.

This fixes bugs introduced as long ago as in getty/main.c rev.1.15.

PR: bin/18181
MFC after: 1 month


116155 10-Jun-2003 yar

Spot one more place where boolean variables were incremented
instead of just being assigned a truth value.


116154 10-Jun-2003 yar

Coding style fix: Use "foo = 1" instead of "foo++" to assign
the truth value to a boolean variable, especially when inside
a loop. The variable can overflow otherwise, at least in theory.


116153 10-Jun-2003 yar

Break sentences.

MFC after: 1 week


116152 10-Jun-2003 yar

General mdoc(7) markup fixes:

- Use .Va, not .Em, to mark up variable-like identifiers
(capability and database entry names.)
- Stop abusing .Tn (trademark) to emphasize general phrases.
- Spot unmarked capability references.
- Add a missing line break.

Discussed with: ru
MFC after: 1 week


116151 10-Jun-2003 yar

Improve the language and markup of the description of the pp and pl
capabilities:

- Mark up capability identifiers.
- Don't squeeze much text into the capability table given the options
will be described below in detail.
- Keep the capability table sorted.
- Use a consistent term for a PPP login program.

MFC after: 1 week


116034 08-Jun-2003 charnier

Add section number to .Xr


116033 08-Jun-2003 charnier

The .Xr utility


115940 07-Jun-2003 marcel

Don't fail if we encounter a relocation of type "none". Just ignore
it. It's a no-op relocation.

Trigger case: ports/x11-toolkits/pango


115900 06-Jun-2003 yar

Fix some minor bugs, namely:

- Initialize "rval", which would be used uninitialized
if al or pl options were set.

- Don't pass an empty string to login(1) as a user name
(this could be triggered by entering a name and then killing it
with backspace or ^U.)

- Don't loop endlessly if the al option specifies a bogus (i.e.,
not alphanumeric) auto-login name.

- Don't pass a bogus user name to login(1) if a good name were
entered and then killed with ^U.

- Exit with status 0, not 1, on receiving an EOF character,
since it's not a error condition.

MFC after: 1 week


115836 04-Jun-2003 markm

Drop MAINTAINER Bit. Not needed any more.


115814 04-Jun-2003 obrien

Set CSTD to gnu99. We can only use on of the gnu?9 C languages.
We can't use c89 due to use of 'inline', and c99 produces bad code.


115697 02-Jun-2003 ru

Assorted mdoc(7) fixes.


115669 02-Jun-2003 obrien

Best we can do with this is c89.


115668 02-Jun-2003 obrien

Include stdlib.h to get exit()'s prototype.


115667 02-Jun-2003 obrien

Add the variable's type to the declaration.


115634 01-Jun-2003 ru

Assorted mdoc(7) fixes.


115448 31-May-2003 mdodd

- use issetugid()
- be paranoid about honoring LD_LIBMAP_DISABLE.

Suggested by: rwatson


115446 31-May-2003 mdodd

Simplify map_object() by breaking out the ELF header validation bits
into a separate function.


115445 31-May-2003 mdodd

Provide function entry debugging messages.


115444 31-May-2003 mdodd

Use the environment variable LD_LIBMAP_DISABLE to disable
libmap.conf(5) functionality.


115400 30-May-2003 mdodd

Don't post-increment pointers inside a loop conditional.

While I'm here:
- Let lm_add() call strdup() on its own behalf.
- Use a temporary pointer when parsing constraints; only set the
constraint pointer on a totally successful match.

PR: bin/52783
Submitted by: David P. Reese Jr. <daver@gomerbud.com>
Approved by: re (rwatson)


115396 29-May-2003 kan

Allow threading libraries to register their own locking
implementation in case default one provided by rtld is
not suitable.

Consolidate various identical MD lock implementation into
a single file using appropriate machine/atomic.h.

Approved by: re (scottl)


115281 24-May-2003 peter

Do not exclude amd64 from rtld-elf builds.

Approved by: re (safe amd64 support commits)


115280 24-May-2003 peter

Initial pass at supporting shared libraries on amd64. There are still
a few missing relocation types in amd64/reloc.c, but I have not found
any of them in use yet. :-)

Approved by: re (amd64/* blanket)


115157 19-May-2003 des

Retire the useless NOSECURE knob.

Approved by: re (scottl)


115150 19-May-2003 mdodd

- Use xmalloc() and xstrdup() instead of malloc() and strdup().
- Add a global mapping if we have a successful constrained match.

Approved by: re


115107 17-May-2003 rwatson

Since libmap.conf is referenced in rtld.1, include it in the references
section.

Approved by: re (scottl)


115087 16-May-2003 ru

mdoc(7) police: Properly markup the previous revision.

Approved by: re (blanket)


115086 16-May-2003 ru

mdoc(7) police: Normalize the FILES section.

Approved by: re (blanket)


114913 11-May-2003 markm

Allow a NOPIC "make world" to complete.

OK'ed by: re(scottl)


114912 11-May-2003 markm

Mrege from crypto telnet with "make unifdef". This gets a bunch of
$FreeBSD$ tags and some debug variable safety belts.


114833 08-May-2003 peter

Exclude rtld-elf for amd64. More porting is still needed.

Approved by: re (scottl)


114826 08-May-2003 kan

Rethink the way we count module references. Simply following
DT_NEEDED links is not flexible enough for cases where dynamically
loaded modules form a dependency cycle.

This should fix an infinite recursion problem encountered by Yahoo.

Approved by: re (jhb)


114709 05-May-2003 markm

Turn MAKE_KERBEROS5 into NO_KERBEROS by negating the logic. Some extra
cleanups were necessary in release/Makefile, and the tinderbox code
was syntax checked, not run checked.


114626 04-May-2003 obrien

Use __FBSDID vs. rcsid[].


114625 04-May-2003 obrien

Fix signed/unsigned comparison warnings.


114624 04-May-2003 obrien

Fix a sign/unsigned comparison.


114448 01-May-2003 ru

Build non-crypto telnet(1) and telnetd(8) if NO_OPENSSL is defined.

Submitted by: Marius Strobl <marius@alchemy.franken.de>


114332 30-Apr-2003 peter

Remove 80386 bandaids from code repocopied from i386. rtld_start.S still
todo.


114316 30-Apr-2003 kan

Remove redundant strlen checks, do not check the same
symbol twice.


114280 30-Apr-2003 ru

Don't clobber Kerberos5 telnet(1) and telnetd(8) with non-crypto versions.


114117 27-Apr-2003 imp

Add back # accidentally deleted in 1.54


114113 27-Apr-2003 imp

This is no longer needed after tw is gone.

Approved by: re@ (scottl)


113714 19-Apr-2003 billf

properly refuse a connection in the -c case if the client ip's subdirectory
does not exist.

PR: bin/38303
Submitted by: Woei-Luen, Shyu <m8535@cn.ee.ccu.edu.tw>
the committed patch differs from the submitted one, any inaccuracies are mine.


113312 10-Apr-2003 mdodd

Code cleanups and sanity checking for config file parser.


113229 07-Apr-2003 mdodd

Dynamic object dependency mapping: libmap.

This is an optional feature, disabled by default.

This will be useful to people testing the various POSIX threading
libraries under -CURRENT but can easily serve other needs.


112998 03-Apr-2003 jmallett

MFp4 @27667: WARNS=5 cleanup on i386.
Remove the unused FILE\ *tf from print_mesg args, and the
bogus passing in of an uninitialised FILE* for it.

Call a timeval 'now' instead of 'clock' due to shadowing.

Remove a nested localtime declaration.

Make the delete invite argument match the ID type, u_int32_t.

Use const for pointers to const items.

Cast to long where printing as such.

Include netinet/in.h for htonl/htons.

Reviewed by: imp


112940 01-Apr-2003 ru

Mark bits that do not require an object directory as such.


112644 25-Mar-2003 silby

Update the description of the -u option to mention that IP_PORTRANGE_HIGH
and _DEFAULT are the same for 5.x.

Committed under threat of action from: The mdoc police


112452 20-Mar-2003 dwmalone

Clean up some warnings that don't result in a change in the object file:
Constness, missing prototypes, non-ansi prototypes, missing
initialisers, unnecessary declarations, shadowing.

Reviewed by: md5


112419 19-Mar-2003 arun

Fix for ia64/48024 - ensure function pointer equality across elf
objects.

Programs such as sshd depend on two pointers to the same function being
equal in a given process. However, the current ia64 implementation
ensures that they're equal when both the pointers are instantiated in
the same ELF object. The attached patch ensures that they're equal
irrespective of where they're instantiated.

Reviewed by marcel@ (mentor) and kan@


112288 15-Mar-2003 phk

Run a revision of the devstat interface:

Kernel:

Change statistics to use the *uptime() timescale (ie: relative to
boottime) rather than the UTC aligned timescale. This makes the
device statistics code oblivious to clock steps.

Change timestamps to bintime format, they are cheaper.

Remove the "busy_count", and replace it with two counter fields:
"start_count" and "end_count", which are updated in the down and
up paths respectively. This removes the locking constraint on
devstat.

Add a timestamp argument to devstat_start_transaction(), this will
normally be a timestamp set by the *_bio() function in bp->bio_t0.
Use this field to calculate duration of I/O operations.

Add two timestamp arguments to devstat_end_transaction(), one is
the current time, a NULL pointer means "take timestamp yourself",
the other is the timestamp of when this transaction started (see
above).

Change calculation of busy_time to operate on "the salami principle":
Only when we are idle, which we can determine by the start+end
counts being identical, do we update the "busy_from" field in the
down path. In the up path we accumulate the timeslice in busy_time
and update busy_from.

Change the byte_* and num_* fields into two arrays: bytes[] and
operations[].

Userland:

Change the misleading "busy_time" name to be called "snap_time" and
make the time long double since that is what most users need anyway,
fill it using clock_gettime(CLOCK_MONOTONIC) to put it on the same
timescale as the kernel fields.

Change devstat_compute_etime() to operate on struct bintime.

Remove the version 2 legacy interface: the change to bintime makes
compatibility far too expensive.

Fix a bug in systat's "vm" page where boot relative busy times would
be bogus.

Bump __FreeBSD_version to 500107

Review & Collaboration by: ken


112283 15-Mar-2003 phk

Update to current devstat API.


112244 14-Mar-2003 kan

Free obj->priv field in obj_free functions. This field is NULL
on all architectures except ia64, which uses it to keep function
description table.


112242 14-Mar-2003 kan

No need to zero fill memory, mmapped anonymously. Kernel will
return pre-zeroed pages itself.

Noticed by: jake


111447 24-Feb-2003 ru

mdoc(7) police: Scheduled sweep.


111283 23-Feb-2003 ru

mdoc(7) police: expand contraction.


111054 17-Feb-2003 kan

Do not remove object from the lists at the unref_dag() stage.
Introduce a new unlink_object() function and call it in
unload_object() instead. Removing the object in unref_dag() is
too early, rtld calls _fini() function after that and shared
objects might fail resolve their own symbols.


111005 16-Feb-2003 phk

Add #include <sys/resource.h>


111001 16-Feb-2003 phk

Remove <sys/dkstat.h> #include


110836 13-Feb-2003 phantom

Advertize rtld(1) as ld.so(1) in manual pages world


110834 13-Feb-2003 kan

Fix a typo in rtld_dirname.


110804 13-Feb-2003 kan

Implement dlinfo() function.

Introdice RTLD_SELF special handle and properly process it within
dlsym() and dlinfo() functions.

The intention is to improve our compatibility with Solaris and
to make a Java port easier.

Partially submitted by: phantom


110803 13-Feb-2003 kan

Add missing include files I forgot about in previous commit.


110801 13-Feb-2003 kan

Remove /usr/lib/elf from a default search path.
Move xprintf to malloc.c, it is only used there. Make static.

Submitted by: phantom


110707 11-Feb-2003 yar

Kill unnecessary vertical whitespace.


110691 11-Feb-2003 yar

Use LOG_AUTHPRIV to hide the username attempted during an invalid login
from everyone but sysadmins.

PR: bin/29487
MFC after: 3 days


110659 10-Feb-2003 kan

When unloading dependencies make sure they are removed from all the
associated lists:
remove RTLD_GLOBAL objects from global objects list;
remove the parent object from dldags list of its children.

Previosly we were doing that only to the top-level object OF the DAG
being unloaded and all its dependencies were ignored, leading to
mysterious crashes later.

Submitted by: peter (partially)


110395 05-Feb-2003 charnier

Add FBSDID. udp/bootps -> bootps/udp. Use err(3).


110378 05-Feb-2003 yar

Allow "~/" in pathnames to work for a chrooted user.


110340 04-Feb-2003 yar

Let tilde expansion be done even if a file/directory doesn't exist yet.
This makes such natural commands as "MKD ~user/newdir" or "STOR ~/newfile"
do what they are supposed to instead of failing miserably with the
"File not found" error.

This involves a bit of code reorganization. Namely, the code doing
glob(3) expansion has been separated to a function; a new function
has been introduced to do tilde expansion; the latter function is
invoked on a pathname before the former one. Thus behaviour mimicing
that of the Bourne shell has been achieved.


110307 04-Feb-2003 yar

RFC 959 doesn't list reply code 550 as a valid responce to STOR/STOU,
so return reply code 553 to indicate a error from open(2) for consistency,
as long as the code is used in the rest of the STOR/STOU handler.


110247 02-Feb-2003 obrien

Add OPIE and PAM libs to the mix.


110246 02-Feb-2003 obrien

OPIE and PAM bits to agument LukeMftpd.

Submitted by: mikeh (reworked by me)


110144 31-Jan-2003 yar

Let real users access special files through FTP
if allowed by their filesystem permissions.

This doesn't break anything since using sendfile(2)
is triggered later by a separate S_ISREG conditional.

PR: bin/20824
MFC after: 1 week


110046 29-Jan-2003 yar

When searching for a unique file name in guniquefd(),
distinguish between the cases of an existing file and
a real system error, such as I/O failure, no access etc.

MFC after: 3 days


110037 29-Jan-2003 yar

Add a new option to ftpd(8), "-h", to disable printing any
host-specific information in FTP server messages (so paranoid
admins can sleep at night :-)

PR: bin/16705
MFC after: 1 week


110036 29-Jan-2003 yar

Give the code around chroot(2)/chdir(2) a major overhaul by
separating its part around chroot(2) from that around initial
chdir(2). This makes the below changes really easy.

Move seteuid(to user's uid) to before calling chdir(2). There are
two goals to achieve by that. First, NFS mounted home directories
with restrictive permissions become accessible (local superuser
can't access them if not mapped to uid 0 on the remote side
explicitly.) Second, all the permissions to the home directory
pathname components become effective; previously a user could be
carried to any local directory despite its permissions since the
chdir(2) was done with euid 0. This reduces possible impact from
FTP server misconfiguration, e.g., assigning a wrong home directory
to a user.

Implement the "/./" feature. Now a guest or user subject to chrooting
may have "/./" in his login directory, which separates his chroot
directory from his home directory inside the chrooted environment.
This works for ftpchroot(5) as well.

PR: bin/17843 bin/23944


109939 27-Jan-2003 yar

Actually extract the second field from a line in ftpchroot(5)
instead of just using the rest of the line behind the first field.


109938 27-Jan-2003 yar

Allow more than one separator character between fields in ftpchroot(5).


109893 26-Jan-2003 yar

Extend the format of /etc/ftpchroot so an alternative chroot
directory can be specified for a user or a group.

Add the manpage ftpchroot(5) since the file's format has grown
complex enough.

PR: bin/45327
Portions submitted by: Hideki SAKAMOTO <sakamoto@hlla.is.tsukuba.ac.jp>
MFC after: 1 week


109815 25-Jan-2003 yar

GLOB_MAXPATH has been deprecated in favour of GLOB_LIMIT.


109742 23-Jan-2003 yar

- Add a new option, ``-P port'', to specify the port for ftpd(8)
to listen at in daemon mode.
- Use the port by 1 less than the control port as the default
data port instead of always using hard-coded port 20.

Submitted by: roam
MFC after: 1 week


109685 22-Jan-2003 yar

Prevent server-side glob(3) patterns from expanding
to a pathname that contains '\r' or '\n'.

Together with the earlier STAT bugfix, this must solve
the problem of such pathnames appearing in the FTP control
stream.


109611 21-Jan-2003 cjc

The FTP daemon was vulnerable to a DoS where an attacker could bind()
up port 20 for an extended period of time and thus lock out all other
users from establishing PORT data connections. Don't hold on to the
bind() while we loop around waiting to see if we can make our
connection.

Being a DoS, it has security implications, giving it a short MFC
time.

MFC after: 1 day


109555 20-Jan-2003 sobomax

Fix a typo (missed &&).

Submitted by: marcus


109540 19-Jan-2003 sobomax

Add a new gettytab(5) option - `pl', which if set tells getty that the line
in question is PPP-only line, i.e. no PPP-sequence detection is necessary and
PPP login program referenced by `pp' should be started automatically instead of
login(1)

Feature suggested and sponsored by: United Networks of Ukraine
No reply from: re
MFC after: 2 weeks


109382 16-Jan-2003 yar

Prepend a space character if a line begins with a digit
in the output to the "STAT file" request.

This closes one discrepancy with RFC 959 (page 36.)

See also http://www.kb.cert.org/vuls/id/328867

Obtained from: OpenBSD


109380 16-Jan-2003 yar

Replace the instances of literal "/bin/ls"
with the _PATH_LS macro to be consistent
with the rest of the ftpd(8) source.


108767 06-Jan-2003 obrien

We have a usable 'LOGIN_NAME_MAX' now.


108764 06-Jan-2003 obrien

Need to prototype strsuftollx() to quiet a warning.


108763 06-Jan-2003 obrien

Make the "nbsd_20030105" import build.


108574 02-Jan-2003 jmallett

Implement POSIX grantpt(3) functionality, and add a pt_chown utility (akin
to Solaris, it is in /usr/libexec) to perform the handing over of tty nodes
to the user being granted the pty.

Submitted by: Ryan Younce <ryany@pobox.com>
Reviewed by: security-officer@, standards@, mike@


108533 01-Jan-2003 schweikh

Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup,
especially in troff files.


108470 30-Dec-2002 schweikh

Fix typos, mostly s/ an / a / where appropriate and a few s/an/and/
Add FreeBSD Id tag where missing.


108317 27-Dec-2002 schweikh

english(4) police.


108257 24-Dec-2002 ru

mdoc(7) police: Deal with self-xrefs.


108221 23-Dec-2002 ru

Fixed the abuses of .Ql visible on stderr in troff mode.

PR: docs/37176


107948 16-Dec-2002 dillon

Change the way ELF coredumps are handled. Instead of unconditionally
skipping read-only pages, which can result in valuable non-text-related
data not getting dumped, the ELF loader and the dynamic loader now mark
read-only text pages NOCORE and the coredump code only checks (primarily) for
complete inaccessibility of the page or NOCORE being set.

Certain applications which map large amounts of read-only data will
produce much larger cores. A new sysctl has been added,
debug.elf_legacy_coredump, which will revert to the old behavior.

This commit represents collaborative work by all parties involved.
The PR contains a program demonstrating the problem.

PR: kern/45994
Submitted by: "Peter Edwards" <pmedwards@eircom.net>, Archie Cobbs <archie@dellroad.org>
Reviewed by: jdp, dillon
MFC after: 7 days


107788 12-Dec-2002 ru

Uniformly refer to a file system as "file system".

Approved by: re


107638 05-Dec-2002 kan

Fix rtld to handle SPARC_R_UA{16,64} relocations correctly.

Approved by: re (rwatson)


107572 04-Dec-2002 grehan

rtld support for PowerPC. Mostly obtained from NetBSD, with mods
for binutils 2.13

Reviewed by: benno

Approved by: re (blanket)


107390 29-Nov-2002 kan

Put back a test for binaries with no PT_LOAD entries I over-jealosly
removed in r1.69.

Apploved by: re (rwatson)


107231 25-Nov-2002 ru

mdoc(7) police:

Properly sort options, spell "file system" correctly, expand contraction.

Catch up to the src/etc/syslog.conf,v 1.23 change: ftpd(8) session logs
are now by default get logged to /var/log/xferlog.

Approved by: re


107071 18-Nov-2002 tmm

Fix the handling of high PLT entries (> 32764) on sparc64. This requires
additional arguments to reloc_jmpslot(), which is why MI code and MD code
of other platforms had to be changed.

Reviewed by: jake
Approved by: re


107030 17-Nov-2002 peter

Oops. Some ut_time stuff slipped through the cracks. These turned out
to be non-fatal due to stack alignment roundups.


106817 12-Nov-2002 obrien

[DAIVD O'BRIEN's OPINION]
Head off what I think is an abuse of the TRB, and disable lukemftpd.


106811 12-Nov-2002 maxim

o Fix usage().
o Explicitly initialize domain pointer.
o Fix passwd file parsing.

PR: bin/39671 (3)
MFC after: 2 weeks


106799 12-Nov-2002 obrien

We don't use libpam, libopie, or libmd.


106798 12-Nov-2002 obrien

We have fparseln(3). Also libskey on RELENG_4.


106795 12-Nov-2002 obrien

Update for version 1.2 Beta 2.


106754 11-Nov-2002 yar

Don't free the current addrinfo list, or else a pointer to a freed
memory area would arise. Only an addrinfo list from an earlier
call to getaddrinfo() should be freed there because it will be
substituted by the current list referenced by "res".

Reported by: John Long <fbsd1@pruam.com>
MFC after: 5 days


105877 24-Oct-2002 rwatson

Have ftpd specify the LOGIN_SETMAC flag to setlogincontext() so that
MAC labels are set if MAC is enabled and configured for the user
logging in.

Note that lukemftpd is not considered a supported application when
MAC is enabled, as it does not use the standard system interfaces for
managing user contexts; if lukemftpd is used with labeled MAC policies,
it will not properly give up privileges when switching to the user
account.

Approved by: re
Obtained from: TrustedBSD Project
Sponsored by: DARPA, Network Associates Laboratories


105847 24-Oct-2002 kuriyama

Unbreak by merging the change in r1.51 of src/libexec/ftpd/Makefile.


105832 24-Oct-2002 rwatson

Teach "ls -Z" to use the policy-agnostic MAC label interfaces rather
than the LOMAC-specific interfaces for listing MAC labels. This permits
ls to view MAC labels in a manner similar to getfmac, when ls is used
with the -l argument. Next generation LOMAC will use the MAC Framework
so should "just" work with this and other policies. Not the prettiest
code in the world, but then, neither is ls(1).

Obtained from: TrustedBSD Project
Sponsored by: DARPA, Network Associates Laboratories


105753 23-Oct-2002 kan

Add support for binaries with arbitrary number of PT_LOAD sections.

Reviewed by: peter


105492 19-Oct-2002 kan

Change the symbol lookup order to search RTLD_GLOBAL objects
before referencing object's DAG. This makes it possible for
C++ exceptions to work across shared libraries and brings
us closer to the search order used by Solaris/Linux.

Reviewed by: jdp
Approved by: obrien
MFC after: 1 month


105439 19-Oct-2002 sobomax

Fix a problem with RTLD_TRACE flag to dlopen(3), which sometimes can return
even if there was no error occured (when trying to dlopen(3) object that
already linked into executable which does dlopen(3) call). This is more
proper fix for `ldd /usr/lib/libc.so' problem, because the new behaviour
conforms to documentation.

Remove workaround from ldd.c (rev.1.32).

PR: 35099
Submitted by: Nathan Hawkins <utsl@quic.net>
MFC after: 1 week


105041 13-Oct-2002 kris

Don't call report() without a format string.

MFC after: 3 days


105040 13-Oct-2002 kris

Mark the logerr() function __printflike().

MFC after: 3 days


105039 13-Oct-2002 kris

Use strlcpy instead of incorrectly using strncpy.

MFC after: 2 weeks


104954 12-Oct-2002 obrien

Use the new freebsd output format from Binutils 2.13.1.


104742 09-Oct-2002 alfred

de-__P()


104724 09-Oct-2002 ru

<machine/atomic.h> requires <sys/types.h>.

Reviewed by: jake, mike


104385 02-Oct-2002 mike

Hook rpc.rstatd back up to the build now that it compiles.


104384 02-Oct-2002 mike

Rename local function havedisk() to haveadisk() to avoid conflict a
with another function by the same name in a system header.


104376 02-Oct-2002 jhb

Unhook rpc.rstatd from the build until it actually compiles.


103949 25-Sep-2002 mike

Use the standardized CHAR_BIT constant instead of NBBY in userland.


103436 17-Sep-2002 peter

Initiate deorbit burn for the i386-only a.out related support. Moves are
under way to move the remnants of the a.out toolchain to ports. As the
comment in src/Makefile said, this stuff is deprecated and one should not
expect this to remain beyond 4.0-REL. It has already lasted WAY beyond
that.

Notable exceptions:
gcc - I have not touched the a.out generation stuff there.
ldd/ldconfig - still have some code to interface with a.out rtld.
old as/ld/etc - I have not removed these yet, pending their move to ports.
some includes - necessary for ldd/ldconfig for now.

Tested on: i386 (extensively), alpha


103315 14-Sep-2002 tmm

Return an error if a symbol is not found in reloc_jmpslots() instead of
crashing.


102604 30-Aug-2002 obrien

Was mising ftpchroot.5

PR: 40717
Submitted by: Andrew <andrew@ugh.net.au>


102566 29-Aug-2002 yar

The mode can be "r+" as well on PUT, but only "a" on APPE.


102565 29-Aug-2002 yar

Fix lexer jam on unimplemented commands.

Submitted by: maxim
MFC after: 5 days


102474 27-Aug-2002 yar

Remove variables no longer used.


102473 27-Aug-2002 yar

More inithosts() fixes:
o Don't free(3) memory occupied by host structures
already in the host list.
o Set hrp->hostinfo to NULL if a host record has to stay in
the host list, but is to be ignored. Selecthost() knows that.
o Reduce the pollution with excessive NULL checks.
o Close a couple of memory leaks.

MFC after: 1 week


102469 27-Aug-2002 yar

Fix an inconsistency between a printf-like format and its argument list.

Submitted by: kris
MFC after: 3 days


102411 25-Aug-2002 charnier

Replace various spelling with FALLTHROUGH which is lint()able


102311 23-Aug-2002 yar

Add option '-W': don't log FTP sessions to wtmp.

Submitted by: maxim
MFC after: 1 week


102249 22-Aug-2002 marcel

Fix a nasty memory corruption bug caused by having a bogus pointer
for the DT_IA64_PLT_RESERVE dynamic table entry. When a shared object
does not have any PLT relocations, the linker apparently doesn't find
it necessary to actually reserve the space for the BOR (Bind On
Reference) entries as pointed to by the DTE. As a result, relocatable
data in the PLT was overwritten, causing some unexpected control flow
with annoyingly predictable outcome: coredump.
To reproduce:
% echo 'int main() { return 0; }' > foo.c
% cc -o foo foo.c -lxpg4


102235 21-Aug-2002 imp

Include stddef.h for NULL definition, rather than rolling our own here.

Reviewed by: jdp


102183 20-Aug-2002 yar

Clean up hostname and hostinfo handling in inithosts():
o check getaddrinfo(3) return value, not result pointer
o getaddrinfo(3) returns int, not pointer
o don't leak memory allocated for hostnames and hostinfo structures
o initialize pointers that will be checked for NULL somewhere

MFC after: 1 week


102155 20-Aug-2002 marcel

Add support for the R_IA64_IPLTLSB relocation in non-PLT context.
This relocation creates a function descriptor at the specified
address and is commonly used for C++ to create virtual function
tables.


102069 18-Aug-2002 bde

Include <nlist.h> for nlist interfaces instead of depending on namespace
pollution in <kvm.h>.


101960 16-Aug-2002 johan

Bump document date for the 'beep only' change.


101828 13-Aug-2002 ru

mdoc(7) police: Removed redundant .Ns calls.


101809 13-Aug-2002 yar

Fix a wrong comment on (hopefully) right code.

MFC after: 3 days


101808 13-Aug-2002 dwmalone

Add tcpd to the build - though we don't need to for inetd, someone might
want it for some other service-running program.

Approved by: markm
MFC after: 1 week


101806 13-Aug-2002 yar

Fix command help lines:
o PORT takes six byte values, not five.
o TYPE argument is mandatory.

Submitted by: demon (the 1st part)
MFC after: 3 days


101785 13-Aug-2002 ru

mdoc(7) police: nits.


101783 13-Aug-2002 ru

mdoc(7) police: tidy up.


101677 11-Aug-2002 schweikh

Fix typos; each file has at least one s/seperat/separat/
(I skipped those in contrib/, gnu/ and crypto/)
While I was at it, fixed a lot more found by ispell that I
could identify with certainty to be errors. All of these
were in comments or text, not in actual code.

Suggested by: bde
MFC after: 3 days


101537 08-Aug-2002 yar

Rework storing files thoroughly. This includes:

o Remove the race between stat(2) & fopen(3) when creating
a unique file.

o Improve bound checking when generating a unique name from
a given pathname.

o Ignore REST marker on APPE. No RFC specifies this case,
but the idea of resuming APPE's implies this.

o By default, deny upload resumes and appends by anonymous users.
Previously these commands were translated to STOU silently,
which led to broken files on server without any notification
to the user.

o Add an option, -m, to allow anonymous users to modify
existing files (e.g., to resume uploads) if filesystem
permissions permit.

Portions obrainded from: OpenBSD
MFC after: 3 weeks


101532 08-Aug-2002 jdp

Don't acquire the writer lock in rtld_exit when clearing the shared
objects' reference counts. This function is called by the atexit
mechanism at program shutdown. I don't think the locking is necessary
here. It caused OpenOffice builds to hang more often than not.
Credit to Martin Blapp and Matt Dillon for helping to diagnose this
problem and for testing the fix.


101395 05-Aug-2002 yar

1) Use "pathstring" instead of "STRING" consistently.
2) Remove unneeded "if not NULL" props from "pathstring",
which will never be NULL by the lexer design.

Inspired by: OpenBSD
MFC after: 1 week


101380 05-Aug-2002 yar

Since GLOB_NOCHECK is set in the glob(3) call,
glob(3) will return at least one pathname unless
a system error has occured. It's not a "not found"
error otherwise.

MFC after: 3 days


101379 05-Aug-2002 yar

Spot places where "pathname" hasn't been checked
for NULL. The "pathname" rule may return NULL
on a glob(3) error.

Obtained from: OpenBSD
MFC after: 1 week


101378 05-Aug-2002 yar

Disallow invalid numeric mode values for SITE CHMOD.
Earlier, a decimal number (e.g., 890) could be passed
for mode, leading to dangerous permissions set:
-1, that is, 07777.

Obtained from: OpenBSD
MFC after: 1 week


101376 05-Aug-2002 yar

Reflect in the ftpd(8) manpage the fact that ASCII SIZE
requests against large files will be denied.

MFC after: 10 days


101034 31-Jul-2002 yar

Deny the SIZE command on large files when in ASCII mode.
This eliminates an opportunity for DoS attack.

Pointed out by: maxim
Inspired by: lukemftpd, OpenBSD
MFC after: 2 weeks


100878 29-Jul-2002 yar

Conform to RFC 959, Appendix II, when replying
to a successful MKD command.

MFC after: 1 week


100720 26-Jul-2002 yar

Make the `-v' option a synonym for `-d'
(as it was intended initially)
and document it in the manpage.

MFC after: 2 weeks


100719 26-Jul-2002 yar

Document the -u (set umask) option
(which has been there at least since 4.4BSD-Lite!)

MFC after: 2 weeks


100717 26-Jul-2002 yar

Sort command-line options according to the mostly used style:
alphabetical order, lower and upper case of the same letter
stick together, lower case first.

MFC after: 2 weeks


100684 25-Jul-2002 yar

Use <arpa/ftp.h> stuff cleanly, without introducing
non-portable constants (in this case, hidden as offsets
to the "?AEIL" string.)

MFC after: 1 week


100615 24-Jul-2002 yar

Re-use passive data ports with the SO_REUSEADDR
socket option to avoid exausting the passive port
space by TIME_WAIT'ing connections.

PR: bin/36955
Submitted by: Maxim Konovalov <maxim@FreeBSD.org>
MFC after: 2 weeks


100612 24-Jul-2002 yar

Remove the outdated casts to "char *" from the setsockopt(2),
write(2), and getipnodebyaddr(3) calls. Now all the above functions
accept "void *" in that arguments and have prototypes. Thus, the
casts are useless under the normal circumstances (and would be harmful
if the functions had no prototypes.)

MFC after: 2 weeks


100609 24-Jul-2002 yar

Clean up the syslog(3) messages on the setsockopt(2) errors:

o Always check a setsockopt(2) return value
o Use a consistent message format
o Don't abort if the failed setsockopt(2) was actually not vital
o Use LOG_WARNING, not LOG_ERR, in non-fatal cases

MFC after: 1 week


100505 22-Jul-2002 ume

use IPV6_V6ONLY instead of non standard IPV6_BINDV6ONLY.

MFC after: 1 week


100486 22-Jul-2002 yar

Fix one RFC 959 incompliance:
Double double-quotes in a PWD result
if they appear in the directory pathname.

PR: misc/18365
MFC after: 1 week


100442 21-Jul-2002 charnier

Correct wrong grammar from previous commit. Note that fingerd is not limited
to being an interface to finger(1), see -p flag. Remove a reference to
name(?) program we don't have.

Submitted by: wollman


100439 21-Jul-2002 yar

Allow deleting and renaming stale symlinks and
deleting symlinks pointing to directories.

PR: bin/37250
Submitted by: Nino Dehne <TeCeEm@gmx.de>
MFC after: 1 week


100265 17-Jul-2002 jake

Add END markers to asm functions so that debuggers can find their size.


100263 17-Jul-2002 yar

Avoid passing NULL to freehostent(3).

MFC after: 1 week


100259 17-Jul-2002 yar

Fix setting parameters for getipnodebyaddr(3):
o "struct addrinfo" contains a pointer to "struct sockaddr,"
not "struct sockaddr" itself
o the function takes a pointer to "struct in*_addr", not to
"struct sockaddr," so the address length must be corresponding

MFC after: 1 week


100222 17-Jul-2002 mikeh

GLOB_QUOTE has been retired.


100183 16-Jul-2002 yar

Use the right indent for the closing brace: it belongs to `if',
not to `for'. The previous indent was reather misleading for
the code reader.

MFC after: 1 week


100182 16-Jul-2002 yar

Replace the awkward hackery about strtok(3)
by conventional one-way parsing of ftphosts(5).
Don't let NULL hostname pointers into virtual
host records as well.

PR: bin/18410
MFC after: 1 month


100120 15-Jul-2002 alfred

Port to TI/RPC and/or IPV6.

Submitted by: Jean-Luc Richier <Jean-Luc.Richier@imag.fr>


99877 12-Jul-2002 yar

Use fgetln(3) to read lines from configuration files (ftpusers, ftphosts.)
Thus lines of any length can be handled, unlike before.

Don't assume that each line read from the files ends with a newline.

As a side effect in inithosts(), don't use automatic buffer at all,
utilize malloc(3) when getting local host name instead.

PR: misc/21494
Reviewed by: maxim, mikeh
MFC after: 1 month


99632 09-Jul-2002 johan

Add ability to only beep when mail arrives.

comsat:
only send two bell charecters if S_IXGRP is set and S_IXUSR is not.

biff:
add new option 'b' to set S_IXGRP.

PR: 10931
Submitted by: Andrew J. Korty <ajk@purdue.edu>
Approved by: sheldonh (mentor)
MFC after: 1 month


99506 06-Jul-2002 jdp

Remove the nanosleep calls from the spin loops in the locking code.
They provided little benefit (if any) and they caused some problems
in OpenOffice, at least in post-KSE -current and perhaps in other
environments too. The nanosleep calls prevented the profiling timer
from advancing during the spinloops, thereby preventing the thread
scheduler from ever pre-empting the spinning thread. Alexander
Kabaev diagnosed this problem, Martin Blapp helped with testing,
and Matt Dillon provided some helpful suggestions.

This is a short-term fix for a larger problem. The use of spinlocking
isn't guaranteed to work in all cases. For example, if the spinning
thread has higher priority than all other threads, it may never be
pre-empted, and the thread holding the lock may never progress far
enough to release the lock. On the other hand, spinlocking is the
only locking that can work with an arbitrary unknown threads package.

I have some ideas for a much better fix in the longer term. It
would eliminate all locking inside the dynamic linker by making it
safe for symbol lookups and lazy binding to proceed in parallel
with a call to dlopen or dlclose. This means that the only mutual
exclusion needed would be to prevent multiple simultaneous calls
to dlopen and/or dlclose. That mutual exclusion could be put into
the native pthreads library. Applications using foreign threads
packages would have to make their own arrangements to ensure that
they did not have multiple threads in dlopen and/or dlclose -- a
reasonable requirement in my opinion.

MFC after: 3 days


99500 06-Jul-2002 charnier

The .Nm utility


99318 03-Jul-2002 dan

Make sure to reset transflag back to zero upon succesfully using sendfile()
to transfer a file.

PR: 39362
Submitted by: TANAKA Hiroyuki <kattyo@abk.nu>
MFC after: 1 week


99255 02-Jul-2002 ume

Cope with 2292bis-01 getaddrinfo (no NI_WITHSCOPEID, always attach
scope identifier).

MFC after: 3 weeks


99213 01-Jul-2002 maxim

Remove trailing whitespaces.


99212 01-Jul-2002 maxim

Move 'byte_count' calculation just before 'recvurg' check. It is a global
variable and used in myoob().

PR: bin/38928
Submitted by: Oliver Fromme <olli@secnetix.de>
MFC after: 1 month


99195 01-Jul-2002 mdodd

Implement a flag to disable directory creation for anonymous users.

PR: misc/38987
Submitted by: Peter da Silva <peter@abbnm.com>
MFC after: 1 week


98973 28-Jun-2002 markm

Remove a GCC-specific command-line option. We should be using WARNS=n
for this stuff.


98897 26-Jun-2002 wollman

When the -p flag is specified, set an environment variable to the name
of the remote host (or rather, the name as mangled by realhostname_sa())
so that the process can use it to behave differently depending on the
origin on the request. We use this to implement rudimentary visibility
control on our user information.

Make sure that the child process's standard error goes through the same
NVT-ASCII filter as is applied to the standard output.

Don't attempt to call logerr() from the child since stdio is not safe in
a vforked process. Just write a message to fd 2 instead. (Ideally, the
parent would open two pipes, and siphon off our stderr to some place less
public, but I have not attempted to do so in this implementation.)


98885 26-Jun-2002 markm

Gut out (by default unused) cruft, and tidy up warnings.


98786 24-Jun-2002 jdp

Update the asm statements to use the "+" modifier instead of
matching constraints where appropriate. This makes the dynamic
linker buildable at -O0 again.

Thanks to Bruce Evans for identifying the cause of the build
problem.

MFC after: 1 week


98724 24-Jun-2002 jake

Add needed include of mman.h to fix sparc64 buildworld.


98629 22-Jun-2002 dillon

The last bits of the alloca -> mmap fix. IA64 and SPARC64 (current only).
Untested (testing request went unanswered), but sparc64 is not expected to
cause problems. IA64 is not expected to cause problems but the patch was
slightly more complex so the possibility exists.

Approved by: jdp


98382 18-Jun-2002 dillon

This is the same alloca() fix as was committed for i386. David O'Brien
tested the patch on -stable.

Reviewed by: obrien
Approved by: jdp
MFC after: 3 days


98104 10-Jun-2002 jdp

Dillon's recent commits to the dynamic linker without running them
by me first have given me a good excuse to drop my MAINTAINERship.

MFC after: 1 week


98103 10-Jun-2002 dillon

Correct a bug in the last commit. The whole point of creating a 'done:'
goto target was so the cache could be freed. So free the cache after
done: rather then before done: (!)

Submitted by: Gavin Atkinson <gavin@ury.york.ac.uk>


98100 10-Jun-2002 dillon

In tracking down an installation seg fault with then openoffice port
Martin Blapp determined that the elf dynamic loader was at fault. In
particular, the loader uses alloca() to allocate a symbol cache on the
stack. Normally this would work just fine, but if the loader is called
from a threaded program and the object being loaded is fairly large the
alloca() can blow away the thread stack and effect other nearby thread
stacks as well. My testing showed that the symbol cache can be as large
as 250KBytes during the openoffice port build and install sequence. Martin
was able to work around the problem by disabling the symbol cache
(cache = NULL;). However, this solution is not adequate for commit because
it can cause an enormous cpu burden for applications which do a lot of
dynamic loading (e.g. like konqueror).

The solution is to use anonymous mmap() to temporarily allocate space to
hold the symbol cache. In testing I found that replacing the alloca()
with mmap() has no observable degredation in performance.

It should be noted that this bug does not necessarily cause an immediate
crash but can instead result in long term corruption and instability in
applications that load modules from threads. The bug is almost certainly
responsible for some of the instabilities found in konqueror, for example,
and possibly netscape too.

Sleuthing work by: Martin Blapp <mb@imp.ch>
X-MFC after: Before or after the 4.6 release depending on the release engineers


97635 30-May-2002 wollman

Add used include of <string.h>.
Delete unused include of <strings.h>.


97420 28-May-2002 alfred

Assume __STDC__, remove non-__STDC__ code.


97419 28-May-2002 alfred

Assume __STDC__, remove non-__STDC__ code. Remove private __P.


97418 28-May-2002 alfred

Assume __STDC__, remove non-__STDC__ code.
Remove private __P.


97417 28-May-2002 alfred

This code defined a private __P, nuke it.


97416 28-May-2002 alfred

Assume __STDC__, remove non-__STDC__ code.

Reviewed by: md5


97341 27-May-2002 jmallett

Don't risk catching a signal while handling a signal for a dying child, as we
can then end up not properly clearing wtmp/utmp entries.

PR: bin/37934
Submitted by: Sandeep Kumar <skumar@juniper.net>
Reviewed by: markm
MFC after: 2 weeks


97026 21-May-2002 marcel

Include machine/ia64_cpu.h because we use ia64_mf().

Submitted by: ru


96580 14-May-2002 brian

Understand the new NGM_PPPOE_SESSIONID message and set SESSIONID
in the environment to it's value.

Approved by: archie (after a very cursory glance)


96528 13-May-2002 ru

Fixed CLEANFILES.


96196 08-May-2002 des

Use <paths.h> rather than "pathnames.h", and fix a couple of whitespace nits.

Sponsored by: DARPA, NAI Labs


96195 08-May-2002 des

PAMify.

Sponsored by: DARPA, NAI Labs


95980 03-May-2002 des

Unbreak static build and remove usage() that isn't usage().

Reviewed by: bde


95915 02-May-2002 des

PAMify rexecd(8).

Sponsored by: DARPA, NAI Labs


95658 28-Apr-2002 des

Spell void * as void * rather than caddr_t. This is complicated by the
fact that caddr_t is often misspelled as char *.

Sponsored by: DARPA, NAI Labs


95544 27-Apr-2002 marcel

Fix handling of weak references to undefined symbols on ia64:
o Set st_shndx for sym_zero to SHN_UNDEF instead of SHN_ABS.
This gives us something to reliably test against.
o For weak references to undefined sysmbols (as indicated by
having st_shndx equals SHN_UNDEF) in the context of OPDs,
the address of the OPD is to be zero, not the address of
the function it contains.
o For weak references to undefined symbols in all other cases
(only DIR64LSB at this time), the actual relocated value is
to be zero, not the value prior to relocating.

Roughly speaking, weak references to undefined symbols are no-ops.

Tested on: i386, ia64


95540 27-Apr-2002 marcel

Now that local symbols aren't looked up with the symbol hash table,
binding works for local symbols. Remove the workaround...


95539 27-Apr-2002 marcel

Don't do symbol lookups for local symbols. The symbol index in the
relocation identifies the symbol to which we need to bind. This
solves a problem seen on ia64 where the symbol hash table does not
contain local symbols and thus resulted in unresolved symbols.

Tested on: alpha, i386, ia64


95496 26-Apr-2002 ume

Correct indent.


95258 22-Apr-2002 des

Usage style sweep: spell "usage" with a small 'u'.
Also change one case of blatant __progname abuse (several more remain)
This commit does not touch anything in src/{contrib,crypto,gnu}/.


94830 16-Apr-2002 ume

When opieverify() is fail, fallback to try unix password.

Tested by: kuriyama


94828 16-Apr-2002 ume

Add an IPv6 support.
I dunno if there is an IPv6 supported rexec client. So, it was
tested that this change doesn't break an IPv4.

Tested by: kuriyama (IPv4 only)


94824 16-Apr-2002 kuriyama

Make this compilable without -DOPIE.

Hint by: ume


94443 11-Apr-2002 ume

IPv6 support for tftp/tftpd.

Obtained from: KAME
MFC after: 2 weeks


94299 09-Apr-2002 ambrisko

Better handle the case with a network that drops packets by retrying
with a back off. This was discovered when Luigi sent me code to
handle this for Etherboot. The Etherboot patch worked okay but
FreeBSD's tftpd had trouble handling it and would fail to transfer
the file since it would abort on send and not retry.

Submitted by: luigi
MFC after: 1 week


94242 08-Apr-2002 obrien

Allow to compile with both GCC 2.95 and 3.1.


94021 07-Apr-2002 peter

Fix a relocation bug in the ia64 ld.so. Weak function pointers in shared
objects were not being correctly set to zero. Instead, the function
descriptor pointer was set to the load address of the .so object. This
caused gcc generated binaries to segfault on exit when crtbegin.asm's
_fini code tested the __cxa_finalize() function pointer for zero.

This is a bit of a hack because of a problem nearby workaround for
find_symdef and its quirks (failures) for local symbols. This still
needs to be fixed.


93979 06-Apr-2002 des

Fix warnings.

Sponsored by: DARPA, NAI Labs


93610 02-Apr-2002 jake

Minor changes to make this work on sparc64.

Approved by: jdp
Tested on: alpha, i386, sparc64


93590 01-Apr-2002 mike

Include <string.h> for some prototypes, rather than depending on
pollution from <strings.h>.


92594 18-Mar-2002 imp

Add missing commas. At least I didn't miss a period.


92543 18-Mar-2002 imp

o MAXPATHLEN is the correct constant to use for path names, it includes
the NULL.
o use snprintf in preference to unchecked strcat in a couple of places that
likely can't overflow. Makes it easier to grep for strcpy :-)


92272 14-Mar-2002 maxim

Teach REST how to restart a file transfer after 2^31 bytes: now yylex()
returns off_t in yylval.u.o. REST is the only user of yylval.u.o at the
moment.

NB: seems lukemftpd has the same bug.

PR: misc/28629
Reviewed by: ru
Approved by: ru
MFC after: 1 month


92195 13-Mar-2002 jake

rtld support for sparc64.

Largely obtained from: netbsd
Submitted by: jake, tmm


92090 11-Mar-2002 maxim

Remove duplicated yacc nonterminals declarations, sort includes.
No functional changes from rev. 1.31.

Reviewed by: ru
Approved by: ru
MFC after: 1 week


91749 06-Mar-2002 des

YA patch I forgot to commit last night.


91534 01-Mar-2002 obrien

*sigh* while the last commit made GCC 3.1 happy, it upset GCC 2.95.
back out last commit to un-break world.


91510 28-Feb-2002 obrien

CPP v3.1 has different rules for processing #lines directives. This
sometimes causes fewer directories to be searched for includes. Thus
we have to be more explicit in our search list.

Pointy at to: GCC 3.1


91444 27-Feb-2002 des

When searching an object that was opened with RTLD_GLOBAL, search its DAG too.

PR: bin/25059
Approved by: jdp
MFC after: 3 weeks


91409 27-Feb-2002 obrien

Add lukemftpd to the mix.


91407 27-Feb-2002 obrien

Build LukeM's ftpd.


91404 27-Feb-2002 obrien

Put the last added source file in proper order.
(and dcc the committer a dictionary)


91244 25-Feb-2002 des

Rewrite the part of the conversation function that allocates the reply array;
it was inelegant and neglected to check the return value from malloc(3).

Sponsored by: DARPA, NAI Labs


91216 25-Feb-2002 bde

#include <sys/time.h> instead of depending on namespace pollution in
<sys/stat.h> for its prerequisite <sys/time.h>.

Removed a duplicated include. Sorted includes.


91214 25-Feb-2002 bde

Removed unused include of <sys/resource.h> instead of depending on
namespace pollution only 1 layer deep in <sys/stat.h> for its
prerequisite <sys/time.h>

Removed other unused includes.


91201 24-Feb-2002 mike

Revert revision 1.11. FreeBSD/alpha has suppport for T/TCP.

MFC after: 1 week


90975 20-Feb-2002 brian

Handle NGM_PPPOE_ACNAME messages.

Submitted by: Andre Albsmeier <andre@albsmeier.net>
Approved by: julian


90868 18-Feb-2002 mike

o Move NTOHL() and associated macros into <sys/param.h>. These are
deprecated in favor of the POSIX-defined lowercase variants.
o Change all occurrences of NTOHL() and associated marcros in the
source tree to use the lowercase function variants.
o Add missing license bits to sparc64's <machine/endian.h>.
Approved by: jake
o Clean up <machine/endian.h> files.
o Remove unused __uint16_swap_uint32() from i386's <machine/endian.h>.
o Remove prototypes for non-existent bswapXX() functions.
o Include <machine/endian.h> in <arpa/inet.h> to define the
POSIX-required ntohl() family of functions.
o Do similar things to expose the ntohl() family in libstand, <netinet/in.h>,
and <sys/param.h>.
o Prepend underscores to the ntohl() family to help deal with
complexities associated with having MD (asm and inline) versions, and
having to prevent exposure of these functions in other headers that
happen to make use of endian-specific defines.
o Create weak aliases to the canonical function name to help deal with
third-party software forgetting to include an appropriate header.
o Remove some now unneeded pollution from <sys/types.h>.
o Add missing <arpa/inet.h> includes in userland.

Tested on: alpha, i386
Reviewed by: bde, jake, tmm


90826 18-Feb-2002 peter

ld-elf.so.1 assumed a few too many things about the ordering of sections
produced by ld(8) (ie: that _DYNAMIC immediately follows the _GOT).
The new binutils import changed that, and the intial GOT relocation
broke. Use a custom linker script to provide a real end-of-GOT symbol.

Update ld.so to deal with the new (faster) PLT format that gcc-3.1 and
binutils can produce.

This is probably incomplete, but appears to be working again.

Obtained from: NetBSD
(And a fix to a silly mistake that I made by: gallatin)


90798 17-Feb-2002 gshapiro

Update build infrastructure for sendmail 8.12.


90779 17-Feb-2002 imp

o __P removal
o use Ansi-style function definitions


90755 17-Feb-2002 obrien

Add support such that if LD_TRACE_LOADED_OBJECTS_ALL is defined to a
non-empty string in the environment; we indicate which objects caused
each object to be loaded.

PR: 30908
Submitted-by: Mike Meyer <mwm@mired.org>


90604 13-Feb-2002 maxim

Fix infinite loop around sendfile(2) after sending >4GB file.

PR: bin/33770
Submitted by: Vladislav Shabanov <vs@rambler-co.ru>
Reviewed by: ru
Approved by: ru
MFC after: 1 month


90377 07-Feb-2002 imp

o __P removal
o register removal
o use new style prototypes and function definitions


90336 07-Feb-2002 imp

o __P removal
o use new style prototypes and function definitions
o signal handlers need an argument. Mark it unused.


90335 07-Feb-2002 imp

o const poison a few prototypes to avoid gcc3 warnings
o s/err/error/ in a couple places to avoid shadowing warnings


90334 07-Feb-2002 imp

o __P removal
o new style definitions/declarations
o declare null_conv static and its arguments __unused


90333 07-Feb-2002 imp

o __P removal
o Use new-style prototypes and function definitions.
o Fix timeout and justquit to have proper signatures for signal
handlers. Mark the args as __unused.
o remove register


90332 07-Feb-2002 imp

o __P removal.
o Use new prototypes and function definitions only.


90303 06-Feb-2002 imp

o Remove __P
o Use proper prototypes
o remove register


90302 06-Feb-2002 imp

Remove some unused variables, mark unused parameters as unused and change
names of variables that shadow globally declared variables. This should
help people doing later WARNS= fixes.


90301 06-Feb-2002 imp

o __P removal
o remove register
o use strict prototypes


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


90296 06-Feb-2002 kris

Set WFORMAT=0, overlooked in previous commits to libexec/.

Reported by: jhay


90262 05-Feb-2002 imp

Fix minor disorder in functions declared in extern.h


90261 05-Feb-2002 imp

o Move externs to extern.h
o Use new-style prototypes exclusively rather than the old foo() style.
o Use new-style function definitions.
o remove register
o make functions passed to signal have the right signature.
o do minor const poisoning.


90242 05-Feb-2002 sheldonh

Don't use non-signal-safe functions (exit(3) in this case) in
signal handlers. In this case, use _exit(2) instead, following
the call to shutdown(2).

This fixes rare telnetd hangs.

PR: misc/33672
Submitted by: Umesh Krishnaswamy <umesh@juniper.net>
MFC after: 1 month


90172 04-Feb-2002 sobomax

Allow ldd(1) be used on shared libraries in addition to executables.


90164 04-Feb-2002 kris

Lock down with WFORMAT?=1, with overrides in the subdirectories which
are not yet warning-clean. Tested on i386 and alpha.


90162 04-Feb-2002 kris

Mark a function as __printflike()

MFC after: 1 week


90161 04-Feb-2002 kris

Mark a function as __printf0like(). This exposes a warning which requires
some code changes to fix but should be possible.

MFC after: 1 week


90160 04-Feb-2002 kris

Prototype a function as __printflike() to avoid a FORMAT_AUDIT warning.

MFC after: 1 week


90159 04-Feb-2002 kris

Mark report() as printflike and fix resulting warnings, including one bug
(get_errmsg -> get_errmsg())


90158 04-Feb-2002 kris

Silence some FORMAT_AUDIT warnings (one left)


90148 03-Feb-2002 imp

o Eliminate __P
o Use new-style function definitions
o remove some !__STDC__ code
o eliminate register


89935 28-Jan-2002 yar

Remove the setjmp/longjmp stuff completely. Use signal
handlers to set flags only (with exception for sigquit(),
which still seems to call some non-reentrant functions on
its way to _exit(2).) That must eliminate the possibility
of catching SIGSEGV from following non-reentrant paths from
signal handlers.

PR: bin/32740 bin/33846
Submitted by: Maxim Konovalov <maxim@macomnet.ru>
Obtained from: OpenBSD


89920 28-Jan-2002 ume

Log wtmp according to an address family properly.

Reported by: matusita
Reviewed by: matusita
MFC after: 1 week


89783 25-Jan-2002 jdp

Change the library search order so that LD_LIBRARY_PATH overrides
all others.

PR: bin/28191
MFC after: 2 weeks


89732 24-Jan-2002 dwmalone

Change brk's prototype from char *brk(const char *) to int brk(const void *)
and sbrk's prototype from char *sbrk(int) to void *sbrk(intptr_t).

This makes us more consistant with NetBSD and standards which include
these functions. Bruce pointed out that ptrdiff_t would probably
have been better than intptr_t, but this doesn't match other
implimentations.

Also remove local declarations of sbrk and unnecessary casting.

PR: 32296
Tested by: Harti Brandt <brandt@fokus.gmd.de>
MFC after: 1 month


89622 21-Jan-2002 ache

Remove my workaround fallback since PAM now do it properly.


89569 19-Jan-2002 des

Really back out ache's commits. These files are now precisely as they were
twentyfour hours ago, except for RCS ids.


89568 19-Jan-2002 ache

Back out PAM_CRED_ERR addition


89552 19-Jan-2002 ache

Add PAM_CRED_ERR as valid failure case


89544 19-Jan-2002 ache

Call opieunlock() only if we skip opieverify() part


89530 19-Jan-2002 ache

Remove conditional 'pwok' fallback for PAM which now
is implemented in pam_opie module

For non-PAM variant rewrite empty password checking code to do the right thing
and not disallow empty passwords in all cases.


89362 14-Jan-2002 ru

yp(4) -> yp(8).

PR: docs/30797


89284 12-Jan-2002 markm

Build the TCP-wrapper helper "daemon" tcpd. This is not much use in
a bog-standard FreeBSD installation, as inetd(8) does that job, but
for inetd(8) replacemenrts such as xinetd, having this around makes
sense.


89230 10-Jan-2002 ru

mdoc(7) police: tidy up.


88935 05-Jan-2002 dwmalone

Be more careful about freeing memory after parsing commands.
Hiroyuki YAMAMORI gave a patch for the EPRT command in the
PR below. Problems with the rest of the patch are my fault.

PR: 33268
Reviewed by: iedowse, sheldonh


88763 01-Jan-2002 ache

Fix OPIE auth


88673 29-Dec-2001 bde

Fixed missing DPADD in previous commit. Fixed most style bugs related to
DPADD and LDADD.


88669 29-Dec-2001 joe

Link with libm to take advantage of the -h flag to ls.

Submitted by: Mike Makonnen <mike_makonnen@yahoo.com>


87883 14-Dec-2001 ru

MFCrypto: Remove -r, -s, sort -p.


87268 03-Dec-2001 markm

Merge from master (crypto) telnet. WARNS fixes for alpha.


87156 30-Nov-2001 markm

Merge the (in)complete ANSIfication work from src/crypto/telnet.


87153 30-Nov-2001 markm

After running a "make unifdef", commit the resultant diffs.

This code is now a complete sunset of the crypto (master) code.


87147 30-Nov-2001 markm

Diff-reduce WRT src/secure/*telnet*/Makefile.

Also, add an "unifdef:" target, so that the telnet sources can
be remade from the crypto sources in src/crypto/telnet.


87064 28-Nov-2001 arr

- Change parameters of signal handlers in order to be correct (they are
handed a integer, not void).
- No need to set flags to zero when they already will be.
- It was also noted the manner in which the signal handling has changed
might possibly generate some problems (hangs possibly) -- these, while
remaining in the code, will be fixed shortly (within a day).

Submitted by: bde


86943 27-Nov-2001 green

Add lomac.c.

Found by: ken


86916 26-Nov-2001 arr

- Fix some poor signal handler usage.

Reviewed by: -audit (and their silence), jhb, maintainer's silence


86783 22-Nov-2001 ru

mdoc(7) police: minor spelling, markup and style fixes.


86765 22-Nov-2001 benno

Change the failure mode in option parsing to silently bailing out of option
negotiation rather than rejecting the request.

Apple OpenFirmware 3.0f3 (the version in my iMac) adds trailing garbage to the
end of an otherwise valid request. Without this change, the requests were
rejected which prevented me from booting.

Reviewed by: obrien


86762 22-Nov-2001 brian

Don't leave dodgy looking spaces in HISMACADDR


86756 22-Nov-2001 brian

Mention that HISMACADDR is set in the environment of child processes


86705 21-Nov-2001 brian

Set HISMACADDR in the environment before envoking ppp.

MFC after: 1 week


86628 19-Nov-2001 yar

Eliminate another instance of the old and well-known
DoS bug that the select(2)/accept(2) pair is called on
a socket that is in the blocking I/O mode. The bug is
triggered if a selected connection dies before the accept(2)
leading to the accept(2) blocking virtually forever.

MFC after: 1 week


85677 29-Oct-2001 peter

Update rtld for the "new" ia64 ABI. In the old toolchain, the
DT_INIT and DT_FINI tags pointed to fptr records. In 2.11.2, it points
to the actuall address of the function. On IA64 you cannot just take
an address of a function, store it in a function pointer variable and
call it.. the function pointers point to a fptr data block that has the
target gp and address in it. This is absolutely necessary for using
the in-tree binutils toolchain, but (unfortunately) will not work with
old shared libraries. Save your old ld-elf.so.1 if you want to use
old ones still. Do not mix-and-match.

This is a no-op change for i386 and alpha.

Reviewed by: dfr


85676 29-Oct-2001 peter

Fix a dependency violation (branch after alloc)


85299 22-Oct-2001 obrien

When we set our UID to `nobody', set an appropriate group also.

Submitted by: peter


85040 17-Oct-2001 fenner

The interface index space may be sparsely populated (e.g. when an
interface in the middle is if_detach()'d). Return (and handle)
ENOENT when the ifmib(4) is accessed for a nonexistent interface.

MFC after: 14 days


85004 15-Oct-2001 dfr

Add ia64 support. Various adjustments were made to existing targets to
cope with a few interface changes required by the ia64. In particular,
function pointers on ia64 need special treatment in rtld.


84842 12-Oct-2001 yar

Don't let a user name in ftpd's proctitle
be mistaken for a status message.

PR: misc/25217
MFC after: 7 days


84841 12-Oct-2001 yar

Be consistent about indent at least within one block of code.


84746 10-Oct-2001 dfr

The support for accelerating find_symdef() with a cache was broken. This
fixes the problem and improves startup times for large applications such
as KDE2 considerably.

Reviewed by: jdp
MFC after: 1 week


84454 04-Oct-2001 ru

Terminate the array of execv(3) pointers by a NULL pointer in the edge case.

PR: bin/30913
Submitted by: Dimitri Lommers <dimitri@hinttech.com>


84285 01-Oct-2001 ru

mdoc(7) police: markup nits.


84255 01-Oct-2001 kris

Migrate uucpd to ports as well.

Noticed by: ru


84146 29-Sep-2001 ache

1) Use OPIE response only when OPIE keys really used
2) Use commonly used OPIE response form instead of self-made one


84125 29-Sep-2001 iedowse

Avoid a few compiler warnings (printf codes, missing includes etc).

PR: bin/30864
Obtained from: Dan Lukes <dan@obluda.cz>
MFC after: 1 week


84119 29-Sep-2001 iedowse

Missing `break' statements caused two error messages to become
"unkown error" [sic]. Add the missing breaks, and correct the
spelling typo.

PR: bin/30865
Submitted by: Dan Lukes <dan@obluda.cz>
MFC after: 1 week


84047 27-Sep-2001 obrien

RFC2349 (http://www.hypermail.org/rfcs/rfc2349.html) adds support
for negotiation of timeout and file size to the tftp protocol. This
is required by some firmware like EFI boot managers (at least on
HP i2000 Itanium servers) in order to boot an image using tftp. The
attached patch implements the RFC, and in doing so also implements
RFC2347; a generic tftp option extension.

PR: 30710
Submitted by: Espen Skoglund <esk@ira.uka.de>


83941 25-Sep-2001 iedowse

RFC2132 is not clear about whether the "Maximum DHCP Message Size"
refers to the size of the whole ethernet packet, just the DHCP
message within the UDP payload, or something else. bootpd interpreted
it as a maximum UDP payload size, so it could end up sending
fragmented packets to clients (such as some versions of Etherboot)
that used different interpretations of the maximum message size.

Switch to the most conservative interpretation: ensure that the
ethernet packet containing the response is no larger than the
specified maximum message size. This matches the behaviour of
the ISC dhcpd.

MFC after: 1 week


83919 25-Sep-2001 mikeh

Improve the description on how to construct ~ftp/pub. Specifically,
don't instruct users to set the directory mode 777.

PR: 30690
Obtained from: NetBSD (with modification)
MFC after: 2 weeks


83367 12-Sep-2001 ru

Fixed some of style bugs.


83308 10-Sep-2001 mikeh

Remove a field width specifier that's not doing anything more than
what using snprintf() achieves. It was also being used incorrectly.


83244 09-Sep-2001 dd

Include ttymsg.h from ../../usr.bin/wall instead of rolling our own
prototype.


82944 04-Sep-2001 sheldonh

Do the best we can with respect to fixing command-line option disorder
in the SYNOPSIS and DESCRIPTION.

Note that -l remains an ugly exception, to which no known rules apply,
since the specification of a single option multiple times isn't normal
standards-compliant CLI behaviour.

While here, mark AF_INET* and LOG_* defined values up with Dv.


82851 03-Sep-2001 ache

File positions are off_t nowdays, not long, so:
atoi -> strtoll
fseek -> fseeko

NOTE: that fseek not works for >long offsets per POSIX:

[EOVERFLOW] For fseek( ), the resulting file offset would be a value which
cannot be represented correctly in an object of type long.

Fix minor cast too.


82796 02-Sep-2001 sheldonh

Extend the functionality offered by the -o option into a new option
-O, which limits the impact of the write-only restriction to guest
users.

*) The existing manual page's SYNOPSIS and option listing in the
DESCRIPTION are already horribly disordered. No attempt has been
made to fix this.

*) The existing source's getopt() optstring and option handling switch
are already horribly disordered. No attempt has been made to fix
this.

Discussed with: nik, -audit


82792 02-Sep-2001 ache

long -> off_t
long -> time_t
%ld -> %qd
fseek -> fseeko

NOTE: that fseek not works for >long offsets per POSIX:

[EOVERFLOW] For fseek( ), the resulting file offset would be a value which
cannot be represented correctly in an object of type long.


82497 29-Aug-2001 markm

Manually unifdef(1) CRAY, UNICOS, hpux and sun uselsess code.


82460 28-Aug-2001 nik

Add a new option, '-o', for "Write-only". Disables the RETR command,
preventing anyone from downloading files. In conjunction with -A, and some
appropriate file permissions, this lets you create an anonymous FTP drop
box for people to upload files to.

The more obvious "-w" flag is already taken by NetBSD's ftpd. "-o" was
available as an option letter in all three BSDs.


82333 25-Aug-2001 brian

Put a parenthesis in the right place (DUH!).
This fixes the apparent immediate client timeout problem.


82326 25-Aug-2001 dd

Remove description of an option that only applies to UNICOS < 7.0.
That define may still be present in the source, but I don't think
anyone has plans to try to use it.

Obtained from: NetBSD


82276 24-Aug-2001 brian

Understand that a return value of 0 from NgRecvMsg() means that the
socket was closed.

This prevents erroneous ``Unexpected netgraph version'' from turning
up in the log.


82065 21-Aug-2001 ru

Added netid(5) manpage.

PR: docs/25657
Obtained from: OpenBSD


81991 20-Aug-2001 brian

Handle snprintf() returning < -1.


81972 20-Aug-2001 brian

Handle snprintf() returning -1.

MFC after: 2 weeks


81963 20-Aug-2001 markm

Feature merging and diff reduction between this code and crypto telnet.
Also remove conditional (AUTHENTICATION) code as we have never compiled
it here, and it is doubtful that it even works in this scenario.


81622 14-Aug-2001 ru

mdoc(7) police: s/BSD/.Bx/ where appropriate.


81449 10-Aug-2001 ru

mdoc(7) police: protect trailing full stops of abbreviations
with a trailing zero-width space: `e.g.\&'.


81251 07-Aug-2001 ru

mdoc(7) police:

Avoid using parenthesis enclosure macros (.Pq and .Po/.Pc) with plain text.
Not only this slows down the mdoc(7) processing significantly, but it also
has an undesired (in this case) effect of disabling hyphenation within the
entire enclosed block.


81118 03-Aug-2001 bde

Don't clobber the default for CFLAGS.


81080 03-Aug-2001 jon

Fixes file descriptor leak in standalone mode.
Prevents simultaneous calls to updatestat() as function is not reentrant.

PR: bin/24857
Submitted by: Martin Butkus <mb@bagheera.thgwf.de>
MFC after: 1 month


80733 31-Jul-2001 brian

Don't use SA_RESETHAND here. We gain nothing.

Suggested by: bde


80728 31-Jul-2001 brian

Add a -l flag used to specify a label when no -p flag is given.
Start new sentences on new lines in pppoed.8.

MFC after: 1 week


80724 31-Jul-2001 brian

Use sigaction() without SA_RESTART rather than signal() so that we
don't block in NgRecvData() after receiving a signal.

MFC after: 1 week


80525 29-Jul-2001 mikeh

Rename the GLOB_MAXPATH flag of glob(3) to GLOB_LIMIT to be compatible
with NetBSD and OpenBSD. glob(3) will now return GLOB_NOSPACE with
errno set to 0 instead of GLOB_LIMIT when we match more than `gl_matchc'
patterns. GLOB_MAXPATH has been left as an alias of GLOB_LIMIT to
maintain backwards compatibility.

Reviewed by: sheldonh, assar
Obtained from: NetBSD/OpenBSD


80381 26-Jul-2001 sheldonh

Use STD{ERR,IN,OUT}_FILENO instead of their numeric values. The
definitions are more readable, and it's possible that they're
more portable to pathalogical platforms.

Submitted by: David Hill <david@phobia.ms>


80370 26-Jul-2001 kris

Xref to openssl(1) (i.e. "openssl passwd")

PR: 28885
Submitted by: Gregory Bond <gnb@itga.com.au>
MFC After: 1 week


80281 24-Jul-2001 dd

yp_errno is an `enum ypstat`.

PR: 29190
Submitted by: Cristan Szmajda <cristan@unsw.edu.au>
Reviewed by: md5(1)


80248 24-Jul-2001 kris

Save errno in signal handler

Obtained from: OpenBSD
MFC After: 1 week


80225 23-Jul-2001 kris

MFcrypto/telnet/telnetd: Correct semantics of output_data*() and netflush()
to ensure deterministic operation


80201 23-Jul-2001 kris

by by -> by

Obtained from: OpenBSD
MFC After: 1 week


80047 20-Jul-2001 ru

MFCrypto: fixed the remote buffer overflow.


79979 19-Jul-2001 obrien

Portability configuration data for LukeM ftpd.


79754 15-Jul-2001 dd

Remove whitespace at EOL.


79674 13-Jul-2001 brian

Print the month number properly

MFC after: 1 week


79597 11-Jul-2001 brian

Remove an extraneous space


79529 10-Jul-2001 ru

mdoc(7) police: removed HISTORY info from the .Os call.


79469 09-Jul-2001 markm

Remove S/Key. PAM can do its job. Well, not quite - there is an issue
with the conversation function and challenges which needs to be
revisited, so in the interim a hack is introduced to provide
an OPIE challenge (which is random if OPIE does not apply)
at all non-anonymnous logins.


79466 09-Jul-2001 markm

Goodbye S/Key, Hello OPIE.

I believe I have done due dilligence on this, but I'd appreciate
decent test scenarios and sucess (or failure) reports.


79454 09-Jul-2001 dd

mdoc(7) police: remove extraneous .Pp before and/or after .Sh.


79452 09-Jul-2001 brian

Fix the type of the NULL arg to execl()

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


79366 06-Jul-2001 ru

mdoc(7) police: sort SEE ALSO xrefs (sort -b -f +2 -3 +1 -2).


79211 04-Jul-2001 ru

mdoc(7) police: sort xrefs.


79209 04-Jul-2001 ru

mdoc(7) police: removed hard sentence breaks.


78457 19-Jun-2001 mikeh

stat(2) filesystem quotas act on, not filesystem quotas file resides on.

PR: bin/4949
MFC after: 2 weeks


78272 15-Jun-2001 olgeni

Fix some typos.

MFC after: 1 week


78153 13-Jun-2001 dd

Move the definition of epsvall out of #ifdef VIRTUAL_HOSTING so that
the latter is not required for ftpd to compile.


77881 07-Jun-2001 ghelmer

Fix the number of bytes allocated by realloc when more space is needed
for the vector of arguments.

MFC after: 1 week


77874 07-Jun-2001 yar

Add 'df' string to gettytab - the strftime(3) format for %d
in the banner messages (of course, defaults to "%+").

Submitted by: Gleb Smirnoff <glebius@tak.estra.ru>


77862 07-Jun-2001 dd

In the "Message from Talk_Daemon" announcement, print the date as well
as the current time. It's nice to know whether the talk request you
see was sent just a few minutes ago (assuming you didn't hear the
bell), or if it's been decaying for days (weeks?).


77760 05-Jun-2001 sobomax

Correct cross-references:
ng_bpf.8 --> ng_bpf.4
ng_ether.8 --> ng_ether.4
ng_iface.8 --> ng_iface.4
ng_pppoe.8 --> ng_pppoe.4
ng_socket.8 --> ng_socket.4
ng_tty.8 --> ng_tty.4
ng_{type}.4 --> /dev/null

MFC after: 1 week


77348 28-May-2001 ru

Use new backup feature of install(1).


76296 05-May-2001 jdp

Performance improvements for the ELF dynamic linker. These
particularly help programs which load many shared libraries with
a lot of relocations. Large C++ programs such as are found in KDE
are a prime example.

While relocating a shared object, maintain a vector of symbols
which have already been looked up, directly indexed by symbol
number. Typically, symbols which are referenced by a relocation
entry are referenced by many of them. This is the same optimization
I made to the a.out dynamic linker in 1995 (rtld.c revision 1.30).

Also, compare the first character of a sought-after symbol with its
symbol table entry before calling strcmp().

On a PII/400 these changes reduce the start-up time of a typical
KDE program from 833 msec (elapsed) to 370 msec.

MFC after: 5 days


76224 02-May-2001 obrien

* include/elf.h has been repo copied to include/elf-hints.h, and it no
longer includes machine/elf.h.
* consumers of elf.h now use the minimalist elf header possible.

This change is motivated by Binutils 2.11.0 and too much clashing over
our base elf headers and the Binutils elf headers.


76183 01-May-2001 dwmalone

Avoid a warning by making a variable a const char *.


76134 29-Apr-2001 markm

Replacement of the old error() routine with errx(3) was premature.
There are protocol issues to deal with.

Bring back this routine (renamed to avoid a library conflict in libssh)
and overhaul it for more 21st Century style coding.

Pointed out by: bde


76125 29-Apr-2001 markm

Grrr. Fix a line that was fatfingered out during the cleanup.
Submitted by: bde
Pointy hat: markm


76106 28-Apr-2001 markm

Cleaner method of making PAMable apps static (in the optional case of
wanting static apps).


76098 28-Apr-2001 markm

Damn. That should be _enable_ static linking, not _force_ static linking.


76097 28-Apr-2001 markm

Enable (optional) static linking.
Asked for by: BDE


76096 28-Apr-2001 markm

Change names of functions and variables with global scope that are
in conflict with library values of the same name. This allows static
linking.


76095 28-Apr-2001 markm

Allow static linking.
Asked for by: BDE


76094 28-Apr-2001 markm

Clean up the error handling code a bit. There is no need to "roll our
own" error() routine when errx() is available. This resolves a conflict
when linking statically.


75905 24-Apr-2001 kris

Replace a strcat() with a strlcat(). Partial sync with OpenBSD; more
work is needed.

Submitted by: "Andrew R. Reiter" <arr@watson.org>
Obtained from: OpenBSD


75670 18-Apr-2001 ru

mdoc(7) police: normalize .Nd.


75650 18-Apr-2001 ru

mdoc(7) police: uppercase document title.


75567 17-Apr-2001 peter

Previous clobbered a work-in-progress. Here is the merged result:

Limit the "pathname" glob to one item, as that is what all users of it
are expecting, except for LIST.

Always glob, instead of when the first character is a ~. For example,
if you had directories ~/x1, and ~/x2, then "cwd x[1]" would fail, but
"cwd ~/x[1]" would work since it was globbed due to the ~ character.
Also, "cwd ~/x[12]" used to arbitarily work as it used the first
expansion (ie: x1) without an error. Make it return '550 ambiguous'
instead of '550 not found' so that the user can see the difference.

For LIST, just use the user supplied string as the popen does the glob.

Problem noticed by: Ajay Mittal <amittal@iprg.nokia.com>


75560 17-Apr-2001 jedgar

Limit number of paths returned via glob() for authorized users
using tilde expansion.


75556 16-Apr-2001 green

Support the empty "PASS\r\n" command.


75542 16-Apr-2001 ru

Document that SITE extensions are disabled for anonymous logins.

Obtained from: logdaemon package by Wietse Venema


75535 15-Apr-2001 phk

Add the "SITE MD5 filename" facility.

This allows you to determine if the file on the other side is the same
as the one you have without transferring the entire file to compare.

Needless to say, if the server end lies to you this check doesn't work,
but on the other hand, if it lies to you about the files checksum,
what can you trust from it ?


75286 07-Apr-2001 ru

beforeinstall -> SCRIPTS.


75162 04-Apr-2001 ru

mdoc(7) police: cosmetics.


74928 28-Mar-2001 ru

Bye-bye /usr/lib/libtelnet.a. This should fix ``make release'' brokeness.

Approved by: markm


74874 27-Mar-2001 markm

Add full PAM support for account management and sessions.

The PAM_FAIL_CHECK and PAM_END macros in su.c came from the util-linux
package's PAM patches to the BSD login.c

Submitted by: "David J. MacKenzie" <djm@web.us.uu.net>


74814 26-Mar-2001 ru

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


74813 26-Mar-2001 ru

Do not build (and install) both secure/ and standard versions
of libtelnet, telnetd, and telnet. This only worked because
secure/ was listed late in SUBDIR in Makefile.inc1.

Reviewed by: markm


74804 26-Mar-2001 ru

Don't use MANDEPEND and MANSRC.


74695 23-Mar-2001 alfred

change callrpc() from taking "char *" args, I'm quite sure they really meant
to use "void *".

remove a duplicate prototype for callrpc() from libexec/ypxfr/ypxfr_extern.h


74529 20-Mar-2001 ru

Set the default manual section for libexec/ to 8.


74470 19-Mar-2001 jlemon

Teach ftpd about the new GLOB_MAXPATH flag.


74100 11-Mar-2001 des

When the file was transferred using sendfile(2), we forgot to keep track
of the transferred byte count. MFC candidate.

PR: bin/25699


73493 04-Mar-2001 kris

First appeared in 4.3, not 5.0


72710 19-Feb-2001 des

Change the read-only reply to "550 Permission denied.".


72640 18-Feb-2001 asmodai

Preceed/preceeding are not english words. Use precede or preceding.


72476 14-Feb-2001 ru

mdoc(7) police: simplify construct.


72143 07-Feb-2001 asmodai

Synch: Properly constify sccsid[].
Replace bcopy() with memmove().


72142 07-Feb-2001 asmodai

Synch: Prefer memmove() over bcopy().


72141 07-Feb-2001 asmodai

Synch: Properly constify sccsid[].


72140 07-Feb-2001 asmodai

Synch: prefer memmove() over bcopy(), since the first is a C-standard
interface, whilst the latter is a BSD'ism.


72093 06-Feb-2001 asmodai

Fix typo: compatability -> compatibility.

Compatability is not an existing english word.


72089 06-Feb-2001 asmodai

Fix typo: seperate -> separate.

Seperate does not exist in the english language.

Submitted to look at by: kris


72082 06-Feb-2001 asmodai

Fix typo: wierd -> weird.

There is no such thing as wierd in the english language.


71926 02-Feb-2001 asmodai

Fix tftpd and tftp to support file transfers of over 65535 blocks
(about 31 MB - 32 MB).

Submitted (partially)
by: Pascal Hofstee <daeron@wit401305.student.utwente.nl>


71918 02-Feb-2001 nik

Structure the options listing to be more standard.

The PR also included documentation for other options, but upon
inspection of the source these options aren't used.

PR: docs/24149
Submitted by: Jesse Monroy, Jr. <opentrax@email.com>


71895 01-Feb-2001 ru

mdoc(7) police: split punctuation characters + misc fixes.


71774 29-Jan-2001 asmodai

Add static dependency to libisc to get isc_movefile().

Submitted by: Munehiro Matsuda <haro@kubota.co.jp>


71616 25-Jan-2001 billf

Add -c/C which chroots by IP of tftp client, (i.e. /tftproot/127.0.0.1/).


71278 20-Jan-2001 jedgar

Limit commands that can be issued when not logged in:
TYPE, STRU, MODE, ALLO, STAT, ABOR, SITE IDLE, SYST, REST

Reviewed by: kris, sheldon


71274 20-Jan-2001 jedgar

Check malloc() and strdup() return values

Reviewed by: kris


71112 16-Jan-2001 ru

man(7) -> mdoc(7).


71099 16-Jan-2001 ru

Prepare for mdoc(7)NG.


71014 14-Jan-2001 dougb

Move the process of storing entropy from /dev/random and reseeding with
it at boot time closer to the way we want it to be in the final version.

* Move the default directory to /var/db/entropy
* Run the entropy saving cron job every 11 minutes. This seems
to be a better default, although still bikeshed material.
* Feed /dev/random some cheesy "entropy" from various commands
and files before the disks are mounted. This gives /dev/random
a better chance of running without blocking early.
* Move the reseeding with previously stored entropy to the point
immediately after the disks are mounted.
* Make the harvesting script a little safer in regards to the
possibility of accidentally overwriting something other
than a regular file.


70922 11-Jan-2001 dougb

Add a system to save entropy from /dev/random periodically so that
it can be used to reseed at boot time. This will greatly increase
the chances that there will be sufficient entropy available at
boot time to prevent long delays.

For /etc/rc, remove the vmstat and iostat runs from the attempt
to provide some cheesy randomness if the files fail, since
those programs are dynamically linked, and ldd seems to want
some randomness to do its magic.

Guidance and parameters for this project were provided by
Mark Murray, based on the requirements of the Yarrow
algorithm. Some helpful suggestions for implementation
(including the tip about iostat and vmstat) were provided
by Sheldon Hearn. All blame for problems or mistakes is
mine of course.


70677 05-Jan-2001 jdp

Fix a bug in which a program called dlclose from a destructor and
got an assert failure in the dynamic linker.


70397 27-Dec-2000 ru

Prepare for mdoc(7)NG.


70227 20-Dec-2000 ru

Prepare for mdoc(7)NG.


70205 20-Dec-2000 dan

In send_data(), use sendfile() instead of the mmap() algorithm.


70144 18-Dec-2000 ru

mdoc(7) police: removed hard sentence breaks, run through spell-checker.


70116 17-Dec-2000 demon

Fix typo.

PR: 23591
Submitted by: mavetju@chello.nl


70102 16-Dec-2000 phk

Add option -E to disable EPSV which throws certain stateful firewalls
into confusion.

Add option -r to make ftpd support only read-only operations.

Submitted by: Flemming (F3) Jacobsen <fj@batmule.dk>
Reviewed by: phk


70015 14-Dec-2000 ru

mdoc(7) police: removed history info from the .Os FreeBSD call.


69948 13-Dec-2000 julian

Add support for advertising the service we support if the
PADI packet contains a NULL service. This is apparently the desired
behaviour in this case, though we only allow advertising one
service. You could run multiple pppoeds to advertise multiple services.


69913 12-Dec-2000 ru

mdoc(7) police: .Os CMU -> .Os, split authors for better output.


69857 11-Dec-2000 ru

mdoc(7) police: use canonical form of .Dd macro.


69825 10-Dec-2000 assar

(scrub_env): change to only accept a listed set of variables,
including only non-filename contents for TERMCAP


69793 09-Dec-2000 obrien

Add `_PATH_DEVZERO'.
Use _PATH_* where where possible.


69707 07-Dec-2000 ru

Whitespace-only to sync with -stable.


69705 07-Dec-2000 ru

MFS: Silence compilation warnings.


69582 04-Dec-2000 brian

Drop out of our main loop due to a signal rather than handling things in the
signal handler.
Fix a spelling error.

Subtley pointed out by: bde

Make some stuff static


69453 01-Dec-2000 obrien

The GCC 2.96 snapshots have slightly different rules for finding include
files. Mostly -I${.CURDIR} was needed -- especially for YACC generated
files as the new cpp does not look in the ultimate source file
(ie, the .y file)'s directory as told by the "#line" directive. Some were
misspellings of "-I${.CURDIR}" as "-I.".


69443 01-Dec-2000 obrien

There is no src/contrib-crypto/ anything directory. So don't look for
include files in subdirs of it.


69313 28-Nov-2000 charnier

Remove unused #include. Use getopt(3). Add usage() with syslog(3) cap.


69252 27-Nov-2000 kris

Constify


69234 26-Nov-2000 danny

Prevent leakage of information about anonymous user's homedir
via 'QUOTE CWD'.

Reviewed by: des


69226 26-Nov-2000 kris

Correct definition of MAXHOSTNAMELEN in ifdef'ed out code.


69223 26-Nov-2000 kris

Correct definition of MAXHOSTNAMELEN in ifdef'ed code.

Submitted by: Edwin Groothuis <mavetju@chello.nl>
PR: bin/22787


69200 26-Nov-2000 kris

Constify


69199 26-Nov-2000 kris

Don't hard-code a buffer size


68949 20-Nov-2000 ru

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


68905 19-Nov-2000 kris

Format string paranoia


68901 19-Nov-2000 kris

Format string paranoia


68895 19-Nov-2000 kris

L_SET -> SEEK_SET

Obtained from: OpenBSD


68894 19-Nov-2000 kris

Format string paranoia

Obtained from: OpenBSD


68890 19-Nov-2000 kris

Don't use sizeof() on a pointer when we really wanted to measure
the length of the array.

Noticed by: Christos Zoulas <christos@ZOULAS.COM>
Obtained from: OpenBSD


68888 19-Nov-2000 jwd

Check return code from login_tty. Allow getty to try and become
a daemon and session leader (thus allowing getty to be run from
a shell command line or script).

Partially Reviewed by: bde


68846 16-Nov-2000 brian

Go back to populating data_len in struct ngpppoe_init_data.


68756 15-Nov-2000 ben

remove trailing periods from SEE ALSO.


68716 14-Nov-2000 ru

Use Fx macro wherever possible.


68575 10-Nov-2000 ru

Avoid use of direct troff requests in mdoc(7) manual pages.


68561 10-Nov-2000 dirk

Fix to=auto in bootptab.

PR: misc/5574
Submitted by: Bart Robinson <lomew@marker.cs.utah.edu>
Reviewed by: wollman


68458 07-Nov-2000 jdp

Remove the superfluous call to _rtld_error() in symlook_default().
The function's callers generate the error message when appropriate.

This eliminates the message ``Undefined symbol "__register_frame_info"''
which was bogusly returned by dlerror() in some cases.


68038 31-Oct-2000 kris

Filter out some more magic environment variables used by libraries linked
with telnetd. This should really be done with a positive filter - i.e.
only allow through a configured list of variables.

Also do some buffer-safety cleanups while I'm here - I don't think these
are exploitable.


68032 31-Oct-2000 brian

Use the new-style ngpppoe_init_data structure.

Approved by: archie


67660 26-Oct-2000 gshapiro

Add a MAINTAINER= line so people know who to blame


67007 12-Oct-2000 guido

Fix broken PAM with SKEY behaviour: the skey.access file checks
were broken because the code failed to set PAM_RHOST.


67001 12-Oct-2000 ru

Removed broken PAM support from rshd(8) and rlogind(8). rshd does
not allocate a pty(4) so it is not suitable at all for interactive
PAM modules. rlogind calls login(1) which is already PAM enabled.

Approved by: markm


66961 11-Oct-2000 gshapiro

Style fixes


66942 10-Oct-2000 gshapiro

mail.local(8) is no longer installed as a set-user-id binary.

Users may have to adjust their configuration to call mail.local as root
by adding the F=S flag to the local mailer. Most probably already have this.


66907 10-Oct-2000 wollman

Don't depend on <sys/stat.h> bogusly including <sys/time.h> (and thereby
<time.h>).


66755 06-Oct-2000 ru

Make it compile without -DNO_PAM again.


66602 03-Oct-2000 brian

o Load netgraph.ko, ng_ether.ko and ng_pppoe.ko as required (I'm sure this
used not to be necessary).
o Allow ``-n ngdebug'' to specify something to pass to NgSetDebug()
and redirect NgSetDebug() output to syslog(8) in daemon() mode.
o Xref ng_ether(8) and NgSetDebug(4).
o Correct the type of the response passed to NgRecvData.


66056 19-Sep-2000 jdp

Add support for dlsym(RTLD_DEFAULT, ...).


65970 17-Sep-2000 gshapiro

Give users a way to alter the sendmail (and related utilities) build
environment so they can enable functionality such as SASL, LDAP, Hesiod.


65852 14-Sep-2000 wollman

Some more slight doco fixes: update date, and add a bit more to the history.


65850 14-Sep-2000 wollman

Allow tftpd to run as a specified user, not just `nobody'.
Update documentation to reflect new option. Also fix documentation
style and add missing references.

PR: 21268
Submitted by: "Aleksandr A. Babaylov" <babolo@links.ru>
Reviewed by: imp


65426 04-Sep-2000 imp

strerror is declared in <string.h>
errno is declared in <errno.h>


65425 04-Sep-2000 imp

remove redundant optreset declaration


65109 26-Aug-2000 jwd

Pass two pointer parameters to the r_debug_state() hook
function, thus allowing a debugger or other trace tool
to easily grab the addresses of the needed structures
off the stack.

This change is transparent to gdb, which locates the
link_map list and transfers it to debugger memory
for comparison purposes.

A sample program will be committed showing how this can
be used.

Reviewed by: John Polstra <jdp@FreeBSD.org>


64778 17-Aug-2000 sheldonh

Don't set an arbitrary limit on username lengths; use MAXLOGNAME
instead.

PR: 20675
Submitted by: Vladimir B Grebenschikov <vova@express.ru>


64699 16-Aug-2000 ru

Fix `control socket: Protocol not supported' failure in
standalone -D mode when neither -4 nor -6 is specified.


64567 12-Aug-2000 gshapiro

The rest of the changes needed to support the new version of sendmail (8.11.0).
Beyond changes to the build system, this includes fixing up the sample
freebsd.mc configuration for changes in defaults and syntax, removing
outdated documentation, and updating the release notes.


64238 04-Aug-2000 kris

sprintf() -> snprintf() paranoia.


64103 01-Aug-2000 sheldonh

Honour skey.access(5) by allowing UNIX passwords when skeyaccess(3)
has set pwok to a non-zero value.

Previously, the fact that skey.access(5) allowed UNIX passwords for
this connection attempt was ignored, even in the NOPAM case.

This only addresses the NOPAM case; when libpam is used, the problem
will persist.

PR: 20333


64076 31-Jul-2000 nsayer

Add 'nc' flag to gettytab -- no carrier. Forces non-blocking open and
setting of CLOCAL. Necessary for 3 wire RS-232 setups with dumb
terminals.

PR: 5959


63959 28-Jul-2000 ume

Make compilable without -DINET6.
With shut up unused variable warnings.

PR: bin/20225
Submitted by: Paul Herman <pherman@frenchfries.net>


63870 26-Jul-2000 jdp

Revamp the code that calls shared libraries' init and fini functions.
Formerly the init functions were called in the opposite of the
order in which libraries were loaded, and libraries were loaded
according to a breadth-first traversal of the dependency graph.
That ordering came from SVR4.0, and it was easy to implement but
not always sensible.

Now we do a depth-first walk over the dependency graph and call
the init functions in an order such that each shared object's needed
objects are initialized before the shared object itself. At the
same time we build a list of finalization (fini) functions in the
opposite order, to guarantee correct C++ destructor ordering whenever
possible. (It may not be possible if dlopen and dlclose are used
in strange ways, but we come as close as one can come.)

The need for this renovation has become apparent as more programs
have started using multithreading. The multithreaded C library
libc_r requires initialization, whereas the standard libc does not.
Since virtually every other object depends on the C library, it is
important that it get initialized first.


63615 20-Jul-2000 green

We shouldn't use cp to save the old ld-elf.so.1. Use the sanctioned tool
${INSTALL} with -C -p instead.


63350 17-Jul-2000 des

Don't reply "not a plain file" when the requested file doesn't exist.


63316 17-Jul-2000 jdp

Fix a bug which could cause programs with user threads packages to
lock against themselves, causing infinite spinning. Brian Feldman
found this problem when testing with Mozilla and supplied the fix,
which I have revised slightly.

Here is the failure scenario. A thread calls dlopen() and acquires
the writer lock. While the thread still holds the lock, a signal
is delivered and caught. The signal handler tries to call a function
which hasn't been bound yet. It thus enters the dynamic linker
and tries to acquire the reader lock. Since the writer lock is
already held, it will spin forever in the signal handler. The
thread holding the lock won't be able to progress and release the
lock.

The solution is to block almost all signals while holding the
exclusive lock.

A similar problem could conceivably occur in the opposite order.
Namely, a thread is holding the reader lock and then a signal
handler calls dlopen() or dlclose() and spins waiting for the writer
lock. We deal with this administratively by proclaiming that signal
handlers aren't allowed to call dlopen() or dlclose(). Actually
we don't have to proclaim a thing, since signal handlers aren't
allowed to call any system functions except those which are explicitly
permitted.

Submitted by: Brian Fundakowski Feldman <green>


62983 11-Jul-2000 kris

Don't call err() without a format string.


62946 11-Jul-2000 ben

Explain that the -S option only logs file downloads, not all transfers.

PR: 16934
Submitted by: Kurt Zeilenga <kurt@OpenLDAP.org>


62801 08-Jul-2000 jdp

Solve the dynamic linker's problems with multithreaded programs once
and for all (I hope). Packages such as wine, JDK, and linuxthreads
should no longer have any problems with re-entering the dynamic
linker.

This commit replaces the locking used in the dynamic linker with a
new spinlock-based reader/writer lock implementation. Brian
Fundakowski Feldman <green> argued for this from the very beginning,
but it took me a long time to come around to his point of view.
Spinlocks are the only kinds of locks that work with all thread
packages. But on uniprocessor systems they can be inefficient,
because while a contender for the lock is spinning the holder of the
lock cannot make any progress toward releasing it. To alleviate
this disadvantage I have borrowed a trick from Sleepycat's Berkeley
DB implementation. When spinning for a lock, the requester does a
nanosleep() call for 1 usec. each time around the loop. This will
generally yield the CPU to other threads, allowing the lock holder
to finish its business and release the lock. I chose 1 usec. as the
minimum sleep which would with reasonable certainty not be rounded
down to 0.

The formerly machine-independent file "lockdflt.c" has been moved
into the architecture-specific subdirectories by repository copy.
It now contains the machine-dependent spinlocking code. For the
spinlocks I used the very nifty "simple, non-scalable reader-preference
lock" which I found at

<http://www.cs.rochester.edu/u/scott/synchronization/pseudocode/rw.html>

on all CPUs except the 80386 (the specific CPU model, not the
architecture). The 80386 CPU doesn't support the necessary "cmpxchg"
instruction, so on that CPU a simple exclusive test-and-set lock
is used instead. 80386 CPUs are detected at initialization time by
trying to execute "cmpxchg" and catching the resulting SIGILL
signal.

To reduce contention for the locks, I have revamped a couple of
key data structures, permitting all common operations to be done
under non-exclusive (reader) locking. The only operations that
require exclusive locking now are the rare intrusive operations
such as dlopen() and dlclose().

The dllockinit() interface is now deprecated. It still exists,
but only as a do-nothing stub. I plan to remove it as soon as is
reasonably possible. (From the very beginning it was clearly
labeled as experimental and subject to change.) As far as I know,
only the linuxthreads port uses dllockinit(). This interface turned
out to have several problems. As one example, when the dynamic
linker called a client-supplied locking function, that function
sometimes needed lazy binding, causing re-entry into the dynamic
linker and a big looping mess. And in any case, it turned out to be
too burdensome to require threads packages to register themselves
with the dynamic linker.


62800 08-Jul-2000 jdp

When installing the dynamic linker, save the previous version in
"ld-elf.so.1.old". The dynamic linker is a critical component of
the system, and it is difficult to recover if it is damaged and
there isn't a working backup available. For instance, parts of
the toolchain such as the assembler are dynamically linked, making
it impossible to build a new dynamic linker if the installed one
doesn't work.


62643 05-Jul-2000 bsd

Plug the hole where rshd would bypass a proper .rhosts check if the
password was empty.

Reviewed by: Warner Losh <imp@freebsd.org>


62271 30-Jun-2000 sheldonh

Only punctuation is an allowed argument type for open-close macros
such as Po/Pc, as explained by phantom.

Reported by: billf


62100 26-Jun-2000 davidn

Fix a problem in the virtual host address compare code which caused
duplicated host entries in /etc/ftphosts not to be folded. Make sure
we exit the loop on a match.

PR: bin/19390


61749 17-Jun-2000 joe

Switch over to using the new fflagstostr and strtofflags library calls.


61187 02-Jun-2000 jlemon

Spelling fix: transfered --> transferred

Submitted by: dan@dan.emsphone.com


60938 26-May-2000 jake

Back out the previous change to the queue(3) interface.
It was not discussed and should probably not happen.

Requested by: msmith and others


60929 25-May-2000 nsayer

1. Add IPv6 portrange restriction code (-U flag) to passive().

2. Add portrange restriction code (for both v4 and v6) to the EPSV
processing stuff.


60833 23-May-2000 jake

Change the way that the queue(3) structures are declared; don't assume that
the type argument to *_HEAD and *_ENTRY is a struct.

Suggested by: phk
Reviewed by: phk
Approved by: mdodd


60799 22-May-2000 jdp

Eliminate unaligned accesses that occurred when relocating the
DWARF2 exception tables emitted by the compiler for C++ sources.
These tables are tightly packed, and they contain some relocated
addresses which are not well-aligned.


60604 15-May-2000 bde

Don't uselessly set MANDEPEND (it isn't used in this Makefile, and isn't
really used in bsd.man.mk).

Don't uselessly set MANSRC ("." is in the path by default, and there are
no ordering problems).

Fixed some other style bugs.


60594 15-May-2000 nsayer

Man page fixups

Submitted by: sheldonh@uunet.co.za


60552 14-May-2000 ume

IPv6 support.

Reviewed by: shin


60507 13-May-2000 nsayer

Add -i (insecure) flag to rexecd, which allows uid == 0 logins
(presuming that the user in question is not in /etc/ftpusers and
does not have a null password).


60015 05-May-2000 mpp

Minor mdoc cleanup.

PR: docs/13218


59748 29-Apr-2000 asmodai

Remove dead debug code.
This also removes a dependency/reference on COMPAT_43.


58720 28-Mar-2000 sheldonh

Cross-reference ldd(1) in rtld(1) and vice versa.


58676 27-Mar-2000 bde

Fixed missing DPADDs.

Fixed some style bugs (some usual ones for LDADD, and misformatting of
$FreeBSD$).


58532 24-Mar-2000 dan

Wrap uucpd behind the NOUUCP knob.

Noticed by: Doug Barton


57978 13-Mar-2000 ru

Finally unifdef -DINTERNAL_LS.


57453 24-Feb-2000 markm

Use libcrypto instead of libdes.


57313 18-Feb-2000 shin

Support logging for IPv6 remote host.

Approved by: jkh

PR: bin/16789
Submitted by: Ben Smithurst <ben@scientia.demon.co.uk


57267 17-Feb-2000 peter

Doc fix: remove references to ~ftp/bin/ls as we have FTPD_INTERNAL_LS
unconditionally active already.

Noticed by: obrien


57124 10-Feb-2000 shin

Add more dual stack consideration.

-ftpd need to know each of AF_INET and AF_INET6 addr for hosts specified in
/etc/ftphosts.

Approved by: jkh


57003 05-Feb-2000 joe

Revert part of the last commit, remove {g|s}etflags from the libc
interface, and statically link them to the programs using them.
These functions, upon reflection and discussion, are too generically
named for a library interface with such specific functionality.
Also the api that they use, whilst ok for private use, isn't good
enough for a libc function.

Additionally there were complications with the build/install-world
process. It depends heavily upon xinstall, which got broken by
the change in api, and caused bootstrap problems and general mayhem.

There is work in progress to address future problems that may be
caused by changes in install-chain tools, and better names for
{g|s}etflags can be derived when some future program requires them.
For now the code has been left in src/lib/libc/gen (it started off
in src/bin/ls).

It's important to provide library functions for manipulating file
flag strings if we ever want this interface to be adopted outside
of the source tree, but now isn't necessarily the right moment
with 4.0-release just around the corner.

Approved: jkh


56975 03-Feb-2000 shin

Remove unnecessary -g for CFLAGS.

-g for CFLAGS which was set at debugging time was mistakenly committed,
so removed it.

Approved by: jkh


56974 03-Feb-2000 shin

Fix ftpd core dump when hostname is not set.

When hostname is not set, ftpd core dumps, because there is no
NULL check for freeing name resolving information for its own
hostname.
So the check is added.

Approved by: jkh


56939 01-Feb-2000 shin

sync iruserok() extension API with other BSDs

Some of rcmd related function is need to be updated to
support IPv6. Some of them are already updated as standard
document. But there is also several de-facto functions and
they are not listed in standard documents.
They are,

iruserok() (used by rlogind, rshd)
ruserok() (used by kerberos, etc)

KAME package updated those functions in original way.

iruserok_af()
ruserok_af()

But recently there was discussion on IETF IPng mailing
list about how to sync those API, and it is decided,

-Those function is not standard and not documented.
-But let BSDs sync their API as de-facto.

And after some discussion, it is announced that

-add update to iruserok() as iruserok_sa()
-no ruserok() API change(it is only updated internaly)

So I sync those API before 4.0 is released.
The changes are,
-prototype changes
-ruserok() internal update (use iruserok_sa() inside)
-removal of ruserok_af()
-change iruserok_af() as static functioin, and also prefix the name with __.
-add iruserok_sa() (Just call __iruserok_af() inside)
-adding flag AI_ALL to getipnodebyaddr() called from __icheckhost().
This is necessary to support IPv4 communication via AF_INET6 socket
could be correctly authenticated via iruserok_sa()
-irusreok_af() call is replaced to iruserok_sa() call
in rlogind, and rshd.

Approved by: jkh


56790 29-Jan-2000 jdp

Add a manual page for the ELF dynamic linker. I initially created
rtld.1 by means of a repository copy from "src/libexec/rtld-aout/rtld.1".
Then I edited it to make it (more) accurate for the ELF dynamic
linker.


56789 29-Jan-2000 jdp

Move the man pages for the a.out dynamic linker into the 1aout
section. I created rtld.1aout earlier with a repository copy.

This clears the way for the ELF dynamic linker man page, which I
will commit next.


56780 29-Jan-2000 jdp

When a threads package registers locking methods with dllockinit(),
figure out which shared object(s) contain the the locking methods
and fully bind those objects as if they had been loaded with
LD_BIND_NOW=1. The goal is to keep the locking methods from
requiring any lazy binding. Otherwise infinite recursion occurs
in _rtld_bind.

This fixes the infinite recursion problem in the linuxthreads port.


56758 28-Jan-2000 shin

Fix rshd coredump when AF_INET socket is used.

Confirmed by: F. Heinrichmeyer <fritz.heinrichmeyer@fernuni-hagen.de>


56725 28-Jan-2000 bde

Changed setflags() to set_flags(). This fixes world breakage due to
recently incremented namespace pollution in <unistd.h>.


56668 27-Jan-2000 shin

another tcp apps IPv6 updates.(should be make world safe)
ftp, telnet, ftpd, faithd
also telnet related sync with crypto, secure, kerberosIV

Obtained from: KAME project


56590 25-Jan-2000 shin

several tcp apps IPv6 update
-inetd
-rshd
-rlogind
-telnetd
-rsh
-rlogin

Reviewed by: freebsd-arch, cvs-committers
Obtained from: KAME project


56566 25-Jan-2000 jdp

Block almost all signals in the default locking method instead of
just a few of them. This looks like it solves the recent

ld-elf.so.1: assert failed: /usr/src/libexec/rtld-elf/lockdflt.c:55

failures seen by some applications such as JDK.


56417 23-Jan-2000 mpp

Fix various man pages to stop abusing the .Bx macro to generate the
string "FreeBSD". Use the .Fx macro instead.


56405 22-Jan-2000 jdp

Allow files in LD_PRELOAD to be separated by white space, like Solaris
and Linux.


55858 12-Jan-2000 asmodai

We do not support the -B option.

PR: 15925
Submitted by: Thierry Herbelot


55687 09-Jan-2000 jdp

Revamp the mechanism for enumerating and calling shared objects'
init and fini functions. Now the code is very careful to hold no
locks when calling these functions. Thus the dynamic linker cannot
be re-entered with a lock already held.

Remove the tolerance for recursive locking that I added in revision
1.2 of dllockinit.c. Recursive locking shouldn't happen any more.

Mozilla and JDK users: I'd appreciate confirmation that things still
work right (or at least the same) with these changes.


55562 07-Jan-2000 phantom

. mdoc(7)'fy
. add Xrs to hosts.equiv(5), auth.conf(5), services(5) to some pages
. sort Xrs in SEE ALSO sections

Patches based on PR: docs/15680
Submitted by: Christian Weisgerber <naddy@mips.rhein-neckar.de>


55270 30-Dec-1999 joe

Moved flags_to_string and string_to_flags into libutil. It's used in
many places nowadays.


55165 28-Dec-1999 jdp

Work around an assert failure in the dynamic linker's default thread
locking functions. If an application loads a shared object with
dlopen() and the shared object has an init function which requires
lazy binding, then _rtld_bind is called when the thread is already
inside the dynamic linker. This leads to a recursive acquisition
of the lock, which I was not expecting -- hence the assert failure.

This work-around makes the default locking functions handle recursive
locking. It is NOT the correct fix -- that should be implemented
at the generic locking level rather than in the default locking
functions. I will implement the correct fix in a future commit.

Since the dllockinit() interface will likely need to change, warn
about that in both the man page and the header file.


55122 27-Dec-1999 jdp

Add a new function dllockinit() for registering thread locking
functions to be used by the dynamic linker. This can be called by
threads packages at start-up time. I will add the call to libc_r
soon.

Also add a default locking method that is used up until dllockinit()
is called. The default method works by blocking SIGVTALRM, SIGPROF,
and SIGALRM in critical sections. It is based on the observation
that most user-space threads packages implement thread preemption
with one of these signals (usually SIGVTALRM).

The dynamic linker has never been reentrant, but it became less
reentrant in revision 1.34 of "src/libexec/rtld-elf/rtld.c".
Starting with that revision, multiple threads each doing lazy
binding could interfere with each other. The usual symptom was
that a symbol was falsely reported as undefined at start-up time.
It was rare but not unseen. This commit fixes it.


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.


54199 06-Dec-1999 sheldonh

Correct the ttys.5 and init.8 manpages with respect to the incorrect
assumption that only getty processes can be managed. Describe the
SysV-like ability to keep arbitrary long-running processes alive
using a non-device first field in /etc/ttys.

PR: 12767
Submitted by: Peter Jeremy <peter.jeremy@alcatel.com.au>


53932 30-Nov-1999 peter

Reactivate named-xfer


53909 30-Nov-1999 peter

Move named and associated tools into a seperate makefile section and
disable them pending an import and cleanup of bind 8.2.2.p5.


53609 23-Nov-1999 brian

Add a ``-P pidfile'' option


53539 21-Nov-1999 brian

Enable pppoed


53537 21-Nov-1999 brian

pppoed(8) - a server to accept PPPoE connections


53400 19-Nov-1999 jdp

In revision 1.21 I changed the search order for shared libraries,
but I forgot to make the corresponding fix to the comment. Rectify
that.

Submitted by: Tony Finch <fanf@demon.net>


53105 12-Nov-1999 marcel

Fix bootpd for Alpha.

bptypes.h originally defined int32 to be of type long. This obviously
doesn't work on the Alpha. By defining int32 (and u_int32) in terms of
int32_t (and u_int32_t) it now is what it says it should be.

Two occurrences of 'unsigned int32' have been changed to 'u_int32' for
consistency.

Submitted by: Wilko Bulte <wilko@yedi.iaf.nl>


52922 06-Nov-1999 eivind

Log username with password failure.
This has proved useful in real life installations.


51995 07-Oct-1999 markm

Allow for a telnet in secure/ (SRA telnet).


51979 07-Oct-1999 alfred

sync with netbsd PR 8534, fix undefined C code.
Pointed out by: David A. Holland


51746 28-Sep-1999 phantom

.Nm += "rtld"
apropos(1) now knows about rtld(1) manpage.


51457 20-Sep-1999 phantom

Correct spelling : ascii -> ASCII

PR: docs/13702
Submitted by: Stephen J. Roznowski <sjr@home.com>
Reviewed by: mpp


51433 19-Sep-1999 markm

Fix for new Kerberos4. Make a fist cut at PAM-ising while I'm here.


51192 12-Sep-1999 mharo

When a STAT command is sent to ftpd as an out-of-band transmission during
a file transfer, the command was mishandled on every other receipt of the
command.

PR: 13261
Submitted by: Ian Lepore <ian@plutotech.com>


51036 06-Sep-1999 markm

Fix more Common Error brokenness.


50990 06-Sep-1999 markm

Add common error lib for the Kerberos case.


50977 05-Sep-1999 jdp

Make jdk-1.1.8 work again. It turns out that some code inside
libjava peeks into the dynamic linker's private Obj_Entry structures.
My recent changes introduced some new members near the front of
the structures, causing libjava to get the wrong fields. This commit
moves the new members toward the end of the structure so that the
layout of the portion that is relevant to JDK remains the same as
before.

I will work with the JDK porting team to see if we can come up with
a less fragile way for them to do what they need to do. I understand
the current approach was necessary in order to work around some
limitations of the dynamic linker. Maybe it's not necessary any
more.


50930 04-Sep-1999 jdp

Enable -Wformat checking for debug_printf().


50928 04-Sep-1999 jdp

Change the warning about unrecognized entries in the dynamic table
to a debug message which is disabled in production builds of the
dynamic linker. The condition warned about is normally harmless.

PR: bin/12849


50873 04-Sep-1999 jdp

When looking up symbols, search the objects loaded at program start
up first -- before the dlopened DAGs containing the referencing
object.

This makes dynamically loaded perl modules work properly again.


50610 30-Aug-1999 jdp

Get the actual pathname of the dynamic linker from the executable's
PT_INTERP program header entry, to ensure that gdb always finds
the right dynamic linker.

Use obj->relocbase to simplify a few calculations where appropriate.


50609 30-Aug-1999 jdp

When checking to see if a shared object is already loaded, look for
a device/inode match if no pathname match is found.


50608 30-Aug-1999 jdp

Revamp the symbol lookup algorithm to cope better with objects
loaded separately by dlopen that have global symbols with identical
names. Viewing each dlopened object as a DAG which is linked by its
DT_NEEDED entries in the dynamic table, the search order is as
follows:

* If the referencing object was linked with -Bsymbolic, search it
internally.
* Search all dlopened DAGs containing the referencing object.
* Search all objects loaded at program start up.
* Search all objects which were dlopened() using the RTLD_GLOBAL
flag (which is now supported too).

The search terminates as soon as a strong definition is found.
Lacking that, the first weak definition is used.

These rules match those of Solaris, as best I could determine them
from its vague manual pages and the results of experiments I performed.

PR: misc/12438


50607 30-Aug-1999 jdp

When honoring -Bsymbolic, still keep searching if only a weak
definition was found in the referencing object.


50606 30-Aug-1999 jdp

Simplify the logic in find_symdef().


50533 28-Aug-1999 mpp

Add $FreeBSD$ lines to man pages that are missing them to make it
easier for translation teams.

PR: docs/13418
Submitted by: Alexey Zelkin <phantom@cris.net>


50476 28-Aug-1999 peter

$Id$ -> $FreeBSD$


50380 26-Aug-1999 peter

unifdef -DINTERNAL_LS - it's too useful to be off by default. If anyone
really dislikes this, we could add a switch to disable it at runtime and
check in popen.c.


50132 21-Aug-1999 imp

Ufff. cflags -> chflags. I could have sworn this change has been in
my last three successful make buildworlds...

Noticed by: phk


50123 21-Aug-1999 imp

Remove all flags from devices before we try to assert ownership and
set permissions.

Bug not fixed:
We silently ignore failures of chflags, chmod and chown.


50096 20-Aug-1999 jdp

Add a NULL pointer check whose absence could cause segmentation
violations in certain obscure cases involving failed dlopens. Many
thanks to Archie Cobbs for providing me with a good test case.

Eliminate a block that existed only to localize a declaration.


49557 09-Aug-1999 jkh

Back out previous commit - it's not necessary now that tty.h properly includes
the queue macros.


49554 09-Aug-1999 green

Add a missing include (sys/queue.h for sys/tty.h SLIST usage.)


49507 08-Aug-1999 stark

Correction to previous commit.


49505 08-Aug-1999 stark

Corrected mistake that was causing daemon to loop without serving
user requests. Note that nothing can be said about the value of 'user'
unless User != NULL.


48871 18-Jul-1999 jdp

Change many asserts into normal errors. They were all for conditions
caused by invalid shared objects rather than by internal errors.

Enable format string mismatch checking for _rtld_error().


48805 14-Jul-1999 jdp

Change the symbol used to find the end of an object's address space
from "end" to "_end". The former does not exist in most shared
libraries. This fixes problems in dladdr() and dlsym(RTLD_NEXT, ...).


48786 12-Jul-1999 mpp

Fix a couple of typos.

PR: 12610
Submitted by: Seth <seth@freebie.dp.ny.frb.org>


48771 12-Jul-1999 dfr

Add code to 'handle' R_ALPHA_NONE relocations by ignoring them.


48709 09-Jul-1999 jdp

Add a MAINTAINER line naming myself. We control the vertical. We
control the horizontal.


48708 09-Jul-1999 jdp

Fix bug: if a dlopen() failed (e.g., because of undefined symbols),
the dynamic linker didn't clean up properly. A subsequent dlopen()
of the same object would appear to succeed.

Another excellent fix from Max Khon.

PR: bin/12471
Submitted by: Max Khon <fjoe@iclub.nsu.ru>


48543 03-Jul-1999 jdp

Shake hands with GDB a little bit earlier so that it is possible to
debug the init functions.

Submitted by: dfr


48313 28-Jun-1999 mpp

Update the SYNOPSIS to reflect that the -l option can be specified
more than once.

Pointed-out-by: sheldonh


48208 25-Jun-1999 jdp

Fix a reference counting problem when using dlopen(NULL, ...).

PR: bin/12129


48205 25-Jun-1999 jdp

Fix a serious performance bug for large programs on the Alpha,
discovered by Hidetoshi Shimokawa. Large programs need multiple
GOTs. The lazy binding stub in the PLT can be reached from any of
these GOTs, but the dynamic linker only has enough information to
fix up the first GOT entry. Thus calls through the other GOTs went
through the time-consuming lazy binding process on every call.

This fix rewrites the PLT entries themselves to bypass the lazy
binding.

Tested by Hidetoshi Shimokawa and Steve Price.

Reviewed by: Doug Rabson <dfr@freebsd.org>


47291 18-May-1999 peter

Identify illegal switches, don't print them as '?' in the error..


46929 10-May-1999 wpaul

Fix ypxfr so that it can be run from cron.

Patch submitted by: Dan Nelson <dnelson@emsphone.com>


46439 04-May-1999 ghelmer

Add missing -A option to SYNOPSIS.

PR: docs/10771


46078 25-Apr-1999 imp

More egcs warning fixes:
o main returns int not void
o use return 0 at end of main when needed
o use braces to avoid potentially ambiguous else
o don't default to type int (and also remove a useless register
modifier).

Reviewed by: obrien and chuckr


45929 22-Apr-1999 jdp

Back out my change from 6 April PDT that added a new dlversion()
function. It was an ill-considered feature. It didn't solve the
problem I wanted it to solve. And it added Yet Another Version
Number that would have to be maintained at every release point.
I'm nuking it now before anybody grows too fond of it.


45890 21-Apr-1999 jdp

After relocating the main program, but before calling any of the
_init() functions, initialize the global variables "__progname" and
"environ". This makes it possible for the _init() functions to call
things like getenv() and err().


45510 09-Apr-1999 jdp

The ELF specification says that the RPATH in the executable or
shared object takes precedence over LD_LIBRARY_PATH. Make the
dynamic linker do it that way.


45501 09-Apr-1999 jdp

Eliminate all machine-dependent code from the main source body and
the Makefile, and move it down into the architecture-specific
subdirectories.

Eliminate an asm() statement for the i386.

Make the dynamic linker work if it is built as an executable instead
of as a shared library. See i386/Makefile.inc to find out how to
do it. Note, this change is not enabled and it might never be
enabled. But it might be useful in the future. Building the
dynamic linker as an executable should make it start up faster,
because it won't have any relocations. But in practice I suspect
the difference is negligible.


45492 08-Apr-1999 brian

Determine the host name using an array size of
MAXHOSTNAMELEN and call trimdomain() before implementing
the -u option.

This allows local hosts of a lan with a long domain name to
appear properly in utmp by base host name (w/o domain) rather
than by IP number.


45423 07-Apr-1999 brian

Really fix -u....


45422 07-Apr-1999 brian

Ensure that things returned by gethostname() and
friends are terminated and allow for a maximum
host name length of MAXHOSTNAMELEN - 1.
Put parenthesis around sizeof args.
Make some variables static.
Fix telnetd -u (broken by my last commit)

Prompted by: bde


45418 07-Apr-1999 brian

Fix the size of rhost, don't forget to NUL terminate
it and use brackets for sizeof.
Requested by: bde


45399 07-Apr-1999 jdp

Fix a couple of typos in comments.


45398 07-Apr-1999 jdp

Add a new function dlversion() which returns the version number of
the dynamic linker in the same form as __FreeBSD_version. This is
mainly intended for checking the dynamic linker version during a make
world.


45396 06-Apr-1999 brian

Link with libutil


45393 06-Apr-1999 brian

Use realhostname() rather than various combinations of
gethostbyaddr() & gethostbyname().

Remove brokeness in ftpd for hosts of MAXHOSTNAMELEN length.


45353 06-Apr-1999 brian

After receiving a connection and doing a reverse
lookup on the incoming IP, do a forward lookup on
the result and make sure that the IP is in the
resulting list. If it's not, put the IP number
in utmp/wtmp instead of the rogue name.

Stolen from: rlogind
Suggested by: sef


45320 05-Apr-1999 jdp

Resolve undefined weak references to a value of 0. This solves the
"__deregister_frame_info" problem that was seen when combining a
program linked using the old gcc with shared libraries that were
built using egcs.


45292 04-Apr-1999 peter

If somebody does an execv("foo", NULL) (which theoretically is an error),
avoid crashing inside rtld (since it's easy) since everything else handles
it. Of course, if the target program checks argv[], it'll fall over.

Reviewed by: jdp


45291 04-Apr-1999 peter

Add an 'al' (autologin username) capability to getty/gettytab. This is a
damn useful thing for using with serial consoles in clusters etc or secure
console locations. Using a custom gettytab entry for console with
an entry like 'al=root' means that there is *always* a root login ready on
the console. This should replace hacks like those which go with conserver
etc. (This is a loaded gun, watch out for those feet!)

Submitted by: "Andrew J. Korty" <ajk@purdue.edu>


45146 30-Mar-1999 joerg

Ignore empty usernames, and repeat the login: prompt in this case.
There's not much point in having uucpd behave differently than
login(1) for this, and now uucpd is compatible to the default chat
script of Taylor UUCP which sends a single \r at first.

While i was at it, added a few strategic ``errno = 0;''s, so at least
an `Undefined error 0' will be returned for things like a closed
connection while reading the login ID or password, as opposed to an
even more bogus thing like `No such file or directory'.


45018 24-Mar-1999 nate

- Commit the correct dladdr() implementation.

Reviewed by: jdp@FreeBSD.org <This is the version he reviewed!>


45015 24-Mar-1999 nate

- Added dladdr(3) support.

Reviewed by: jdp@FreeBSD.org


44615 09-Mar-1999 brian

Set the CPU resource limit back to infinity before exec()ing PP.
PR: 10399


44060 15-Feb-1999 fenner

Clean up some .Os macro uses: quotes are not needed, multiple arguments
don't really work if the first one isn't "FreeBSD", and "FreeBSD-Experimental"
isn't an OS name.


44050 15-Feb-1999 nate

- Set the system immutable flag when installing ld.so to avoid people
accidentally clobbering it.

Submitted by: numberous people on -current


42587 12-Jan-1999 asami

Oops, I missed a few more /etc/nologin references yesterday. It appears
my check of the tree was incomplete. Sorry guys.

Reported by: Ben Smithurst <ben@scientia.demon.co.uk>


41860 16-Dec-1998 peter

As previously threatened, clean up the rshd -a option and make it default
on rshd and rlogind. However, note that:
1: rshd used to drop a connection with -a if the hostname != ip address.
This is unneeded, because iruserok() does it's own checking.
It was also wrong if .rhosts had an explicit IP address in it,
connections would be dropped from that host solely because the DNS was
mismatched even though it was explicitly intended to work by IP address.
2: rlogind and rshd check the hostname mappings by default now because that
is what goes into the utmp/wtmp and logs. If the hostname != ip address,
then it uses the IP address for logging/utmp/wtmp purposes. There isn't
much point logging ficticious hostnames.
3: rshd -a is now accepted (but ignored) for compatability. If you really
want to make life miserable for people with bad reverse DNS, use tcpd in
paranoid mode (which is questionable anyway, given DNS ttl tweaking).


41857 16-Dec-1998 peter

Old stuff laying around: Don't use a function called getstr(), that has
nasty consequences when the system curses is ncurses as this conflicts
with a ncurses funciton and causes recursion.


41734 13-Dec-1998 eivind

Block for buffer overflow.


41699 12-Dec-1998 dillon

PR: bin/9031

Changed unbounded strcpy() to snprintf() to fix buffer overrun exploit


41480 03-Dec-1998 bde

Fixed long line in previous commit.


41465 02-Dec-1998 billf

Update to correctly reflect the default values of
net.inet.ip.portrange.hifirst and net.inet.ip.portrange.hilast

PR: docs/6745
Submitted by: Masachika Ishizuka <ishizuka@ish.org>


41445 01-Dec-1998 dg

Added a -D option to turn on TCP_NODELAY.


41440 01-Dec-1998 dillon

Reviewed by: freebsd-current, freebsd-security

Removed getuid() root check so ntalkd can be run from a tty sandbox.
It isn't suid root anyway, who knows why the getuid() check was even
in there in the first place!


41374 27-Nov-1998 dfr

Use the runpath of the main program for locating libraries loaded by
dlopen().

Reviewed by: jdp


41278 21-Nov-1998 jdp

Find "klogin.c" in "src/lib/libpam/modules/pam_kerberosIV" instead
of in "src/usr.bin/login". The latter instance is going away. As
soon as ftpd is PAMized, it won't need to use klogin.c at all.


41051 10-Nov-1998 dima

Enable named-xfer and rbootd for alpha.


40983 07-Nov-1998 jdp

Fix a bug in the handling of minor version numbers. Formerly, the
rtld would accept the first shared library it found with the right
major version number, even if the minor version number was too low.
If a different version of the shared library with an adequate minor
version number appeared later in the search path, it would not be
found.

Now the rtld searches all locations first looking for a library
with a minor version that is high enough. Only if such a library
is not found will it fall back to accepting a minor version number
that is too low. As before, a warning comes out in that case.

This solves some problems encountered when building an older world
on a -current system.


40765 30-Oct-1998 dg

Rename a function name so that it doesn't conflict with a future system call.


40310 13-Oct-1998 des

Set the user context correctly so that cd ~ does the right thing.

PR: bin/7943 bin/8293
Submitted by: Bill Fenner <fenner@parc.xerox.com>
Approved by: jkh


40280 13-Oct-1998 jdp

Fix a bug in dlclose that broke the apache13 port. The list of
loaded objects wasn't being maintained properly.


40083 08-Oct-1998 jkh

This thing has its own puts function, so use it.
Submitted by: Matthew Jacob <mjacob@nas.nasa.gov>


40078 08-Oct-1998 ken

Fix a memory leak in rpc.rstatd that shows up when it's run in standalone
mode. (i.e., not from inetd)

PR: bin/8212


39783 29-Sep-1998 alex

Added double quotes around CHMOD description to prevent garbled output.

PR: 8094
Submitted by: Christoph Weber-Fahr <wefa@callcenter.systemhaus.net>


39551 22-Sep-1998 jdp

Make LD_PRELOAD work for ELF.


39495 19-Sep-1998 obrien

Remove useless `BINOWN=root' now that it is the default.


39383 16-Sep-1998 dfr

Work around an alpha compiler bug.

Reviewed by: Kenneth D. Merry <ken@plutotech.com>


39321 16-Sep-1998 jdp

Fix a bug that showed up when debugging dynamically linked programs.
References from GDB to "printf" and various other functions would
find the versions in the dynamic linker itself, rather than the
versions in the program's libc. This fix moves the GDB link map
entry for the dynamic linker to the end of the search list, where
its symbols will be found only if they are not found anywhere else.
It was suggested by Doug Rabson, though I implemented it a little
differently.

I personally would prefer to leave the dynamic linker's entry out
of the GDB search list altogether. But Doug argues that it is
handy there for such things as setting breakpoints on dlopen().
So it stays for now, at least.

Note, if we ever integrate the dynamic linker with libc (which has
several important benefits to recommend it), this whole problem
goes away.


39306 15-Sep-1998 jdp

Make the pathname pointed to by the Obj_Entry structure for the
dynamic linker itself dynamically allocated. All of them are
supposed to be dynamically allocated, but we cheated before. It
made gdb unhappy under some circumstances.


39228 15-Sep-1998 gibbs

Update system to new device statistics code.

Submitted by: "Kenneth D. Merry" <ken@plutotech.com>
mike@smith.net.au (Mike Smith)


39081 11-Sep-1998 dfr

Update to the binutils-2.9.1 PLT format.


39080 11-Sep-1998 dfr

Add the r_addend of the relocation when processing GLOB_DAT relocations.


38940 08-Sep-1998 dfr

Fix a cut&paste error which prevented LD_BIND_NOW from working.


38870 05-Sep-1998 jdp

Don't recognize a file as an a.out shared library unless it has at
least 2 version numbers. This fixes the bug where the dynamic
linker would try to load an ELF shared library if it found one.

Note, this change also fixes the same thing in "ld", because the
code is shared.

For "ld" there is still a problem with ".a" libraries, which cannot
be distinguished by name. I haven't decided what, if anything, to
do about that.


38854 05-Sep-1998 jb

Chaneg MACHINE to MACHINE_ARCH to support MACHINE=pc98.

Remove a couple of unsupported machines.


38853 05-Sep-1998 jb

Chaneg MACHINE to MACHINE_ARCH to support MACHINE=pc98.


38836 05-Sep-1998 jdp

Implement ldconfig functionality for ELF. The hints are stored in
a different file than the a.out hints, namely, "/var/run/ld-elf.so.hints".
These hints consist only of the directory search path. There is
no hash table as in the a.out hints, because ELF doesn't have to
search for the file with the highest minor version number. (It
doesn't have minor version numbers at all.)

A single run of ldconfig updates either the a.out hints or the ELF
hints, but not both. The set of hints to process is selected in
the usual way, via /etc/objformat, or ${OBJFORMAT}, or the "-aout"
or "-elf" command line option. The rationale is that you probably
want to search different directories for ELF than for a.out.

"ldconfig -r" is faked up to produce output like we are used to,
except that for ELF there are no minor version numbers. This should
enable "ldconfig -r" to be used for checking LIB_DEPENDS in ports
even for ELF.

I implemented the ELF functionality in a new source file, with an
eye toward eliminating the a.out code entirely at some point in
the future.


38827 05-Sep-1998 jb

Add -lcrypt when building kerberos.


38823 04-Sep-1998 jb

Enable rtld-elf for build on alpha too. We now have support for shared
libraries on alpha!


38816 04-Sep-1998 dfr

Add alpha support.

Submitted by: John Birrell <jb@cimlogic.com.au> (with extra hacks by me)
Obtained from: Probably NetBSD


38740 02-Sep-1998 jdp

Suppress duplicate entries in ldd output.


38739 02-Sep-1998 jdp

Style fixes. If it seems like a lot of lines of changes, it's
because I moved some functions. Mr. Tidy likes them to be in
alphabetical order.


38737 02-Sep-1998 jdp

Handle dlsym(NULL, ...) properly, by searching in the caller's
shared object. Note, this searches _only_ that object, and not its
needed objects, in accordance with the documentation.

Also fix dlopen(NULL, ...) so that the executable's needed objects
are searched as well as the executable itself.


38702 31-Aug-1998 wosch

Sort cross references.


38632 30-Aug-1998 jb

BINFORMAT -> OBJFORMAT ready for E-day.


38480 22-Aug-1998 mckay

Pass me the pointy hat with the extra sequins. Just a moment, while I get
it to sit right...

The __error() hack gave out the wrong address. It returned the address of
errno in ld.so instead of the address of errno in the main program. Oops.

The hack is now correct, just in time to be obsoleted by elf.


38467 21-Aug-1998 jb

Update this header to use the revamped elf headers which select Elf32
or Elf64 based on the inclusion of the machine dependent header.

I've left the addition of the extra fields to handle the relocation
structures with addend for a separate commit after jdp has had a chance
to review what I've done. The current change is needed to compile
csu/alpha/crt1.c


38377 17-Aug-1998 jdp

Add "-C" to INSTALLFLAGS to install atomically. An elf->elf
installworld dies at this point otherwise, leaving the system
without a dynamic linker.


38149 06-Aug-1998 markm

Fix LIBDIR (for aout/ELF).


38101 04-Aug-1998 peter

Build mail.local and smrsh (when building sendmail)


38100 04-Aug-1998 peter

Build sendmail-8.9.1 smrsh


38099 04-Aug-1998 peter

Use sendmail-8.9.1 mail.local (with our changes). It has LMTP support.


38024 02-Aug-1998 bde

Fixed printf format errors.


37817 22-Jul-1998 phk

Getty is missing the speed table entry for 230400 baud.
PR: 7280
Reviewed by: phk
Submitted by: Craig Leres <leres@ee.lbl.gov>


37769 20-Jul-1998 steve

Remove no longer needed FreeBSD specific code.

PR: 5497
Submitted by: Jacob Bohn Lorensen <jacob@jblhome.ping.mk>
Obtained from: OpenBSD (indirectly it seems so just to be safe)


37532 09-Jul-1998 jkoshy

Document the use of lines beginning with a '#' as comment lines.

PR: 5676


37322 01-Jul-1998 jkoshy

Clean up grammar. Provide proper pathnames for spool directories.
Document dependency on current load average for starting new batch jobs.

PR: 7109


37297 30-Jun-1998 bde

Fixed printf format errors.


37262 29-Jun-1998 bde

Don't assume that time_t is long.


37261 29-Jun-1998 bde

Don't assume that time_t is long. Fixed printf format errors.


37092 21-Jun-1998 mckay

Since I got no objections to this patch, and no one has offered any
alternative, I present .. ta! da! .. the __error() hack.

This patch to the a.out dynamic loader provides old a.out binaries
with __error() if they are linked with an older libc that lacks it,
but are also linked against a library that needs it.

There is a smaller, tricker hack that takes advantage of the fact
that ld.so has __error() too, courtesy of the new libc, but this
hack is the straightforward version.


36932 12-Jun-1998 peter

Fix stupid typo, I had only tested this in elf mode.


36923 12-Jun-1998 peter

Only build rtld-aout if we're in an a.out build environment.


36894 11-Jun-1998 peter

Activate libbind


36853 10-Jun-1998 phk

Spelling fixes.

PR: 6903
Reviewed by: phk
Submitted by: Josh Gilliam <josh@quick.net>


36717 07-Jun-1998 brian

Search for libraries in dlopen() when the specified path
contains no ``/''s.
Elf already searches it seems.
Mostly submitted by: Mike Smith <mike@smith.net.au>


36695 06-Jun-1998 jb

named-xfer can't be linked static due to the duplicated symbols in
libc and libbind.

rpc.rstatd required libkvm.

Only try to build these on i386 for the time being.


36667 05-Jun-1998 jkoshy

Mention that syslog.conf(5) does not log LOG_FTP messages by default.

PR: 5287


36617 03-Jun-1998 joerg

Use gethostname(3) to obtain the local host name, as opposed to uname(3).
Otherwise the length of the name is limited to 32 characters only.


36612 03-Jun-1998 jb

signal() returns SIG_ERR on error, not int.

time() requires a time_t pointer, not a long.


36601 03-Jun-1998 jkoshy

Spelling corrections.

PR: 6829
Submitted by: Josh Gilliam <josh@quick.net>


36572 01-Jun-1998 peter

SUBDIR += rtld-aout


36565 01-Jun-1998 peter

Seperate the Paul Kranenburg a.out rtld stuff into a stand-alone area away
from the gpl ld code. This is part 2 of something that I began in 1996.
A repository copy has happened behind cvs's back.


36397 26-May-1998 sos

ELF preparation step 2:

Move a.out libraries to /usr/lib/aout to make space for ELF libs.
Make rtld usr /usr/lib/aout as default library path.
Make ldconfig reject /usr/lib as an a.out library path.
Fix various Makefiles for LIBDIR!=/usr/lib breakage.

This will after a make world & reboot give a system that no
longer uses /usr/lib/*, infact one could remove all the old
libraries there, they are not used anymore.

We are getting close to an ELF make world, but I'll let this
all settle for a week or two...


36349 25-May-1998 steve

Make ftpd(8) honor its default group setting in the config files.

PR: 6682
Submitted by: Max Euston <meuston@jmrodgers.com>


36140 18-May-1998 ache

Back out "always UTC" fix since some people want visually identical 'ls'
output for local users. FTP protocol RFC also says that 'ls' output is
not machine-readable. "always UTC" still possible with TZ= in ftpd
environment by price of having UTC in log files too.

Fix INTERNAL_LS to sense new /etc/localtime after chroot


36105 16-May-1998 ache

Return back initial tzset() must be before first chroot


36072 15-May-1998 ache

Return back vfork and use execve with TZ="" environment in vfork case


36070 15-May-1998 ache

Use fork instead of vfork since setenv clobber parent environment
Fork already used for INTERNAL_LS in anycase


36068 15-May-1998 ache

Move TZ="" assignment just before exec to not touch other time stuff


36066 15-May-1998 ache

Do TZ= as first thing, since FTP protocol is unable to tell zone offset in
any case.

It makes no difference for anon account (since chroot already makes it GMT),
but if you do mirror with special non-anon login, in old variant
your mirror will be wholy retransmitted twice in the year due to
time zone changes (/etc/localtime plays bad role here)


36045 15-May-1998 jb

NetBSD kernels don't support TCP_NOPUSH, so on alpha don't try setting
this socket option. This is temporary code while the alpha still uses
NetBSD socket code in the kernel.


36030 14-May-1998 jb

Remove a bogus prototype for time() and let time.h do that.

Change pointer casts from int to long. The code that looks to index -1
of argv is still broken on alpha.


35909 10-May-1998 bde

Fixed missing dependencies on headers generated by rpcgen, as usual.
Removed bogus dependencies of generated .c files on generated headers.
Sorted sources lists.


35728 05-May-1998 rnordier

Replace _exit() with exit()
Pointed out by: Nathan Torkington <gnat@prometheus.frii.com> PR 5585


35727 05-May-1998 rnordier

Fix typo.
Pointed out by: Junji SAKAI <sakai.jp.freebsd.org> PR 5621


35700 04-May-1998 bde

Simplified by using new yacc rules and by not generating y.tab.h.


35673 04-May-1998 peter

Argh, forgot to commit the update here for bind-8.. Sorry folks...

Prompted by: John Hay <jhay@mikom.csir.co.za>


35665 04-May-1998 steve

Clarify use of 'if' capability.

PR: 6499
Submitted by: Doug Barton <Studded@san.rr.com>


35646 03-May-1998 steve

Avoid stairstep effect on output of 'if=...' file.

PR: part of 6492
Submitted by: Chip Norkus via Doug White <studded@san.rr.com>


35574 01-May-1998 dfr

Add support for ldd.


35529 30-Apr-1998 dfr

Add GDB support. The method and some of the code came from NetBSD's elf
runtime linker.


35482 28-Apr-1998 dg

Set TCP_NODELAY on the control channel to improve performance a bit.


35474 27-Apr-1998 dg

Fixed a bug where if MAXUSRARGS amount of args were passed in, the argv[]
array would end up without the NULL pointer termination, causing the glob
code to glob whatever garbage happend to follow on the stack.


35460 26-Apr-1998 phk

telnetd does not recognize the if (display file before login) gettytab flag.

PR: 6365
Reviewed by: phk
Submitted by: Jason Garman <init@risen.org>


35270 18-Apr-1998 stark

PR: misc/4679
Submitted by: Glen Foster (gfoster@gfoster.com)
Fix missing "/" in dump file pathname.


35152 12-Apr-1998 phk

openlog() needs to have LOG_NDELAY added, or else the syslog() calls after
the chroot will not get sent to syslogd.

PR: 4910
Reviewed by: phk
Submitted by: Jim Mercer <jim@komodo.reptiles.org>


34671 19-Mar-1998 charnier

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


34670 19-Mar-1998 charnier

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


34195 07-Mar-1998 jdp

Enable rtld-elf when building an ELF system on the i386.


34193 07-Mar-1998 jdp

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


34192 07-Mar-1998 jdp

Import the ELF dynamic linker. This is the ElfKit version with
quite a few enhancements and bug fixes. There are still some known
deficiencies, but it should be adequate to get us started with ELF.

Submitted by: John Polstra <jdp@polstra.com>


33829 25-Feb-1998 danny

PR: 5812
Pointed-in-the-right-driection-by: Mike Smith and Steve Price

Close syslogging before calling ls_main()


33782 24-Feb-1998 eivind

Make ftpd log IP-addresses in addition to hostnames.


33552 18-Feb-1998 obrien

MFS.


33137 06-Feb-1998 jdp

Implement dladdr.


33035 03-Feb-1998 charnier

Convert to mdoc. Header -> Id. Typo.


32892 30-Jan-1998 phk

Remove lfs_cleanerd


32891 30-Jan-1998 phk

Disable lfs_cleanerd


32653 20-Jan-1998 bde

Merged just enough files from Lite2 in lfs_cleanerd to convert from
MOUNT_LFS to "lfs" in one place. The merge was painful because it
conflicted with cosmetic FreeBSD changes. lfs_cleanerd still compiles
cleanly but has aproximately the same chance of working as before (0).


32629 19-Jan-1998 wpaul

Make these programs compile and work correctly now that /usr/include/rpcsvc
has been ANSI-fied.

Pointed out by: bde


32570 16-Jan-1998 bde

Removed most unused includes of <net/if_var.h> outside the kernel.


32314 07-Jan-1998 charnier

Add missing dot.


32312 07-Jan-1998 charnier

Remove unused #includes and make it compile again with -DDEBUG. Use syslog()
instead of errx() when being a daemon.


32311 07-Jan-1998 charnier

Remove unused #include. Display if inetd started us in case of failure.


32309 07-Jan-1998 charnier

Typos.


32084 29-Dec-1997 max

Typo fix: bootgw -> bootpgw


32009 26-Dec-1997 imp

style(9) nits
Submitted by: bde


31978 24-Dec-1997 imp

sprintf->snprintf paranoia
Obtained from: OpenBSD (?)


31977 24-Dec-1997 imp

Be extra paranoid about the length of data returned from gethostbyaddr or
gethostbyname.
Submitted by: Julian Assange


31975 24-Dec-1997 imp

sprintf->snprintf paranoia. The one thing that looks like a hole in
the diff is in an ifdef that isn't enabled for FreeBSD.
Obtained from: OpenBSD(?)


31973 24-Dec-1997 imp

Various sprintf -> snprintf fixes.
Minor style fix (strcpy(foo,"") -> *foo = '\0')
Obtained from: OpenBSD(?)


31971 24-Dec-1997 imp

Use snprintf rather than printf out of paranoia
Obtained from: OpenBSD


31837 18-Dec-1997 charnier

Typo.


31737 15-Dec-1997 charnier

Cosmetic in usage string.


31626 08-Dec-1997 charnier

Use full path in synopsis. Sort #includes. Use .Tn for NIS.


31625 08-Dec-1997 charnier

Sync with diffs I found in kerberised versions: -Wall, no `;' in macros.


31546 05-Dec-1997 jdp

Make emacs work again. This is a workaround for the fact that the
emacs a.out file, self-generated by emacs's "unexec" function in
"unexsunos4.c", is invalid. In particular, its "_end" symbol has
the wrong value. The dynamic linker was using the value of that
symbol to initialize its sbrk break level.

The workaround is to peek at the executable's a.out header in
memory, and calculate what "_end" should be based on the segment
sizes.

I will work out a fix for emacs and send it to the FSF. This
dynamic linker workaround is still worthwhile, if only to avoid
forcing all emacs users to build a new version.

Note: xemacs gives a bogus warning at startup, for related reasons.
The warning is harmless and can safely be ignored. I will send a
patch to the xemacs maintainers to get rid of it, and meanwhile
add a patch file to our port.


31525 04-Dec-1997 charnier

Use err(3). Add prototypes. Document that startup scripts are rc.i386 and
rc.conf (enable/disable) not rc.local.
Use full pathname in SYNOPSIS section.


31524 04-Dec-1997 charnier

Sort #includes. Add rcsid. Use full pathname in SYNOPSIS section.


31523 04-Dec-1997 steve

FTP_INTERNAL_LS -> FTPD_INTERNAL_LS

Pointed out by: Jaye Mathisen <mrcpu@cdsnet.net>


31512 03-Dec-1997 charnier

Use full path in synopsis. Syslog will add trailing \n.


31511 03-Dec-1997 charnier

Use err(3). Remove progname and trailing \n in syslog strings.


31491 02-Dec-1997 charnier

Use err(3). Add protos for -Wall.


31490 02-Dec-1997 charnier

No \n in syslog() strings. Add man page to Xrefs. Change null byte to NUL byte.


31489 02-Dec-1997 charnier

Do not terminate syslog() messages with a dot, as others daemons do.


31488 02-Dec-1997 charnier

Document -n flag. Use err(3). Add usage.
Add syslog capability.


31445 29-Nov-1997 jdp

Get rid of the dynamic linker's internal malloc package, and arrange
things so that it uses the same malloc as is used by the program
being executed. This has several advantages, the big one being
that you can now debug core dumps from dynamically linked programs
and get useful information out of them. Until now, that didn't
work. The internal malloc package placed the tables describing
the loaded shared libraries in a mapped region of high memory that
was not written to core files. Thus the debugger had no way of
determining what was loaded where in memory. Now that the dynamic
linker uses the application's malloc package (normally, but not
necessarily, the system malloc), its tables end up in the regular
heap area where they will be included in core dumps. The debugger
now works very well indeed, thank you very much.

Also ...

Bring the program a little closer to conformance with style(9).
There is still a long way to go.

Add minimal const correctness changes to get rid of compiler warnings
caused by the recent const changes in <dlfcn.h> and <link.h>.

Improve performance by eliminating redundant calculations of symbols'
hash values.


31422 26-Nov-1997 charnier

Use err(3). -Wall cleaning. cosmetics in man page.


31421 26-Nov-1997 charnier

Remove \n at end of syslog string. -Wall cleaning. Cosmetics in man page.


31420 26-Nov-1997 charnier

Cosmetics in man page. Add rcsid and sort #includes.


31419 26-Nov-1997 charnier

Use err(3). -Wall cleaning. Use Pa for file names and add section in Xrefs.


31405 25-Nov-1997 charnier

Sort #includes. Add rcsid. Add man page section in .Xrefs.


31404 25-Nov-1997 charnier

Use warn(3). Hardcode progname instead of using argv[0]. Use Pa for file
name.


31386 24-Nov-1997 charnier

Add usage(), rcsids.


31385 24-Nov-1997 charnier

Cosmetics in usage() and man page.


31383 24-Nov-1997 charnier

Key is 8 bytes according to code, not 10 as stated in man page. Add rcsid.


31382 24-Nov-1997 charnier

Use err(3) instead of local redefinition. Add usage. -Wall cleaning.


31331 21-Nov-1997 charnier

Correct incompletes .Xrs. Remove duplicate #includes and unused variables.


31330 21-Nov-1997 charnier

Use err(3). -Wall cleaning.


31329 21-Nov-1997 charnier

Cosmetics in man page. Exit(-1) -> exit(1).


31308 20-Nov-1997 charnier

Add const to copyright string. Put sccsid under #if 0/#endif control.


31307 20-Nov-1997 charnier

Use err(3). exit(-1) -> exit(1).


31306 20-Nov-1997 charnier

Cosmetic in error strings. Sort Xrefs. Add usage (with syslog capability).


31168 14-Nov-1997 sef

Log the request from the remote side, in addition to it having happened.

Reviewed by: julian


31164 13-Nov-1997 alex

Switch the effective uid to that of the user when writing mail files,
allowing quotas to be enforced on mail spools.

PR: 1111
Submitted by: Charles Henrich <henrich@crh.cl.msu.edu>


30313 11-Oct-1997 wosch

Store temporary files in /var/tmp instead /tmp. This should avoid
a possible disk overflow for enormous large mails.
Submitted by: grog


30211 08-Oct-1997 uhclem

PR: bin/771 and bin/1037 are resolved by this change
This change changes the default handling of linemode so that older and/or
stupider telnet clients can still get wakeup characters like <ESC> and
<CTRL>D to work correctly multiple times on the same line, as in csh
"set filec" operations. It also causes CR and LF characters to be read by
apps in certain terminal modes consistently, as opposed to returning
CR sometimes and LF sometimes, which broke existing apps. The change
was shown to fix the problem demonstrated in the FreeBSD telnet client,
along with the telnet client in Solaris, SCO, Windows '95 & NT, DEC OSF,
NCSA, and others.

A similar change will be incorporated in the crypto version of telnetd.

This resolves bin/771 and bin/1037.


30175 06-Oct-1997 imp

Clarify the actions of -s and the list of allowable names.


30113 05-Oct-1997 jkh

Changes to support full make parallelism (-j<n>) in the world
target.
Reviewed by: <many different folks>
Submitted by: Nickolay N. Dudorov" <nnd@nnd.itfs.nsk.su>


30008 30-Sep-1997 wpaul

Putting records with zero-length keys into a Berkeley DB hash database
is asking for trouble (sequential database enumerations can get caught
in an infinite loop). The yp_mkdb(8) utility avoids putting such records
into a database, but ypxfr does not. Today I got bit by a NULL entry in
one of the amd maps on my network, which is served by a SunOS master.
The map was transfered successfully to my FreeBSD slave, but attempting
to dump it with ypcat(1) caused ypserv(8) to transmit the same record
over and over again, making the map appear to be infinitely large. I
finally noticed the problem while testing a new version of amd under
development at the Columbia CS department, which began gobbling up insane
amounts of memory while trying to swallow the map.

To deal with this problem, I'm modifying ypxfr to watch for records
with zero-length keys and turn them into something less destructive
before writing them to the database.


29924 28-Sep-1997 markm

Changes for KTH KerberosIV.


29918 28-Sep-1997 markm

There is a clear separation of the crypto telnet and the non-crypto telnet.
As this is the non-crypto version, remove the useless (commented out)
directives and macros.


29917 28-Sep-1997 markm

Changes for the new KTH Kerberos4.
Also make -Wall a bit quieter


29916 28-Sep-1997 markm

Changes for the new KTH Kerberos.
Also make -Wall a bit quieter.


29574 18-Sep-1997 phk

Many places in the code NULL is used in integer context, where
plain 0 should be used. This happens to work because we #define
NULL to 0, but is stylistically wrong and can cause problems
for people trying to port bits of code to other environments.

PR: 2752
Submitted by: Arne Henrik Juul <arnej@imf.unit.no>


29433 15-Sep-1997 ache

Allow backspace too


29432 15-Sep-1997 ache

disable upper controls and enable all other
8bit codes due to lack of locale knowledge in daemon


29397 14-Sep-1997 wosch

-p flag misdocumented in telnetd(8)
PR: 4462
Submitted by: hfir@math.rochester.edu


29329 13-Sep-1997 wosch

spelling corrections.

PR: docs/4450
Submitted by: josh@quick.net


29231 08-Sep-1997 dima

Do setlogin() before changing uid/gid, since
`at/batch' requires this.

Obtained from: me && OpenBSD


29140 05-Sep-1997 tg

Hopefully better fix for logwtmp(): rename to a private
version ftpd_logwtmp().


29139 05-Sep-1997 tg

logwtmp() prototype is in <libutil.h>.


29045 03-Sep-1997 davidn

Fix botch with escaped characters, go back to using cgetstr().
For escaped characters used in modem strings, use double-backslashes
in gettytab.
PR: 4370


29003 01-Sep-1997 davidn

Use cgetustr() since we handled special escapes ourselves.
Fix typo in escape parsing function.
PR: 4370
Submitted by: sumii@is.s.u-tokyo.ac.jp


28660 24-Aug-1997 joerg

Fix description of -t option.

PR: 3382
Submitted by: furuta@sra.co.jp (Atsushi Furuta)


28626 23-Aug-1997 steve

Turn off hyphenation in this manpage so that .Xr macros, don't get
split between lines.

PR: bin/4080


28588 22-Aug-1997 jmg

change -I/sys to -I${.CURDIR}/../../sys


28434 19-Aug-1997 nate

- In dlsym(), if the lookup fails using the original symbol, prepend an
underscore and try looking it up again. This is a non-issue if we
switch to ELF.

Reviewed by: sef, jdp


28316 17-Aug-1997 steve

.Nm --> .Xr so that gettytab(5) is shown instead of gettytab 5.

PR: bin/4079


27849 02-Aug-1997 bde

Makefile.dist is a non-bmaked version of Makefile. We don't want it.


27848 02-Aug-1997 bde

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


27838 02-Aug-1997 jdp

Implement dlsym(RTLD_NEXT, symbol).


27650 24-Jul-1997 davidn

Make useage of hostname global variable consistent.
PR: 4135
Based on submitted patch by: blank@fox.uni-trier.de


27516 18-Jul-1997 wosch

Rshd print to much information if a user does not exists.


27369 13-Jul-1997 peter

kill the undead


27207 05-Jul-1997 peter

.if exists(../eBones) tests the obj dir, not the source dir's existance.
The existance of a stale obj dir does not imply the source too.


27079 29-Jun-1997 steve

Zap register keyword usage and convert: bcopy -> memmove, bzero -> memset,
index -> strchr, and rindex -> strrchr.


27077 29-Jun-1997 steve

Merge conflicts and make this compile -Wall clean.


27075 29-Jun-1997 steve

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


26999 27-Jun-1997 alex

Removed unused variables.


26867 24-Jun-1997 stark

Submitted by: Gene Stark and Robert Sexton (robert@kudra.com)
Added patches from Robert Sexton to eliminate case sensitivity of the
xtend command.


26826 23-Jun-1997 steve

Show the real revision date and not the date that this
manpage is being viewed.


26415 03-Jun-1997 davidn

Reset alarm before invoking ppplogin.
PR: 3733
Reviewed by:
Submitted by: kfurge@worldnet.att.net
Obtained from:


26398 02-Jun-1997 davidn

login.group => login.conf.
PR: 3748
Reviewed by:
Submitted by:
Obtained from:


26195 27-May-1997 max

Typo fix.
PR: 3693
Submitted by: Kazuo Horikawa <k-horik@yk.rim.or.jp>


25986 21-May-1997 danny

Tell the chroot()ed user that "access restrictions apply".


25969 21-May-1997 wpaul

Small tweak to the group parsing code to stop it from core dumping
on malformed /etc/group entries. This is a band-aid until I can pull
in the newer group parsing code from getgrent .

Pointed out by: branson@belmakor.hq.ferg.com (Branson Matheson)


25774 13-May-1997 dfr

Changes to support the kernel linker:

Add a -Bforcedynamic option which generates a dynamic object even
if no shared libraries were given in the link.

Make RRS in text section warnings conditional on "-assert pure-text"
so that I can link non-PIC kernel modules without tons of link
errors. Changes to bsd.lib.mk to follow.

Fix a couple of bugs exposed by the fact that the kernel is not
linked at zero.

Reviewed by: jdp


25717 11-May-1997 phk

Don't rely on stderr to report bad news.


25709 11-May-1997 davidn

Fix memory leak caused by not freeing memory returned by cgetstr()
calls. The cost is a little more up-front memory allocation, but the
effect seems minimal.

Problem noticed-by: bde

Added syslog at LOG_ERR when referencing an unknown gettytab entry
and for other cgetent() failues (circular reference et al).

To be merged into 2.2 after a few days testing.


25674 10-May-1997 davidn

login_getclass() -> login_getpwclass().


25300 30-Apr-1997 jdp

Fix a bug that caused the relocs for linker set members in shared
libraries to come out as 1-byte relocations instead of 4-byte
relocations.

Submitted by: Doug Rabson <dfr@nlsystems.com>


25283 29-Apr-1997 davidn

Adds anon ftp virtual host capability to ftpd, using /etc/ftphosts for
definition of a system's virtual hosts.


25187 27-Apr-1997 davidn

YAMF2.2: Allow @group entries in /etc/ftpusers & /etc/ftpchroot to deny
and allow chroot access to entire groups.


25166 26-Apr-1997 davidn

Document internal ls, how to compile it in and what it changes wrt
anon ftp and chrooted users.


25165 26-Apr-1997 davidn

Adds optional "internal ls" support for ftpd, by collecting
modules from src/bin/ls, and handling exec(_PATH_LS,..) as a
special case, very useful in an environment where many users
are given chroot access. "~/etc/{s}pwd.db" files are still
needed if uid/gid->user/group translation is desired.

To enable this it must be compiled with the make variable
FTP_INTERNAL_LS defined, either in /etc/make.conf or the
environment.


25101 23-Apr-1997 davidn

Add basic login.conf (sans authentication) support.


25099 23-Apr-1997 davidn

Added login.conf support.


24979 16-Apr-1997 bde

Fixed `make depend' and related bogons. LDFLAGS was used for
ld-specific flags. LDFLAGS is really for ld-related flags for cc,
not for ld, and some flags, e.g., -Bshareable, mean completely
different things to cc and ld. Having the wrong things in LDFLAGS
also broke the standard ${PROG} target. This was kludged around
by using a special rule that depended on LDFLAGS being bogus.
Fixing `make depend' broke the special rule but fixed the standard
rule (except in the DESTDIR case, which was handled more strictly
here than elsewhere).


24906 13-Apr-1997 davidn

Remove text about unsupported flags 'mdmbuf', 'local', 'crtscts' etc
that are in reality handled in gettytab.

Document the new 'dialin' and 'network' tty flags.


24829 12-Apr-1997 davidn

Submitted by: Philippe Charnier <charnier@xp11.frmug.org>
Fixes name size limitation (was hardcoded to 8).
Closes PR#3258


24732 08-Apr-1997 mpp

Ensure that the remote host name is Nul terminated.
Closes PR# 2589.


24728 08-Apr-1997 davidn

Fix for expiration date test. Closes PR#3224.


24514 01-Apr-1997 joerg

Use MAXHOSTNAMELEN, as opposed to an arbitrary number, and ensure
correct termination if it overflows.

Closes PR # misc/2982.

Submitted by: Drew Derbyshire <ahd@kew.com>


24379 29-Mar-1997 peter

Be a bit more careful about what port number we are using for the
second socket. If we're going to check for reserved ports, we should
do it properly.


24349 28-Mar-1997 imp

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


24258 25-Mar-1997 davidn

Don't trucate username to 8 characters.


24242 25-Mar-1997 mpp

Remove some incorrect text on how passwords are validated.
Closes PR# 3050.

Submitted by: Dmitrij Tejblum <dima@tejblum.dnttm.rssi.ru>


24193 24-Mar-1997 imp

Fix non explloitable buffer overflows (since the largest packet processed
precludes it) to keep people from whining about it in the newsgroups and
mailing lists.


24191 24-Mar-1997 imp

Fix various buffer overflows that may or may not be exploitable.

Fixes PR 2588

Reviewed by: Dan Cross?
Submitted by: Julian Assange


24189 24-Mar-1997 imp

Julian A's fix. Do chdir as user rather than as root. Fixes a minor NFS
compatibility problem at the same time. Some buffer made large enough
for worst case hostname.

fixes PR 2593.

Reviewed by: Dan Cross and maybe others


23880 14-Mar-1997 mpp

Change a reference to NetBSD to FreeBSD.


22996 22-Feb-1997 peter

Revert $FreeBSD$ to $Id$


22989 22-Feb-1997 peter

Revert $FreeBSD$ to $Id$


22954 20-Feb-1997 mpp

#include <string.h> to help silence -Wall.


22668 13-Feb-1997 guido

Actually allow the -R flag.


22491 09-Feb-1997 davidn

Tidy-up modem-chat handling: ensure tty modes are restored to
'sane' standard (not raw) settings before abort/exiting; move
responsibility of setting raw mode for chat-handling out of
chat.c to avoid doing redundant tc{s,g}etattr()s; move DE
pause prior setting standard mode before issue/login prompt to
avoid echoing modem connect strings. Fixed up comment styles
in a couple of places.


22457 09-Feb-1997 imp

Buffer Overflow from OpenBSD
rev 1.7 deraadt:
buf oflow
Obtained from: OpenBSD


22455 09-Feb-1997 imp

Some patches for source routed packets from OpenBSD.
Rev 1.16 deraadt:
do not warn about valid options; invalid options correctly quit
Rev 1.15 deraadt:
need not clear options since bad ones cause exit;
provos@ws1.physnet.uni-hamburg.de
Rev 1.14 deraadt:
IPOPT_LSRR/IPOPT_SSRR must exit() due to tcp sequencing; pointed
out by provos@wserver.physnet.uni-hamburg.de. also another 1-char
buffer overflow.

Reviewed by: Peter Wemm
Obtained from: OpenSBD


22454 09-Feb-1997 imp

Some patches for source routed packets from OpenBSD.
Rev 1.13 deraadt:
do not warn about valid options; invalid options correctly quit
Rev 1.12 deraadt:
need not clear options since bad ones cause exit;
provos@ws1.physnet.uni-hamburg.de
Rev 1.11 deraadt:
IPOPT_LSRR/IPOPT_SSRR must exit() due to tcp sequencing; pointed
out by provos@wserver.physnet.uni-hamburg.de. also another 1-char
buffer overflow.

Reviewed by: Peter Wemm
Obtained from: OpenSBD


22413 07-Feb-1997 jkh

Fix a hop count datatype bogon pointed out in PR#2642 (though my fix
was slightly different than the one submitted).
Submitted by: Elmar Bartel <bartel@informatik.tu-muenchen.de>


22400 07-Feb-1997 davidn

Increased username size to allow passing username:auth_method to
login.


22211 02-Feb-1997 davidn

Make username size dependant on MAXLOGNAME in sys/param.h. Was
previously hard-coded at 16 characters (and possibly overflowing
the field when NUL terminating a username of exactly 16 characters
in length).


22208 02-Feb-1997 davidn

Added:
ic=expect/send script modem init script
ac=expect/send script modem answer script
ct#val chat script timeout (seconds)
rt#val recycle timeout (seconds) if 'ac' set
dc#val debug bitmask for debugging chat scripts
hw (boolean) enable crtscts handshaking
if=path 'issue' file sent prior login prompt

chat.c is a simplistic expect/send chat module.


22199 02-Feb-1997 davidn

Fix bug in %s, %m, %r and %v macros not displaying data.


22196 02-Feb-1997 davidn

Added support for %s (sysname) %m (machine) %r (release) and %v (version)
prompt macros to agree with getty(8).


22058 28-Jan-1997 dg

Oops, fix white space in last commit.


22057 28-Jan-1997 dg

Fix signal handler race condition.


22041 27-Jan-1997 joerg

Make even more copies of hostnames obtained by inet_ntoa(). iruserok()
could still clobber the static storage, yielding an error message with
a wrong hostname.


21967 24-Jan-1997 jdp

Use xmalloc instead of malloc in two places, so that out-of-memory
conditions will be detected.

Submitted by: Philippe Charnier <charnier@xp11.frmug.org>


21838 18-Jan-1997 pst

Fix buffer overrun problem.

Cannidate for: 2.2 [must]

Obtained from: Lite/2 and BSDI's published patch


21819 17-Jan-1997 jdp

Pay attention to the environment variable "LD_IGNORE_MISSING_OBJECTS".
If it is set to a nonempty string, then simply skip any missing
shared libraries. This came up in a discussion long ago as a
potentially useful feature at sysinstall time. For example, an
X11 utility could be used without the X libraries being present,
provided the utility had a mode in which no X functions were actually
called.


21786 16-Jan-1997 alex

Sweep through the tree fixing mmap() usage:

- Use MAP_FAILED instead of the constant -1 to indicate
failure (required by POSIX).
- Removed flag arguments of '0' (required by POSIX).
- Fixed code which expected an error return of 0.
- Fixed code which thought any address with the high bit set
was an error.
- Check for failure where no checks were present.

Discussed with: bde


21693 14-Jan-1997 jdp

If a library is found in the hints file, but the library doesn't exist,
ignore the hint.

This is a straightforward fix, and it should go into 2.2 after a burn-in
period of a few days.

Noticed by: bde


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.


21635 13-Jan-1997 wosch

Sort cross references.


21620 12-Jan-1997 jdp

Use the RTLD_NOW symbol, now that it is defined in <dlfcn.h>.


21578 12-Jan-1997 jdp

Correct typos and spelling errors.


21577 12-Jan-1997 jdp

Add support for the LD_BIND_NOW environment variable. If it is set to a
nonempty string, then function calls are relocated at program start-up
rather than lazily. This variable is standard on Sun and SVR4 systems.

The dlopen() function now supports both lazy and immediate binding, as
determined by its "mode" argument, which can be either 1 (RTLD_LAZY) or
2 (RTLD_NOW). I will add defines of these symbols to <dlfcn.h> as soon
as I've done a little more checking to make sure they won't cause
collisions or bootstrapping problems that would break "make world".

The "LD_*" environment variables which alter dynamic linker behavior are
now treated as unset if they are set to the empty string. This agrees
with the standard SVR4 conventions for the dynamic linker.

Add a work-around for programs compiled with certain buggy versions of
crt0.o. The buggy versions failed to set the "crt_ldso" member of the
interface structure. This caused certain error messages from the
dynamic linker to begin with "(null)" instead of the pathname of the
dynamic linker.


21574 12-Jan-1997 jdp

Add support for the LD_BIND_NOW environment variable. If it is set to a
nonempty string, then function calls are relocated at program start-up
rather than lazily. This variable is standard on Sun and SVR4 systems.

The dlopen() function now supports both lazy and immediate binding, as
determined by its "mode" argument, which can be either 1 (RTLD_LAZY) or
2 (RTLD_NOW). I will add defines of these symbols to <dlfcn.h> as soon
as I've done a little more checking to make sure they won't cause
collisions or bootstrapping problems that would break "make world".


21553 11-Jan-1997 mpp

Document the fact that the administrator may have
to change syslog's config file in order for all of
ftpd's log messages to be displayed by syslogd.

Closes PR# 1559.


21428 08-Jan-1997 ache

Build ebones/telnetd only if MAKE_EBONES defined


21422 08-Jan-1997 mpp

Correct some misleading text.

Submitted by: Klaus Klein <kleink@layla.inka.de>
Obtained from: NetBSD-bugs PR#3089


21403 07-Jan-1997 pst

Some buffer overrun fixes and removed check for username starting with "-"
(replacied it with a getopt stopper (--) instead, which is more correct).

Obtained from: OpenBSD


21264 03-Jan-1997 wollman

Update to match changes in <net/if.h>.


21189 02-Jan-1997 davidn

Added group= facility to /etc/ttys for tty grouping for more
more manageable and convenient referencing by login.conf (login
class database) and (e.g.) login.access.

This is the first of a group of commits which implements the login
class capabilities database.


21167 01-Jan-1997 jkh

Remove dmalloc.c reference from here too. :)


21120 31-Dec-1996 msmith

Add a new 'de' capability, specifying a number of seconds to sleep before
emitting the initial prompt.

This is useful in a number of circumstances :
- you have (a) stupid modem(s) that assert(s) DCD too soon.
- you have dialin users with stupid diallers and poorly
written chatscripts. (esp. some Winsock diallers)

BSD/OS also has this capability.

Submitted by: damian@cablenet.net (Damian Hamill)


20930 26-Dec-1996 swallace

Fix spelling error in manpage.


20862 23-Dec-1996 wpaul

Change declaration of yp_errno from int to enum ypstat so that it
matches what's in ypserv/yp_extern.h (which I changed when I added the
async DNS stuff). The conflict broke the build of rpc.yppasswdd.

Pointed out by: bde


20542 16-Dec-1996 mpp

Document the -k, -v and -x options.

Closes PR# 801.


20486 14-Dec-1996 mpp

Correct some xrefs/mlinks.


20387 13-Dec-1996 wpaul

Close PR #2193: support backslash line continuations.
(Also did some minor cleanups.)


20333 11-Dec-1996 wollman

Convert this program to use sysctl rather than kvm for some of its
statistics. Unfortunately, the coverage of sysctl isn't good enough to do
all of them :-( .


20287 10-Dec-1996 wollman

Fix up programs which expect <net/if.h> to include <sys/time.h> to instead
do it themselves. (Some of these programs actually depended on this
beyond compiling the definition of struct ifinfo!) Also fix up some
other #include messes while we're at it.


20052 30-Nov-1996 joerg

Truncate the file when opening it with write intent. Otherwise,
there's a good chance that garbage will remain at the end.

Closes PR # bin/2112: tftpd doesn't truncate ...

Reviewed by: fenner


20042 30-Nov-1996 torstenb

add flag to allow only anonymous ftp logins

Reviewed by: pst


19967 26-Nov-1996 ache

Use LC_TIME=C instead of LC_TIME=


19924 22-Nov-1996 pst

Back out recent security patch for rexecd. After more careful analysis,
it is both uneeded and breaks certain lock-step timing in the rexec
protocol.

Yes, an attacker can "relay" connections using this trick, but a properly
configured firewall that would make this sort of subterfuge necessary in the
first place (instead of direct packet spoofing) would also thwart useful
attacks based on this.


19903 20-Nov-1996 pst

Conditionalize setsockopt IP_PORTRANGE to make ftpd portable.


19902 20-Nov-1996 pst

Truncate argument list to avoid buffer overflows.

Cannidate for: 2.1 and 2.2


19871 19-Nov-1996 pst

Do not attempt to open reverse channel until authentication phase has
succeeded.

Never allow the reverse channel to be to a privileged port.

Cannidate for: 2.1 and 2.2 branches

Reviewed by: pst (with local cleanups)
Submitted by: Cy Shubert <cy@cwsys.cwent.com>
Obtained from: Jaeger <jaeger@dhp.com> via BUGTRAQ


19699 13-Nov-1996 pst

remove newly added reference to ppplogin


19697 13-Nov-1996 pst

Add the >optional< ability to sense PPP link bringups and call an authentication program


19673 12-Nov-1996 phk

doc/1994: spelling error.

Submitted by: David Leonard David Leonard <d@scry.dstc.edu.au>


19416 05-Nov-1996 jkh

Correct the ancient paths here in case someone ever uncomments this again.


19404 04-Nov-1996 torstenb

Comment out the XIDLE extension stuff, it breaks make world on systems
with Xinside's CDE installed


19368 03-Nov-1996 markm

Compile telnetd from eBones instead of secure.

2.2 candidate.


19181 25-Oct-1996 wpaul

Give ypxfr the ability to detect the presence of the YP_INTERDOMAIN
and YP_SECURE flags so that it can properly add them to newly created
maps when needed. This applies only when using the 'standard' method
for map transfers. When using rpc.ypxfrd, the whole map is copied
verbatim, along with any special entries that may be encoded in it.

Also made -Wall a little quieter for ypxfrd_getmap.c.


19158 24-Oct-1996 jdp

If errors occur during the loading of the shared libraries required by
the main program, report them directly from the dynamic linker and die
there, rather than returning an error message to crt0.o. This enables
the printing of error messages even for old executables, whose version
of crt0.o is not able to print them.

This fix closes PR bin/1869.

The code in crt0.o for printing error messages from the dynamic linker
is no longer used, because of this change. But it must remain, for
backward compatibility with older dynamic linkers.


19143 24-Oct-1996 wpaul

Nuke a couple of useless lines of code from the /etc/netid parsing
section. (Cut & paste-o.)


19118 23-Oct-1996 scrappy

Totally botched ths patch...revert back to Rev 1.7, and request a
proper context diff from the submitter...


19114 22-Oct-1996 scrappy

Last time I trust 'sucess's on a non-context diff...

Pointed out by: Bill Fenner <fenner@parc.xerox.com>


19108 22-Oct-1996 scrappy

Fixes:

When an rsh is denied by rshd because the client is lacking appropriate
.rhosts permission, an error message is formatted for syslog which contains
the client's hostname. The hostname portion of the message relies on a pointer
to a field within gethostbyname()'s internal struct hostent which changes state
between when the pointer is initialized and when it is dereferenced to create th
e
message.

Submitted by: skynyrd@opus.cts.cwu.edu


19107 22-Oct-1996 scrappy

Fixes:

>Description:

/usr/libexec/mail.local runs as root. As such is can fill up a
mailbox on a quota'd filesystem, and keep going... Makes quota's
almost useless in an ISP environment.

Closes: PR#bin/1111

Submitted by: Charles Henrich <henrich@crh.cl.msu.edu>


19065 20-Oct-1996 wpaul

Add a couple of reserved port checks: don't talk to either ypserv
or rpc.ypxfrd processes on remote systems that aren't bound to reserved
ports. The servers already do reserved port checks on the clients.

Obtained from: scrutinizing the OpenBSD ypxfr sources. (Note that this
applies to the ypserv check only; OpenBSD doesn't have an rpc.ypxfrd.)


19018 18-Oct-1996 ache

Implement alternative strategy if it is impossible to confirm
password: ask for it, but don't tell that S/key password required.
It looks like non-s/key system from outside.

Additionally tell that s/key required when it is so for normal case


19010 18-Oct-1996 jdp

Fix two minor typos in the manual page.


18993 17-Oct-1996 ache

Oops, fix my previous commit, now tell user his s/key parameters


18989 17-Oct-1996 ache

Don't ever ask for password if it is impossible to confirm it
It happens if 1) regular passwords not allowed, 2) skey database
not activated for given user.
Under some rare circumstanes skey_challenge can return empty
diagnostic or even previous buffer, fix it.


18862 10-Oct-1996 jdp

Add the search directories from the hints file only the first time it is
opened. After that, the directories are already present, and there is
no point in adding them again. This doesn't fix any bugs; it's just for
efficiency.


18849 10-Oct-1996 jdp

Fix a bug that caused a segmentation violation if dlsym() was called
with its first argument equal to NULL.


18767 06-Oct-1996 wosch

correct spelling of 'X Window System' (tm)


18718 05-Oct-1996 wosch

delete doubled words, e.g.: "the the" -> "the"


18625 01-Oct-1996 nate

There's no need to 'unsetenv()' unsafe environment variables explicitly
since rt_readenv() already takes care of not setting unsafe variables.
This was part of the changes I submitted to Peter and John during the
review which must have gotten missed.


18618 01-Oct-1996 peter

Sigh, oh well, here's my obligigatory "oops" commit. I don't quite know
how I managed to get this out of sync, but I did. I guess that's what I
get for directly committing from different machines that I was testing on.

Pointed out by: Paul Traina <pst@freebsd.org>


18599 01-Oct-1996 peter

Update to handle new version ld.so.hints and info in executable for
configurable fallback search paths, as well as new crt interface version.

Also:
- even faster getenv(), get all environment variable settings in a single
pass.
- ldd printf-like format specifications
- minor code cleanups, one vsprintf -> vsnprintf (harmless)

The library search sequence is a little more complete now. Before,
it'd search $LD_LIBRARY_PATH (by opendir/readdir/closedir), then read
the hints file, then read /usr/lib (again by scanning thr directory). It
would then fail if there was no "found" library.

Now, it does LD_LIBRARY_PATH and the hints file the same, but then uses
a longer fallback path. The -R path is fetched from the executable if
specified at build time, the ldconfig path is appended, and /usr/lib is
appended to that. Duplicates are suppressed. This means that simply
placing a new library in /usr/local/lib will work (the same as it did in
/usr/lib) without needing ldconfig -m. It will find it quicker if the
ldconfig is run though.

Similar changes have been made to the NetBSD ld.so, but ours is rather
different now due to John Polstra's speedups and fixes from a while back.

The ldd printf-like format support came direct from NetBSD.

Reviewed by: nate, jdp


18596 01-Oct-1996 peter

Update the backends to go with the top-level ld changes. The non-i386
changes are for completeness, I don't think they work. There are changes
to deal with the new include files.

Obtained from: NetBSD (mostly)


18595 01-Oct-1996 peter

Support for .weak (in addition to the N_INDR stab) for gcc/g++. Also deal
with the -R option and store the path in the dynamic header when specified.
The $LD_RUN_PATH environment variable is not checked yet.

While here, split up the code a bit more to enable more selective replacing
of GPL'ed components that are linked with ld.so with others.

Obtained from: NetBSD (mostly, the breakup is my fault)


18480 23-Sep-1996 wosch

add missing comma(s) in .Xr macros


18471 22-Sep-1996 wosch

add forgotten $Id$


18458 22-Sep-1996 imp

Reviewed by: Bill Fenner <fennder@parc.xerox.com>
Reviewed by: Garrett Wollman <wollman@freebsd.org>
Submitted by: Warner Losh <imp@village.org>
Close PR bin/1145:
Add -s flag to tftpd. This enables the so-called secure mode
of tftpd where it chroots to a given directory before allowing access
to the files. In addition, it runs as nobody when in this mode.
Reviewed a long time ago by Bill and Garrett. Apply my patch from the
pr, and close the PR.


18449 21-Sep-1996 pst

Fix some compilation warnings.


18419 20-Sep-1996 bde

This should have gone away with the COMPAT_43 cruft. cgetent() is now
used instead of the rudimentary routines here.


18379 19-Sep-1996 phk

Make the inetd suggestion slightly less confusing.


18286 14-Sep-1996 bde

Don't use __dead or __pure in user code. They were obfuscations
for gcc >= 2.5 and no-ops for gcc >= 2.6. Converted to use __dead2
or __pure2 where it wasn't already done, except in math.h where use
of __pure was mostly wrong.


18258 12-Sep-1996 bde

Use `install -C' instead of lots of shell commands to install ld.so
as atomically as possible.

(Immutable targets can't be renamed without opening a window when
neither the source nor the target is immutable. Perhaps there
should be a rename_immutable syscall to do this if unsetting the
immutable flags would work.)


18237 11-Sep-1996 pst

bootpd.dump is in /tmp


18097 07-Sep-1996 peter

wrong C bracketing, *blush*...


18094 07-Sep-1996 peter

zap #include <sgtty.h>, it's not used.


18093 07-Sep-1996 peter

Another sgtty use bites the dust..


18050 05-Sep-1996 bde

Fixed DPADD.


18035 04-Sep-1996 bde

Removed unused `-I.'s from CFLAGS.

"." means the object directory, so it is just confusing to use it
when nothing is included from the object directory unless the object
directory is also the source directory. It is confusing for "."
not to mean the source directory anyway, so used `-I.'s should be
replaced by `-I${.OBJDIR}'.


17982 01-Sep-1996 ache

Unlocalize date


17918 29-Aug-1996 peter

Add named-xfer


17912 29-Aug-1996 peter

build bind-4.9.4-P1 named-xfer in it's own directory


17849 27-Aug-1996 wosch

sync copyright with /usr/share/examples/etc/bsd-style-copyright


17797 23-Aug-1996 mpp

Use the .Bx macro where appropriate.


17787 23-Aug-1996 mpp

Use the .At macro where appropriate.


17786 23-Aug-1996 mpp

Use the .Fx macro where appropriate.


17568 13-Aug-1996 peter

Add a ``-P altlogin'' option which allows the sysadmin to specify an
alternate login(1) type program to run.


17483 09-Aug-1996 julian

Reviewed by: various
Submitted by: archie@whistle.com

allow ftpd to bind to a single address/interface
this allows easy split services.


17478 09-Aug-1996 markm

Tidy up the Kerberised bits. While I'm here, fix some -Wall complaints.


17453 06-Aug-1996 phk

Fix another bogon.


17451 06-Aug-1996 phk

Make password checking in ftpd work again.


17435 05-Aug-1996 pst

Convert STATS and PARANOID to run-time options.
Document the new -R (relax paranoia) option.

From NetBSD/Lite2: code and man page cleanups, Kerberos IV hooks
(relax, we're still exportable), and /etc/ftpchroot feature for
semi-anonymous accounts


17433 04-Aug-1996 pst

If PARANOID is set, do not allow PORT commands to remote ports less than 1024
or addresses other than the requestor's address. This violates the FTP
protocol (hmm...as I write this, I'm going to change this to a run-time var.)

Require login before PASV and RNTO commands.

Close unused PASV ports so they don't hang around forever.

Do not allow file overwrites via rename or STOR when anonymous
(suspenders).

Clean up buffer utilization.

My code, but heavily inspired by Hobbit's changes to wu-ftpd as pointed out
by Mike Prettejohn and Kit Knox.


17424 04-Aug-1996 wpaul

Use err() instead of perror()/exit() and remember to #include <errno.h>
and <err.h>.


17257 23-Jul-1996 adam

consistent presentation of emphasis


17115 12-Jul-1996 bde

Include <sys/types.h> before including <grp.h> so that this doesn't
depend on <stdio.h> bogusly including <sys/types.h>

Reordered includes to satisfy KNF rules.


17016 08-Jul-1996 wosch

add manpage getNAME(1)


16958 04-Jul-1996 wpaul

Fill in new arguments in the ypxfr_getmap structure (byte order,
db type, filename) and check for new failure codes (db mismatch,
endian mismatch).


16793 27-Jun-1996 wpaul

Improve performance with very large user databases by increasing
hash table size from 256 to 1024.

Generate output that looks more like the SunOS mknetid: uses a space
instead of tabs for white space.

Fix typo in comment in hash.h: Groupit -> Groupid.


16734 25-Jun-1996 wpaul

Turn on mknetid.


16729 25-Jun-1996 wpaul

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


16433 17-Jun-1996 ache

If hostname > UT_HOSTSIZE, use its numerical address instead to keep
valid utmp and wtmp entries


16154 06-Jun-1996 wpaul

Take ypxfrd_xdr.c out of SRCS line. It should be included in librpcsvc,
which ypxfr links with. (Sorry: left over development bogon.)

Just a reminder: you must rebuild librpcsvc before you build
this program.

Pointed out by: Stephen Hocking


16132 05-Jun-1996 wpaul

Add support for rpc.ypxfrd and document it in the man page.

Also generallize the yp_dbwrite functions a little: allow the caller
to specify certain flags. I need this mostly for some changes to
rpc.yppasswdd to allow in-place updates.

Also change Makefile a little to use the same format as ypserv.


16105 04-Jun-1996 pst

Pass in both username and file to jkfprintf


16072 02-Jun-1996 phk

backout yacc changes


16033 31-May-1996 peter

Use the sysctl settable data port ranges rather than the statically
compiled values. see sysctl net.inet.ip.portrange.* and the IP_PORTRANGE
discussion in <netinet/in.h>


16015 30-May-1996 phk

Fix yacc rule usage.


15861 22-May-1996 jdp

When checking to see whether a needed shared library has already
been loaded, look for a match by device and inode number if the
traditional pathname comparisons don't find a match. This detects
the case in which a library is requested using two different names
which are really links to the same file, and avoids loading it
twice.

Requested by: peter@freebsd.org
Reviewed by: peter@freebsd.org


15754 12-May-1996 wpaul

Small touchups:

- Fix typos in comments in hash.c.
- Remove unneeded and unused member from grouplist struct in hash.h.
(Curiously, the compiler never complained about this even though the
member was of type 'struct grps' which is not defined anywhere in
this program.)
- char ch -> int ch in revnetgroup.c.
- char *argv[0]; -> char *argv[]; also in revnetgroup.c.
- Force the user to specify at least one of the -u or -h flags
and complain if they specify both.


15679 07-May-1996 wosch

``mv'' -> ``mv -f''
``rm'' -> ``rm -f''
so mv/rm may not ask for confirmation if you are not root


15671 07-May-1996 wpaul

phkmalloc doesn't like the call to xdr_free() in ypxfr_get_master().
Nuke it.


15662 07-May-1996 ache

Localize time


15659 07-May-1996 ache

Replace non-POSIX speed setting by POSIX one


15645 05-May-1996 joerg

Finally commit the changes that make getty(8) no longer depend on the
COMPAT_43 cruft. This is supposedly the last core utility that has
been using it! (So now, one should be able to remove this option from
the config files. Be aware that the last officially released xterm
however still requires it.)

The getty has been running now for several weeks on my modem line, so
i feel safe about it.

Obtained from: mostly from the NetBSD vendor-branch


15420 28-Apr-1996 wpaul

Small tweak to yp_put_record(): call the DB put routine with the
R_NOOVERWRITE flag and process return codes so that we can tell the
difference between a failure due to a duplicate database entry and
failure due to some other error.


15326 20-Apr-1996 jdp

Implement support for LD_PRELOAD in the dynamic linker. Remove
descriptions of LD_NO_INTERN_SEARCH and LD_NOSTD_PATH from the manual
page, since they are not supported.

Submitted by: Doug Ambrisko <ambrisko@ambrisko.roble.com>


15325 20-Apr-1996 jdp

Implement support for LD_PRELOAD in the dynamic linker.

Submitted by: Doug Ambrisko <ambrisko@ambrisko.roble.com>


15250 13-Apr-1996 joerg

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


15235 13-Apr-1996 joerg

Introduce a -b option for sites who are not interested in the old biff
service. (Avoid a ``in_vain'' warning...)


15196 11-Apr-1996 dg

Implemented a "-D" option that causes ftpd to detach and become a daemon -
accepting connections on the FTP port and forking children processes to
handling them. This is lower overhead than spawning ftpd from inetd and
can be a significant win on busy FTP servers. Be sure to disable ftpd in
inetd.conf if you decide to use this option.
These changes are based on similar changes I made to wu-ftpd and have
been in use on wcarchive for several months.


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.


15101 07-Apr-1996 joerg

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


15082 07-Apr-1996 mpp

Correct some man page cross references and file location references.


14783 24-Mar-1996 jkh

Here is a patch to talkd which makes it send the request to the tty with
the lowest idle time.
Submitted by: loodvrij@gridpoint.com (Bruce J. Keeler)


14667 18-Mar-1996 dg

Fix bug that caused a coredump when attempting to enter passive mode when
not logged in. Original fix slightly altered by me to return the correct
reply code.

Submitted by: Vadim Kolontsov <vadim@tversu.ac.ru>


14150 18-Feb-1996 mpp

Update the uucpd makefile to install the man page.


14149 18-Feb-1996 markm

New man page for uucpd. There is precious little info for this thing
available, but I managed to find something in the BSD4.4 uucico(8)
docs.

Closes pr docs/131.


14088 13-Feb-1996 wpaul

Turn on ypxfr.


14078 13-Feb-1996 joerg

Include both, the regular and the `secure' telnetd, when building
a release.


14038 11-Feb-1996 mpp

Correct a bunch of man page cross references and generally
try and silence "manck".

ncurses, rpc, and some of the gnu stuff are still a big mess, however.


14024 11-Feb-1996 markm

#include <kerberosIV/des.h> -> #include <des.h>


14004 09-Feb-1996 mpp

Another round of various man page cleanups.


13990 09-Feb-1996 mpp

Correct a file location in the FILES section.


13895 04-Feb-1996 wpaul

ypxfr_getmap.c:
- Handle 'empty' maps more gracefully. By empty I mean a valid map that
just happens not to have any entries in it, such as you would get if
you built a map database from an empty file. Previously, trying to
ypxfr such a map would yield an 'NIS map/database error' which is not
the correct behavior.

ypxfr_misc:
- Make sure to free() or xdr_free() dynamically allocated memory in
ypxfr_get_master() as necessary.


13881 03-Feb-1996 markm

Rename des_set_key -> des_set_key_krb. (libdes conflict)


13849 02-Feb-1996 mpp

Add some missing manual page links.


13681 28-Jan-1996 wosch

Section FILES and SEE ALSO completed
Section FILES and SEE ALSO completed


13680 28-Jan-1996 wosch

Section FILES and SEE ALSO completed


13582 23-Jan-1996 pst

Fix getif() to work under 4.3bsd and later


13579 23-Jan-1996 pst

Remove bootpgw


13578 23-Jan-1996 pst

Disconnect bootpgw


13577 23-Jan-1996 pst

Merge back in 4.4bsd ARP changes by hand


13576 23-Jan-1996 pst

Add bootpgw makefile


13575 23-Jan-1996 pst

Fix conflicts from 2.4.3 merge


13573 23-Jan-1996 pst

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


13570 23-Jan-1996 pst

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


13406 13-Jan-1996 jdp

This release is a moderate restructuring of the dynamic linker.
It addresses a number of problems that were present in earlier
versions.

The calls to the "init" and "fini" functions of shared libraries
have been reordered, so that they are called in a strictly nested
fashion, as is required for C++ constructors and destructors. In
addition, the "init" functions are called in better order relative
to each other. That makes the system more tolerant of C++ programs
which depend on a library's being initialized before its clients.

The dynamic linker is now more tolerant of shared libraries in
which dependencies on other shared libraries are incompletely
recorded.

Cleanup in the event of errors has been improved throughout the
dynamic linker. A number of memory leaks were eliminated.

The warning message for a shared library whose minor version number
is too old has been clarified.

The code dealing with the "ld.so.hints" file has been cleaned up.
A bug that caused the hints file to be unmapped incompletely has
been fixed. A different bug that could potentially cause the hints
file to be mapped on top of a loaded object has been fixed.

The code that searches for shared libraries has been cleaned up.
The searching is now more compatible with that done by SunOS and
SVR4. Also, some unnecessary and useless searches of both the
hints file and library directories have been eliminated.

Reviewed by: nate@freebsd.org


13405 13-Jan-1996 jdp

Split up the code so that a single directory can be searched, to
support some changes in the dynamic linker. (This code is shared
by the dynamic linker.)

Reviewed by: nate@freebsd.org


13390 11-Jan-1996 phk

Another '-' needed for make release.


13388 11-Jan-1996 phk

Make the new realinstall target a little less draconian so that make release
doesn't fall over.


13382 11-Jan-1996 jdp

Install ld.so in a way that is safe even on a running system.


13376 10-Jan-1996 wpaul

- Fix error reporting when checking order number via NIS: we return zero
on a failure, but if we're checking a corrupt map we could also get back
a zero from ypserv without really encountering any actual error. Flag this
condition and generate an meaningful error message.

- Fix transmission of ypxfr_clear to ypserv: error checking was wrong
and we sending YPXFR_YPERR as an error status instead of YPXFR_CLEAR.

- To help avoid a race condition (or at least reduce the likelyhood of
it occuring), use rename() to move a newly transfered map into place
instead of unlink()ing the old one first and then renaming. Da man page
sez that rename should do the unlink() for us. This prevents ypserv
from returning 'no such map in domain' when asked to query a map which
ypxfr has just unlink()ed but not yet replaced.


13276 06-Jan-1996 wpaul

Sync with my sources at home (these are really tiny changes):

- Fix a SEGV condition in ypxfr_main.c that reared its ugly head while I
was working on the 'parallel jobs' feature of the new yppush. After we've
completed the map transfer and created a local temporary copy, we check
the order number of the map on ypserv again to make sure it didn't change
while the transfer was in progress (map skew). If for some reason we flat
out fail to get the order number from the server, we flag this as an
error and bail, telling ypxfr_exit() to clean up our temporary files
for us. However, ypxfr_exit() tries to close the database before unkining
it, not realizing that it has already been closed prior to the skew check.
The second attempt to close the database causes a SEGV somewhere inside
the DB code.

(Well, it does on my 2.0.5 machine anyway. I haven't seen anyone modify
the DB library code in ages, so the condition is probably still there.)

To work around this, we deliberately set dbp to NULL after closing the
database and check for the condition in ypxfr_exit(), being careful to
avoid the second close if we see the NULL.

- In yp_dbwrite.c, make yp_open_db_rw() open the database with O_EXLOCK
flag set. This probably won't affect much of anything, but I feel better
having it there.


13247 05-Jan-1996 graichen

added rpc.rquotad and rpc.sprayd


13241 05-Jan-1996 graichen

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


13238 05-Jan-1996 graichen

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


13139 01-Jan-1996 peter

Make ftpd use setproctitle() from libutil

I've left the old code in there under #ifdef OLD_SETPROCTITLE in case
somebody wants to try to compile out ftpd on some other machine.


13123 30-Dec-1995 peter

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


13122 30-Dec-1995 peter

recording cvs-1.6 file death


13008 25-Dec-1995 wpaul

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


12908 17-Dec-1995 wollman

Implement server-side transaction TCP. (Has no effect on non-TTCP clients.)


12728 10-Dec-1995 peter

Fix the bug which allowed people to avoid the "-s" (secure) bug.
Now, "finger" is invoked with "--" before the first network supplied
argument, so the "--" and "-l" hacks will be stopped.


12575 02-Dec-1995 nate

Fix typo.


12561 01-Dec-1995 guido

It is not necessary to check if a '-' is in lusername., Checking if
lusername starts with a '-' is enough. Otherwise, no users with a '-'
in there name can use rlogin.


12532 29-Nov-1995 guido

Timeout when an expected accept does not happen after all.
This gets rids of dozens of hanging ftpd's because some broken
pc implementation `forgets' to open a passive connection.
Obtained from: Wietse Venema


12434 20-Nov-1995 peter

Stop rlogind from bogusly ignoring an explicit .rhosts file for root.
It still correctly ignores hosts.equiv. This is now consistant with rshd.


12387 19-Nov-1995 ache

Add missing & in des_set_key argument


12240 12-Nov-1995 peter

Move the setlogin() call a little earlier.. It was being done in the child
process - which would be no longer allowed if the setlogin() changes go
through. Now the parent (the session leader, when started by inetd) does it.


12012 02-Nov-1995 nate

Changed the terminology for what used to be called the "memorizing"
vector. Now it is called the "symbol caching" vector. This was made
possible and unconfusing by other changes that allowed me to localize
everything having to do with the caching vector in the function
reloc_map().

Switched to alloca() for allocating the caching vector, and eliminated
the special mmap-based allocation routines. Although this was motivated
by performance reasons, it led to significant simplification of the
code, and made it possible to confine the symbol caching code to the
single function reloc_map().

Got rid of the unnecessary and inefficient division loop at the
beginning of rtld().

Reduced the number of calls to getenv("LD_LIBRARY_PATH") to just 1, on
suggestion from <davidg@root.com>.

Added breaks out of the relocation loops when the relocation address is
found to be 0. A relocation address of 0 is caused by an unused
relocation entry. Unused relocation entries are caused by linking a
shared object with the "-Bsymbolic" switch. The runtime linker itself
is linked that way, and the last 40% of its relocation entries are
unused. Thus, breaking out of the loop on the first such entry is a
performance win when ld.so relocates itself. As a side benefit, it
permits removing a test from md_relocate_simple() in
../i386/md-static-funcs.c.

Unused relocation entries in other shared objects (linked with
"-Bsymbolic") caused even bigger problems in previous versions of the
runtime linker. The runtime linker interpreted the unused entries as if
they were valid. That caused it to perform repeated relocations of the
first byte of the shared object. In order to do that, it had to remap
the text segment writable. Breaking out of the loop on the first unused
relocation entry solves that.

Submitted by: John Polstra <jdp@polstra.com>


11952 31-Oct-1995 ache

Revert fsync ifdef behaviour and name, now default variant acts like
original one.
Suggested by: peter


11950 31-Oct-1995 ache

Put fsync under #ifdef EXTRA_SANITY and turn it off by default.
fsync here cause real disk trashing when large UUCP mail chanks
parsed.


11817 26-Oct-1995 wpaul

Add revnetgroup.


11815 26-Oct-1995 wpaul

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


11781 25-Oct-1995 nate

Run-time linker speedups - Round One

Implemented symbol memorizing to reduce the number of calls to lookup(),
making relocation go faster. While relocating a given shared object,
the dynamic linker maintains a memorizing vector that is directly
indexed by the symbol number in the relocation entry. The first time a
given symbol is looked up, the memorizing vector is filled in with a
pointer to the symbol table entry, and a pointer to the so_map of the
shared object in which the symbol was defined. On subsequent uses of
the same symbol, that information is retrieved directly from the
memorizing vector, without calling lookup() again.

A symbol that is referenced in a relocation entry is typically
referenced in many relocation entries, so this memorizing reduces the
number of calls to lookup() dramatically. The overall improvement in
the speed of dynamic linking is also dramatic -- as much as a factor of
three for programs that use many shared libaries.

Submitted by: jdp@polstra.com "John Polstra"


11767 24-Oct-1995 ache

Remove LD_NOSTD_PATH unsetenv, isn't exist anymore


11766 24-Oct-1995 ache

Remove LD_NOSTD_PATH implementation, it isn't works and
can cause some problems.
Suggested-by: davidg


11617 21-Oct-1995 ache

if uid != euid or gid != egid unsetenv("LD_NOSTD_PATH") too


11597 20-Oct-1995 ache

Fix original patch error with ! before strncmp
Zap only needed LD_* variables


11591 20-Oct-1995 ache

Don't allow LD_* env. variables to be tricked
Submitted by: Sam Hartman <hartmans@mit.edu>


11486 15-Oct-1995 dg

Added a -D option to set the TCP_NODELAY socket option. This improves
responsiveness at the expense of some additional network traffic.


11233 05-Oct-1995 gibbs

Kerberos can now deal with multi-homed clients.

Kerberos obtains a network address for the local host from the routing
tables and uses it consistently for all Kerberos transactions. This ensures
that packets only leave the *authenticated* interface. Clients who open
and use their own sockets for encrypted or authenticated correspondance
to kerberos services should bind their sockets to the same address as that
used by kerberos. krb_get_local_addr() and krb_bind_local_addr() allow
clients to obtain the local address or bind a socket to the local address
used by Kerberos respectively.

Reviewed by: Mark Murray <markm>, Garrett Wollman <wollman>
Obtained from: concept by Dieter Dworkin Muller <dworkin@village.org>


11198 05-Oct-1995 nate

This is a FreeBSD manpage, not a NetBSD manpage. :)


11068 29-Sep-1995 ache

Build secure telnetd if available and allowed


11050 28-Sep-1995 bde

Fix SRCS (.c's were .o's) so that `make depend' works.


11041 27-Sep-1995 nate

Make the error message more readable when 'ld.so' cannot locate a needed
shared library. Formerly, the message looked like this:

ld.so: run: libjdp1.so.1.0: Undefined error: 0

The new message looks like this:

ld.so: run: Can't find shared library "libjdp1.so.1.0"

(Where "run" is the name of the program being executed.)

Submitted by: jdp@polstra.com (John Polstra)


11040 27-Sep-1995 nate

Fixup the "ld.so failed" message for the case when ld.so finds undefined
symbols.

An easy example to see this is to develop an X program which links
against Xt, but doesn't add -lX11 to the link line. It will link fine,
but cause run-time errors by ld.so because of missing symbols used by Xt
defined in X11. This patch makes the errors more readable.

Submitted by: jdp@polstra.com (John Polstra)


10678 11-Sep-1995 dg

Fixed bug introduced with the change of startslave()...two arguments
were chopped off of the function call and garbage was passed instead.
The solution involves making some variable globals as well as fixing the
call to have all the arguments.


10571 06-Sep-1995 pst

Move erase cleanup outside linemode conditional


10561 05-Sep-1995 pst

Properly set the erase character for the login prompt.

Submitted by: John Capo <jc@irbs.com> & Peter Wemm


10560 05-Sep-1995 pst

Delay starting login process until option negotiation is complete to
avoid race condition on connections with larger round-trip-times.

Submitted by: John Capo & Peter Wemm


10415 29-Aug-1995 ache

Fix ${.CURDIR} misspelling


10401 28-Aug-1995 mpp

Check for expired passwords before allowing access to the system.


10335 26-Aug-1995 joerg

Import Paul Kranenburg's man page for ld.so (aka. rtld).

Obtained from: NetBSD


10154 21-Aug-1995 ache

Upgrade to 2.9


9970 06-Aug-1995 bde

Change `install' to `${INSTALL}' so that default install flags can be
specified in the top level Makefiles.

Previously I missed dozens of Makefiles that skip the install after
using `cmp -s' to decide that the install isn't necessary.


9962 06-Aug-1995 markm

Only build telnetd if secure telnetd is not going to be built.
Reviewed by: rgrimes


9933 05-Aug-1995 pst

Use data ports in the range 40000..44999 by default to enhance FTP usability
in a firewall environment. Original idea by Mark Tracy (?).

Reviewed by: wollman
Submitted by: pst


9931 05-Aug-1995 ats

Fix some typos in a comment BUAD -> BAUD.


9875 03-Aug-1995 jkh

Back this change out. It's just not worth arguing over and any further emails
I get on this topic will go straight to /dev/null. This is absolutely the
last word on this topic you'll see from me. Too much time has already been
wasted.


9860 02-Aug-1995 paul

Change default banner fro 4.4 BSD to FreeBSD.
Reviewed by:
Submitted by:
Obtained from:


9857 02-Aug-1995 ache

Use the same DECODE_BAUD trick like in new telnetd to obtain
termios speed.
Obtained from: Pre-Lite2 telnet


9839 01-Aug-1995 jkh

A useful aid.. Add support for:

%r: current release
%m: machine architecture type (i386 for now)
%s: OS name (FreeBSD)

from uname() in banner string.


9765 29-Jul-1995 peter

rexecd was not calling "setlogin()" when it should have. This was causing
getlogin() to return wrong answers (eg: "root").
Reviewed by: davidg
Obtained from: James Jegers, for NetBSD, slightly reworked by me.


9720 25-Jul-1995 wpaul

Uncomment 'CFLAGS+=ETC_ETHERS' -- we have support for this as of 2.0.5.


9651 23-Jul-1995 ache

Change hardcoded 15 (which means 38400) to B115200 which is 17


9335 27-Jun-1995 dfr

Change ld.so to correctly load dependant libraries for dlopen and unload them
on dlclose. Also correctly call constructors and destructors for libraries
linked with /usr/lib/c++rt0.o.
Change interpretation of dlopen manpage to call _init() rather than init()
for dlopened objects.
Change c++rt0.o to avoid using atexit to call destructors, allowing dlclose to
call destructors when an object is unloaded.
Change interface between crt0 and ld.so to allow crt0 to call a function on
exit to call destructors for shared libraries explicitly.

These changes are backwards compatible. Old binaries will work with the new
ld.so and new binaries will work with the old ld.so. A version number has
been introduced in the crt0-ld.so interface to allow for future changes.

Reviewed by: GAWollman, Craig Struble <cstruble@singularity.bevc.blacksburg.va.us>


9253 17-Jun-1995 dg

The final negotiation of DO_BINARY in the LINEMODE portion of the telnetd code
causes some clients that do not support linemode to mis-interpret the return
key (i.e. double returns).
The fix is to only do the state check for binary options if linemode will
be used.
Closes PR#505.

Submitted by: Charles Henrich


8870 30-May-1995 rgrimes

Remove trailing whitespace.


8858 30-May-1995 rgrimes

Remove trailing whitespace.


8697 22-May-1995 dg

Make last change a little more robust by checking for failure of getcwd().


8696 22-May-1995 dg

Set "HOME" so that tilde expands correctly. It previously was always root's
directory /root.


8240 03-May-1995 wollman

Speed up ftpd and make it more efficient:

- set TCP_NOPUSH to keep from sending short packets at each write(2) boundary
- set SO_SNDBUF to 64k so we have a reasonable amount of buffer space
- for a regular file in binary mode which is not being restarted and is
. smaller than 16 Meg, use mmap(2) and write(2) the whole file in one big
gulp

In the most common circumstances, this should dramatically reduce the
system-call load from ftpd, since the call to write() will not return until
the entire file has been written, rather than writing just a few K at a time
in a loop.


8093 26-Apr-1995 ache

Fix bug:
When hostname len > 8, name replaced with dot notation when -u flag
not specified (default case).
Use _PATH_* for utmp/wtmp.


7971 21-Apr-1995 nate

Sync. up bits with Paul K. Cascade support plus some cosmetic changes.

Obtained from: NetBSD


7914 18-Apr-1995 jkh

Extensive updates to this package.
Submitted by: Gene Stark <gene@starkhome.cs.sunysb.edu>


7842 15-Apr-1995 gpalmer

Fix two more references to /etc/motd that I overlooked. PR #29


7841 15-Apr-1995 gpalmer

Close PR #29. The file should be /etc/ftpmotd, not /etc/motd.


7777 12-Apr-1995 ache

Add some useful sendmail options


7768 12-Apr-1995 ache

Upgrade.
Close security holes reported.


7766 12-Apr-1995 gpalmer

The servers bootpd & bootpgw live in /usr/libexec not /etc. Correct the
references in the man page.


7317 24-Mar-1995 ache

Fix truncating hostname using MAXHOSTNAMELEN
Submitted by: Jan Conard <charly@fachschaften.tu-muenchen.de>


7182 20-Mar-1995 ache

Fix wtmp logout
Submitted by: Gil Kloepfer Jr. <gil@limbic.ssdl.com>


7172 19-Mar-1995 nate

Removed /usr/local/lib from the standard library search path to be
consistant. Programs shouldn't rely on non-standard paths for bringing
in default libraries.

Suggested by: Andreas Schulz <ats@freebsd.first.gmd.de>


7142 18-Mar-1995 bde

Restore the 4.4lite version which apparently was clobbered by a repository
copy. The differences are trivial. I have no backups of the clobbered
history.


7128 18-Mar-1995 nate

Don't rely on the shared library bringing in libmd, do it explicitly.

Change the library order so libcrypt is the last library in the list.
libskey contains references to _crypt and can't resolve it unless
-lcrypt occurs after it in the link command. This only occurs when
linking statically.


7127 18-Mar-1995 nate

Change the library order so libcrypt is the last library in the list.
libskey contains references to _crypt and can't resolve it unless
-lcrypt occurs after it in the link command. This only occurs when
linking statically.


6887 04-Mar-1995 nate

Weak symbol support from NetBSD. This should bring us in sync with the
NetBSD ld code except for local changes for dlopen() and friends and
the hashing on the minor value of the shlibs. We should be binary
compatible now with all their libraries.

Obtained from: NetBSD


6750 26-Feb-1995 jkh

I think the security check to invalidate ALL write requests was just a little
excessive, and violates the specification defined in the manpage to boot.


6740 26-Feb-1995 guido

Add some functionality to ftpd so it logs all anonymous file
transfers. It only does this when -S is set.
Reviewed by:
Submitted by:
Obtained from: logdaemon package


6440 15-Feb-1995 ats

Add a description for the np flag.


6264 09-Feb-1995 jkh

Support for >32 PTYs.
Submitted by: Heikki Suonsivu <hsu@cs.hut.fi>


6234 07-Feb-1995 jkh

Support for more Sun compatible dlopen() and friends. Also added proper error
handling.
Reviewed by: gj
Submitted by: Mark Diekhans <markd@grizzly.com>


6180 04-Feb-1995 phk

fixed spelling error.


6034 30-Jan-1995 dfr

Discard any messages which are buffered on the routing socket before using
it otherwise the response to one of our routing messages could be lost due
to buffer overflow.


5661 16-Jan-1995 dfr

Change to use RTM_CHANGE when an arp entry already exists. This closes
problem bin/57 which was caused when an incomplete entry was present for the
host which was booting.


5551 12-Jan-1995 joerg

Make ldconfig and ld.so not hashing the shared lib minor number. This
misfeature caused troubles when a program attempted to access a shlib
where one with a higher minor number has been hashed. Ldconfig does
only include the highest-numbered shlib anyway, so this is in no way a
limitation of generality.

Caution: after installing the new programs, your /var/run/ld.so.hints
needs to be rebuiult; run ldconfig again as it's done from /etc/rc.


5402 05-Jan-1995 swallace

Change to
#define STANDARD_SEARCH_DIRS "/usr/lib", "/usr/X11R6/lib", "/usr/local/lib"
Like in 2.0R, except without /usr/X386.


5395 04-Jan-1995 gibbs

Remove -DDIAGNOSTIC in makefile. The DIAGNOSTIC code is severly broken and
will change if I have more time to look at it. Keep at least 5 segments
cleaned if possible (instead of 2 which is a bare minimum for FS operation).


5205 23-Dec-1994 nate

Updated to recent version of Paul K.'s shlib code. This code has better
warning handling and allows for link-time warnings with a modified
version of gas.

Note: Not all of the newer bits were updated such as some of the non-x86
machine-dependant code is relevant to FreeBSD right now.

Obtained from: NetBSD


5111 15-Dec-1994 ache

Fix hostnames >32 chars
Submitted by: cstruble@singularity.bevc.blacksburg.va.us


4807 25-Nov-1994 ache

Remove -u argument, does nothing for non-priviliged user.
Write LOGNAME in addition to USER as sun uucpd does.


4790 23-Nov-1994 ache

mass fixes from 1.1.5.1 + better log erros and incorrect logins


4789 23-Nov-1994 ache

Fix uucico path
Submitted by: Gene Stark


4715 20-Nov-1994 wollman

Add distribution=krb for P-HK


4661 18-Nov-1994 ats

Make two variables static so that the compiler warnings are
vanishing. As far as i know rpc.rusersd is single_threaded, so
this shouldn't be a problem.


4659 18-Nov-1994 ats

Reviewed by: Roger Holst roger@first.gmd.de
Add an initialization of the len parameter for the getsockname call.
Now rpc.rwalld can run under inetd.


4657 18-Nov-1994 ats

Reviewed by: Roger Holst roger@first.gmd.de
Add an initialization of the len parameter for the getsockname call.
Now rpc.rusersd can run under inetd.


4656 18-Nov-1994 ats

Reviewed by: Roger Holst roger@first.gmd.de
Add an initialization of the len parameter for the getsockname call.
Now rpc.rstatd can run under inetd.


4593 18-Nov-1994 phk

Relativized a ".PATH:" directive.


4131 04-Nov-1994 jkh

__386BSD__ -> __FreeBSD__

I know that many of these entries are bogus and need to be revisited,
but let's get the tree working again for now and then do a pass through
looking at all the __FreeBSD__ entries, shall we?


3938 27-Oct-1994 pst

recommit rev 1.5 of ftpd, I fatfingered a command


3936 27-Oct-1994 pst

Printing out /etc/motd when a ftp login occurs is a security hole
(as is printing out a version number at the telnet login banner).

Don't print out /etc/motd when people login, instead if present,
print out /etc/ftpmotd. It looks like 4.4lite2 has done something similar
(perhaps for different reasons) because /etc/motd no longer shows up
on vangogh.

Folks who like the old behavior can create a symbolic link to motd.


3793 22-Oct-1994 ache

Implement security fix correctly: via isprint()


3791 22-Oct-1994 phk

A nice little security fix. Things must be rough in moscow...

Submitted by: dima@demos.su (Dima Ruban)


3787 22-Oct-1994 jkh

Add xtend.


3780 22-Oct-1994 jkh

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


3777 22-Oct-1994 pst

Figured it out, misapplied a patch, ftpd now works again.


3776 22-Oct-1994 pst

Fix broken command parser (fall back 10 yards and scratch head).


3702 19-Oct-1994 pst

Include most of the logdaemon v4.4 S/key changes


3618 15-Oct-1994 ache

Extend message format to user@offset[:file]
Obtained from: FreeBSD 1.x


3615 15-Oct-1994 dg

Updated to changes in struct vmmeter. There is a slight bogosity here:
"pageins/outs" now refers to vnode paging.


3250 30-Sep-1994 pst

Clean up makefile


3234 30-Sep-1994 pst

make rexecd link against skeyaccess, not authfile


3231 30-Sep-1994 pst

Move bootp & related stuff


3230 30-Sep-1994 pst

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


3228 30-Sep-1994 pst

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


3206 29-Sep-1994 pst

Use new skey access routines


3197 29-Sep-1994 csgr

First level of changes for bringing in eBones (kerberos).
- Get rid of inverse logic (NOKERBEROS and NOEBONES) in src/makefile,
and replace with MAKE_KERBEROS and MAKE_EBONES. (Far fewer contortions,
and both default to off.) IF YOU WANT KERBEROS, YOU HAVE TO EXPLICITLY
DEFINE ONE OF THESE.
- Make Makefiles kerberos-aware.


3191 29-Sep-1994 pst

Tighen up rexecd(8) security (see manual page for details).
Rexecd is a crock, it never should have been written, however make it so
that people who have a need to run it don't hurt themselves so badly.

Obtained from: Ideas obtained from logdaemon 4.3 from Wietse Venema


3171 28-Sep-1994 pst

Forget it. pcnfsd is too ugly for words because of the hand edited
rpc files and other cruft. It's not important enough to have it in the
source distribution and I don't feel comfortable with this, as it's below
the standards of CSRG.

Disable & remove pcnfsd. Either I'll rewrite this so it can all be
generated with rpcgen or stuff it in ports and let it rot there.


3170 28-Sep-1994 pst

Port rpc.pcnfsd to FreeBSD and enable


2930 20-Sep-1994 dg

Fixed bug where /etc/ftpusers was ineffective. Caused by the wrong
pointer being passed to strcmp(). Bug noticed by Matthew Green.


2856 18-Sep-1994 swallace

Add LDDESTDIR to ld command.
Add -I${DESTDIR}/usr/include to cpp command.


2845 18-Sep-1994 dg

Fix from John Kohl:

/usr/libexec/getty doesn't properly interpret the '%d' escape. It tries
to use %P to get AM or PM, but instead all it gets is "P".

Submitted by: John Kohl


2812 15-Sep-1994 bde

Unmap hints file when finished with it, so that it can go away
completely when ldconfig unlinks it. If init is shared, then the
referenced unlinked copy of the hints file created by running
ldconfig in /etc/rc caused the file system to be unclean after
every reboot.


2678 11-Sep-1994 rgrimes

Change all references to LIBTERM and -ltermlib to LIBTERMCAP and -ltermcap


2620 09-Sep-1994 paul

Removed bugfiler.
Submitted by: Paul Richards


2517 05-Sep-1994 csgr

Don't define KLUDGELINEMODE.
(If you do, you will have problems trying to telnet into a FreeBSD-2.0
box from a Sun, and I WANT TO DO THAT.)
Submitted by: Geoff


2391 29-Aug-1994 ache

Ignore SIGQUITs, cause getty dumps core on garbadge from modem line


2375 28-Aug-1994 bde

Add dependencies on libraries to DPADD. Someday this should be done
automagically. -lfoo has to be right to work, but ${LIBFO0} is too
easy to forget or misspell; nothing checks it and it should be
different for shared libraries.


2350 28-Aug-1994 csgr

add: rpc.rstatd rpc.rusersd rpc.rwalld
Submitted by: Geoff.


2342 28-Aug-1994 csgr

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


2338 28-Aug-1994 csgr

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


2335 28-Aug-1994 csgr

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


2301 26-Aug-1994 wollman

Install ld.so immutable.


2287 26-Aug-1994 jkh

Whoops - forgot to add this guy.
Reviewed by:
Submitted by: jkh


2286 26-Aug-1994 jkh

Replace this with the 1.1.5.1 getty. David says that the 4.4 version is too
broken to live.
Submitted by: jkh


2248 23-Aug-1994 guido

Add -DBSD4.2 and -DBSDINETD so uucpd makes sense. Further correct a
warning at compil time.
This actually makes uucpd at tcp port 540 work, so slippers can poll
over tcp.
Reviewed by:
Submitted by: guido


2230 23-Aug-1994 jkh

Add back atrun
Submitted by: jkh


2223 22-Aug-1994 guido

Implement fbtab ala SunSO.
Could not compile it (on thud) because ttychar.h was still broken.
Reviewed by:
Submitted by: guido


2195 21-Aug-1994 guido

Add skey support
Reviewed by:
Submitted by: guido


2194 21-Aug-1994 guido

Put skey support to ftpd
Reviewed by:
Submitted by: guido


2193 21-Aug-1994 guido

Put skey support in ftpd.
Reviewed by:
Submitted by: guido


2161 20-Aug-1994 csgr

LDADD= -lcrypt
Submitted by: Geoff


2158 20-Aug-1994 csgr

LDADD= -lcrypt
Submitted by: Geoff


2077 15-Aug-1994 guido

Plug already known security hole. (Brought over from 1.1.5):
Fixed security problem with telnetd, which allowed
telnet -l -hcert.org localhost
to change the user's host in utmp.
Thanks to Matthew Green <mrgreen@@mame.mu.oz.au> for showing me this one.


Reviewed by: karl, guido
Submitted by: mrgreen@@mame.mu.oz.au


2076 15-Aug-1994 guido

Plug security hole that was already fixed in 1.1. It prevents
user from specifying their hostname when rlogin()-ing in
(using rlogin -f-h<host>)

Reviewed by:
Submitted by:


2054 12-Aug-1994 csgr

Remove the scary bits from telnetd - no more encryption left here.
Only crypt.c in libc remains.
Reviewed by: Geoff Rehmet


2002 10-Aug-1994 jkh

Change bogus --I to -I to make compilation happen again.
Submitted by: jkh


1875 05-Aug-1994 wollman

Update to new make macros and disable Kerberos because we haven't got it
set up right yet.


1847 04-Aug-1994 wollman

For the moment, don't build kpasswdd until we figure out what
to do with it.


1801 24-Jul-1994 phk

Reviewed by: phk
changed ^G to \007


1741 15-Jun-1994 rich

Changes from Paul Kranenburg which bring us into sync with his sources:

handling of errors through the standard err() and warn()
more fixes for Geoff Rehmet's NULL pointer bug.
fixes NULL pointer bugs when linking mono and nested X servers.
supports a `-nostdlib' option.
accept object files without a symbol table
don't attempt dynamic linking when `-A' is given

a few variable names have chaged (desc -> fd), and the formatting has
changed which should make it much easier to track his sources.

I tested 'make world' for /usr/src and X twice with these changes.


1634 30-May-1994 rgrimes

Disable afterinstall rule as it is broken when you have CVS files around.
Reviewed by:
Submitted by:


1605 28-May-1994 rgrimes

rbootd compiles on i386 too.
Reviewed by:
Submitted by:


1593 27-May-1994 rgrimes

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


1361 13-Apr-1994 ats

Change the private declarations from dlopen,dlclose,dlsym,dlctl
to public. These functions are also used in /usr/include/link.h,
so it looks, like they shouldn't be private.
I will ask Paul about that, if this is correct.


1255 10-Mar-1994 ats

Due to the deletion of the gcc support from libc we need again the
-lgcc_pic library. rtld uses the udivd3 routine from it.
Repeat the bug by simply compiling ld on current.


1153 13-Feb-1994 jkh

This is Paul K's latest set of ld changes. A commit was necessary at this
late stage due to the fact that link.h was copyright Sun Microsystems.

This version of ld sync's us up with NetBSD's ld and supports compatablily
with NetBSD's -[zZ] flags (which we had reversed). Compiling with this
new ld will give you RRS warnings for libraries which do not contain .type
infomation - these wsarnings are harmless and will go away as soon as you
recompile your libraries (cd /usr/src; make libraries).


1132 09-Feb-1994 rgrimes

Remove /usr/X386/lib and /usr/local/lib from the default locations,
these are handled by /etc/rc and this was causing errors on a new
install as these places do NOT exsist by default!


986 19-Jan-1994 dg

Removed dependance on EX_DYNAMIC in making decisions on the magic number.


973 14-Jan-1994 jkh

More proper fix for for shared lib debugging support.


972 12-Jan-1994 jkh

1. Fix bug where duplicate symbol warnings were suppressed. This often
caued ld to `exit silently', to general confusion.

2. Add Gary Jennejohn's fix to support debugging of shared libraries.


940 05-Jan-1994 nate

Modified Os string to be FreeBSD instead of NetBSD


939 05-Jan-1994 nate

Added the Linux atrun command as hacked by Chris Demetriou for NetBSD.


928 03-Jan-1994 dg

Implemented 'QMAGIC' a.out format correctly, and changed the default
output to be QMAGIC.


912 22-Dec-1993 jkh

C++ support changes (+misc fixes) from Paul K.


846 11-Dec-1993 jkh

Broke sbrk() out of rtld as part of general cleanup.


844 11-Dec-1993 jkh

Omitted 4th argument to findshlib() [thanks Rich!]. Our ld is a bit
different from NetBSD's here and it squeaked through the update.


843 11-Dec-1993 jkh

Sync up with Paul K's latest ld from cesium.


838 10-Dec-1993 jkh

makedepend fails for ld. I think it because the .S files are
preprocessed the same as when they are compiled. I just remove the
single-quotes from the offending comments. Rich


835 09-Dec-1993 jkh

David Greenman's latest changes to eliminate much stack-walking jazz
(no more sbrk_init()!).


829 04-Dec-1993 jkh

More changes to bring FreeBSD in sync with Paul K's latest.


828 04-Dec-1993 jkh

More changes to bring FreBSD in sync with Paul K's latest.


822 02-Dec-1993 jkh

Second attempt to integrate Paul K's changes.


815 01-Dec-1993 ache

Remove hanging #else part (with second sbrk()) without #if & #endif
Add missing argument to findshlib, I am not shure,
but it seems that it is 1.
!!! Does anybody compile it before commit?


811 30-Nov-1993 jkh

Many recent fixes from Paul K, add support for chaining of shared lib deps.


797 25-Nov-1993 jkh

Added -lgcc_pic back again.


792 22-Nov-1993 jkh

Some of the latest changes from Paul K (taken from NetBSD-current).


767 15-Nov-1993 paul

Incorporated fixes from Paul to make -Z option work. Emits old-style
ZMAGIC magic numbers in a long.


742 09-Nov-1993 paul

Added -lgcc_pic to Makefile -- Why do we need this and NetBSD don't ??

Incorporated patch by Guido (inspired by Davidg) that fixes stack
problem. May not be final fix but it works more than the current method.


740 09-Nov-1993 paul

Updated to newest ld from pk.

lib.c:
Pull in archives containing definitions needed by shared objects.
warnings.c:
Less spurious "undefined symbol" msgs for shared library defined
symbols.
ld.c:
Do a better job of recognising data in text segments, eg. `const char []'.
shlib.c,ld/rtld/{Makefile rtld.c}
Use strsep() in stead of strtok() and restore colons in eg. env. vars.


711 07-Nov-1993 paul

Added -lgcc_pic to LDFLAGS in rtld/Makefile


696 03-Nov-1993 paul

Imported NetBSD's ld for shared libs.


173 20-Jul-1993 nate

Libcrypt upgrade


85 02-Jul-1993 root

New manual page system


5 12-Jun-1993 rgrimes

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