Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Dec 2010 01:37:14 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r216683 - in projects/binutils-2.17: . bin/kill bin/sh bin/sh/bltin contrib/bsnmp/lib contrib/bsnmp/snmp_target contrib/bsnmp/snmp_usm contrib/bsnmp/snmp_vacm contrib/bsnmp/snmpd contri...
Message-ID:  <201012240137.oBO1bEpa074674@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dim
Date: Fri Dec 24 01:37:13 2010
New Revision: 216683
URL: http://svn.freebsd.org/changeset/base/216683

Log:
  Sync: merge r216506 through r216682 from ^/head.

Added:
  projects/binutils-2.17/contrib/bsnmp/lib/tc.def
     - copied unchanged from r216682, head/contrib/bsnmp/lib/tc.def
  projects/binutils-2.17/contrib/bsnmp/snmp_target/
     - copied from r216682, head/contrib/bsnmp/snmp_target/
  projects/binutils-2.17/lib/libthr/thread/thr_sleepq.c
     - copied unchanged from r216682, head/lib/libthr/thread/thr_sleepq.c
  projects/binutils-2.17/sys/contrib/dev/wpi/iwlwifi-3945-15.32.2.9.fw.uu
     - copied unchanged from r216682, head/sys/contrib/dev/wpi/iwlwifi-3945-15.32.2.9.fw.uu
  projects/binutils-2.17/sys/kern/kern_hhook.c
     - copied unchanged from r216682, head/sys/kern/kern_hhook.c
  projects/binutils-2.17/sys/kern/kern_khelp.c
     - copied unchanged from r216682, head/sys/kern/kern_khelp.c
  projects/binutils-2.17/sys/sys/hhook.h
     - copied unchanged from r216682, head/sys/sys/hhook.h
  projects/binutils-2.17/sys/sys/khelp.h
     - copied unchanged from r216682, head/sys/sys/khelp.h
  projects/binutils-2.17/sys/sys/module_khelp.h
     - copied unchanged from r216682, head/sys/sys/module_khelp.h
  projects/binutils-2.17/sys/x86/include/bus.h
     - copied unchanged from r216682, head/sys/x86/include/bus.h
  projects/binutils-2.17/tools/regression/bin/sh/builtins/printf3.0
     - copied unchanged from r216682, head/tools/regression/bin/sh/builtins/printf3.0
  projects/binutils-2.17/tools/regression/bin/sh/builtins/printf4.0
     - copied unchanged from r216682, head/tools/regression/bin/sh/builtins/printf4.0
  projects/binutils-2.17/tools/regression/bin/sh/expansion/arith8.0
     - copied unchanged from r216682, head/tools/regression/bin/sh/expansion/arith8.0
  projects/binutils-2.17/usr.sbin/bsnmpd/modules/snmp_target/
     - copied from r216682, head/usr.sbin/bsnmpd/modules/snmp_target/
Deleted:
  projects/binutils-2.17/sys/contrib/dev/wpi/iwlwifi-3945-2.14.4.fw.uu
Modified:
  projects/binutils-2.17/Makefile
  projects/binutils-2.17/UPDATING
  projects/binutils-2.17/bin/kill/kill.1
  projects/binutils-2.17/bin/kill/kill.c
  projects/binutils-2.17/bin/sh/Makefile
  projects/binutils-2.17/bin/sh/alias.c
  projects/binutils-2.17/bin/sh/arith_lex.l
  projects/binutils-2.17/bin/sh/bltin/bltin.h
  projects/binutils-2.17/bin/sh/builtins.def
  projects/binutils-2.17/bin/sh/cd.c
  projects/binutils-2.17/bin/sh/error.c
  projects/binutils-2.17/bin/sh/error.h
  projects/binutils-2.17/bin/sh/expand.c
  projects/binutils-2.17/bin/sh/jobs.c
  projects/binutils-2.17/bin/sh/sh.1
  projects/binutils-2.17/bin/sh/trap.c
  projects/binutils-2.17/contrib/bsnmp/lib/bsnmplib.3
  projects/binutils-2.17/contrib/bsnmp/lib/snmp.c
  projects/binutils-2.17/contrib/bsnmp/lib/snmp.h
  projects/binutils-2.17/contrib/bsnmp/lib/snmpagent.c
  projects/binutils-2.17/contrib/bsnmp/lib/snmpclient.c
  projects/binutils-2.17/contrib/bsnmp/lib/snmppriv.h
  projects/binutils-2.17/contrib/bsnmp/snmp_usm/snmp_usm.3
  projects/binutils-2.17/contrib/bsnmp/snmp_usm/usm_tree.def
  projects/binutils-2.17/contrib/bsnmp/snmp_vacm/vacm_tree.def
  projects/binutils-2.17/contrib/bsnmp/snmpd/main.c
  projects/binutils-2.17/contrib/bsnmp/snmpd/snmpmod.3
  projects/binutils-2.17/contrib/bsnmp/snmpd/snmpmod.h
  projects/binutils-2.17/contrib/bsnmp/snmpd/trap.c
  projects/binutils-2.17/contrib/bsnmp/snmpd/tree.def
  projects/binutils-2.17/etc/snmpd.config
  projects/binutils-2.17/games/factor/factor.c
  projects/binutils-2.17/include/unistd.h
  projects/binutils-2.17/lib/libc/sys/shmat.2
  projects/binutils-2.17/lib/libc/sys/shmctl.2
  projects/binutils-2.17/lib/libc/sys/shmget.2
  projects/binutils-2.17/lib/libthr/thread/Makefile.inc
  projects/binutils-2.17/lib/libthr/thread/thr_cond.c
  projects/binutils-2.17/lib/libthr/thread/thr_init.c
  projects/binutils-2.17/lib/libthr/thread/thr_kern.c
  projects/binutils-2.17/lib/libthr/thread/thr_list.c
  projects/binutils-2.17/lib/libthr/thread/thr_mutex.c
  projects/binutils-2.17/lib/libthr/thread/thr_private.h
  projects/binutils-2.17/lib/libthr/thread/thr_umtx.c
  projects/binutils-2.17/lib/libthr/thread/thr_umtx.h
  projects/binutils-2.17/libexec/getty/chat.c
  projects/binutils-2.17/libexec/getty/main.c
  projects/binutils-2.17/libexec/rbootd/rbootd.c
  projects/binutils-2.17/libexec/rlogind/rlogind.c
  projects/binutils-2.17/libexec/rpc.rwalld/rwalld.c
  projects/binutils-2.17/sbin/geom/class/part/geom_part.c
  projects/binutils-2.17/sbin/ping6/ping6.c
  projects/binutils-2.17/share/man/man1/builtin.1
  projects/binutils-2.17/share/man/man4/altq.4
  projects/binutils-2.17/share/man/man4/ixgb.4
  projects/binutils-2.17/share/man/man4/ixgbe.4
  projects/binutils-2.17/share/man/man4/jme.4
  projects/binutils-2.17/share/man/man4/miibus.4
  projects/binutils-2.17/share/man/man4/vlan.4
  projects/binutils-2.17/share/man/man4/xen.4
  projects/binutils-2.17/share/man/man5/core.5
  projects/binutils-2.17/share/man/man9/VOP_READDIR.9
  projects/binutils-2.17/share/mk/bsd.own.mk
  projects/binutils-2.17/sys/amd64/amd64/cpu_switch.S
  projects/binutils-2.17/sys/amd64/amd64/exception.S
  projects/binutils-2.17/sys/amd64/amd64/fpu.c
  projects/binutils-2.17/sys/amd64/amd64/genassym.c
  projects/binutils-2.17/sys/amd64/amd64/machdep.c
  projects/binutils-2.17/sys/amd64/amd64/sys_machdep.c
  projects/binutils-2.17/sys/amd64/amd64/vm_machdep.c
  projects/binutils-2.17/sys/amd64/ia32/ia32_reg.c
  projects/binutils-2.17/sys/amd64/ia32/ia32_signal.c
  projects/binutils-2.17/sys/amd64/include/atomic.h
  projects/binutils-2.17/sys/amd64/include/bus.h
  projects/binutils-2.17/sys/amd64/include/pcb.h
  projects/binutils-2.17/sys/amd64/linux32/linux32_machdep.c
  projects/binutils-2.17/sys/amd64/linux32/linux32_sysvec.c
  projects/binutils-2.17/sys/arm/xscale/ixp425/avila_gpio.c
  projects/binutils-2.17/sys/compat/freebsd32/freebsd32.h
  projects/binutils-2.17/sys/compat/ndis/hal_var.h
  projects/binutils-2.17/sys/conf/files
  projects/binutils-2.17/sys/contrib/dev/wpi/LICENSE
  projects/binutils-2.17/sys/dev/acpica/acpi.c
  projects/binutils-2.17/sys/dev/acpica/acpivar.h
  projects/binutils-2.17/sys/dev/atkbdc/atkbdc.c
  projects/binutils-2.17/sys/dev/atkbdc/atkbdc_isa.c
  projects/binutils-2.17/sys/dev/cxgb/ulp/tom/cxgb_cpl_socket.c
  projects/binutils-2.17/sys/dev/cxgb/ulp/tom/cxgb_ddp.c
  projects/binutils-2.17/sys/dev/cxgb/ulp/tom/cxgb_vm.c
  projects/binutils-2.17/sys/dev/cxgb/ulp/tom/cxgb_vm.h
  projects/binutils-2.17/sys/dev/hifn/hifn7751.c
  projects/binutils-2.17/sys/dev/if_ndis/if_ndis_pci.c
  projects/binutils-2.17/sys/dev/jme/if_jme.c
  projects/binutils-2.17/sys/dev/jme/if_jmereg.h
  projects/binutils-2.17/sys/dev/jme/if_jmevar.h
  projects/binutils-2.17/sys/dev/le/if_le_pci.c
  projects/binutils-2.17/sys/dev/lmc/if_lmc.c
  projects/binutils-2.17/sys/dev/malo/if_malo_pci.c
  projects/binutils-2.17/sys/dev/mii/jmphy.c
  projects/binutils-2.17/sys/dev/mii/jmphyreg.h
  projects/binutils-2.17/sys/dev/mii/nsgphy.c
  projects/binutils-2.17/sys/dev/pci/vga_pci.c
  projects/binutils-2.17/sys/dev/puc/pucdata.c
  projects/binutils-2.17/sys/dev/sis/if_sis.c
  projects/binutils-2.17/sys/dev/sound/pci/atiixp.c
  projects/binutils-2.17/sys/dev/sound/pci/csa.c
  projects/binutils-2.17/sys/dev/sound/pci/ich.c
  projects/binutils-2.17/sys/dev/uart/uart_cpu_amd64.c
  projects/binutils-2.17/sys/dev/uart/uart_cpu_i386.c
  projects/binutils-2.17/sys/dev/uart/uart_cpu_pc98.c
  projects/binutils-2.17/sys/dev/wpi/if_wpi.c
  projects/binutils-2.17/sys/fs/nfsserver/nfs_nfsdstate.c
  projects/binutils-2.17/sys/i386/i386/pmap.c
  projects/binutils-2.17/sys/i386/include/atomic.h
  projects/binutils-2.17/sys/i386/include/bus.h
  projects/binutils-2.17/sys/kern/kern_fail.c
  projects/binutils-2.17/sys/kern/kern_umtx.c
  projects/binutils-2.17/sys/kern/sys_pipe.c
  projects/binutils-2.17/sys/kern/sys_process.c
  projects/binutils-2.17/sys/kern/vfs_bio.c
  projects/binutils-2.17/sys/mips/conf/SENTRY5
  projects/binutils-2.17/sys/modules/wpifw/Makefile
  projects/binutils-2.17/sys/netinet/sctp_cc_functions.c
  projects/binutils-2.17/sys/netinet/sctp_indata.c
  projects/binutils-2.17/sys/netinet/sctp_input.c
  projects/binutils-2.17/sys/netinet/sctp_output.c
  projects/binutils-2.17/sys/netinet/sctp_sysctl.h
  projects/binutils-2.17/sys/netinet/sctp_timer.c
  projects/binutils-2.17/sys/netinet/sctp_usrreq.c
  projects/binutils-2.17/sys/netinet/tcp_timer.c
  projects/binutils-2.17/sys/netinet6/in6_ifattach.c
  projects/binutils-2.17/sys/netinet6/sctp6_usrreq.c
  projects/binutils-2.17/sys/nfsserver/nfs.h
  projects/binutils-2.17/sys/nfsserver/nfs_serv.c
  projects/binutils-2.17/sys/nfsserver/nfs_srvsubs.c
  projects/binutils-2.17/sys/pc98/include/bus.h
  projects/binutils-2.17/sys/powerpc/aim/mmu_oea.c
  projects/binutils-2.17/sys/powerpc/aim/mmu_oea64.c
  projects/binutils-2.17/sys/powerpc/include/vmparam.h
  projects/binutils-2.17/sys/sparc64/include/cpufunc.h
  projects/binutils-2.17/sys/sparc64/include/vmparam.h
  projects/binutils-2.17/sys/sparc64/sparc64/tick.c
  projects/binutils-2.17/sys/sys/_umtx.h
  projects/binutils-2.17/sys/sys/fail.h
  projects/binutils-2.17/sys/sys/mount.h
  projects/binutils-2.17/sys/sys/osd.h
  projects/binutils-2.17/sys/sys/param.h
  projects/binutils-2.17/sys/sys/umtx.h
  projects/binutils-2.17/sys/ufs/ffs/ffs_softdep.c
  projects/binutils-2.17/sys/vm/vm_extern.h
  projects/binutils-2.17/sys/vm/vm_fault.c
  projects/binutils-2.17/sys/vm/vm_map.h
  projects/binutils-2.17/sys/vm/vm_page.c
  projects/binutils-2.17/sys/vm/vm_page.h
  projects/binutils-2.17/sys/x86/x86/io_apic.c
  projects/binutils-2.17/sys/x86/x86/nexus.c
  projects/binutils-2.17/usr.bin/csup/rcsfile.c
  projects/binutils-2.17/usr.bin/csup/rcsfile.h
  projects/binutils-2.17/usr.bin/mail/cmd1.c
  projects/binutils-2.17/usr.bin/mail/cmd2.c
  projects/binutils-2.17/usr.bin/mail/cmd3.c
  projects/binutils-2.17/usr.bin/mail/collect.c
  projects/binutils-2.17/usr.bin/mail/edit.c
  projects/binutils-2.17/usr.bin/mail/fio.c
  projects/binutils-2.17/usr.bin/mail/getname.c
  projects/binutils-2.17/usr.bin/mail/head.c
  projects/binutils-2.17/usr.bin/mail/lex.c
  projects/binutils-2.17/usr.bin/mail/list.c
  projects/binutils-2.17/usr.bin/mail/main.c
  projects/binutils-2.17/usr.bin/mail/names.c
  projects/binutils-2.17/usr.bin/mail/popen.c
  projects/binutils-2.17/usr.bin/mail/quit.c
  projects/binutils-2.17/usr.bin/mail/send.c
  projects/binutils-2.17/usr.bin/mail/strings.c
  projects/binutils-2.17/usr.bin/mail/temp.c
  projects/binutils-2.17/usr.bin/mail/tty.c
  projects/binutils-2.17/usr.bin/mail/util.c
  projects/binutils-2.17/usr.bin/mail/v7.local.c
  projects/binutils-2.17/usr.bin/mail/vars.c
  projects/binutils-2.17/usr.bin/printf/printf.c
  projects/binutils-2.17/usr.bin/rsh/rsh.c
  projects/binutils-2.17/usr.bin/stat/stat.c
  projects/binutils-2.17/usr.sbin/bsnmpd/bsnmpd/Makefile
  projects/binutils-2.17/usr.sbin/bsnmpd/modules/Makefile
  projects/binutils-2.17/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_tree.def
  projects/binutils-2.17/usr.sbin/bsnmpd/modules/snmp_wlan/wlan_tree.def
  projects/binutils-2.17/usr.sbin/lmcconfig/Makefile
  projects/binutils-2.17/usr.sbin/lmcconfig/lmcconfig.c
  projects/binutils-2.17/usr.sbin/mld6query/mld6.c
  projects/binutils-2.17/usr.sbin/mountd/mountd.c
  projects/binutils-2.17/usr.sbin/ngctl/main.c
  projects/binutils-2.17/usr.sbin/ngctl/msg.c
  projects/binutils-2.17/usr.sbin/pkg_install/add/main.c
  projects/binutils-2.17/usr.sbin/portsnap/portsnap/portsnap.sh
  projects/binutils-2.17/usr.sbin/rpc.lockd/Makefile
  projects/binutils-2.17/usr.sbin/rpc.lockd/lockd.c
  projects/binutils-2.17/usr.sbin/rpc.lockd/lockd_lock.c
  projects/binutils-2.17/usr.sbin/rtadvd/Makefile
  projects/binutils-2.17/usr.sbin/rtadvd/rtadvd.8
  projects/binutils-2.17/usr.sbin/rtadvd/rtadvd.c
  projects/binutils-2.17/usr.sbin/sysinstall/menus.c
  projects/binutils-2.17/usr.sbin/wpa/hostapd/driver_freebsd.c
Directory Properties:
  projects/binutils-2.17/   (props changed)
  projects/binutils-2.17/cddl/contrib/opensolaris/   (props changed)
  projects/binutils-2.17/contrib/bind9/   (props changed)
  projects/binutils-2.17/contrib/binutils/   (props changed)
  projects/binutils-2.17/contrib/bzip2/   (props changed)
  projects/binutils-2.17/contrib/ee/   (props changed)
  projects/binutils-2.17/contrib/expat/   (props changed)
  projects/binutils-2.17/contrib/file/   (props changed)
  projects/binutils-2.17/contrib/gdb/   (props changed)
  projects/binutils-2.17/contrib/gdtoa/   (props changed)
  projects/binutils-2.17/contrib/gnu-sort/   (props changed)
  projects/binutils-2.17/contrib/groff/   (props changed)
  projects/binutils-2.17/contrib/less/   (props changed)
  projects/binutils-2.17/contrib/libpcap/   (props changed)
  projects/binutils-2.17/contrib/llvm/   (props changed)
  projects/binutils-2.17/contrib/llvm/tools/clang/   (props changed)
  projects/binutils-2.17/contrib/ncurses/   (props changed)
  projects/binutils-2.17/contrib/netcat/   (props changed)
  projects/binutils-2.17/contrib/ntp/   (props changed)
  projects/binutils-2.17/contrib/one-true-awk/   (props changed)
  projects/binutils-2.17/contrib/openbsm/   (props changed)
  projects/binutils-2.17/contrib/openpam/   (props changed)
  projects/binutils-2.17/contrib/pf/   (props changed)
  projects/binutils-2.17/contrib/sendmail/   (props changed)
  projects/binutils-2.17/contrib/tcpdump/   (props changed)
  projects/binutils-2.17/contrib/tcsh/   (props changed)
  projects/binutils-2.17/contrib/top/   (props changed)
  projects/binutils-2.17/contrib/top/install-sh   (props changed)
  projects/binutils-2.17/contrib/tzcode/stdtime/   (props changed)
  projects/binutils-2.17/contrib/tzcode/zic/   (props changed)
  projects/binutils-2.17/contrib/tzdata/   (props changed)
  projects/binutils-2.17/contrib/wpa/   (props changed)
  projects/binutils-2.17/contrib/xz/   (props changed)
  projects/binutils-2.17/crypto/openssh/   (props changed)
  projects/binutils-2.17/crypto/openssl/   (props changed)
  projects/binutils-2.17/lib/libc/   (props changed)
  projects/binutils-2.17/lib/libc/stdtime/   (props changed)
  projects/binutils-2.17/lib/libutil/   (props changed)
  projects/binutils-2.17/lib/libz/   (props changed)
  projects/binutils-2.17/sbin/   (props changed)
  projects/binutils-2.17/sbin/ipfw/   (props changed)
  projects/binutils-2.17/share/mk/bsd.arch.inc.mk   (props changed)
  projects/binutils-2.17/share/zoneinfo/   (props changed)
  projects/binutils-2.17/sys/   (props changed)
  projects/binutils-2.17/sys/amd64/include/xen/   (props changed)
  projects/binutils-2.17/sys/cddl/contrib/opensolaris/   (props changed)
  projects/binutils-2.17/sys/contrib/dev/acpica/   (props changed)
  projects/binutils-2.17/sys/contrib/octeon-sdk/   (props changed)
  projects/binutils-2.17/sys/contrib/pf/   (props changed)
  projects/binutils-2.17/sys/contrib/x86emu/   (props changed)
  projects/binutils-2.17/usr.bin/calendar/   (props changed)
  projects/binutils-2.17/usr.bin/csup/   (props changed)
  projects/binutils-2.17/usr.bin/procstat/   (props changed)
  projects/binutils-2.17/usr.sbin/zic/   (props changed)

Modified: projects/binutils-2.17/Makefile
==============================================================================
--- projects/binutils-2.17/Makefile	Thu Dec 23 20:23:17 2010	(r216682)
+++ projects/binutils-2.17/Makefile	Fri Dec 24 01:37:13 2010	(r216683)
@@ -281,7 +281,15 @@ tinderbox:
 # existing system is.
 #
 .if make(universe) || make(universe_kernels) || make(tinderbox)
-TARGETS?=amd64 i386 ia64 pc98 powerpc sparc64 sun4v mips
+TARGETS?=amd64 arm i386 ia64 mips pc98 powerpc sparc64 sun4v
+TARGET_ARCHES_arm?=	arm armeb
+TARGET_ARCHES_mips?=	mipsel mipseb
+TARGET_ARCHES_powerpc?=	powerpc powerpc64
+TARGET_ARCHES_pc98?=	i386
+TARGET_ARCHES_sun4v?=	sparc64
+.for target in ${TARGETS}
+TARGET_ARCHES_${target}?= ${target}
+.endfor
 
 .if defined(DOING_TINDERBOX)
 FAILFILE=tinderbox.failed
@@ -301,16 +309,24 @@ universe_prologue:
 .for target in ${TARGETS}
 universe: universe_${target}
 .ORDER: universe_prologue universe_${target} universe_epilogue
-universe_${target}:
-.if !defined(MAKE_JUST_KERNELS)
+universe_${target}: universe_${target}_prologue
+universe_${target}_prologue:
 	@echo ">> ${target} started on `LC_ALL=C date`"
+.if !defined(MAKE_JUST_KERNELS)
+.for target_arch in ${TARGET_ARCHES_${target}}
+universe_${target}: universe_${target}_${target_arch}
+universe_${target}_${target_arch}: universe_${target}_prologue
+	@echo ">> ${target}.${target_arch} buildworld started on `LC_ALL=C date`"
 	@(cd ${.CURDIR} && env __MAKE_CONF=/dev/null \
 	    ${MAKE} ${JFLAG} buildworld \
 	    TARGET=${target} \
-	    > _.${target}.buildworld 2>&1 || \
-	    (echo "${target} world failed," \
-	    "check _.${target}.buildworld for details" | ${MAKEFAIL}))
-	@echo ">> ${target} buildworld completed on `LC_ALL=C date`"
+	    TARGET_ARCH=${target_arch} \
+	    > _.${target}.${target_arch}.buildworld 2>&1 || \
+	    (echo "${target}.${target_arch} world failed," \
+	    "check _.${target}.${target_arch}.buildworld for details" | \
+	    ${MAKEFAIL}))
+	@echo ">> ${target}.${target_arch} buildworld completed on `LC_ALL=C date`"
+.endfor
 .endif
 .if !defined(MAKE_JUST_WORLDS)
 .if exists(${.CURDIR}/sys/${target}/conf/NOTES)
@@ -333,9 +349,15 @@ KERNCONFS!=	cd ${.CURDIR}/sys/${TARGET}/
 		! -name DEFAULTS ! -name NOTES
 universe_kernconfs:
 .for kernel in ${KERNCONFS}
+TARGET_ARCH_${kernel}!=	cd ${.CURDIR}/sys/${TARGET}/conf && \
+			config -m ${.CURDIR}/sys/${TARGET}/conf/${kernel} | \
+			cut -f 2
+universe_kernconfs: universe_kernconf_${TARGET}_${kernel}
+universe_kernconf_${TARGET}_${kernel}:
 	@(cd ${.CURDIR} && env __MAKE_CONF=/dev/null \
 	    ${MAKE} ${JFLAG} buildkernel \
 	    TARGET=${TARGET} \
+	    TARGET_ARCH=${TARGET_ARCH_${kernel}} \
 	    KERNCONF=${kernel} \
 	    > _.${TARGET}.${kernel} 2>&1 || \
 	    (echo "${TARGET} ${kernel} kernel failed," \

Modified: projects/binutils-2.17/UPDATING
==============================================================================
--- projects/binutils-2.17/UPDATING	Thu Dec 23 20:23:17 2010	(r216682)
+++ projects/binutils-2.17/UPDATING	Fri Dec 24 01:37:13 2010	(r216683)
@@ -1136,8 +1136,8 @@ COMMON ITEMS:
 	<reboot in single user>				[3]
 	mergemaster -p					[5]
 	make installworld
-	make delete-old
 	mergemaster -i					[4]
+	make delete-old					[6]
 	<reboot>
 
 
@@ -1174,8 +1174,8 @@ COMMON ITEMS:
 	<reboot in single user>				[3]
 	mergemaster -p					[5]
 	make installworld
-	make delete-old
 	mergemaster -i					[4]
+	make delete-old					[6]
 	<reboot>
 
 	Make sure that you've read the UPDATING file to understand the
@@ -1218,6 +1218,10 @@ COMMON ITEMS:
 	install) after the buildworld before this step if you last updated
 	from current before 20020224 or from -stable before 20020408.
 
+	[6] This only deletes old files and directories. Old libraries
+	can be deleted by "make delete-old-libs", but you have to make
+	sure that no program is using those libraries anymore.
+
 	[8] In order to have a kernel that can run the 4.x binaries needed to
 	do an installworld, you must include the COMPAT_FREEBSD4 option in
 	your kernel.  Failure to do so may leave you with a system that is

Modified: projects/binutils-2.17/bin/kill/kill.1
==============================================================================
--- projects/binutils-2.17/bin/kill/kill.1	Thu Dec 23 20:23:17 2010	(r216682)
+++ projects/binutils-2.17/bin/kill/kill.1	Fri Dec 24 01:37:13 2010	(r216683)
@@ -134,6 +134,7 @@ Terminate the process group with PGID 11
 .Xr csh 1 ,
 .Xr killall 1 ,
 .Xr ps 1 ,
+.Xr sh 1 ,
 .Xr kill 2 ,
 .Xr sigaction 2
 .Sh STANDARDS

Modified: projects/binutils-2.17/bin/kill/kill.c
==============================================================================
--- projects/binutils-2.17/bin/kill/kill.c	Thu Dec 23 20:23:17 2010	(r216682)
+++ projects/binutils-2.17/bin/kill/kill.c	Fri Dec 24 01:37:13 2010	(r216683)
@@ -49,6 +49,12 @@ __FBSDID("$FreeBSD$");
 #include <stdlib.h>
 #include <string.h>
 
+#ifdef SHELL
+#define main killcmd
+#include "bltin/bltin.h"
+#include "error.h"
+#endif
+
 static void nosig(const char *);
 static void printsignals(FILE *);
 static int signame_to_signum(const char *);
@@ -75,16 +81,16 @@ main(int argc, char *argv[])
 				usage();
 			numsig = strtol(*argv, &ep, 10);
 			if (!**argv || *ep)
-				errx(1, "illegal signal number: %s", *argv);
+				errx(2, "illegal signal number: %s", *argv);
 			if (numsig >= 128)
 				numsig -= 128;
 			if (numsig <= 0 || numsig >= sys_nsig)
 				nosig(*argv);
 			printf("%s\n", sys_signame[numsig]);
-			exit(0);
+			return (0);
 		}
 		printsignals(stdout);
-		exit(0);
+		return (0);
 	}
 
 	if (!strcmp(*argv, "-s")) {
@@ -107,7 +113,7 @@ main(int argc, char *argv[])
 		} else if (isdigit(**argv)) {
 			numsig = strtol(*argv, &ep, 10);
 			if (!**argv || *ep)
-				errx(1, "illegal signal number: %s", *argv);
+				errx(2, "illegal signal number: %s", *argv);
 			if (numsig < 0)
 				nosig(*argv);
 		} else
@@ -122,16 +128,23 @@ main(int argc, char *argv[])
 		usage();
 
 	for (errors = 0; argc; argc--, argv++) {
-		pid = strtol(*argv, &ep, 10);
-		if (!**argv || *ep)
-			errx(1, "illegal process id: %s", *argv);
-		else if (kill(pid, numsig) == -1) {
+#ifdef SHELL
+		if (**argv == '%')
+			pid = getjobpgrp(*argv);
+		else
+#endif
+		{
+			pid = strtol(*argv, &ep, 10);
+			if (!**argv || *ep)
+				errx(2, "illegal process id: %s", *argv);
+		}
+		if (kill(pid, numsig) == -1) {
 			warn("%s", *argv);
 			errors = 1;
 		}
 	}
 
-	exit(errors);
+	return (errors);
 }
 
 static int
@@ -154,7 +167,11 @@ nosig(const char *name)
 
 	warnx("unknown signal %s; valid signals:", name);
 	printsignals(stderr);
-	exit(1);
+#ifdef SHELL
+	error(NULL);
+#else
+	exit(2);
+#endif
 }
 
 static void
@@ -180,5 +197,9 @@ usage(void)
 		"       kill -l [exit_status]",
 		"       kill -signal_name pid ...",
 		"       kill -signal_number pid ...");
-	exit(1);
+#ifdef SHELL
+	error(NULL);
+#else
+	exit(2);
+#endif
 }

Modified: projects/binutils-2.17/bin/sh/Makefile
==============================================================================
--- projects/binutils-2.17/bin/sh/Makefile	Thu Dec 23 20:23:17 2010	(r216682)
+++ projects/binutils-2.17/bin/sh/Makefile	Fri Dec 24 01:37:13 2010	(r216683)
@@ -4,7 +4,7 @@
 PROG=	sh
 INSTALLFLAGS= -S
 SHSRCS=	alias.c arith.y arith_lex.l cd.c echo.c error.c eval.c exec.c expand.c \
-	histedit.c input.c jobs.c mail.c main.c memalloc.c miscbltin.c \
+	histedit.c input.c jobs.c kill.c mail.c main.c memalloc.c miscbltin.c \
 	mystring.c options.c output.c parser.c printf.c redir.c show.c \
 	test.c trap.c var.c
 GENSRCS= builtins.c init.c nodes.c syntax.c
@@ -26,6 +26,7 @@ WARNS?=	2
 WFORMAT=0
 
 .PATH:	${.CURDIR}/bltin \
+	${.CURDIR}/../kill \
 	${.CURDIR}/../test \
 	${.CURDIR}/../../usr.bin/printf
 

Modified: projects/binutils-2.17/bin/sh/alias.c
==============================================================================
--- projects/binutils-2.17/bin/sh/alias.c	Thu Dec 23 20:23:17 2010	(r216682)
+++ projects/binutils-2.17/bin/sh/alias.c	Fri Dec 24 01:37:13 2010	(r216683)
@@ -246,7 +246,7 @@ aliascmd(int argc, char **argv)
 	while ((n = *++argv) != NULL) {
 		if ((v = strchr(n+1, '=')) == NULL) /* n+1: funny ksh stuff */
 			if ((ap = lookupalias(n, 0)) == NULL) {
-				outfmt(out2, "alias: %s not found\n", n);
+				warning("%s not found", n);
 				ret = 1;
 			} else
 				printalias(ap);

Modified: projects/binutils-2.17/bin/sh/arith_lex.l
==============================================================================
--- projects/binutils-2.17/bin/sh/arith_lex.l	Thu Dec 23 20:23:17 2010	(r216682)
+++ projects/binutils-2.17/bin/sh/arith_lex.l	Fri Dec 24 01:37:13 2010	(r216683)
@@ -74,12 +74,12 @@ int yylex(void);
 			return ARITH_NUM;
 		}
 
-0[0-7]+		{
+0[0-7]*		{
 			yylval.l_value = strtoarith_t(yytext, NULL, 8);
 			return ARITH_NUM;
 		}
 
-[0-9]+		{
+[1-9][0-9]*	{
 			yylval.l_value = strtoarith_t(yytext, NULL, 10);
 			return ARITH_NUM;
 		}

Modified: projects/binutils-2.17/bin/sh/bltin/bltin.h
==============================================================================
--- projects/binutils-2.17/bin/sh/bltin/bltin.h	Thu Dec 23 20:23:17 2010	(r216682)
+++ projects/binutils-2.17/bin/sh/bltin/bltin.h	Fri Dec 24 01:37:13 2010	(r216683)
@@ -43,6 +43,7 @@
 #include "../mystring.h"
 #ifdef SHELL
 #include "../output.h"
+#define FILE struct output
 #undef stdout
 #define stdout out1
 #undef stderr
@@ -57,21 +58,9 @@
 #define fwrite(ptr, size, nmemb, file) outbin(ptr, (size) * (nmemb), file)
 #define fflush flushout
 #define INITARGS(argv)
-#define warnx1(a, b, c) {				\
-	char buf[64];					\
-	(void)snprintf(buf, sizeof(buf), a);		\
-	error("%s", buf);				\
-}
-#define warnx2(a, b, c) {				\
-	char buf[64];					\
-	(void)snprintf(buf, sizeof(buf), a, b);		\
-	error("%s", buf);				\
-}
-#define warnx3(a, b, c) {				\
-	char buf[64];					\
-	(void)snprintf(buf, sizeof(buf), a, b, c);	\
-	error("%s", buf);				\
-}
+#define warnx warning
+#define warn(fmt, ...) warning(fmt ": %s", __VA_ARGS__, strerror(errno))
+#define errx(exitstatus, ...) error(__VA_ARGS__)
 
 #else
 #undef NULL
@@ -80,8 +69,11 @@
 #define INITARGS(argv)	if ((commandname = argv[0]) == NULL) {fputs("Argc is zero\n", stderr); exit(2);} else
 #endif
 
+#include <unistd.h>
+
 pointer stalloc(int);
 void error(const char *, ...) __printf0like(1, 2);
+pid_t getjobpgrp(char *);
 
 int echocmd(int, char **);
 int testcmd(int, char **);

Modified: projects/binutils-2.17/bin/sh/builtins.def
==============================================================================
--- projects/binutils-2.17/bin/sh/builtins.def	Thu Dec 23 20:23:17 2010	(r216682)
+++ projects/binutils-2.17/bin/sh/builtins.def	Fri Dec 24 01:37:13 2010	(r216683)
@@ -70,6 +70,7 @@ hashcmd		hash
 histcmd -h	fc
 jobidcmd	jobid
 jobscmd		jobs
+killcmd		kill
 localcmd	local
 printfcmd	printf
 pwdcmd		pwd

Modified: projects/binutils-2.17/bin/sh/cd.c
==============================================================================
--- projects/binutils-2.17/bin/sh/cd.c	Thu Dec 23 20:23:17 2010	(r216682)
+++ projects/binutils-2.17/bin/sh/cd.c	Fri Dec 24 01:37:13 2010	(r216683)
@@ -224,7 +224,7 @@ cdphysical(char *dest)
 	}
 	p = findcwd(NULL);
 	if (p == NULL)
-		out2fmt_flush("cd: warning: failed to get name of current directory\n");
+		warning("warning: failed to get name of current directory");
 	updatepwd(p);
 	INTON;
 	return (0);

Modified: projects/binutils-2.17/bin/sh/error.c
==============================================================================
--- projects/binutils-2.17/bin/sh/error.c	Thu Dec 23 20:23:17 2010	(r216682)
+++ projects/binutils-2.17/bin/sh/error.c	Fri Dec 24 01:37:13 2010	(r216683)
@@ -134,6 +134,26 @@ onint(void)
 }
 
 
+static void
+vwarning(const char *msg, va_list ap)
+{
+	if (commandname)
+		outfmt(out2, "%s: ", commandname);
+	doformat(out2, msg, ap);
+	out2fmt_flush("\n");
+}
+
+
+void
+warning(const char *msg, ...)
+{
+	va_list ap;
+	va_start(ap, msg);
+	vwarning(msg, ap);
+	va_end(ap);
+}
+
+
 /*
  * Exverror is called to raise the error exception.  If the first argument
  * is not NULL then error prints an error message using printf style
@@ -158,12 +178,8 @@ exverror(int cond, const char *msg, va_l
 	else
 		TRACE(("exverror(%d, NULL) pid=%d\n", cond, getpid()));
 #endif
-	if (msg) {
-		if (commandname)
-			outfmt(out2, "%s: ", commandname);
-		doformat(out2, msg, ap);
-		out2c('\n');
-	}
+	if (msg)
+		vwarning(msg, ap);
 	flushall();
 	exraise(cond);
 }

Modified: projects/binutils-2.17/bin/sh/error.h
==============================================================================
--- projects/binutils-2.17/bin/sh/error.h	Thu Dec 23 20:23:17 2010	(r216682)
+++ projects/binutils-2.17/bin/sh/error.h	Fri Dec 24 01:37:13 2010	(r216683)
@@ -80,6 +80,7 @@ extern volatile sig_atomic_t intpending;
 
 void exraise(int) __dead2;
 void onint(void);
+void warning(const char *, ...) __printflike(1, 2);
 void error(const char *, ...) __printf0like(1, 2) __dead2;
 void exerror(int, const char *, ...) __printf0like(2, 3) __dead2;
 

Modified: projects/binutils-2.17/bin/sh/expand.c
==============================================================================
--- projects/binutils-2.17/bin/sh/expand.c	Thu Dec 23 20:23:17 2010	(r216682)
+++ projects/binutils-2.17/bin/sh/expand.c	Fri Dec 24 01:37:13 2010	(r216683)
@@ -557,8 +557,6 @@ subevalvar(char *p, char *str, int strlo
 		amount = startp - expdest;
 		STADJUST(amount, expdest);
 		varflags &= ~VSNUL;
-		if (c != 0)
-			*loc = c;
 		return 1;
 
 	case VSQUESTION:

Modified: projects/binutils-2.17/bin/sh/jobs.c
==============================================================================
--- projects/binutils-2.17/bin/sh/jobs.c	Thu Dec 23 20:23:17 2010	(r216682)
+++ projects/binutils-2.17/bin/sh/jobs.c	Fri Dec 24 01:37:13 2010	(r216683)
@@ -632,6 +632,14 @@ currentjob:	if ((jp = getcurjob(NULL)) =
 }
 
 
+pid_t
+getjobpgrp(char *name)
+{
+	struct job *jp;
+
+	jp = getjob(name);
+	return -jp->ps[0].pid;
+}
 
 /*
  * Return a new job structure,

Modified: projects/binutils-2.17/bin/sh/sh.1
==============================================================================
--- projects/binutils-2.17/bin/sh/sh.1	Thu Dec 23 20:23:17 2010	(r216682)
+++ projects/binutils-2.17/bin/sh/sh.1	Fri Dec 24 01:37:13 2010	(r216683)
@@ -32,7 +32,7 @@
 .\"	from: @(#)sh.1	8.6 (Berkeley) 5/4/95
 .\" $FreeBSD$
 .\"
-.Dd December 3, 2010
+.Dd December 21, 2010
 .Dt SH 1
 .Os
 .Sh NAME
@@ -456,9 +456,10 @@ would become
 Aliases provide a convenient way for naive users to
 create shorthands for commands without having to learn how
 to create functions with arguments.
-They can also be
-used to create lexically obscure code.
-This use is discouraged.
+Using aliases in scripts is discouraged
+because the command that defines them must be executed
+before the code that uses them is parsed.
+This is fragile and not portable.
 .Pp
 An alias name may be escaped in a command line, so that it is not
 replaced by its alias value, by using quoting characters within or
@@ -2049,6 +2050,10 @@ If the
 .Fl s
 option is specified, only the PIDs of the job commands are printed, one per
 line.
+.It Ic kill
+A built-in equivalent of
+.Xr kill 1
+that additionally supports sending signals to jobs.
 .It Ic local Oo Ar variable ... Oc Op Fl
 See the
 .Sx Functions
@@ -2477,6 +2482,7 @@ will return the argument.
 .Xr echo 1 ,
 .Xr ed 1 ,
 .Xr emacs 1 ,
+.Xr kill 1 ,
 .Xr printf 1 ,
 .Xr pwd 1 ,
 .Xr test 1 ,

Modified: projects/binutils-2.17/bin/sh/trap.c
==============================================================================
--- projects/binutils-2.17/bin/sh/trap.c	Thu Dec 23 20:23:17 2010	(r216682)
+++ projects/binutils-2.17/bin/sh/trap.c	Fri Dec 24 01:37:13 2010	(r216683)
@@ -185,7 +185,7 @@ trapcmd(int argc, char **argv)
 	}
 	while (*argv) {
 		if ((signo = sigstring_to_signum(*argv)) == -1) {
-			out2fmt_flush("trap: bad signal %s\n", *argv);
+			warning("bad signal %s", *argv);
 			errors = 1;
 		}
 		INTOFF;

Modified: projects/binutils-2.17/contrib/bsnmp/lib/bsnmplib.3
==============================================================================
--- projects/binutils-2.17/contrib/bsnmp/lib/bsnmplib.3	Thu Dec 23 20:23:17 2010	(r216682)
+++ projects/binutils-2.17/contrib/bsnmp/lib/bsnmplib.3	Fri Dec 24 01:37:13 2010	(r216683)
@@ -37,7 +37,7 @@
 .\"
 .\" $Begemot: bsnmp/lib/bsnmplib.3,v 1.9 2005/10/04 08:46:51 brandt_h Exp $
 .\"
-.Dd September 9, 2010
+.Dd December 19, 2010
 .Dt BSNMPLIB 3
 .Os
 .Sh NAME
@@ -50,6 +50,7 @@
 .Nm snmp_pdu_decode_header ,
 .Nm snmp_pdu_decode_scoped ,
 .Nm snmp_pdu_decode_secmode ,
+.Nm snmp_pdu_init_secparams ,
 .Nm snmp_pdu_dump ,
 .Nm snmp_passwd_to_keys ,
 .Nm snmp_get_local_keys ,
@@ -83,6 +84,8 @@ Begemot SNMP library
 .Ft enum snmp_code
 .Fn snmp_pdu_decode_secmode "struct asn_buf *buf" "struct snmp_pdu *pdu"
 .Ft void
+.Fn snmp_pdu_init_secparams "struct snmp_pdu *pdu"
+.Ft void
 .Fn snmp_pdu_dump "const struct snmp_pdu *pdu"
 .Ft enum snmp_code
 .Fn snmp_passwd_to_keys "struct snmp_user *user" "char *passwd"
@@ -175,12 +178,18 @@ This structure represents an SNMP engine
 Architecture described in RFC 3411.
 .Pp
 .Bd -literal -offset indent
-#define	SNMP_USM_NAME_SIZ		(32 + 1)
+#define	SNMP_ADM_STR32_SIZ		(32 + 1)
 #define	SNMP_AUTH_KEY_SIZ		40
 #define	SNMP_PRIV_KEY_SIZ		32
 
+enum snmp_usm_level {
+	SNMP_noAuthNoPriv = 1,
+	SNMP_authNoPriv = 2,
+	SNMP_authPriv = 3
+};
+
 struct snmp_user {
-	char				sec_name[SNMP_USM_NAME_SIZ];
+	char				sec_name[SNMP_ADM_STR32_SIZ];
 	enum snmp_authentication	auth_proto;
 	enum snmp_privacy		priv_proto;
 	uint8_t				auth_key[SNMP_AUTH_KEY_SIZ];
@@ -230,7 +239,9 @@ contain the authentication and privacy k
 #define	SNMP_MSG_PRIV_FLAG		0x2
 #define	SNMP_MSG_REPORT_FLAG		0x4
 
-#define	SNMP_SECMODEL_USM		3
+#define	SNMP_MPM_SNMP_V1		0
+#define	SNMP_MPM_SNMP_V2c		1
+#define	SNMP_MPM_SNMP_V3		3
 
 struct snmp_pdu {
 	char			community[SNMP_COMMUNITY_MAXLEN + 1];
@@ -296,7 +307,17 @@ and
 is the type of the PDU.
 .Fa security_model
 is the security model used for SNMPv3 PDUs. The only supported
-value currently is 3 (User-based Security Model).
+value currently is 3 (User-based Security Model). Additional values for any,
+unknown, SNMPv1 and SNMPv2c security models are also enumerated
+.Bd -literal -offset indent
+enum snmp_secmodel {
+	SNMP_SECMODEL_ANY = 0,
+	SNMP_SECMODEL_SNMPv1 = 1,
+	SNMP_SECMODEL_SNMPv2c = 2,
+	SNMP_SECMODEL_USM = 3,
+	SNMP_SECMODEL_UNKNOWN
+};
+.Ed
 .Pp
 The function
 .Fn snmp_value_free
@@ -366,6 +387,13 @@ if the PDU is encrypted, decrypts the PD
 If successfull, a plain text scoped PDU is stored in the buffer.
 .Pp
 The function
+.Fn snmp_pdu_init_secparams
+calculates the initialization vector for the privacy protocol in use before
+the PDU pointed to by 
+.Fa pdu
+may be encrypted or decrypted.
+.Pp
+The function
 .Fn snmp_pdu_dump
 dumps the PDU in a human readable form by calling
 .Fn snmp_printf .

Modified: projects/binutils-2.17/contrib/bsnmp/lib/snmp.c
==============================================================================
--- projects/binutils-2.17/contrib/bsnmp/lib/snmp.c	Thu Dec 23 20:23:17 2010	(r216682)
+++ projects/binutils-2.17/contrib/bsnmp/lib/snmp.c	Fri Dec 24 01:37:13 2010	(r216683)
@@ -764,6 +764,7 @@ snmp_pdu_encode_header(struct asn_buf *b
 
 		if (pdu->type != SNMP_PDU_RESPONSE &&
 		    pdu->type != SNMP_PDU_TRAP &&
+		    pdu->type != SNMP_PDU_TRAP2 &&
 		    pdu->type != SNMP_PDU_REPORT)
 			pdu->flags |= SNMP_MSG_REPORT_FLAG;
 
@@ -1176,23 +1177,19 @@ snmp_value_copy(struct snmp_value *to, c
 }
 
 void
-snmp_pdu_init_secparams(struct snmp_pdu *pdu, struct snmp_engine *eng,
-    struct snmp_user *user)
+snmp_pdu_init_secparams(struct snmp_pdu *pdu)
 {
 	int32_t rval;
 
-	memcpy(&pdu->engine, eng, sizeof(pdu->engine));
-	memcpy(&pdu->user, user, sizeof(pdu->user));
-
-	if (user->auth_proto != SNMP_AUTH_NOAUTH)
+	if (pdu->user.auth_proto != SNMP_AUTH_NOAUTH)
 		pdu->flags |= SNMP_MSG_AUTH_FLAG;
 
-	switch (user->priv_proto) {
+	switch (pdu->user.priv_proto) {
 	case SNMP_PRIV_DES:
-		memcpy(pdu->msg_salt, &eng->engine_boots,
-		    sizeof(eng->engine_boots));
+		memcpy(pdu->msg_salt, &pdu->engine.engine_boots,
+		    sizeof(pdu->engine.engine_boots));
 		rval = random();
-		memcpy(pdu->msg_salt + sizeof(eng->engine_boots), &rval,
+		memcpy(pdu->msg_salt + sizeof(pdu->engine.engine_boots), &rval,
 		    sizeof(int32_t));
 		pdu->flags |= SNMP_MSG_PRIV_FLAG;
 		break;

Modified: projects/binutils-2.17/contrib/bsnmp/lib/snmp.h
==============================================================================
--- projects/binutils-2.17/contrib/bsnmp/lib/snmp.h	Thu Dec 23 20:23:17 2010	(r216682)
+++ projects/binutils-2.17/contrib/bsnmp/lib/snmp.h	Fri Dec 24 01:37:13 2010	(r216683)
@@ -89,6 +89,10 @@ enum snmp_version {
 	SNMP_V3,
 };
 
+#define	SNMP_MPM_SNMP_V1		0
+#define	SNMP_MPM_SNMP_V2c		1
+#define	SNMP_MPM_SNMP_V3		3
+
 #define	SNMP_ADM_STR32_SIZ		(32 + 1)
 #define	SNMP_AUTH_KEY_SIZ		40
 #define	SNMP_PRIV_KEY_SIZ		32
@@ -255,6 +259,7 @@ int snmp_value_parse(const char *, enum 
 int snmp_value_copy(struct snmp_value *, const struct snmp_value *);
 
 void snmp_pdu_free(struct snmp_pdu *);
+void snmp_pdu_init_secparams(struct snmp_pdu *);
 enum snmp_code snmp_pdu_decode(struct asn_buf *b, struct snmp_pdu *pdu, int32_t *);
 enum snmp_code snmp_pdu_decode_header(struct asn_buf *, struct snmp_pdu *);
 enum snmp_code snmp_pdu_decode_scoped(struct asn_buf *, struct snmp_pdu *, int32_t *);

Modified: projects/binutils-2.17/contrib/bsnmp/lib/snmpagent.c
==============================================================================
--- projects/binutils-2.17/contrib/bsnmp/lib/snmpagent.c	Thu Dec 23 20:23:17 2010	(r216682)
+++ projects/binutils-2.17/contrib/bsnmp/lib/snmpagent.c	Fri Dec 24 01:37:13 2010	(r216683)
@@ -178,7 +178,9 @@ snmp_pdu_create_response(struct snmp_pdu
 	if (resp->version != SNMP_V3)
 		return;
 
-	snmp_pdu_init_secparams(resp, &pdu->engine, &pdu->user);
+	memcpy(&resp->engine, &pdu->engine, sizeof(pdu->engine));
+	memcpy(&resp->user, &pdu->user, sizeof(pdu->user));
+	snmp_pdu_init_secparams(resp);
 	resp->identifier = pdu->identifier;
 	resp->security_model = pdu->security_model;
 	resp->context_engine_len = pdu->context_engine_len;

Modified: projects/binutils-2.17/contrib/bsnmp/lib/snmpclient.c
==============================================================================
--- projects/binutils-2.17/contrib/bsnmp/lib/snmpclient.c	Thu Dec 23 20:23:17 2010	(r216682)
+++ projects/binutils-2.17/contrib/bsnmp/lib/snmpclient.c	Fri Dec 24 01:37:13 2010	(r216683)
@@ -1160,10 +1160,11 @@ snmp_pdu_create(struct snmp_pdu *pdu, u_
 	pdu->flags = 0;
 	pdu->security_model = snmp_client.security_model;
 
-	if (snmp_client.security_model == SNMP_SECMODEL_USM)
-		snmp_pdu_init_secparams(pdu, &snmp_client.engine,
-		    &snmp_client.user);
-	else
+	if (snmp_client.security_model == SNMP_SECMODEL_USM) {
+		memcpy(&pdu->engine, &snmp_client.engine, sizeof(pdu->engine));
+		memcpy(&pdu->user, &snmp_client.user, sizeof(pdu->user));
+		snmp_pdu_init_secparams(pdu);
+	} else
 		seterr(&snmp_client, "unknown security model");
 
 	if (snmp_client.clen > 0) {
@@ -1440,9 +1441,11 @@ snmp_receive_packet(struct snmp_pdu *pdu
 	abuf.asn_len = ret;
 
 	memset(pdu, 0, sizeof(*pdu));
-	if (snmp_client.security_model == SNMP_SECMODEL_USM)
-		snmp_pdu_init_secparams(pdu, &snmp_client.engine,
-		    &snmp_client.user);
+	if (snmp_client.security_model == SNMP_SECMODEL_USM) {
+		memcpy(&pdu->engine, &snmp_client.engine, sizeof(pdu->engine));
+		memcpy(&pdu->user, &snmp_client.user, sizeof(pdu->user));
+		snmp_pdu_init_secparams(pdu);
+	}
 
 	if (SNMP_CODE_OK != (ret = snmp_pdu_decode(&abuf, pdu, &ip))) {
 		seterr(&snmp_client, "snmp_decode_pdu: failed %d", ret);

Modified: projects/binutils-2.17/contrib/bsnmp/lib/snmppriv.h
==============================================================================
--- projects/binutils-2.17/contrib/bsnmp/lib/snmppriv.h	Thu Dec 23 20:23:17 2010	(r216682)
+++ projects/binutils-2.17/contrib/bsnmp/lib/snmppriv.h	Fri Dec 24 01:37:13 2010	(r216683)
@@ -38,9 +38,6 @@ enum snmp_code snmp_fix_encoding(struct 
 enum asn_err snmp_parse_pdus_hdr(struct asn_buf *b, struct snmp_pdu *pdu,
     asn_len_t *lenp);
 
-void snmp_pdu_init_secparams(struct snmp_pdu *, struct snmp_engine *,
-    struct snmp_user *);
-
 enum snmp_code snmp_pdu_calc_digest(const struct snmp_pdu *, uint8_t *);
 enum snmp_code snmp_pdu_encrypt(const struct snmp_pdu *);
 enum snmp_code snmp_pdu_decrypt(const struct snmp_pdu *);

Copied: projects/binutils-2.17/contrib/bsnmp/lib/tc.def (from r216682, head/contrib/bsnmp/lib/tc.def)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ projects/binutils-2.17/contrib/bsnmp/lib/tc.def	Fri Dec 24 01:37:13 2010	(r216683, copy of r216682, head/contrib/bsnmp/lib/tc.def)
@@ -0,0 +1,40 @@
+#-
+# Copyright (C) 2010 The FreeBSD Foundation
+# All rights reserved.
+#
+# This software was developed by Shteryana Sotirova Shopova under
+# sponsorship from the FreeBSD Foundation.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#   documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED.  IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+#
+# $FreeBSD$
+#
+
+typedef RowStatus ENUM (
+	1 active
+	2 notInService
+	3 notReady
+	4 createAndGo
+	5 createAndWait
+	6 destroy
+)
+

Modified: projects/binutils-2.17/contrib/bsnmp/snmp_usm/snmp_usm.3
==============================================================================
--- projects/binutils-2.17/contrib/bsnmp/snmp_usm/snmp_usm.3	Thu Dec 23 20:23:17 2010	(r216682)
+++ projects/binutils-2.17/contrib/bsnmp/snmp_usm/snmp_usm.3	Fri Dec 24 01:37:13 2010	(r216683)
@@ -112,7 +112,7 @@ Applications always have this column set
 lost when the module is restarted. A SET operation on this column is not
 allowed.
 .It Va usmUserStatus
-This column is used to create new USM user entries or delete exsiting ones from
+This column is used to create new USM user entries or delete existing ones from
 the table.
 .El
 .EL

Modified: projects/binutils-2.17/contrib/bsnmp/snmp_usm/usm_tree.def
==============================================================================
--- projects/binutils-2.17/contrib/bsnmp/snmp_usm/usm_tree.def	Thu Dec 23 20:23:17 2010	(r216682)
+++ projects/binutils-2.17/contrib/bsnmp/snmp_usm/usm_tree.def	Fri Dec 24 01:37:13 2010	(r216683)
@@ -29,13 +29,7 @@
 # $FreeBSD$
 #
 
-typedef StorageType ENUM (
-	1 other
-	2 volatile
-	3 nonVolatile
-	4 permanent
-	5 readOnly
-)
+#include "tc.def"
 
 typedef RowStatus ENUM (
 	1 active
@@ -46,6 +40,14 @@ typedef RowStatus ENUM (
 	6 destroy
 )
 
+typedef StorageType ENUM (
+	1 other
+	2 volatile
+	3 nonVolatile
+	4 permanent
+	5 readOnly
+)
+
 (1 internet
   (6 snmpV2
     (3 snmpModules

Modified: projects/binutils-2.17/contrib/bsnmp/snmp_vacm/vacm_tree.def
==============================================================================
--- projects/binutils-2.17/contrib/bsnmp/snmp_vacm/vacm_tree.def	Thu Dec 23 20:23:17 2010	(r216682)
+++ projects/binutils-2.17/contrib/bsnmp/snmp_vacm/vacm_tree.def	Fri Dec 24 01:37:13 2010	(r216683)
@@ -29,13 +29,7 @@
 # $FreeBSD$
 #
 
-typedef StorageType ENUM (
-	1 other
-	2 volatile
-	3 nonVolatile
-	4 permanent
-	5 readOnly
-)
+#include "tc.def"
 
 typedef RowStatus ENUM (
 	1 active
@@ -46,6 +40,14 @@ typedef RowStatus ENUM (
 	6 destroy
 )
 
+typedef StorageType ENUM (
+	1 other
+	2 volatile
+	3 nonVolatile
+	4 permanent
+	5 readOnly
+)
+
 (1 internet
   (6 snmpV2
     (3 snmpModules

Modified: projects/binutils-2.17/contrib/bsnmp/snmpd/main.c
==============================================================================
--- projects/binutils-2.17/contrib/bsnmp/snmpd/main.c	Thu Dec 23 20:23:17 2010	(r216682)
+++ projects/binutils-2.17/contrib/bsnmp/snmpd/main.c	Fri Dec 24 01:37:13 2010	(r216683)
@@ -5,6 +5,12 @@
  *
  * Author: Harti Brandt <harti@freebsd.org>
  * 
+ * Copyright (c) 2010 The FreeBSD Foundation
+ * All rights reserved.
+ *
+ * Portions of this software were developed by Shteryana Sotirova Shopova
+ * under sponsorship from the FreeBSD Foundation.
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
@@ -98,6 +104,8 @@ struct snmp_engine snmpd_engine;
 /* snmpSerialNo */
 int32_t snmp_serial_no;
 
+struct snmpd_target_stats snmpd_target_stats;
+
 /* search path for config files */
 const char *syspath = PATH_SYSCONFIG;
 
@@ -361,7 +369,7 @@ snmp_pdu_auth_user(struct snmp_pdu *pdu)
  * Check whether access to each of var bindings in the PDU is allowed based
  * on the user credentials against the configured User groups & VACM views.
  */
-static enum snmp_code
+enum snmp_code
 snmp_pdu_auth_access(struct snmp_pdu *pdu, int32_t *ip)
 {
 	const char *uname;
@@ -1838,14 +1846,14 @@ main(int argc, char *argv[])
 		exit(1);
 	}
 
-	snmp_send_trap(&oid_coldStart, (struct snmp_value *)NULL);
-
 	while ((m = TAILQ_FIRST(&modules_start)) != NULL) {
 		m->flags &= ~LM_ONSTARTLIST;
 		TAILQ_REMOVE(&modules_start, m, start);
 		lm_start(m);
 	}
 
+	snmp_send_trap(&oid_coldStart, (struct snmp_value *)NULL);
+
 	for (;;) {
 #ifndef USE_LIBBEGEMOT
 		evEvent event;

Modified: projects/binutils-2.17/contrib/bsnmp/snmpd/snmpmod.3
==============================================================================
--- projects/binutils-2.17/contrib/bsnmp/snmpd/snmpmod.3	Thu Dec 23 20:23:17 2010	(r216682)
+++ projects/binutils-2.17/contrib/bsnmp/snmpd/snmpmod.3	Fri Dec 24 01:37:13 2010	(r216683)
@@ -31,7 +31,7 @@
 .\"
 .\" $Begemot: bsnmp/snmpd/snmpmod.3,v 1.14 2005/10/04 13:30:35 brandt_h Exp $
 .\"
-.Dd September 9, 2010
+.Dd December 19, 2010
 .Dt SNMPMOD 3
 .Os
 .Sh NAME
@@ -83,6 +83,7 @@
 .Nm snmp_output ,
 .Nm snmp_send_port ,
 .Nm snmp_send_trap ,
+.Nm snmp_pdu_auth_access
 .Nm string_save ,
 .Nm string_commit ,
 .Nm string_rollback ,
@@ -102,6 +103,7 @@
 .Nm index_compare_off ,
 .Nm index_append ,
 .Nm index_append_off,
+.Nm snmpd_usmstats,
 .Nm bsnmpd_get_usm_stats,
 .Nm bsnmpd_reset_usm_stats,
 .Nm usm_first_user,
@@ -111,6 +113,25 @@
 .Nm usm_delete_user,
 .Nm usm_flush_users,
 .Nm usm_user
+.Nm snmpd_target_stat
+.Nm bsnmpd_get_target_stats
+.Nm target_first_address
+.Nm target_next_address
+.Nm target_new_address
+.Nm target_activate_address
+.Nm target_delete_address
+.Nm target_first_param
+.Nm target_next_param
+.Nm target_new_param
+.Nm target_delete_param
+.Nm target_first_notify
+.Nm target_next_notify
+.Nm target_new_notify
+.Nm target_delete_notify
+.Nm target_flush_all
+.Nm target_address
+.Nm target_param
+.Nm target_notify
 .Nd "SNMP daemon loadable module interface"
 .Sh LIBRARY
 Begemot SNMP library
@@ -201,6 +222,8 @@ Begemot SNMP library
 .Fc
 .Ft void
 .Fn snmp_send_trap "const struct asn_oid *oid" "..."
+.Ft enum snmp_code
+.Fn snmp_pdu_auth_access "struct snmp_pdu *pdu" "int32_t *ip"
 .Ft int
 .Fn string_save "struct snmp_value *val" "struct snmp_context *ctx" "ssize_t req_size" "u_char **strp"
 .Ft void
@@ -239,6 +262,7 @@ Begemot SNMP library
 .Fn index_append "struct asn_oid *dst" "u_int sub" "const struct asn_oid *src"
 .Ft void
 .Fn index_append_off "struct asn_oid *dst" "u_int sub" "const struct asn_oid *src" "u_int off"
+.Vt extern struct snmpd_usmstat snmpd_usmstats ;
 .Ft struct snmpd_usmstat *
 .Fn bsnmpd_get_usm_stats "void"
 .Ft void
@@ -256,6 +280,36 @@ Begemot SNMP library
 .Ft void
 .Fn usm_flush_users "void"
 .Vt extern struct usm_user *usm_user;
+.Ft struct snmpd_target_stats *
+.Fn bsnmpd_get_target_stats "void"
+.Ft struct target_address *
+.Fn target_first_address "void"
+.Ft struct target_address *
+.Fn target_next_address "struct target_address *"
+.Ft struct target_address *
+.Fn target_new_address "char *"
+.Ft int
+.Fn target_activate_address "struct target_address *"
+.Ft int
+.Fn target_delete_address "struct target_address *"
+.Ft struct target_param *
+.Fn target_first_param "void"
+.Ft struct target_param *
+.Fn target_next_param "struct target_param *"
+.Ft struct target_param *
+.Fn target_new_param "char *"
+.Ft int
+.Fn target_delete_param "struct target_param *"
+.Ft struct target_notify *
+.Fn target_first_notify "void"
+.Ft struct target_notify *
+.Fn target_next_notify "struct target_notify *"
+.Ft struct target_notify *
+.Fn target_new_notify "char *"
+.Ft int
+.Fn target_delete_notify "struct target_notify *"
+.Ft void
+.Fn target_flush_all "void"
 .Vt extern const struct asn_oid oid_usmUnknownEngineIDs;
 .Vt extern const struct asn_oid oid_usmNotInTimeWindows;
 .Sh DESCRIPTION
@@ -603,7 +657,7 @@ struct usm_user {
 	struct snmp_user		suser;
 	uint8_t				user_engine_id[SNMP_ENGINE_ID_SIZ];
 	uint32_t			user_engine_len;
-	char				user_public[SNMP_USM_NAME_SIZ];
+	char				user_public[SNMP_ADM_STR32_SIZ];
 	uint32_t			user_public_len;
 	int32_t				status;
 	int32_t				type;
@@ -640,6 +694,103 @@ and
 or
 .Li NULL
 if an user with the specified name and engine id is not present in the list.
+.Ss THE MANAGEMENT TARGET GROUP
+The Management Target group holds target address information used when sending
+SNMPv3 notifications.
+.Pp
+The scalar statistics of the Management Target group are held in the global
+variable
+.Va snmpd_target_stats :
+.Bd -literal -offset indent
+struct snmpd_target_stats {
+	uint32_t			unavail_contexts;
+	uint32_t			unknown_contexts;
+};
+.Ed
+.Fn bsnmpd_get_target_stats
+returns a pointer to the global structure containing the statistics.
+.Pp
+Three global lists of configured management target addresses, parameters and
+notifications respectively are maintained by the daemon.
+.Bd -literal -offset indent
+struct target_address {
+	char				name[SNMP_ADM_STR32_SIZ];
+	uint8_t				address[SNMP_UDP_ADDR_SIZ];
+	int32_t				timeout;
+	int32_t				retry;
+	char				taglist[SNMP_TAG_SIZ];
+	char				paramname[SNMP_ADM_STR32_SIZ];
+	int32_t				type;
+	int32_t				socket;
+	int32_t				status;
+	SLIST_ENTRY(target_address)	ta;
+};
+.Ed
+This structure represents a SNMPv3 Management Target address. Each time a SNMP
+TRAP is send the daemon will send the Trap to all active Management Target
+addresses in its global list.
+.Bd -literal -offset indent
+struct target_param {
+	char				name[SNMP_ADM_STR32_SIZ];
+	int32_t				mpmodel;
+	int32_t				sec_model;
+	char				secname[SNMP_ADM_STR32_SIZ];
+	enum snmp_usm_level		sec_level;

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201012240137.oBO1bEpa074674>