svn commit: r189504 - in projects/jbuild: . contrib/bind9
contrib/cpio contrib/csup contrib/gdtoa contrib/gdtoa/test
contrib/hostapd contrib/ncurses contrib/netcat contrib/ntp
contrib/openbsm contr...
John Birrell
jb at FreeBSD.org
Sat Mar 7 19:10:39 PST 2009
Author: jb
Date: Sun Mar 8 03:10:37 2009
New Revision: 189504
URL: http://svn.freebsd.org/changeset/base/189504
Log:
MFC
Added:
projects/jbuild/contrib/wpa/ (props changed)
- copied from r189503, head/contrib/wpa/
projects/jbuild/lib/libarchive/archive_read_disk.c
- copied unchanged from r189503, head/lib/libarchive/archive_read_disk.c
projects/jbuild/lib/libarchive/archive_read_disk_entry_from_file.c
- copied unchanged from r189503, head/lib/libarchive/archive_read_disk_entry_from_file.c
projects/jbuild/lib/libarchive/archive_read_disk_private.h
- copied unchanged from r189503, head/lib/libarchive/archive_read_disk_private.h
projects/jbuild/lib/libarchive/archive_read_disk_set_standard_lookup.c
- copied unchanged from r189503, head/lib/libarchive/archive_read_disk_set_standard_lookup.c
projects/jbuild/lib/libarchive/test/test_compat_gtar_1.tar.uu
- copied unchanged from r189503, head/lib/libarchive/test/test_compat_gtar_1.tar.uu
projects/jbuild/lib/libarchive/test/test_extattr_freebsd.c
- copied unchanged from r189503, head/lib/libarchive/test/test_extattr_freebsd.c
projects/jbuild/lib/libarchive/test/test_pax_filename_encoding.tar.uu
- copied unchanged from r189503, head/lib/libarchive/test/test_pax_filename_encoding.tar.uu
projects/jbuild/lib/libarchive/test/test_read_disk.c
- copied unchanged from r189503, head/lib/libarchive/test/test_read_disk.c
projects/jbuild/lib/libarchive/test/test_read_file_nonexistent.c
- copied unchanged from r189503, head/lib/libarchive/test/test_read_file_nonexistent.c
projects/jbuild/lib/libarchive/test/test_read_format_gtar_sparse_1_13.tar.uu
- copied unchanged from r189503, head/lib/libarchive/test/test_read_format_gtar_sparse_1_13.tar.uu
projects/jbuild/lib/libarchive/test/test_read_format_gtar_sparse_1_17.tar.uu
- copied unchanged from r189503, head/lib/libarchive/test/test_read_format_gtar_sparse_1_17.tar.uu
projects/jbuild/lib/libarchive/test/test_read_format_gtar_sparse_1_17_posix00.tar.uu
- copied unchanged from r189503, head/lib/libarchive/test/test_read_format_gtar_sparse_1_17_posix00.tar.uu
projects/jbuild/lib/libarchive/test/test_read_format_gtar_sparse_1_17_posix01.tar.uu
- copied unchanged from r189503, head/lib/libarchive/test/test_read_format_gtar_sparse_1_17_posix01.tar.uu
projects/jbuild/lib/libarchive/test/test_read_format_gtar_sparse_1_17_posix10.tar.uu
- copied unchanged from r189503, head/lib/libarchive/test/test_read_format_gtar_sparse_1_17_posix10.tar.uu
projects/jbuild/lib/libarchive/test/test_read_format_isojoliet_bz2.c
- copied unchanged from r189503, head/lib/libarchive/test/test_read_format_isojoliet_bz2.c
projects/jbuild/lib/libarchive/test/test_read_format_isojoliet_bz2.iso.bz2.uu
- copied unchanged from r189503, head/lib/libarchive/test/test_read_format_isojoliet_bz2.iso.bz2.uu
projects/jbuild/lib/libarchive/test/test_read_format_isojolietrr_bz2.iso.bz2.uu
- copied unchanged from r189503, head/lib/libarchive/test/test_read_format_isojolietrr_bz2.iso.bz2.uu
projects/jbuild/lib/libbluetooth/dev.c
- copied unchanged from r189503, head/lib/libbluetooth/dev.c
projects/jbuild/lib/libbluetooth/hci.c
- copied unchanged from r189503, head/lib/libbluetooth/hci.c
projects/jbuild/lib/libc/stdio/dprintf.c
- copied unchanged from r189503, head/lib/libc/stdio/dprintf.c
projects/jbuild/lib/libc/stdio/vdprintf.c
- copied unchanged from r189503, head/lib/libc/stdio/vdprintf.c
projects/jbuild/lib/libc/string/wcpcpy.c
- copied unchanged from r189503, head/lib/libc/string/wcpcpy.c
projects/jbuild/lib/libc/string/wcpncpy.c
- copied unchanged from r189503, head/lib/libc/string/wcpncpy.c
projects/jbuild/sys/dev/drm/r600_cp.c
- copied unchanged from r189503, head/sys/dev/drm/r600_cp.c
projects/jbuild/sys/dev/drm/r600_microcode.h
- copied unchanged from r189503, head/sys/dev/drm/r600_microcode.h
projects/jbuild/usr.sbin/ifmcstat/printb.c
- copied unchanged from r189503, head/usr.sbin/ifmcstat/printb.c
Replaced:
projects/jbuild/lib/libc/stdio/asprintf.c
- copied unchanged from r189503, head/lib/libc/stdio/asprintf.c
Deleted:
projects/jbuild/contrib/gdtoa/test/
projects/jbuild/contrib/gdtoa/xsum0.out
projects/jbuild/contrib/hostapd/
projects/jbuild/contrib/wpa_supplicant/
projects/jbuild/lib/libarchive/test/test_compat_gtar_1.tgz.uu
projects/jbuild/lib/libarchive/test/test_pax_filename_encoding.tar.gz.uu
projects/jbuild/lib/libarchive/test/test_read_format_gtar_sparse_1_13.tgz.uu
projects/jbuild/lib/libarchive/test/test_read_format_gtar_sparse_1_17.tgz.uu
projects/jbuild/lib/libarchive/test/test_read_format_gtar_sparse_1_17_posix00.tgz.uu
projects/jbuild/lib/libarchive/test/test_read_format_gtar_sparse_1_17_posix01.tgz.uu
projects/jbuild/lib/libarchive/test/test_read_format_gtar_sparse_1_17_posix10.tgz.uu
projects/jbuild/lib/libthread_db/arch/amd64/libc_r_md.c
projects/jbuild/lib/libthread_db/arch/i386/libc_r_md.c
projects/jbuild/lib/libthread_db/arch/ia64/libc_r_md.c
projects/jbuild/lib/libthread_db/arch/powerpc/libc_r_md.c
projects/jbuild/lib/libthread_db/arch/sparc64/libc_r_md.c
projects/jbuild/lib/libthread_db/libc_r_db.c
Modified:
projects/jbuild/ (props changed)
projects/jbuild/MAINTAINERS
projects/jbuild/UPDATING
projects/jbuild/contrib/bind9/ (props changed)
projects/jbuild/contrib/cpio/ (props changed)
projects/jbuild/contrib/csup/updater.c
projects/jbuild/contrib/gdtoa/ (props changed)
projects/jbuild/contrib/ncurses/ (props changed)
projects/jbuild/contrib/netcat/ (props changed)
projects/jbuild/contrib/ntp/ (props changed)
projects/jbuild/contrib/openbsm/ (props changed)
projects/jbuild/contrib/openbsm/CREDITS
projects/jbuild/contrib/openbsm/NEWS
projects/jbuild/contrib/openbsm/README
projects/jbuild/contrib/openbsm/VERSION
projects/jbuild/contrib/openbsm/bin/audit/audit.8
projects/jbuild/contrib/openbsm/bin/audit/audit.c
projects/jbuild/contrib/openbsm/bin/auditd/audit_warn.c
projects/jbuild/contrib/openbsm/bin/auditd/auditd.c
projects/jbuild/contrib/openbsm/bin/auditd/auditd.h
projects/jbuild/contrib/openbsm/bsm/auditd_lib.h
projects/jbuild/contrib/openbsm/bsm/libbsm.h
projects/jbuild/contrib/openbsm/config/config.h
projects/jbuild/contrib/openbsm/configure
projects/jbuild/contrib/openbsm/configure.ac
projects/jbuild/contrib/openbsm/etc/audit_control
projects/jbuild/contrib/openbsm/etc/audit_event
projects/jbuild/contrib/openbsm/libauditd/auditd_lib.c
projects/jbuild/contrib/openbsm/libbsm/au_control.3
projects/jbuild/contrib/openbsm/libbsm/au_domain.3
projects/jbuild/contrib/openbsm/libbsm/au_errno.3
projects/jbuild/contrib/openbsm/libbsm/bsm_control.c
projects/jbuild/contrib/openbsm/libbsm/bsm_errno.c
projects/jbuild/contrib/openbsm/libbsm/bsm_io.c
projects/jbuild/contrib/openbsm/libbsm/bsm_token.c
projects/jbuild/contrib/openbsm/man/audit_control.5
projects/jbuild/contrib/openbsm/man/auditon.2
projects/jbuild/contrib/openbsm/sys/bsm/audit.h
projects/jbuild/contrib/openbsm/sys/bsm/audit_kevents.h
projects/jbuild/contrib/openbsm/tools/audump.c
projects/jbuild/contrib/openpam/ (props changed)
projects/jbuild/contrib/pf/ (props changed)
projects/jbuild/contrib/sendmail/ (props changed)
projects/jbuild/contrib/top/ (props changed)
projects/jbuild/crypto/openssh/ (props changed)
projects/jbuild/crypto/openssl/ (props changed)
projects/jbuild/games/fortune/datfiles/fortunes
projects/jbuild/include/signal.h
projects/jbuild/include/stdio.h
projects/jbuild/include/stdlib.h
projects/jbuild/include/strings.h
projects/jbuild/include/unistd.h
projects/jbuild/include/wchar.h
projects/jbuild/lib/libarchive/Makefile
projects/jbuild/lib/libarchive/archive.h
projects/jbuild/lib/libarchive/archive_check_magic.c
projects/jbuild/lib/libarchive/archive_endian.h
projects/jbuild/lib/libarchive/archive_entry.c
projects/jbuild/lib/libarchive/archive_entry_copy_stat.c
projects/jbuild/lib/libarchive/archive_entry_stat.c
projects/jbuild/lib/libarchive/archive_platform.h
projects/jbuild/lib/libarchive/archive_private.h
projects/jbuild/lib/libarchive/archive_read.c
projects/jbuild/lib/libarchive/archive_read_open_filename.c
projects/jbuild/lib/libarchive/archive_read_private.h
projects/jbuild/lib/libarchive/archive_read_support_compression_all.c
projects/jbuild/lib/libarchive/archive_read_support_compression_bzip2.c
projects/jbuild/lib/libarchive/archive_read_support_compression_compress.c
projects/jbuild/lib/libarchive/archive_read_support_compression_gzip.c
projects/jbuild/lib/libarchive/archive_read_support_compression_program.c
projects/jbuild/lib/libarchive/archive_read_support_format_ar.c
projects/jbuild/lib/libarchive/archive_read_support_format_cpio.c
projects/jbuild/lib/libarchive/archive_read_support_format_empty.c
projects/jbuild/lib/libarchive/archive_read_support_format_iso9660.c
projects/jbuild/lib/libarchive/archive_read_support_format_mtree.c
projects/jbuild/lib/libarchive/archive_read_support_format_tar.c
projects/jbuild/lib/libarchive/archive_read_support_format_zip.c
projects/jbuild/lib/libarchive/archive_string.c
projects/jbuild/lib/libarchive/archive_string.h
projects/jbuild/lib/libarchive/archive_string_sprintf.c
projects/jbuild/lib/libarchive/archive_util.c
projects/jbuild/lib/libarchive/archive_virtual.c
projects/jbuild/lib/libarchive/archive_write.c
projects/jbuild/lib/libarchive/archive_write_disk.c
projects/jbuild/lib/libarchive/archive_write_private.h
projects/jbuild/lib/libarchive/archive_write_set_compression_bzip2.c
projects/jbuild/lib/libarchive/archive_write_set_compression_gzip.c
projects/jbuild/lib/libarchive/archive_write_set_compression_program.c
projects/jbuild/lib/libarchive/archive_write_set_format_ar.c
projects/jbuild/lib/libarchive/archive_write_set_format_cpio.c
projects/jbuild/lib/libarchive/archive_write_set_format_cpio_newc.c
projects/jbuild/lib/libarchive/archive_write_set_format_mtree.c
projects/jbuild/lib/libarchive/archive_write_set_format_pax.c
projects/jbuild/lib/libarchive/archive_write_set_format_shar.c
projects/jbuild/lib/libarchive/archive_write_set_format_ustar.c
projects/jbuild/lib/libarchive/config_freebsd.h
projects/jbuild/lib/libarchive/test/ (props changed)
projects/jbuild/lib/libarchive/test/Makefile
projects/jbuild/lib/libarchive/test/main.c
projects/jbuild/lib/libarchive/test/read_open_memory.c
projects/jbuild/lib/libarchive/test/test.h
projects/jbuild/lib/libarchive/test/test_acl_freebsd.c
projects/jbuild/lib/libarchive/test/test_acl_pax.c
projects/jbuild/lib/libarchive/test/test_compat_bzip2.c
projects/jbuild/lib/libarchive/test/test_compat_gtar.c
projects/jbuild/lib/libarchive/test/test_compat_gzip.c
projects/jbuild/lib/libarchive/test/test_compat_zip.c
projects/jbuild/lib/libarchive/test/test_empty_write.c
projects/jbuild/lib/libarchive/test/test_entry.c
projects/jbuild/lib/libarchive/test/test_fuzz.c
projects/jbuild/lib/libarchive/test/test_pax_filename_encoding.c
projects/jbuild/lib/libarchive/test/test_read_compress_program.c
projects/jbuild/lib/libarchive/test/test_read_extract.c
projects/jbuild/lib/libarchive/test/test_read_format_cpio_bin_Z.c
projects/jbuild/lib/libarchive/test/test_read_format_cpio_bin_bz2.c
projects/jbuild/lib/libarchive/test/test_read_format_cpio_bin_gz.c
projects/jbuild/lib/libarchive/test/test_read_format_cpio_svr4_gzip.c
projects/jbuild/lib/libarchive/test/test_read_format_cpio_svr4c_Z.c
projects/jbuild/lib/libarchive/test/test_read_format_empty.c
projects/jbuild/lib/libarchive/test/test_read_format_gtar_gz.c
projects/jbuild/lib/libarchive/test/test_read_format_gtar_sparse.c
projects/jbuild/lib/libarchive/test/test_read_format_iso_gz.c
projects/jbuild/lib/libarchive/test/test_read_format_isorr_bz2.c
projects/jbuild/lib/libarchive/test/test_read_format_pax_bz2.c
projects/jbuild/lib/libarchive/test/test_read_format_tar.c
projects/jbuild/lib/libarchive/test/test_read_format_tbz.c
projects/jbuild/lib/libarchive/test/test_read_format_tgz.c
projects/jbuild/lib/libarchive/test/test_read_format_tz.c
projects/jbuild/lib/libarchive/test/test_read_format_zip.c
projects/jbuild/lib/libarchive/test/test_read_large.c
projects/jbuild/lib/libarchive/test/test_read_pax_truncated.c
projects/jbuild/lib/libarchive/test/test_read_position.c
projects/jbuild/lib/libarchive/test/test_tar_large.c
projects/jbuild/lib/libarchive/test/test_ustar_filenames.c
projects/jbuild/lib/libarchive/test/test_write_compress.c
projects/jbuild/lib/libarchive/test/test_write_compress_program.c
projects/jbuild/lib/libarchive/test/test_write_disk.c
projects/jbuild/lib/libarchive/test/test_write_disk_failures.c
projects/jbuild/lib/libarchive/test/test_write_disk_hardlink.c
projects/jbuild/lib/libarchive/test/test_write_disk_perms.c
projects/jbuild/lib/libarchive/test/test_write_disk_secure.c
projects/jbuild/lib/libarchive/test/test_write_format_ar.c
projects/jbuild/lib/libarchive/test/test_write_format_cpio_newc.c
projects/jbuild/lib/libarchive/test/test_write_format_cpio_odc.c
projects/jbuild/lib/libarchive/test/test_write_format_tar.c
projects/jbuild/lib/libarchive/test/test_write_format_tar_empty.c
projects/jbuild/lib/libarchive/test/test_write_format_tar_ustar.c
projects/jbuild/lib/libarchive/test/test_write_open_memory.c
projects/jbuild/lib/libbluetooth/Makefile
projects/jbuild/lib/libbluetooth/bluetooth.3
projects/jbuild/lib/libbluetooth/bluetooth.c
projects/jbuild/lib/libbluetooth/bluetooth.h
projects/jbuild/lib/libc/ (props changed)
projects/jbuild/lib/libc/db/btree/bt_close.c
projects/jbuild/lib/libc/db/btree/bt_conv.c
projects/jbuild/lib/libc/db/btree/bt_debug.c
projects/jbuild/lib/libc/db/btree/bt_delete.c
projects/jbuild/lib/libc/db/btree/bt_get.c
projects/jbuild/lib/libc/db/btree/bt_open.c
projects/jbuild/lib/libc/db/btree/bt_overflow.c
projects/jbuild/lib/libc/db/btree/bt_page.c
projects/jbuild/lib/libc/db/btree/bt_put.c
projects/jbuild/lib/libc/db/btree/bt_search.c
projects/jbuild/lib/libc/db/btree/bt_seq.c
projects/jbuild/lib/libc/db/btree/bt_split.c
projects/jbuild/lib/libc/db/btree/bt_utils.c
projects/jbuild/lib/libc/db/btree/btree.h
projects/jbuild/lib/libc/db/db/db.c
projects/jbuild/lib/libc/db/hash/hash.c
projects/jbuild/lib/libc/db/hash/hash.h
projects/jbuild/lib/libc/db/hash/hash_bigkey.c
projects/jbuild/lib/libc/db/hash/hash_buf.c
projects/jbuild/lib/libc/db/hash/hash_log2.c
projects/jbuild/lib/libc/db/hash/hash_page.c
projects/jbuild/lib/libc/db/hash/page.h
projects/jbuild/lib/libc/db/mpool/mpool.c
projects/jbuild/lib/libc/db/recno/rec_close.c
projects/jbuild/lib/libc/db/recno/rec_delete.c
projects/jbuild/lib/libc/db/recno/rec_get.c
projects/jbuild/lib/libc/db/recno/rec_open.c
projects/jbuild/lib/libc/db/recno/rec_put.c
projects/jbuild/lib/libc/db/recno/rec_search.c
projects/jbuild/lib/libc/db/recno/rec_seq.c
projects/jbuild/lib/libc/db/recno/rec_utils.c
projects/jbuild/lib/libc/gen/fts.c
projects/jbuild/lib/libc/gen/lockf.3
projects/jbuild/lib/libc/gen/lockf.c
projects/jbuild/lib/libc/net/rcmd.3
projects/jbuild/lib/libc/net/sourcefilter.3
projects/jbuild/lib/libc/net/sourcefilter.c
projects/jbuild/lib/libc/stdio/Makefile.inc
projects/jbuild/lib/libc/stdio/Symbol.map
projects/jbuild/lib/libc/stdio/findfp.c
projects/jbuild/lib/libc/stdio/printf-pos.c
projects/jbuild/lib/libc/stdio/printf.3
projects/jbuild/lib/libc/stdio/printflocal.h
projects/jbuild/lib/libc/stdio/stdio.3
projects/jbuild/lib/libc/stdlib/atol.3
projects/jbuild/lib/libc/stdtime/ (props changed)
projects/jbuild/lib/libc/string/Makefile.inc
projects/jbuild/lib/libc/string/Symbol.map
projects/jbuild/lib/libc/string/ffsll.c (props changed)
projects/jbuild/lib/libc/string/flsll.c (props changed)
projects/jbuild/lib/libc/string/wmemchr.3
projects/jbuild/lib/libc/sys/shmctl.2
projects/jbuild/lib/libipsec/policy_token.l
projects/jbuild/lib/libutil/ (props changed)
projects/jbuild/release/amd64/boot_crunch.conf
projects/jbuild/release/i386/boot_crunch.conf
projects/jbuild/release/ia64/boot_crunch.conf
projects/jbuild/release/picobsd/bridge/PICOBSD
projects/jbuild/release/powerpc/boot_crunch.conf
projects/jbuild/release/sparc64/boot_crunch.conf
projects/jbuild/release/sun4v/boot_crunch.conf
projects/jbuild/sbin/devd/token.l
projects/jbuild/sbin/dump/optr.c
projects/jbuild/sbin/ipfw/altq.c
projects/jbuild/sbin/ipfw/main.c
projects/jbuild/sbin/ipfw/nat.c
projects/jbuild/sbin/mount/mount.8
projects/jbuild/sbin/mount/mount.c
projects/jbuild/sbin/setkey/token.l
projects/jbuild/share/man/man4/crypto.4
projects/jbuild/share/man/man4/ip.4
projects/jbuild/share/man/man4/multicast.4
projects/jbuild/share/man/man4/uplcom.4
projects/jbuild/share/man/man9/Makefile
projects/jbuild/share/man/man9/vfs_getopt.9
projects/jbuild/share/termcap/termcap.src
projects/jbuild/share/zoneinfo/ (props changed)
projects/jbuild/sys/ (props changed)
projects/jbuild/sys/amd64/acpica/madt.c
projects/jbuild/sys/amd64/amd64/fpu.c
projects/jbuild/sys/amd64/amd64/machdep.c
projects/jbuild/sys/amd64/amd64/pmap.c
projects/jbuild/sys/amd64/amd64/trap.c
projects/jbuild/sys/amd64/amd64/vm_machdep.c
projects/jbuild/sys/amd64/conf/NOTES
projects/jbuild/sys/amd64/ia32/ia32_signal.c
projects/jbuild/sys/amd64/include/fpu.h
projects/jbuild/sys/amd64/include/pcb.h
projects/jbuild/sys/amd64/linux32/linux.h
projects/jbuild/sys/amd64/linux32/linux32_sysvec.c
projects/jbuild/sys/arm/conf/AVILA
projects/jbuild/sys/arm/conf/CAMBRIA
projects/jbuild/sys/arm/xscale/ixp425/avila_machdep.c
projects/jbuild/sys/arm/xscale/ixp425/files.ixp425
projects/jbuild/sys/arm/xscale/ixp425/ixp425_pci.c
projects/jbuild/sys/arm/xscale/ixp425/ixp425reg.h
projects/jbuild/sys/boot/i386/boot0/Makefile
projects/jbuild/sys/boot/i386/boot0/boot0.S
projects/jbuild/sys/boot/i386/boot2/Makefile
projects/jbuild/sys/boot/i386/boot2/boot1.S
projects/jbuild/sys/bsm/audit.h
projects/jbuild/sys/bsm/audit_kevents.h
projects/jbuild/sys/cddl/compat/opensolaris/kern/opensolaris_vfs.c
projects/jbuild/sys/compat/freebsd32/freebsd32_misc.c
projects/jbuild/sys/compat/linux/linux_misc.c
projects/jbuild/sys/compat/linux/linux_misc.h
projects/jbuild/sys/compat/ndis/hal_var.h
projects/jbuild/sys/compat/ndis/kern_ndis.c
projects/jbuild/sys/compat/ndis/kern_windrv.c
projects/jbuild/sys/compat/ndis/ndis_var.h
projects/jbuild/sys/compat/ndis/ntoskrnl_var.h
projects/jbuild/sys/compat/ndis/pe_var.h
projects/jbuild/sys/compat/ndis/resource_var.h
projects/jbuild/sys/compat/ndis/subr_hal.c
projects/jbuild/sys/compat/ndis/subr_ndis.c
projects/jbuild/sys/compat/ndis/subr_ntoskrnl.c
projects/jbuild/sys/compat/ndis/subr_pe.c
projects/jbuild/sys/compat/ndis/subr_usbd.c
projects/jbuild/sys/compat/ndis/usbd_var.h
projects/jbuild/sys/conf/files
projects/jbuild/sys/conf/kern.mk
projects/jbuild/sys/contrib/pf/ (props changed)
projects/jbuild/sys/dev/ale/if_ale.c
projects/jbuild/sys/dev/ata/ata-all.c
projects/jbuild/sys/dev/ata/ata-all.h
projects/jbuild/sys/dev/ata/ata-disk.c
projects/jbuild/sys/dev/ata/ata-queue.c
projects/jbuild/sys/dev/ata/ata-raid.c
projects/jbuild/sys/dev/ata/ata-usb.c
projects/jbuild/sys/dev/ata/atapi-cam.c
projects/jbuild/sys/dev/ata/atapi-cd.c
projects/jbuild/sys/dev/ata/atapi-fd.c
projects/jbuild/sys/dev/ata/atapi-tape.c
projects/jbuild/sys/dev/ata/chipsets/ata-acerlabs.c
projects/jbuild/sys/dev/ata/chipsets/ata-ahci.c
projects/jbuild/sys/dev/ata/chipsets/ata-intel.c
projects/jbuild/sys/dev/ata/chipsets/ata-marvell.c
projects/jbuild/sys/dev/ata/chipsets/ata-nvidia.c
projects/jbuild/sys/dev/ata/chipsets/ata-promise.c
projects/jbuild/sys/dev/ata/chipsets/ata-siliconimage.c
projects/jbuild/sys/dev/ata/chipsets/ata-sis.c
projects/jbuild/sys/dev/ata/chipsets/ata-via.c
projects/jbuild/sys/dev/ath/if_ath.c
projects/jbuild/sys/dev/ath/if_athvar.h
projects/jbuild/sys/dev/bce/if_bce.c
projects/jbuild/sys/dev/bce/if_bcefw.h
projects/jbuild/sys/dev/bce/if_bcereg.h
projects/jbuild/sys/dev/drm/drm_pciids.h
projects/jbuild/sys/dev/drm/radeon_cp.c
projects/jbuild/sys/dev/drm/radeon_drm.h
projects/jbuild/sys/dev/drm/radeon_drv.h
projects/jbuild/sys/dev/drm/radeon_irq.c
projects/jbuild/sys/dev/drm/radeon_state.c
projects/jbuild/sys/dev/ichwd/ichwd.c
projects/jbuild/sys/dev/if_ndis/if_ndis.c
projects/jbuild/sys/dev/if_ndis/if_ndis_pccard.c
projects/jbuild/sys/dev/if_ndis/if_ndis_pci.c
projects/jbuild/sys/dev/if_ndis/if_ndis_usb.c
projects/jbuild/sys/dev/if_ndis/if_ndisvar.h
projects/jbuild/sys/dev/ofw/ofw_iicbus.c
projects/jbuild/sys/dev/pccard/pccard.c
projects/jbuild/sys/dev/pccard/pccardvar.h
projects/jbuild/sys/dev/pccard/pccardvarp.h
projects/jbuild/sys/dev/pci/pci.c
projects/jbuild/sys/dev/pci/pci_private.h
projects/jbuild/sys/dev/pci/pcireg.h
projects/jbuild/sys/dev/pci/vga_pci.c
projects/jbuild/sys/dev/puc/pucdata.c
projects/jbuild/sys/dev/sound/usb/uaudio.c
projects/jbuild/sys/dev/uart/uart_bus_pci.c
projects/jbuild/sys/dev/usb/bluetooth/ng_ubt.c
projects/jbuild/sys/dev/usb/bluetooth/ubtbcmfw.c
projects/jbuild/sys/dev/usb/controller/ehci.c
projects/jbuild/sys/dev/usb/controller/ehci.h
projects/jbuild/sys/dev/usb/controller/ehci_ixp4xx.c
projects/jbuild/sys/dev/usb/image/uscanner.c
projects/jbuild/sys/dev/usb/input/uhid.c
projects/jbuild/sys/dev/usb/input/ukbd.c
projects/jbuild/sys/dev/usb/input/ums.c
projects/jbuild/sys/dev/usb/misc/udbp.c
projects/jbuild/sys/dev/usb/misc/ufm.c
projects/jbuild/sys/dev/usb/net/if_aue.c
projects/jbuild/sys/dev/usb/net/if_axe.c
projects/jbuild/sys/dev/usb/net/if_cdce.c
projects/jbuild/sys/dev/usb/net/if_cue.c
projects/jbuild/sys/dev/usb/net/if_kue.c
projects/jbuild/sys/dev/usb/net/if_rue.c
projects/jbuild/sys/dev/usb/net/if_udav.c
projects/jbuild/sys/dev/usb/serial/u3g.c
projects/jbuild/sys/dev/usb/serial/uark.c
projects/jbuild/sys/dev/usb/serial/ubsa.c
projects/jbuild/sys/dev/usb/serial/ubser.c
projects/jbuild/sys/dev/usb/serial/uchcom.c
projects/jbuild/sys/dev/usb/serial/ucycom.c
projects/jbuild/sys/dev/usb/serial/ufoma.c
projects/jbuild/sys/dev/usb/serial/uftdi.c
projects/jbuild/sys/dev/usb/serial/ugensa.c
projects/jbuild/sys/dev/usb/serial/uipaq.c
projects/jbuild/sys/dev/usb/serial/ulpt.c
projects/jbuild/sys/dev/usb/serial/umct.c
projects/jbuild/sys/dev/usb/serial/umodem.c
projects/jbuild/sys/dev/usb/serial/umoscom.c
projects/jbuild/sys/dev/usb/serial/uplcom.c
projects/jbuild/sys/dev/usb/serial/uslcom.c
projects/jbuild/sys/dev/usb/serial/uvisor.c
projects/jbuild/sys/dev/usb/serial/uvscom.c
projects/jbuild/sys/dev/usb/storage/umass.c
projects/jbuild/sys/dev/usb/storage/urio.c
projects/jbuild/sys/dev/usb/storage/ustorage_fs.c
projects/jbuild/sys/dev/usb/usb_compat_linux.c
projects/jbuild/sys/dev/usb/usb_dev.c
projects/jbuild/sys/dev/usb/usb_hub.c
projects/jbuild/sys/dev/usb/usbdevs
projects/jbuild/sys/dev/usb/wlan/if_rum.c
projects/jbuild/sys/dev/usb/wlan/if_ural.c
projects/jbuild/sys/dev/usb/wlan/if_zyd.c
projects/jbuild/sys/fs/devfs/devfs_vnops.c
projects/jbuild/sys/fs/procfs/procfs_dbregs.c
projects/jbuild/sys/fs/procfs/procfs_fpregs.c
projects/jbuild/sys/fs/procfs/procfs_regs.c
projects/jbuild/sys/fs/udf/udf_vnops.c
projects/jbuild/sys/i386/acpica/madt.c
projects/jbuild/sys/i386/conf/NOTES
projects/jbuild/sys/i386/i386/machdep.c
projects/jbuild/sys/i386/i386/mp_machdep.c
projects/jbuild/sys/i386/include/npx.h
projects/jbuild/sys/i386/include/pcb.h
projects/jbuild/sys/i386/isa/npx.c
projects/jbuild/sys/i386/linux/linux.h
projects/jbuild/sys/i386/linux/linux_sysvec.c
projects/jbuild/sys/i386/xen/mp_machdep.c
projects/jbuild/sys/isa/syscons_isa.c
projects/jbuild/sys/kern/kern_conf.c
projects/jbuild/sys/kern/kern_priv.c
projects/jbuild/sys/kern/subr_smp.c
projects/jbuild/sys/kern/subr_witness.c
projects/jbuild/sys/kern/sys_generic.c
projects/jbuild/sys/kern/sys_process.c
projects/jbuild/sys/kern/sysv_shm.c
projects/jbuild/sys/kern/tty.c
projects/jbuild/sys/kern/tty_pts.c
projects/jbuild/sys/kern/vfs_default.c
projects/jbuild/sys/kern/vfs_mount.c
projects/jbuild/sys/kern/vfs_subr.c
projects/jbuild/sys/mips/mips/pmap.c
projects/jbuild/sys/modules/drm/radeon/Makefile
projects/jbuild/sys/modules/if_ndis/Makefile
projects/jbuild/sys/modules/ndis/Makefile
projects/jbuild/sys/net/bpf.c
projects/jbuild/sys/net/bpf_zerocopy.c
projects/jbuild/sys/net/if_gif.h
projects/jbuild/sys/net/if_var.h
projects/jbuild/sys/net/netisr.h
projects/jbuild/sys/net/vnet.h
projects/jbuild/sys/net80211/ieee80211_scan_sta.c
projects/jbuild/sys/netgraph/atm/ng_ccatm.h
projects/jbuild/sys/netgraph/ng_pppoe.c
projects/jbuild/sys/netgraph/ng_pppoe.h
projects/jbuild/sys/netinet/igmp.h
projects/jbuild/sys/netinet/in.h
projects/jbuild/sys/netinet/in_gif.c
projects/jbuild/sys/netinet/in_mcast.c
projects/jbuild/sys/netinet/ip6.h
projects/jbuild/sys/netinet/ip_dummynet.c
projects/jbuild/sys/netinet/ip_fw.h
projects/jbuild/sys/netinet/ip_fw2.c
projects/jbuild/sys/netinet/ip_options.c
projects/jbuild/sys/netinet/ip_options.h
projects/jbuild/sys/netinet/ip_output.c
projects/jbuild/sys/netinet/libalias/alias.h
projects/jbuild/sys/netinet/sctp_constants.h
projects/jbuild/sys/netinet/sctp_indata.c
projects/jbuild/sys/netinet/sctp_os_bsd.h
projects/jbuild/sys/netinet/sctp_output.c
projects/jbuild/sys/netinet/tcp_timewait.c
projects/jbuild/sys/netinet/vinet.h
projects/jbuild/sys/netinet6/in6_gif.c
projects/jbuild/sys/netinet6/ip6_output.c
projects/jbuild/sys/netinet6/route6.c
projects/jbuild/sys/netinet6/vinet6.h
projects/jbuild/sys/netipsec/key.c
projects/jbuild/sys/netipsec/vipsec.h
projects/jbuild/sys/pc98/cbus/syscons_cbus.c
projects/jbuild/sys/pc98/pc98/machdep.c
projects/jbuild/sys/pci/viapm.c
projects/jbuild/sys/security/audit/audit_bsm_errno.c
projects/jbuild/sys/security/audit/audit_bsm_token.c
projects/jbuild/sys/security/mac/mac_audit.c
projects/jbuild/sys/security/mac/mac_cred.c
projects/jbuild/sys/security/mac/mac_framework.c
projects/jbuild/sys/security/mac/mac_inet.c
projects/jbuild/sys/security/mac/mac_internal.h
projects/jbuild/sys/security/mac/mac_net.c
projects/jbuild/sys/security/mac/mac_pipe.c
projects/jbuild/sys/security/mac/mac_posix_sem.c
projects/jbuild/sys/security/mac/mac_posix_shm.c
projects/jbuild/sys/security/mac/mac_priv.c
projects/jbuild/sys/security/mac/mac_process.c
projects/jbuild/sys/security/mac/mac_socket.c
projects/jbuild/sys/security/mac/mac_system.c
projects/jbuild/sys/security/mac/mac_sysv_msg.c
projects/jbuild/sys/security/mac/mac_sysv_sem.c
projects/jbuild/sys/security/mac/mac_sysv_shm.c
projects/jbuild/sys/security/mac/mac_vfs.c
projects/jbuild/sys/sys/cdefs.h
projects/jbuild/sys/sys/fcntl.h
projects/jbuild/sys/sys/mbuf.h
projects/jbuild/sys/sys/mount.h
projects/jbuild/sys/sys/param.h
projects/jbuild/sys/sys/sdt.h
projects/jbuild/sys/sys/shm.h
projects/jbuild/sys/sys/stat.h
projects/jbuild/sys/sys/systm.h
projects/jbuild/sys/sys/tree.h
projects/jbuild/sys/sys/vimage.h
projects/jbuild/tools/regression/lib/msun/test-conj.t (props changed)
projects/jbuild/tools/tools/ath/athstats/main.c
projects/jbuild/tools/tools/ifinfo/ifinfo.c
projects/jbuild/usr.bin/ipcs/ipcs.c
projects/jbuild/usr.bin/procstat/ (props changed)
projects/jbuild/usr.sbin/IPXrouted/tables.c
projects/jbuild/usr.sbin/apmd/apmdlex.l
projects/jbuild/usr.sbin/boot0cfg/boot0cfg.c
projects/jbuild/usr.sbin/makefs/ffs/ffs_bswap.c (props changed)
projects/jbuild/usr.sbin/makefs/ffs/ffs_subr.c (props changed)
projects/jbuild/usr.sbin/makefs/ffs/ufs_bswap.h (props changed)
projects/jbuild/usr.sbin/makefs/getid.c (props changed)
projects/jbuild/usr.sbin/mtest/mtest.8
projects/jbuild/usr.sbin/mtest/mtest.c
projects/jbuild/usr.sbin/wpa/Makefile.inc
projects/jbuild/usr.sbin/wpa/hostapd/Makefile
projects/jbuild/usr.sbin/wpa/hostapd/driver_freebsd.c
projects/jbuild/usr.sbin/wpa/hostapd_cli/Makefile
projects/jbuild/usr.sbin/wpa/wpa_cli/Makefile
projects/jbuild/usr.sbin/wpa/wpa_passphrase/Makefile
projects/jbuild/usr.sbin/wpa/wpa_supplicant/Makefile
projects/jbuild/usr.sbin/wpa/wpa_supplicant/Packet32.c
projects/jbuild/usr.sbin/wpa/wpa_supplicant/driver_freebsd.c
projects/jbuild/usr.sbin/wpa/wpa_supplicant/driver_wired.c
projects/jbuild/usr.sbin/zic/ (props changed)
Modified: projects/jbuild/MAINTAINERS
==============================================================================
--- projects/jbuild/MAINTAINERS Sun Mar 8 00:50:37 2009 (r189503)
+++ projects/jbuild/MAINTAINERS Sun Mar 8 03:10:37 2009 (r189504)
@@ -29,7 +29,6 @@ MAC Framework rwatson Pre-commit review
MAC Modules rwatson Pre-commit review requested.
contrib/openbsm rwatson Pre-commit review requested.
sys/security/audit rwatson Pre-commit review requested.
-ATA/IDE sos Pre-commit review requested.
ahc(4) gibbs Pre-commit review requested.
ahd(4) gibbs Pre-commit review requested.
NEWCARD imp Pre-commit review requested.
Modified: projects/jbuild/UPDATING
==============================================================================
--- projects/jbuild/UPDATING Sun Mar 8 00:50:37 2009 (r189503)
+++ projects/jbuild/UPDATING Sun Mar 8 03:10:37 2009 (r189504)
@@ -22,6 +22,18 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8.
to maximize performance. (To disable malloc debugging, run
ln -s aj /etc/malloc.conf.)
+20090302:
+ A workaround is committed to allow the creation of System V shared
+ memory segment of size > 2 GB on the 64-bit architectures.
+ Due to a limitation of the existing ABI, the shm_segsz member
+ of the struct shmid_ds, returned by shmctl(IPC_STAT) call is
+ wrong for large segments. Note that limits must be explicitely
+ raised to allow such segments to be created.
+
+20090301:
+ The layout of struct ifnet has changed, requiring a rebuild of all
+ network device driver modules.
+
20090227:
The /dev handling for the new USB stack has changed, a
buildworld/installworld is required for libusb20.
@@ -31,7 +43,8 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8.
module names reverted to their previous values (eg, usb, ehci, ohci,
ums, ...). The old usb stack can be compiled in by prefixing the name
with the letter 'o', the old usb modules have been removed.
- Updating entry 20090216 for xorg may still apply.
+ Updating entry 20090216 for xorg and 20090215 for libmap may still
+ apply.
20090217:
The rc.conf(5) option if_up_delay has been renamed to
@@ -55,6 +68,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8.
that includes GENERIC then ensure that usb names are also changed over,
eg uftdi -> usb2_serial_ftdi.
+ Older programs linked against the ports libusb 0.1 need to be
+ redirected to the new stack's libusb20. /etc/libmap.conf can
+ be used for this:
+ # Map old usb library to new one for usb2 stack
+ libusb-0.1.so.8 libusb20.so.1
+
20090203:
The ichsmb(4) driver has been changed to require SMBus slave
addresses be left-justified (xxxxxxx0b) rather than right-justified.
Modified: projects/jbuild/contrib/csup/updater.c
==============================================================================
--- projects/jbuild/contrib/csup/updater.c Sun Mar 8 00:50:37 2009 (r189503)
+++ projects/jbuild/contrib/csup/updater.c Sun Mar 8 03:10:37 2009 (r189504)
@@ -1682,7 +1682,7 @@ updater_rcsedit(struct updater *up, stru
stream_close(dest);
rcsfile_free(rf);
if (error)
- return (UPDATER_ERR_PROTO);
+ lprintf(-1, "Error writing %s\n", name);
finish:
sr->sr_clientattr = fattr_frompath(path, FATTR_NOFOLLOW);
Modified: projects/jbuild/contrib/openbsm/CREDITS
==============================================================================
--- projects/jbuild/contrib/openbsm/CREDITS Sun Mar 8 00:50:37 2009 (r189503)
+++ projects/jbuild/contrib/openbsm/CREDITS Sun Mar 8 03:10:37 2009 (r189504)
@@ -27,6 +27,7 @@ the development of OpenBSM:
Eric Hall
Xin LI
Stacey Son
+ Todd Heberlein
In addition, Coverity, Inc.'s Prevent(tm) static analysis tool and Gimpel
Software's FlexeLint tool were used to identify a number of bugs in the
Modified: projects/jbuild/contrib/openbsm/NEWS
==============================================================================
--- projects/jbuild/contrib/openbsm/NEWS Sun Mar 8 00:50:37 2009 (r189503)
+++ projects/jbuild/contrib/openbsm/NEWS Sun Mar 8 03:10:37 2009 (r189504)
@@ -1,5 +1,24 @@
OpenBSM Version History
+OpenBSM 1.1 beta 1
+
+- The filesz parameter in audit_control(5) now accepts suffixes: 'B' for
+ Bytes, 'K' for Kilobytes, 'M' for Megabytes, and 'G' for Gigabytes.
+ For legacy support no suffix defaults to bytes.
+- Audit trail log expiration support added. It is configured in
+ audit_control(5) with the expire-after parameter. If there is no
+ expire-after parameter in audit_control(5), the default, then the audit
+ trail files are not expired and removed. See audit_control(5) for
+ more information.
+- Change defaults in audit_control: warn at 5% rather than 20% free for audit
+ partitions, rotate automatically at 2mb, and set the default policy to
+ cnt,argv rather than cnt so that execve(2) arguments are captured if
+ AUE_EXECVE events are audited. These may provide more usable defaults for
+ many users.
+- Use au_domain_to_bsm(3) and au_socket_type_to_bsm(3) to convert
+ au_to_socket_ex(3) arguments to BSM format.
+- Fix error encoding AUT_IPC_PERM tokens.
+
OpenBSM 1.1 alpha 5
- Stub libauditd(3) man page added.
@@ -412,4 +431,4 @@ OpenBSM 1.0 alpha 1
to support reloading of kernel event table.
- Allow comments in /etc/security configuration files.
-$P4: //depot/projects/trustedbsd/openbsm/NEWS#27 $
+$P4: //depot/projects/trustedbsd/openbsm/NEWS#32 $
Modified: projects/jbuild/contrib/openbsm/README
==============================================================================
--- projects/jbuild/contrib/openbsm/README Sun Mar 8 00:50:37 2009 (r189503)
+++ projects/jbuild/contrib/openbsm/README Sun Mar 8 03:10:37 2009 (r189504)
@@ -1,4 +1,4 @@
-OpenBSM 1.1 alpha 4
+OpenBSM 1.1 beta 1
Introduction
@@ -56,4 +56,4 @@ Information on TrustedBSD may be found o
http://www.TrustedBSD.org/
-$P4: //depot/projects/trustedbsd/openbsm/README#34 $
+$P4: //depot/projects/trustedbsd/openbsm/README#35 $
Modified: projects/jbuild/contrib/openbsm/VERSION
==============================================================================
--- projects/jbuild/contrib/openbsm/VERSION Sun Mar 8 00:50:37 2009 (r189503)
+++ projects/jbuild/contrib/openbsm/VERSION Sun Mar 8 03:10:37 2009 (r189504)
@@ -1 +1 @@
-OPENBSM_1_1_ALPHA_5
+OPENBSM_1_1_BETA_1
Modified: projects/jbuild/contrib/openbsm/bin/audit/audit.8
==============================================================================
--- projects/jbuild/contrib/openbsm/bin/audit/audit.8 Sun Mar 8 00:50:37 2009 (r189503)
+++ projects/jbuild/contrib/openbsm/bin/audit/audit.8 Sun Mar 8 03:10:37 2009 (r189504)
@@ -1,4 +1,4 @@
-.\" Copyright (c) 2004 Apple Inc.
+.\" Copyright (c) 2004-2009 Apple Inc.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
@@ -25,9 +25,9 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.\" $P4: //depot/projects/trustedbsd/openbsm/bin/audit/audit.8#13 $
+.\" $P4: //depot/projects/trustedbsd/openbsm/bin/audit/audit.8#15 $
.\"
-.Dd December 11, 2008
+.Dd January 29, 2009
.Dt AUDIT 8
.Os
.Sh NAME
@@ -35,7 +35,7 @@
.Nd audit management utility
.Sh SYNOPSIS
.Nm
-.Fl i | n | s | t
+.Fl e | i | n | s | t
.Sh DESCRIPTION
The
.Nm
@@ -43,6 +43,10 @@ utility controls the state of the audit
One of the following flags is required as an argument to
.Nm :
.Bl -tag -width indent
+.It Fl e
+Forces the audit system to immediately remove audit log files that
+meet the expiration criteria specified in the audit control file without
+doing a log rotation.
.It Fl i
Initializes and starts auditing.
This option is currently for Mac OS X only
@@ -53,6 +57,8 @@ to be configured to run under
.It Fl n
Forces the audit system to close the existing audit log file and rotate to
a new log file in a location specified in the audit control file.
+Also, audit log files that meet the expiration criteria specified in the
+audit control file will be removed.
.It Fl s
Specifies that the audit system should [re]synchronize its
configuration from the audit control file.
Modified: projects/jbuild/contrib/openbsm/bin/audit/audit.c
==============================================================================
--- projects/jbuild/contrib/openbsm/bin/audit/audit.c Sun Mar 8 00:50:37 2009 (r189503)
+++ projects/jbuild/contrib/openbsm/bin/audit/audit.c Sun Mar 8 03:10:37 2009 (r189504)
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2005-2008 Apple Inc.
+ * Copyright (c) 2005-2009 Apple Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -26,7 +26,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $P4: //depot/projects/trustedbsd/openbsm/bin/audit/audit.c#13 $
+ * $P4: //depot/projects/trustedbsd/openbsm/bin/audit/audit.c#14 $
*/
/*
* Program to trigger the audit daemon with a message that is either:
@@ -68,12 +68,15 @@ static int send_trigger(unsigned int);
#include "auditd_control.h"
/*
- * XXX the following is temporary until this can be added to the kernel
+ * XXX The following are temporary until these can be added to the kernel
* audit.h header.
*/
#ifndef AUDIT_TRIGGER_INITIALIZE
#define AUDIT_TRIGGER_INITIALIZE 7
#endif
+#ifndef AUDIT_TRIGGER_EXPIRE_TRAILS
+#define AUDIT_TRIGGER_EXPIRE_TRAILS 8
+#endif
static int
send_trigger(unsigned int trigger)
@@ -125,7 +128,7 @@ static void
usage(void)
{
- (void)fprintf(stderr, "Usage: audit -i | -n | -s | -t \n");
+ (void)fprintf(stderr, "Usage: audit -e | -i | -n | -s | -t \n");
exit(-1);
}
@@ -141,9 +144,13 @@ main(int argc, char **argv)
if (argc != 2)
usage();
- while ((ch = getopt(argc, argv, "inst")) != -1) {
+ while ((ch = getopt(argc, argv, "einst")) != -1) {
switch(ch) {
+ case 'e':
+ trigger = AUDIT_TRIGGER_EXPIRE_TRAILS;
+ break;
+
case 'i':
trigger = AUDIT_TRIGGER_INITIALIZE;
break;
Modified: projects/jbuild/contrib/openbsm/bin/auditd/audit_warn.c
==============================================================================
--- projects/jbuild/contrib/openbsm/bin/auditd/audit_warn.c Sun Mar 8 00:50:37 2009 (r189503)
+++ projects/jbuild/contrib/openbsm/bin/auditd/audit_warn.c Sun Mar 8 03:10:37 2009 (r189504)
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2005 Apple Inc.
+ * Copyright (c) 2005-2009 Apple Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -26,7 +26,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $P4: //depot/projects/trustedbsd/openbsm/bin/auditd/audit_warn.c#10 $
+ * $P4: //depot/projects/trustedbsd/openbsm/bin/auditd/audit_warn.c#11 $
*/
#include <sys/types.h>
@@ -236,3 +236,18 @@ audit_warn_tmpfile(void)
return (auditwarnlog(args));
}
+
+/*
+ * Indicates that this trail file has expired and was removed.
+ */
+int
+audit_warn_expired(char *filename)
+{
+ char *args[3];
+
+ args[0] = EXPIRED_WARN;
+ args[1] = filename;
+ args[2] = NULL;
+
+ return (auditwarnlog(args));
+}
Modified: projects/jbuild/contrib/openbsm/bin/auditd/auditd.c
==============================================================================
--- projects/jbuild/contrib/openbsm/bin/auditd/auditd.c Sun Mar 8 00:50:37 2009 (r189503)
+++ projects/jbuild/contrib/openbsm/bin/auditd/auditd.c Sun Mar 8 03:10:37 2009 (r189504)
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2004-2008 Apple Inc.
+ * Copyright (c) 2004-2009 Apple Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -26,7 +26,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $P4: //depot/projects/trustedbsd/openbsm/bin/auditd/auditd.c#41 $
+ * $P4: //depot/projects/trustedbsd/openbsm/bin/auditd/auditd.c#43 $
*/
#include <sys/types.h>
@@ -67,12 +67,16 @@
#endif
/*
- * XXX the following is temporary until this can be added to the kernel
+ * XXX The following are temporary until these can be added to the kernel
* audit.h header.
*/
#ifndef AUDIT_TRIGGER_INITIALIZE
#define AUDIT_TRIGGER_INITIALIZE 7
#endif
+#ifndef AUDIT_TRIGGER_EXPIRE_TRAILS
+#define AUDIT_TRIGGER_EXPIRE_TRAILS 8
+#endif
+
/*
* LaunchD flag (Mac OS X and, maybe, FreeBSD only.) See launchd(8) and
@@ -166,7 +170,7 @@ close_lastfile(char *TS)
/* Rename the last file -- append timestamp. */
if ((ptr = strstr(lastfile, NOT_TERMINATED)) != NULL) {
- strlcpy(ptr, TS, TIMESTAMP_LEN);
+ memcpy(ptr, TS, POSTFIX_LEN);
if (rename(oldname, lastfile) != 0)
auditd_log_err(
"Could not rename %s to %s: %m", oldname,
@@ -275,6 +279,14 @@ do_trail_file(void)
return (-1);
}
+ /*
+ * Finally, see if there are any trail files to expire.
+ */
+ err = auditd_expire_trails(audit_warn_expired);
+ if (err)
+ auditd_log_err("auditd_expire_trails(): %s",
+ auditd_strerror(err));
+
return (0);
}
@@ -550,6 +562,14 @@ auditd_handle_trigger(int trigger)
audit_setup();
break;
+ case AUDIT_TRIGGER_EXPIRE_TRAILS:
+ auditd_log_info("Got audit expire trails trigger");
+ err = auditd_expire_trails(audit_warn_expired);
+ if (err)
+ auditd_log_err("auditd_expire_trails(): %s",
+ auditd_strerror(err));
+ break;
+
default:
auditd_log_err("Got unknown trigger %d", trigger);
break;
@@ -669,13 +689,18 @@ auditd_config_controls(void)
*/
err = auditd_set_host();
if (err) {
- auditd_log_err("auditd_set_host() %s: %m",
- auditd_strerror(err));
- ret = -1;
+ if (err == ADE_PARSE) {
+ auditd_log_notice(
+ "audit_control(5) may be missing 'host:' field");
+ } else {
+ auditd_log_err("auditd_set_host() %s: %m",
+ auditd_strerror(err));
+ ret = -1;
+ }
} else
auditd_log_debug(
"Set audit host address information in kernel.");
-
+
return (ret);
}
Modified: projects/jbuild/contrib/openbsm/bin/auditd/auditd.h
==============================================================================
--- projects/jbuild/contrib/openbsm/bin/auditd/auditd.h Sun Mar 8 00:50:37 2009 (r189503)
+++ projects/jbuild/contrib/openbsm/bin/auditd/auditd.h Sun Mar 8 03:10:37 2009 (r189504)
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2005 Apple Inc.
+ * Copyright (c) 2005-2009 Apple Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -26,7 +26,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $P4: //depot/projects/trustedbsd/openbsm/bin/auditd/auditd.h#12 $
+ * $P4: //depot/projects/trustedbsd/openbsm/bin/auditd/auditd.h#13 $
*/
#ifndef _AUDITD_H_
@@ -57,6 +57,7 @@
#define POSTSIGTERM_WARN "postsigterm"
#define SOFTLIM_WARN "soft"
#define TMPFILE_WARN "tmpfile"
+#define EXPIRED_WARN "expired"
#define AUDITWARN_SCRIPT "/etc/security/audit_warn"
#define AUDITD_PIDFILE "/var/run/auditd.pid"
@@ -76,6 +77,7 @@ int audit_warn_nostart(void);
int audit_warn_postsigterm(void);
int audit_warn_soft(char *filename);
int audit_warn_tmpfile(void);
+int audit_warn_expired(char *filename);
void auditd_openlog(int debug, gid_t gid);
void auditd_log_err(const char *fmt, ...);
Modified: projects/jbuild/contrib/openbsm/bsm/auditd_lib.h
==============================================================================
--- projects/jbuild/contrib/openbsm/bsm/auditd_lib.h Sun Mar 8 00:50:37 2009 (r189503)
+++ projects/jbuild/contrib/openbsm/bsm/auditd_lib.h Sun Mar 8 03:10:37 2009 (r189504)
@@ -26,7 +26,7 @@
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
- * $P4: //depot/projects/trustedbsd/openbsm/bsm/auditd_lib.h#3 $
+ * $P4: //depot/projects/trustedbsd/openbsm/bsm/auditd_lib.h#4 $
*/
#ifndef _BSM_AUDITD_LIB_H_
@@ -81,12 +81,14 @@
#define ADE_INVAL -16 /* Invalid argument. */
#define ADE_GETADDR -17 /* Error resolving address from hostname. */
#define ADE_ADDRFAM -18 /* Address family not supported. */
+#define ADE_EXPIRE -19 /* Error expiring audit trail files. */
/*
* auditd_lib functions.
*/
const char *auditd_strerror(int errcode);
int auditd_set_minfree(void);
+int auditd_expire_trails(int (*warn_expired)(char *));
int auditd_read_dirs(int (*warn_soft)(char *), int (*warn_hard)(char *));
void auditd_close_dirs(void);
int auditd_set_evcmap(void);
Modified: projects/jbuild/contrib/openbsm/bsm/libbsm.h
==============================================================================
--- projects/jbuild/contrib/openbsm/bsm/libbsm.h Sun Mar 8 00:50:37 2009 (r189503)
+++ projects/jbuild/contrib/openbsm/bsm/libbsm.h Sun Mar 8 03:10:37 2009 (r189504)
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2004-2008 Apple Inc.
+ * Copyright (c) 2004-2009 Apple Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -26,7 +26,7 @@
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
- * $P4: //depot/projects/trustedbsd/openbsm/bsm/libbsm.h#41 $
+ * $P4: //depot/projects/trustedbsd/openbsm/bsm/libbsm.h#42 $
*/
#ifndef _LIBBSM_H_
@@ -76,13 +76,14 @@
#define AUDIT_CONTROL_FILE "/etc/security/audit_control"
#define AUDIT_USER_FILE "/etc/security/audit_user"
-#define DIR_CONTROL_ENTRY "dir"
-#define MINFREE_CONTROL_ENTRY "minfree"
-#define FILESZ_CONTROL_ENTRY "filesz"
-#define FLAGS_CONTROL_ENTRY "flags"
-#define NA_CONTROL_ENTRY "naflags"
-#define POLICY_CONTROL_ENTRY "policy"
+#define DIR_CONTROL_ENTRY "dir"
+#define MINFREE_CONTROL_ENTRY "minfree"
+#define FILESZ_CONTROL_ENTRY "filesz"
+#define FLAGS_CONTROL_ENTRY "flags"
+#define NA_CONTROL_ENTRY "naflags"
+#define POLICY_CONTROL_ENTRY "policy"
#define AUDIT_HOST_CONTROL_ENTRY "host"
+#define EXPIRE_AFTER_CONTROL_ENTRY "expire-after"
#define AU_CLASS_NAME_MAX 8
#define AU_CLASS_DESC_MAX 72
@@ -766,6 +767,7 @@ int getacflg(char *auditstr, int len)
int getacna(char *auditstr, int len);
int getacpol(char *auditstr, size_t len);
int getachost(char *auditstr, size_t len);
+int getacexpire(int *andflg, time_t *age, size_t *size);
int getauditflagsbin(char *auditstr, au_mask_t *masks);
int getauditflagschar(char *auditstr, au_mask_t *masks,
int verbose);
Modified: projects/jbuild/contrib/openbsm/config/config.h
==============================================================================
--- projects/jbuild/contrib/openbsm/config/config.h Sun Mar 8 00:50:37 2009 (r189503)
+++ projects/jbuild/contrib/openbsm/config/config.h Sun Mar 8 03:10:37 2009 (r189504)
@@ -165,13 +165,13 @@
#define PACKAGE_NAME "OpenBSM"
/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "OpenBSM 1.1alpha4"
+#define PACKAGE_STRING "OpenBSM 1.1beta1"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "openbsm"
/* Define to the version of this package. */
-#define PACKAGE_VERSION "1.1alpha4"
+#define PACKAGE_VERSION "1.1beta1"
/* Define as the return type of signal handlers (`int' or `void'). */
#define RETSIGTYPE void
@@ -192,7 +192,7 @@
#define USE_NATIVE_INCLUDES
/* Version number of package */
-#define VERSION "1.1alpha4"
+#define VERSION "1.1beta1"
/* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */
Modified: projects/jbuild/contrib/openbsm/configure
==============================================================================
--- projects/jbuild/contrib/openbsm/configure Sun Mar 8 00:50:37 2009 (r189503)
+++ projects/jbuild/contrib/openbsm/configure Sun Mar 8 03:10:37 2009 (r189504)
@@ -1,7 +1,7 @@
#! /bin/sh
# From configure.ac P4: //depot/projects/trustedbsd/openbsm/configure.ac#49 .
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61 for OpenBSM 1.1alpha5.
+# Generated by GNU Autoconf 2.61 for OpenBSM 1.1beta1.
#
# Report bugs to <trustedbsd-audit at TrustesdBSD.org>.
#
@@ -729,8 +729,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='OpenBSM'
PACKAGE_TARNAME='openbsm'
-PACKAGE_VERSION='1.1alpha5'
-PACKAGE_STRING='OpenBSM 1.1alpha5'
+PACKAGE_VERSION='1.1beta1'
+PACKAGE_STRING='OpenBSM 1.1beta1'
PACKAGE_BUGREPORT='trustedbsd-audit at TrustesdBSD.org'
ac_unique_file="bin/auditreduce/auditreduce.c"
@@ -1404,7 +1404,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures OpenBSM 1.1alpha5 to adapt to many kinds of systems.
+\`configure' configures OpenBSM 1.1beta1 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1474,7 +1474,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of OpenBSM 1.1alpha5:";;
+ short | recursive ) echo "Configuration of OpenBSM 1.1beta1:";;
esac
cat <<\_ACEOF
@@ -1580,7 +1580,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-OpenBSM configure 1.1alpha5
+OpenBSM configure 1.1beta1
generated by GNU Autoconf 2.61
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1594,7 +1594,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by OpenBSM $as_me 1.1alpha5, which was
+It was created by OpenBSM $as_me 1.1beta1, which was
generated by GNU Autoconf 2.61. Invocation command line was
$ $0 $@
@@ -19076,7 +19076,7 @@ fi
# Define the identity of the package.
PACKAGE=OpenBSM
- VERSION=1.1alpha5
+ VERSION=1.1beta1
cat >>confdefs.h <<_ACEOF
@@ -23584,7 +23584,7 @@ exec 6>&1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by OpenBSM $as_me 1.1alpha5, which was
+This file was extended by OpenBSM $as_me 1.1beta1, which was
generated by GNU Autoconf 2.61. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -23637,7 +23637,7 @@ Report bugs to <bug-autoconf at gnu.org>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-OpenBSM config.status 1.1alpha5
+OpenBSM config.status 1.1beta1
configured by $0, generated by GNU Autoconf 2.61,
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Modified: projects/jbuild/contrib/openbsm/configure.ac
==============================================================================
--- projects/jbuild/contrib/openbsm/configure.ac Sun Mar 8 00:50:37 2009 (r189503)
+++ projects/jbuild/contrib/openbsm/configure.ac Sun Mar 8 03:10:37 2009 (r189504)
@@ -2,8 +2,8 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
-AC_INIT([OpenBSM], [1.1alpha5], [trustedbsd-audit at TrustesdBSD.org],[openbsm])
-AC_REVISION([$P4: //depot/projects/trustedbsd/openbsm/configure.ac#49 $])
+AC_INIT([OpenBSM], [1.1beta1], [trustedbsd-audit at TrustesdBSD.org],[openbsm])
+AC_REVISION([$P4: //depot/projects/trustedbsd/openbsm/configure.ac#50 $])
AC_CONFIG_SRCDIR([bin/auditreduce/auditreduce.c])
AC_CONFIG_AUX_DIR(config)
AC_CONFIG_HEADER([config/config.h])
Modified: projects/jbuild/contrib/openbsm/etc/audit_control
==============================================================================
--- projects/jbuild/contrib/openbsm/etc/audit_control Sun Mar 8 00:50:37 2009 (r189503)
+++ projects/jbuild/contrib/openbsm/etc/audit_control Sun Mar 8 03:10:37 2009 (r189504)
@@ -1,10 +1,10 @@
#
-# $P4: //depot/projects/trustedbsd/openbsm/etc/audit_control#5 $
+# $P4: //depot/projects/trustedbsd/openbsm/etc/audit_control#6 $
# $FreeBSD$
#
dir:/var/audit
flags:lo
-minfree:20
+minfree:5
naflags:lo
-policy:cnt
-filesz:0
+policy:cnt,argv
+filesz:2097152
Modified: projects/jbuild/contrib/openbsm/etc/audit_event
==============================================================================
--- projects/jbuild/contrib/openbsm/etc/audit_event Sun Mar 8 00:50:37 2009 (r189503)
+++ projects/jbuild/contrib/openbsm/etc/audit_event Sun Mar 8 03:10:37 2009 (r189504)
@@ -1,5 +1,5 @@
#
-# $P4: //depot/projects/trustedbsd/openbsm/etc/audit_event#34 $
+# $P4: //depot/projects/trustedbsd/openbsm/etc/audit_event#36 $
# $FreeBSD$
#
# The mapping between event identifiers and values is also hard-coded in
@@ -491,7 +491,7 @@
43128:AUE_MAC_GET_PID:mac_get_pid(2):pc
43129:AUE_MAC_GET_LINK:mac_get_link(2):fa
43130:AUE_MAC_SET_LINK:mac_set_link(2):fm
-43131:AUE_MAC_EXECVE:mac_exeve(2):ex,pc
+43131:AUE_MAC_EXECVE:mac_execve(2):ex,pc
43132:AUE_GETPATH_FROMFD:getpath_fromfd(2):fa
43133:AUE_GETPATH_FROMADDR:getpath_fromaddr(2):fa
43134:AUE_MQ_OPEN:mq_open(2):ip
@@ -552,6 +552,8 @@
43189:AUE_CAP_GETMODE:cap_getmode(2):pc
43190:AUE_POSIX_SPAWN:posix_spawn(2):pc
43191:AUE_FSGETPATH:fsgetpath(2):ot
+43192:AUE_PREAD:pread(2):no
+43193:AUE_PWRITE:pwrite(2):no
#
# Solaris userspace events.
#
Modified: projects/jbuild/contrib/openbsm/libauditd/auditd_lib.c
==============================================================================
--- projects/jbuild/contrib/openbsm/libauditd/auditd_lib.c Sun Mar 8 00:50:37 2009 (r189503)
+++ projects/jbuild/contrib/openbsm/libauditd/auditd_lib.c Sun Mar 8 03:10:37 2009 (r189504)
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2008 Apple Inc.
+ * Copyright (c) 2008-2009 Apple Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -26,7 +26,7 @@
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
- * $P4: //depot/projects/trustedbsd/openbsm/libauditd/auditd_lib.c#2 $
+ * $P4: //depot/projects/trustedbsd/openbsm/libauditd/auditd_lib.c#7 $
*/
#include <sys/param.h>
@@ -52,6 +52,7 @@
#include <bsm/auditd_lib.h>
#include <bsm/libbsm.h>
+#include <dirent.h>
#include <err.h>
#include <errno.h>
#include <fcntl.h>
@@ -77,6 +78,11 @@
#define AUDIT_HARD_LIMIT_FREE_BLOCKS 4
#endif
+/*
+ * Number of seconds to January 1, 2000
+ */
+#define JAN_01_2000 946598400
+
struct dir_ent {
char *dirname;
uint8_t softlim;
@@ -85,7 +91,19 @@ struct dir_ent {
};
static TAILQ_HEAD(, dir_ent) dir_q;
-static int minval = -1;
+
+struct audit_trail {
+ time_t at_time;
+ char *at_path;
+ off_t at_size;
+
+ TAILQ_ENTRY(audit_trail) at_trls;
+};
+
+static int auditd_minval = -1;
+
+static char auditd_host[MAXHOSTNAMELEN];
+static int auditd_hostlen = -1;
static char *auditd_errmsg[] = {
"no error", /* ADE_NOERR ( 0) */
@@ -107,6 +125,7 @@ static char *auditd_errmsg[] = {
"invalid argument", /* ADE_INVAL (16) */
"could not resolve hostname to address", /* ADE_GETADDR (17) */
"address family not supported", /* ADE_ADDRFAM (18) */
+ "error expiring audit trail files", /* ADE_EXPIRE (19) */
};
#define MAXERRCODE (sizeof(auditd_errmsg) / sizeof(auditd_errmsg[0]))
@@ -165,7 +184,13 @@ affixdir(char *name, struct dir_ent *dir
return (NULL);
}
- asprintf(&fn, "%s/%s", dirent->dirname, name);
+ /*
+ * If the host is set then also add the hostname to the filename.
+ */
+ if (auditd_hostlen != -1)
+ asprintf(&fn, "%s/%s.%s", dirent->dirname, name, auditd_host);
+ else
+ asprintf(&fn, "%s/%s", dirent->dirname, name);
return (fn);
}
@@ -204,16 +229,14 @@ insert_orderly(struct dir_ent *denew)
int
auditd_set_host(void)
{
- char hoststr[MAXHOSTNAMELEN];
struct sockaddr_in6 *sin6;
struct sockaddr_in *sin;
struct addrinfo *res;
struct auditinfo_addr aia;
int error, ret = ADE_NOERR;
- if (getachost(hoststr, MAXHOSTNAMELEN) != 0) {
-
- ret = ADE_PARSE;
+ if (getachost(auditd_host, sizeof(auditd_host)) != 0) {
+ ret = ADE_PARSE;
/*
* To maintain reverse compatability with older audit_control
@@ -229,7 +252,8 @@ auditd_set_host(void)
ret = ADE_AUDITON;
return (ret);
}
- error = getaddrinfo(hoststr, NULL, NULL, &res);
+ auditd_hostlen = strlen(auditd_host);
+ error = getaddrinfo(auditd_host, NULL, NULL, &res);
if (error)
return (ADE_GETADDR);
switch (res->ai_family) {
@@ -271,14 +295,14 @@ auditd_set_minfree(void)
{
au_qctrl_t qctrl;
- if (getacmin(&minval) != 0)
+ if (getacmin(&auditd_minval) != 0)
return (ADE_PARSE);
if (auditon(A_GETQCTRL, &qctrl, sizeof(qctrl)) != 0)
return (ADE_AUDITON);
- if (qctrl.aq_minfree != minval) {
- qctrl.aq_minfree = minval;
+ if (qctrl.aq_minfree != auditd_minval) {
+ qctrl.aq_minfree = auditd_minval;
if (auditon(A_SETQCTRL, &qctrl, sizeof(qctrl)) != 0)
return (ADE_AUDITON);
}
@@ -287,9 +311,259 @@ auditd_set_minfree(void)
}
/*
+ * Convert a trailname into a timestamp (seconds). Return 0 if the conversion
+ * was successful.
+ */
+static int
+trailname_to_tstamp(char *fn, time_t *tstamp)
+{
+ struct tm tm;
+ char ts[TIMESTAMP_LEN];
+ char *p;
+
+ *tstamp = 0;
+
+ /*
+ * Get the ending time stamp.
+ */
+ if ((p = strchr(fn, '.')) == NULL)
+ return (1);
+ strlcpy(ts, ++p, TIMESTAMP_LEN);
+ if (strlen(ts) != POSTFIX_LEN)
+ return (1);
+
+ bzero(&tm, sizeof(tm));
+
+ /* seconds (0-60) */
+ p = ts + POSTFIX_LEN - 2;
+ tm.tm_sec = atol(p);
+ if (tm.tm_sec < 0 || tm.tm_sec > 60)
+ return (1);
+
+ /* minutes (0-59) */
+ *p = '\0'; p -= 2;
+ tm.tm_min = atol(p);
+ if (tm.tm_min < 0 || tm.tm_min > 59)
+ return (1);
+
+ /* hours (0 - 23) */
+ *p = '\0'; p -= 2;
+ tm.tm_hour = atol(p);
+ if (tm.tm_hour < 0 || tm.tm_hour > 23)
+ return (1);
+
+ /* day of month (1-31) */
+ *p = '\0'; p -= 2;
+ tm.tm_mday = atol(p);
+ if (tm.tm_mday < 1 || tm.tm_mday > 31)
+ return (1);
+
+ /* month (0 - 11) */
+ *p = '\0'; p -= 2;
+ tm.tm_mon = atol(p) - 1;
+ if (tm.tm_mon < 0 || tm.tm_mon > 11)
+ return (1);
+
+ /* year (year - 1900) */
+ *p = '\0'; p -= 4;
+ tm.tm_year = atol(p) - 1900;
+ if (tm.tm_year < 0)
+ return (1);
+
+ *tstamp = timegm(&tm);
+
+ return (0);
+}
+
+/*
+ * Remove audit trails files according to the expiration conditions. Returns:
+ * ADE_NOERR on success or there is nothing to do.
+ * ADE_PARSE if error parsing audit_control(5).
+ * ADE_NOMEM if could not allocate memory.
+ * ADE_EXPIRE if there was an unespected error.
+ */
+int
+auditd_expire_trails(int (*warn_expired)(char *))
+{
+ int andflg, ret = ADE_NOERR;
+ size_t expire_size, total_size = 0L;
+ time_t expire_age, oldest_time, current_time = time(NULL);
+ struct dir_ent *traildir;
+ struct audit_trail *at;
+ char *afnp, *pn;
+ TAILQ_HEAD(au_trls_head, audit_trail) head =
+ TAILQ_HEAD_INITIALIZER(head);
+ struct stat stbuf;
+ char activefn[MAXPATHLEN];
+
+ /*
+ * Read the expiration conditions. If no conditions then return no
+ * error.
+ */
+ if (getacexpire(&andflg, &expire_age, &expire_size) < 0)
+ return (ADE_PARSE);
+ if (!expire_age && !expire_size)
+ return (ADE_NOERR);
+
+ /*
+ * Read the 'current' trail file name. Trim off directory path.
+ */
+ activefn[0] = '\0';
+ readlink(AUDIT_CURRENT_LINK, activefn, MAXPATHLEN - 1);
+ if ((afnp = strrchr(activefn, '/')) != NULL)
+ afnp++;
+
+
+ /*
+ * Build tail queue of the trail files.
+ */
+ TAILQ_FOREACH(traildir, &dir_q, dirs) {
+ DIR *dirp;
+ struct dirent *dp;
+
+ dirp = opendir(traildir->dirname);
+ while ((dp = readdir(dirp)) != NULL) {
+ time_t tstamp = 0;
+ struct audit_trail *new;
+
+ /*
+ * Quickly filter non-trail files.
+ */
+ if (dp->d_namlen != (FILENAME_LEN - 1) ||
+#ifdef DT_REG
+ dp->d_type != DT_REG ||
+#endif
+ dp->d_name[POSTFIX_LEN] != '.')
+ continue;
+
+ if (asprintf(&pn, "%s/%s", traildir->dirname,
+ dp->d_name) < 0) {
+ ret = ADE_NOMEM;
+ break;
+ }
+
+ if (stat(pn, &stbuf) < 0 || !S_ISREG(stbuf.st_mode)) {
+ free(pn);
+ continue;
+ }
+
+ total_size += stbuf.st_size;
+
+ /*
+ * If this is the 'current' audit trail then
+ * don't add it to the tail queue.
+ */
+ if (NULL != afnp &&
+ strncmp(dp->d_name, afnp, FILENAME_LEN) == 0) {
+ free(pn);
+ continue;
+ }
+
+ /*
+ * Get the ending time stamp encoded in the trail
+ * name. If we can't read it or if it is older
+ * than Jan 1, 2000 then use the mtime.
+ */
+ if (trailname_to_tstamp(dp->d_name, &tstamp) != 0 ||
+ tstamp < JAN_01_2000)
+ tstamp = stbuf.st_mtime;
+
+ /*
+ * If the time stamp is older than Jan 1, 2000 then
+ * update the mtime of the trail file to the current
+ * time. This is so we don't prematurely remove a trail
+ * file that was created while the system clock reset
+ * to the * "beginning of time" but later the system
+ * clock is set to the correct current time.
+ */
+ if (current_time >= JAN_01_2000 &&
+ tstamp < JAN_01_2000) {
+ struct timeval tv[2];
+
+ tstamp = stbuf.st_mtime = current_time;
+ TIMESPEC_TO_TIMEVAL(&tv[0],
+ &stbuf.st_atimespec);
+ TIMESPEC_TO_TIMEVAL(&tv[1],
+ &stbuf.st_mtimespec);
+ utimes(pn, tv);
+ }
+
+ /*
+ * Allocate and populate the new entry.
+ */
+ new = malloc(sizeof(*new));
+ if (NULL == new) {
+ free(pn);
+ ret = ADE_NOMEM;
+ break;
+ }
+ new->at_time = tstamp;
+ new->at_size = stbuf.st_size;
+ new->at_path = pn;
+
+ /*
+ * Check to see if we have a new head. Otherwise,
+ * walk the tailq from the tail first and do a simple
+ * insertion sort.
+ */
+ if (TAILQ_EMPTY(&head) ||
+ (new->at_time <= TAILQ_FIRST(&head)->at_time)) {
+ TAILQ_INSERT_HEAD(&head, new, at_trls);
+ continue;
+ }
+
+ TAILQ_FOREACH_REVERSE(at, &head, au_trls_head, at_trls)
+ if (new->at_time >= at->at_time) {
+ TAILQ_INSERT_AFTER(&head, at, new,
+ at_trls);
+ break;
+ }
+
+ }
+ }
+
+ oldest_time = current_time - expire_age;
+
+ /*
+ * Expire trail files, oldest (mtime) first, if the given
+ * conditions are met.
+ */
+ at = TAILQ_FIRST(&head);
+ while (NULL != at) {
+ struct audit_trail *at_next = TAILQ_NEXT(at, at_trls);
+
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-src-projects
mailing list