From owner-svn-src-user@FreeBSD.ORG Thu Mar 7 23:43:09 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 42B1371C; Thu, 7 Mar 2013 23:43:09 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 25EF0AFC; Thu, 7 Mar 2013 23:43:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r27Nh9OE058087; Thu, 7 Mar 2013 23:43:09 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r27Nh4ra058057; Thu, 7 Mar 2013 23:43:04 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201303072343.r27Nh4ra058057@svn.freebsd.org> From: Attilio Rao Date: Thu, 7 Mar 2013 23:43:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r247973 - in user/attilio/vmcontention: . cddl/contrib/opensolaris/cmd/zdb cddl/contrib/opensolaris/tools/ctf/cvt contrib/openpam/doc/man contrib/openpam/lib crypto/openssh etc lib/libc... X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Mar 2013 23:43:09 -0000 Author: attilio Date: Thu Mar 7 23:43:03 2013 New Revision: 247973 URL: http://svnweb.freebsd.org/changeset/base/247973 Log: MFC Added: user/attilio/vmcontention/lib/libyaml/libbsdyml.3 - copied unchanged from r247970, head/lib/libyaml/libbsdyml.3 user/attilio/vmcontention/sys/dev/drm2/drm_global.c - copied unchanged from r247970, head/sys/dev/drm2/drm_global.c user/attilio/vmcontention/sys/dev/drm2/drm_global.h - copied unchanged from r247970, head/sys/dev/drm2/drm_global.h user/attilio/vmcontention/sys/dev/drm2/ttm/ - copied from r247970, head/sys/dev/drm2/ttm/ user/attilio/vmcontention/usr.sbin/pkg/config.c - copied unchanged from r247970, head/usr.sbin/pkg/config.c user/attilio/vmcontention/usr.sbin/pkg/config.h - copied unchanged from r247970, head/usr.sbin/pkg/config.h Deleted: user/attilio/vmcontention/sbin/mount_ext2fs/ user/attilio/vmcontention/sbin/mount_reiserfs/ user/attilio/vmcontention/sbin/mount_std/ Modified: user/attilio/vmcontention/UPDATING user/attilio/vmcontention/cddl/contrib/opensolaris/cmd/zdb/zdb.c user/attilio/vmcontention/cddl/contrib/opensolaris/tools/ctf/cvt/output.c user/attilio/vmcontention/contrib/openpam/doc/man/openpam_straddch.3 user/attilio/vmcontention/contrib/openpam/lib/openpam_readline.c user/attilio/vmcontention/contrib/openpam/lib/openpam_readword.c user/attilio/vmcontention/crypto/openssh/FREEBSD-upgrade user/attilio/vmcontention/crypto/openssh/config.h user/attilio/vmcontention/etc/portsnap.conf user/attilio/vmcontention/lib/libc/string/Makefile.inc user/attilio/vmcontention/lib/libstand/Makefile user/attilio/vmcontention/lib/libutil/gr_util.c user/attilio/vmcontention/lib/libutil/libutil.h user/attilio/vmcontention/lib/libyaml/Makefile user/attilio/vmcontention/sbin/ipfw/ipfw2.c user/attilio/vmcontention/sbin/mount_cd9660/mount_cd9660.8 user/attilio/vmcontention/sbin/mount_cd9660/mount_cd9660.c user/attilio/vmcontention/sbin/mount_msdosfs/mount_msdosfs.c user/attilio/vmcontention/sbin/mount_nfs/mount_nfs.c user/attilio/vmcontention/sbin/mount_nullfs/mount_nullfs.c user/attilio/vmcontention/sbin/mount_udf/Makefile user/attilio/vmcontention/sbin/mount_udf/mount_udf.c user/attilio/vmcontention/sbin/mount_unionfs/mount_unionfs.c user/attilio/vmcontention/share/man/man4/eventtimers.4 user/attilio/vmcontention/share/man/man4/zyd.4 user/attilio/vmcontention/share/man/man7/development.7 user/attilio/vmcontention/share/man/man7/ports.7 user/attilio/vmcontention/share/man/man9/Makefile user/attilio/vmcontention/share/man/man9/condvar.9 user/attilio/vmcontention/share/man/man9/sleep.9 user/attilio/vmcontention/share/man/man9/sleepqueue.9 user/attilio/vmcontention/share/man/man9/timeout.9 user/attilio/vmcontention/sys/amd64/conf/GENERIC user/attilio/vmcontention/sys/amd64/conf/NOTES user/attilio/vmcontention/sys/arm/arm/swtch.S user/attilio/vmcontention/sys/arm/arm/vm_machdep.c user/attilio/vmcontention/sys/arm/broadcom/bcm2835/bcm2835_dma.c user/attilio/vmcontention/sys/arm/include/frame.h user/attilio/vmcontention/sys/cam/ctl/ctl.c user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bpobj.c user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c user/attilio/vmcontention/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c user/attilio/vmcontention/sys/conf/files.amd64 user/attilio/vmcontention/sys/conf/files.i386 user/attilio/vmcontention/sys/conf/options user/attilio/vmcontention/sys/contrib/altq/altq/altq_hfsc.c user/attilio/vmcontention/sys/contrib/altq/altq/altq_hfsc.h user/attilio/vmcontention/sys/dev/drm2/drmP.h user/attilio/vmcontention/sys/dev/drm2/drm_drv.c user/attilio/vmcontention/sys/dev/drm2/drm_gem.c user/attilio/vmcontention/sys/dev/drm2/drm_mm.c user/attilio/vmcontention/sys/dev/drm2/drm_mm.h user/attilio/vmcontention/sys/dev/hwpmc/hwpmc_soft.c user/attilio/vmcontention/sys/dev/ixgbe/LICENSE user/attilio/vmcontention/sys/dev/ixgbe/ixgbe.c user/attilio/vmcontention/sys/dev/ixgbe/ixgbe_82598.c user/attilio/vmcontention/sys/dev/ixgbe/ixgbe_82599.c user/attilio/vmcontention/sys/dev/ixgbe/ixgbe_82599.h user/attilio/vmcontention/sys/dev/ixgbe/ixgbe_api.c user/attilio/vmcontention/sys/dev/ixgbe/ixgbe_api.h user/attilio/vmcontention/sys/dev/ixgbe/ixgbe_common.c user/attilio/vmcontention/sys/dev/ixgbe/ixgbe_common.h user/attilio/vmcontention/sys/dev/ixgbe/ixgbe_mbx.h user/attilio/vmcontention/sys/dev/ixgbe/ixgbe_osdep.h user/attilio/vmcontention/sys/dev/ixgbe/ixgbe_phy.c user/attilio/vmcontention/sys/dev/ixgbe/ixgbe_phy.h user/attilio/vmcontention/sys/dev/ixgbe/ixgbe_type.h user/attilio/vmcontention/sys/dev/ixgbe/ixgbe_vf.c user/attilio/vmcontention/sys/dev/ixgbe/ixgbe_vf.h user/attilio/vmcontention/sys/dev/ixgbe/ixgbe_x540.c user/attilio/vmcontention/sys/dev/ixgbe/ixgbe_x540.h user/attilio/vmcontention/sys/dev/ixgbe/ixv.c user/attilio/vmcontention/sys/dev/nvme/nvme.c user/attilio/vmcontention/sys/dev/nvme/nvme_ctrlr.c user/attilio/vmcontention/sys/dev/oce/oce_hw.c user/attilio/vmcontention/sys/dev/oce/oce_hw.h user/attilio/vmcontention/sys/dev/oce/oce_if.c user/attilio/vmcontention/sys/dev/oce/oce_if.h user/attilio/vmcontention/sys/dev/oce/oce_mbox.c user/attilio/vmcontention/sys/dev/oce/oce_queue.c user/attilio/vmcontention/sys/dev/oce/oce_sysctl.c user/attilio/vmcontention/sys/dev/oce/oce_util.c user/attilio/vmcontention/sys/dev/random/randomdev_soft.c user/attilio/vmcontention/sys/dev/sound/pci/hda/hdaa_patches.c user/attilio/vmcontention/sys/dev/sound/pci/hda/hdac.h user/attilio/vmcontention/sys/dev/sound/pci/hda/hdacc.c user/attilio/vmcontention/sys/dev/syscons/syscons.c user/attilio/vmcontention/sys/dev/syscons/syscons.h user/attilio/vmcontention/sys/dev/virtio/block/virtio_blk.c user/attilio/vmcontention/sys/geom/label/g_label_ntfs.c user/attilio/vmcontention/sys/geom/part/g_part.c user/attilio/vmcontention/sys/geom/part/g_part.h user/attilio/vmcontention/sys/geom/part/g_part_mbr.c user/attilio/vmcontention/sys/geom/raid/md_ddf.c user/attilio/vmcontention/sys/i386/conf/GENERIC user/attilio/vmcontention/sys/i386/conf/NOTES user/attilio/vmcontention/sys/kern/kern_clock.c user/attilio/vmcontention/sys/kern/kern_event.c user/attilio/vmcontention/sys/kern/kern_resource.c user/attilio/vmcontention/sys/kern/kern_time.c user/attilio/vmcontention/sys/kern/kern_timeout.c user/attilio/vmcontention/sys/kern/subr_log.c user/attilio/vmcontention/sys/kern/sys_generic.c user/attilio/vmcontention/sys/modules/drm2/drm2/Makefile user/attilio/vmcontention/sys/modules/uart/Makefile user/attilio/vmcontention/sys/net/route.c user/attilio/vmcontention/sys/netinet/siftr.c user/attilio/vmcontention/sys/sparc64/pci/psycho.c user/attilio/vmcontention/sys/sys/diskmbr.h user/attilio/vmcontention/sys/sys/param.h user/attilio/vmcontention/sys/sys/pmckern.h user/attilio/vmcontention/tools/tools/cxgbetool/cxgbetool.c user/attilio/vmcontention/usr.bin/c89/c89.c user/attilio/vmcontention/usr.bin/c99/c99.c user/attilio/vmcontention/usr.sbin/bhyve/acpi.c user/attilio/vmcontention/usr.sbin/bhyve/pci_virtio_block.c user/attilio/vmcontention/usr.sbin/bhyve/pci_virtio_net.c user/attilio/vmcontention/usr.sbin/pkg/Makefile user/attilio/vmcontention/usr.sbin/pkg/pkg.c user/attilio/vmcontention/usr.sbin/rtadvd/rtadvd.c Directory Properties: user/attilio/vmcontention/ (props changed) user/attilio/vmcontention/cddl/contrib/opensolaris/ (props changed) user/attilio/vmcontention/contrib/openpam/ (props changed) user/attilio/vmcontention/crypto/openssh/ (props changed) user/attilio/vmcontention/lib/libc/ (props changed) user/attilio/vmcontention/lib/libutil/ (props changed) user/attilio/vmcontention/sbin/ (props changed) user/attilio/vmcontention/sbin/ipfw/ (props changed) user/attilio/vmcontention/share/man/man4/ (props changed) user/attilio/vmcontention/sys/ (props changed) user/attilio/vmcontention/sys/cddl/contrib/opensolaris/ (props changed) user/attilio/vmcontention/sys/conf/ (props changed) user/attilio/vmcontention/usr.sbin/bhyve/ (props changed) user/attilio/vmcontention/usr.sbin/rtadvd/ (props changed) Modified: user/attilio/vmcontention/UPDATING ============================================================================== --- user/attilio/vmcontention/UPDATING Thu Mar 7 23:41:57 2013 (r247972) +++ user/attilio/vmcontention/UPDATING Thu Mar 7 23:43:03 2013 (r247973) @@ -26,6 +26,19 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20130304: + Recent commits to callout(9) changed the size of struct callout, + so the KBI is probably heavily disturbed. Also, some functions + in callout(9)/sleep(9)/sleepqueue(9)/condvar(9) KPIs were replaced + by macros. Every kernel module using it won't load, so rebuild + is requested. + + The ctl device has been re-enabled in GENERIC for i386 and amd64, + but does not initialize by default (because of the new CTL_DISABLE + option) to save memory. To re-enable it, remove the CTL_DISABLE + option from the kernel config file or set kern.cam.ctl.disable=0 + in /boot/loader.conf. + 20130301: The ctl device has been disabled in GENERIC for i386 and amd64. This was done due to the extra memory being allocated at system Modified: user/attilio/vmcontention/cddl/contrib/opensolaris/cmd/zdb/zdb.c ============================================================================== --- user/attilio/vmcontention/cddl/contrib/opensolaris/cmd/zdb/zdb.c Thu Mar 7 23:41:57 2013 (r247972) +++ user/attilio/vmcontention/cddl/contrib/opensolaris/cmd/zdb/zdb.c Thu Mar 7 23:43:03 2013 (r247973) @@ -1189,7 +1189,7 @@ dump_bpobj_cb(void *arg, const blkptr_t } static void -dump_bpobj(bpobj_t *bpo, char *name) +dump_bpobj(bpobj_t *bpo, char *name, int indent) { char bytes[32]; char comp[32]; @@ -1199,31 +1199,56 @@ dump_bpobj(bpobj_t *bpo, char *name) return; zdb_nicenum(bpo->bpo_phys->bpo_bytes, bytes); - if (bpo->bpo_havesubobj) { + if (bpo->bpo_havesubobj && bpo->bpo_phys->bpo_subobjs != 0) { zdb_nicenum(bpo->bpo_phys->bpo_comp, comp); zdb_nicenum(bpo->bpo_phys->bpo_uncomp, uncomp); - (void) printf("\n %s: %llu local blkptrs, %llu subobjs, " - "%s (%s/%s comp)\n", - name, (u_longlong_t)bpo->bpo_phys->bpo_num_blkptrs, + (void) printf(" %*s: object %llu, %llu local blkptrs, " + "%llu subobjs, %s (%s/%s comp)\n", + indent * 8, name, + (u_longlong_t)bpo->bpo_object, + (u_longlong_t)bpo->bpo_phys->bpo_num_blkptrs, (u_longlong_t)bpo->bpo_phys->bpo_num_subobjs, bytes, comp, uncomp); + + for (uint64_t i = 0; i < bpo->bpo_phys->bpo_num_subobjs; i++) { + uint64_t subobj; + bpobj_t subbpo; + int error; + VERIFY0(dmu_read(bpo->bpo_os, + bpo->bpo_phys->bpo_subobjs, + i * sizeof (subobj), sizeof (subobj), &subobj, 0)); + error = bpobj_open(&subbpo, bpo->bpo_os, subobj); + if (error != 0) { + (void) printf("ERROR %u while trying to open " + "subobj id %llu\n", + error, (u_longlong_t)subobj); + continue; + } + dump_bpobj(&subbpo, "subobj", indent + 1); + } } else { - (void) printf("\n %s: %llu blkptrs, %s\n", - name, (u_longlong_t)bpo->bpo_phys->bpo_num_blkptrs, bytes); + (void) printf(" %*s: object %llu, %llu blkptrs, %s\n", + indent * 8, name, + (u_longlong_t)bpo->bpo_object, + (u_longlong_t)bpo->bpo_phys->bpo_num_blkptrs, + bytes); } if (dump_opt['d'] < 5) return; - (void) printf("\n"); - (void) bpobj_iterate_nofree(bpo, dump_bpobj_cb, NULL, NULL); + if (indent == 0) { + (void) bpobj_iterate_nofree(bpo, dump_bpobj_cb, NULL, NULL); + (void) printf("\n"); + } } static void dump_deadlist(dsl_deadlist_t *dl) { dsl_deadlist_entry_t *dle; + uint64_t unused; char bytes[32]; char comp[32]; char uncomp[32]; @@ -1242,14 +1267,24 @@ dump_deadlist(dsl_deadlist_t *dl) (void) printf("\n"); + /* force the tree to be loaded */ + dsl_deadlist_space_range(dl, 0, UINT64_MAX, &unused, &unused, &unused); + for (dle = avl_first(&dl->dl_tree); dle; dle = AVL_NEXT(&dl->dl_tree, dle)) { - (void) printf(" mintxg %llu -> obj %llu\n", - (longlong_t)dle->dle_mintxg, - (longlong_t)dle->dle_bpobj.bpo_object); + if (dump_opt['d'] >= 5) { + char buf[128]; + (void) snprintf(buf, sizeof (buf), "mintxg %llu -> ", + (longlong_t)dle->dle_mintxg, + (longlong_t)dle->dle_bpobj.bpo_object); - if (dump_opt['d'] >= 5) - dump_bpobj(&dle->dle_bpobj, ""); + dump_bpobj(&dle->dle_bpobj, buf, 0); + } else { + (void) printf("mintxg %llu -> obj %llu\n", + (longlong_t)dle->dle_mintxg, + (longlong_t)dle->dle_bpobj.bpo_object); + + } } } @@ -1272,7 +1307,7 @@ fuid_table_destroy() * print uid or gid information. * For normal POSIX id just the id is printed in decimal format. * For CIFS files with FUID the fuid is printed in hex followed by - * the doman-rid string. + * the domain-rid string. */ static void print_idstr(uint64_t id, const char *id_type) @@ -2529,10 +2564,11 @@ dump_zpool(spa_t *spa) if (dump_opt['d'] || dump_opt['i']) { dump_dir(dp->dp_meta_objset); if (dump_opt['d'] >= 3) { - dump_bpobj(&spa->spa_deferred_bpobj, "Deferred frees"); + dump_bpobj(&spa->spa_deferred_bpobj, + "Deferred frees", 0); if (spa_version(spa) >= SPA_VERSION_DEADLISTS) { dump_bpobj(&spa->spa_dsl_pool->dp_free_bpobj, - "Pool snapshot frees"); + "Pool snapshot frees", 0); } if (spa_feature_is_active(spa, Modified: user/attilio/vmcontention/cddl/contrib/opensolaris/tools/ctf/cvt/output.c ============================================================================== --- user/attilio/vmcontention/cddl/contrib/opensolaris/tools/ctf/cvt/output.c Thu Mar 7 23:41:57 2013 (r247972) +++ user/attilio/vmcontention/cddl/contrib/opensolaris/tools/ctf/cvt/output.c Thu Mar 7 23:43:03 2013 (r247973) @@ -363,6 +363,7 @@ sort_iidescs(Elf *elf, const char *file, for (i = 0; i < nent; i++) { GElf_Sym sym; + char *bname; iidesc_t **tolist; GElf_Sym ssym; iidesc_match_t smatch; @@ -377,7 +378,8 @@ sort_iidescs(Elf *elf, const char *file, switch (GELF_ST_TYPE(sym.st_info)) { case STT_FILE: - match.iim_file = match.iim_name; + bname = strrchr(match.iim_name, '/'); + match.iim_file = bname == NULL ? match.iim_name : bname + 1; continue; case STT_OBJECT: tolist = iiburst->iib_objts; Modified: user/attilio/vmcontention/contrib/openpam/doc/man/openpam_straddch.3 ============================================================================== --- user/attilio/vmcontention/contrib/openpam/doc/man/openpam_straddch.3 Thu Mar 7 23:41:57 2013 (r247972) +++ user/attilio/vmcontention/contrib/openpam/doc/man/openpam_straddch.3 Thu Mar 7 23:43:03 2013 (r247973) @@ -34,7 +34,7 @@ .\" .\" $Id$ .\" -.Dd May 26, 2012 +.Dd March 3, 2013 .Dt OPENPAM_STRADDCH 3 .Os .Sh NAME @@ -73,6 +73,21 @@ and argument point to variables used to hold the size of the buffer and the length of the string it contains, respectively. .Pp +The final argument, +.Fa ch , +is the character that should be appended to +the string. If +.Fa ch +is 0, nothing is appended, but a new buffer is +still allocated if +.Fa str +is NULL. This can be used to +.Do +bootstrap +.Dc +the +string. +.Pp If a new buffer is allocated or an existing buffer is reallocated to make room for the additional character, .Fa str @@ -91,7 +106,9 @@ If the function is successful, it increments the integer variable pointed to by .Fa len -and returns 0. +(unless +.Fa ch +was 0) and returns 0. Otherwise, it leaves the variables pointed to by .Fa str , .Fa size Modified: user/attilio/vmcontention/contrib/openpam/lib/openpam_readline.c ============================================================================== --- user/attilio/vmcontention/contrib/openpam/lib/openpam_readline.c Thu Mar 7 23:41:57 2013 (r247972) +++ user/attilio/vmcontention/contrib/openpam/lib/openpam_readline.c Thu Mar 7 23:43:03 2013 (r247973) @@ -62,11 +62,9 @@ openpam_readline(FILE *f, int *lineno, s size_t len, size; int ch; - if ((line = malloc(size = MIN_LINE_LENGTH)) == NULL) { - openpam_log(PAM_LOG_ERROR, "malloc(): %m"); + line = NULL; + if (openpam_straddch(&line, &size, &len, 0) != 0) return (NULL); - } - len = 0; for (;;) { ch = fgetc(f); /* strip comment */ Modified: user/attilio/vmcontention/contrib/openpam/lib/openpam_readword.c ============================================================================== --- user/attilio/vmcontention/contrib/openpam/lib/openpam_readword.c Thu Mar 7 23:41:57 2013 (r247972) +++ user/attilio/vmcontention/contrib/openpam/lib/openpam_readword.c Thu Mar 7 23:43:03 2013 (r247973) @@ -86,13 +86,8 @@ openpam_readword(FILE *f, int *lineno, s /* begin quote */ quote = ch; /* edge case: empty quoted string */ - if (word == NULL && (word = malloc(1)) == NULL) { - openpam_log(PAM_LOG_ERROR, "malloc(): %m"); - errno = ENOMEM; + if (openpam_straddch(&word, &size, &len, 0) != 0) return (NULL); - } - *word = '\0'; - size = 1; } else if (ch == quote && !escape) { /* end quote */ quote = 0; Modified: user/attilio/vmcontention/crypto/openssh/FREEBSD-upgrade ============================================================================== --- user/attilio/vmcontention/crypto/openssh/FREEBSD-upgrade Thu Mar 7 23:41:57 2013 (r247972) +++ user/attilio/vmcontention/crypto/openssh/FREEBSD-upgrade Thu Mar 7 23:43:03 2013 (r247973) @@ -43,6 +43,7 @@ 7) Run configure with the appropriate arguments: $ ./configure --prefix=/usr --sysconfdir=/etc/ssh \ + --disable-lastlog --disable-utmp --disable-wtmp \ --with-pam --with-tcp-wrappers --with-libedit \ --with-ssl-engine Modified: user/attilio/vmcontention/crypto/openssh/config.h ============================================================================== --- user/attilio/vmcontention/crypto/openssh/config.h Thu Mar 7 23:41:57 2013 (r247972) +++ user/attilio/vmcontention/crypto/openssh/config.h Thu Mar 7 23:43:03 2013 (r247973) @@ -17,6 +17,9 @@ /* Define if your resolver libs need this for getrrsetbyname */ /* #undef BIND_8_COMPAT */ +/* The system has incomplete BSM API */ +/* #undef BROKEN_BSM_API */ + /* Define if cmsg_type is not passed correctly */ /* #undef BROKEN_CMSG_TYPE */ @@ -97,7 +100,7 @@ /* #undef DISABLE_FD_PASSING */ /* Define if you don't want to use lastlog */ -/* #undef DISABLE_LASTLOG */ +#define DISABLE_LASTLOG 1 /* Define if you don't want to use your system's login() call */ /* #undef DISABLE_LOGIN */ @@ -307,7 +310,7 @@ #define HAVE_DECL__GETSHORT 0 /* Define if you have /dev/ptmx */ -#define HAVE_DEV_PTMX 1 +/* #undef HAVE_DEV_PTMX */ /* Define if you have /dev/ptc */ /* #undef HAVE_DEV_PTS_AND_PTC */ @@ -316,7 +319,7 @@ #define HAVE_DIRENT_H 1 /* Define to 1 if you have the `dirfd' function. */ -/* #undef HAVE_DIRFD */ +#define HAVE_DIRFD 1 /* Define to 1 if you have the `dirname' function. */ #define HAVE_DIRNAME 1 @@ -501,6 +504,9 @@ /* Define if HEADER.ad exists in arpa/nameser.h */ #define HAVE_HEADER_AD 1 +/* Define to 1 if you have the `HMAC_CTX_init' function. */ +#define HAVE_HMAC_CTX_INIT 1 + /* Define if you have ut_host in utmp.h */ /* #undef HAVE_HOST_IN_UTMP */ @@ -552,6 +558,9 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_LASTLOG_H */ +/* Define if you want ldns support */ +/* #undef HAVE_LDNS */ + /* Define to 1 if you have the header file. */ /* #undef HAVE_LIBAUDIT_H */ @@ -594,10 +603,19 @@ /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_LINUX_AUDIT_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_LINUX_FILTER_H */ + /* Define to 1 if you have the header file. */ /* #undef HAVE_LINUX_IF_TUN_H */ -/* Define if your libraries define login() */ +/* Define to 1 if you have the header file. */ +/* #undef HAVE_LINUX_SECCOMP_H */ + +/* Define to 1 if you have the `login' function. */ /* #undef HAVE_LOGIN */ /* Define to 1 if you have the header file. */ @@ -805,6 +823,9 @@ /* Define to 1 if you have the `setgroups' function. */ #define HAVE_SETGROUPS 1 +/* Define to 1 if you have the `setlinebuf' function. */ +#define HAVE_SETLINEBUF 1 + /* Define to 1 if you have the `setlogin' function. */ #define HAVE_SETLOGIN 1 @@ -931,6 +952,9 @@ /* Define to 1 if you have the `strmode' function. */ #define HAVE_STRMODE 1 +/* Define to 1 if you have the `strnlen' function. */ +#define HAVE_STRNLEN 1 + /* Define to 1 if you have the `strnvis' function. */ /* #undef HAVE_STRNVIS */ @@ -1172,7 +1196,7 @@ /* #undef HAVE_VHANGUP */ /* Define to 1 if you have the header file. */ -#define HAVE_VIS_H 1 +/* #undef HAVE_VIS_H */ /* Define to 1 if you have the `vsnprintf' function. */ #define HAVE_VSNPRINTF 1 @@ -1351,15 +1375,21 @@ /* Sandbox using setrlimit(2) */ #define SANDBOX_RLIMIT 1 +/* Sandbox using seccomp filter */ +/* #undef SANDBOX_SECCOMP_FILTER */ + +/* setrlimit RLIMIT_FSIZE works */ +/* #undef SANDBOX_SKIP_RLIMIT_FSIZE */ + /* Sandbox using systrace(4) */ /* #undef SANDBOX_SYSTRACE */ +/* Specify the system call convention in use */ +/* #undef SECCOMP_AUDIT_ARCH */ + /* Define if your platform breaks doing a seteuid before a setuid */ /* #undef SETEUID_BREAKS_SETUID */ -/* The size of `char', as computed by sizeof. */ -#define SIZEOF_CHAR 1 - /* The size of `int', as computed by sizeof. */ #define SIZEOF_INT 4 @@ -1500,6 +1530,11 @@ /* Define if xauth is found in your path */ /* #undef XAUTH_PATH */ +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ Modified: user/attilio/vmcontention/etc/portsnap.conf ============================================================================== --- user/attilio/vmcontention/etc/portsnap.conf Thu Mar 7 23:41:57 2013 (r247972) +++ user/attilio/vmcontention/etc/portsnap.conf Thu Mar 7 23:43:03 2013 (r247973) @@ -30,6 +30,5 @@ KEYPRINT=9b5feee6d69f170e3dd0a2c8e469ddb # REFUSE korean polish portuguese russian ukrainian vietnamese # List of INDEX files to build and the DESCRIBE file to use for each -INDEX INDEX-7 DESCRIBE.7 INDEX INDEX-8 DESCRIBE.8 INDEX INDEX-9 DESCRIBE.9 Modified: user/attilio/vmcontention/lib/libc/string/Makefile.inc ============================================================================== --- user/attilio/vmcontention/lib/libc/string/Makefile.inc Thu Mar 7 23:41:57 2013 (r247972) +++ user/attilio/vmcontention/lib/libc/string/Makefile.inc Thu Mar 7 23:43:03 2013 (r247973) @@ -46,7 +46,8 @@ MLINKS+=strcasecmp.3 strncasecmp.3 \ strcasecmp.3 strcasecmp_l.3 \ strcasecmp.3 strncasecmp_l.3 MLINKS+=strcat.3 strncat.3 -MLINKS+=strchr.3 strrchr.3 +MLINKS+=strchr.3 strrchr.3 \ + strchr.3 strchrnul.3 MLINKS+=strcmp.3 strncmp.3 MLINKS+=strcoll.3 strcoll_l.3 MLINKS+=strcpy.3 stpcpy.3 \ Modified: user/attilio/vmcontention/lib/libstand/Makefile ============================================================================== --- user/attilio/vmcontention/lib/libstand/Makefile Thu Mar 7 23:41:57 2013 (r247972) +++ user/attilio/vmcontention/lib/libstand/Makefile Thu Mar 7 23:43:03 2013 (r247973) @@ -67,6 +67,9 @@ SRCS+= divsi3.S .else # Compiler support functions .PATH: ${.CURDIR}/../../contrib/compiler-rt/lib/ +# __clzsi2 and ctzsi2 for various builtin functions +SRCS+= clzsi2.c ctzsi2.c +# Divide and modulus functions called by the compiler SRCS+= divmoddi4.c divmodsi4.c divdi3.c divsi3.c moddi3.c modsi3.c SRCS+= udivmoddi4.c udivmodsi4.c udivdi3.c udivsi3.c umoddi3.c umodsi3.c Modified: user/attilio/vmcontention/lib/libutil/gr_util.c ============================================================================== --- user/attilio/vmcontention/lib/libutil/gr_util.c Thu Mar 7 23:41:57 2013 (r247972) +++ user/attilio/vmcontention/lib/libutil/gr_util.c Thu Mar 7 23:43:03 2013 (r247973) @@ -49,6 +49,8 @@ static char group_dir[PATH_MAX]; static char group_file[PATH_MAX]; static char tempname[PATH_MAX]; static int initialized; +static size_t grmemlen(const struct group *, const char *, int *); +static struct group *grcopy(const struct group *gr, struct group *newgr, const char *, int ndx); /* * Initialize statics @@ -429,90 +431,121 @@ gr_make(const struct group *gr) struct group * gr_dup(const struct group *gr) { + return (gr_add(gr, NULL)); +} +/* + * Add a new member name to a struct group. + */ +struct group * +gr_add(const struct group *gr, const char *newmember) +{ struct group *newgr; - char *dst; size_t len; - int ndx; int num_mem; - /* Calculate size of the group. */ - len = sizeof(*newgr); - if (gr->gr_name != NULL) - len += strlen(gr->gr_name) + 1; - if (gr->gr_passwd != NULL) - len += strlen(gr->gr_passwd) + 1; - if (gr->gr_mem != NULL) { - for (num_mem = 0; gr->gr_mem[num_mem] != NULL; num_mem++) - len += strlen(gr->gr_mem[num_mem]) + 1; - len += (num_mem + 1) * sizeof(*gr->gr_mem); - } else - num_mem = -1; + num_mem = 0; + len = grmemlen(gr, newmember, &num_mem); /* Create new group and copy old group into it. */ if ((newgr = malloc(len)) == NULL) return (NULL); - /* point new gr_mem to end of struct + 1 */ - if (gr->gr_mem != NULL) + return (grcopy(gr, newgr, newmember, num_mem)); +} + +/* It is safer to walk the pointers given at gr_mem since there is no + * guarantee the gr_mem + strings are continguous in the given struct group + * but compact the new group into the following form. + * + * The new struct is laid out like this in memory. The example given is + * for a group with two members only. + * + * { + * (char *name) + * (char *passwd) + * (int gid) + * (gr_mem * newgrp + sizeof(struct group) + sizeof(**)) points to gr_mem area + * gr_mem area + * (member1 *) + * (member2 *) + * (NULL) + * (name string) + * (passwd string) + * (member1 string) + * (member2 string) + * } + */ +/* + * Copy the guts of a group plus given name to a preallocated group struct + */ +static struct group * +grcopy(const struct group *gr, struct group *newgr, const char *name, int ndx) +{ + char *dst; + int i; + + if (name != NULL) + ndx++; + /* point new gr_mem to end of struct + 1 if there are names */ + if (ndx != 0) newgr->gr_mem = (char **)(newgr + 1); else newgr->gr_mem = NULL; /* point dst after the end of all the gr_mem pointers in newgr */ - dst = (char *)&newgr->gr_mem[num_mem + 1]; + dst = (char *)&newgr->gr_mem[ndx + 1]; if (gr->gr_name != NULL) { newgr->gr_name = dst; dst = stpcpy(dst, gr->gr_name) + 1; - } else { + } else newgr->gr_name = NULL; - } if (gr->gr_passwd != NULL) { newgr->gr_passwd = dst; dst = stpcpy(dst, gr->gr_passwd) + 1; - } else { + } else newgr->gr_passwd = NULL; - } newgr->gr_gid = gr->gr_gid; - if (gr->gr_mem != NULL) { - for (ndx = 0; ndx < num_mem; ndx++) { - newgr->gr_mem[ndx] = dst; - dst = stpcpy(dst, gr->gr_mem[ndx]) + 1; + if (ndx != 0) { + for (i = 0; gr->gr_mem[i] != NULL; i++) { + newgr->gr_mem[i] = dst; + dst = stpcpy(dst, gr->gr_mem[i]) + 1; + } + if (name != NULL) { + newgr->gr_mem[i++] = dst; + dst = stpcpy(dst, name) + 1; } - newgr->gr_mem[ndx] = NULL; + newgr->gr_mem[i] = NULL; } return (newgr); } /* - * Add a new member name to a struct group. + * Calculate length of a struct group + given name */ -struct group * -gr_add(struct group *gr, char *newmember) +static size_t +grmemlen(const struct group *gr, const char *name, int *num_mem) { - size_t mlen; - int num_mem=0; - char **members; - struct group *newgr; - - if (newmember == NULL) - return(gr_dup(gr)); + size_t len; + int i; + if (gr == NULL) + return (0); + /* Calculate size of the group. */ + len = sizeof(*gr); + if (gr->gr_name != NULL) + len += strlen(gr->gr_name) + 1; + if (gr->gr_passwd != NULL) + len += strlen(gr->gr_passwd) + 1; if (gr->gr_mem != NULL) { - for (num_mem = 0; gr->gr_mem[num_mem] != NULL; num_mem++) { - if (strcmp(gr->gr_mem[num_mem], newmember) == 0) { - errno = EEXIST; - return (NULL); - } + for (len = i = 0; gr->gr_mem[i] != NULL; i++) { + len += strlen(gr->gr_mem[i]) + 1; + len += sizeof(*gr->gr_mem); } + *num_mem = i; } - /* Allocate enough for current pointers + 1 more and NULL marker */ - mlen = (num_mem + 2) * sizeof(*gr->gr_mem); - if ((members = malloc(mlen)) == NULL) - return (NULL); - memcpy(members, gr->gr_mem, num_mem * sizeof(*gr->gr_mem)); - members[num_mem++] = newmember; - members[num_mem] = NULL; - gr->gr_mem = members; - newgr = gr_dup(gr); - free(members); - return (newgr); + if (name != NULL) { + len += strlen(name) + 1; + if (gr->gr_mem == NULL) + len += sizeof(*gr->gr_mem); + } + return(len); } /* Modified: user/attilio/vmcontention/lib/libutil/libutil.h ============================================================================== --- user/attilio/vmcontention/lib/libutil/libutil.h Thu Mar 7 23:41:57 2013 (r247972) +++ user/attilio/vmcontention/lib/libutil/libutil.h Thu Mar 7 23:43:03 2013 (r247973) @@ -167,7 +167,7 @@ int gr_copy(int __ffd, int _tfd, const struct group * gr_dup(const struct group *_gr); struct group * - gr_add(struct group *_gr, char *_newmember); + gr_add(const struct group *_gr, const char *_newmember); int gr_equal(const struct group *_gr1, const struct group *_gr2); void gr_fini(void); int gr_init(const char *_dir, const char *_master); Modified: user/attilio/vmcontention/lib/libyaml/Makefile ============================================================================== --- user/attilio/vmcontention/lib/libyaml/Makefile Thu Mar 7 23:41:57 2013 (r247972) +++ user/attilio/vmcontention/lib/libyaml/Makefile Thu Mar 7 23:43:03 2013 (r247973) @@ -7,6 +7,7 @@ SHLIB_MAJOR= 0 INCS= bsdyml.h SRCS= api.c dumper.c emitter.c loader.c \ parser.c reader.c scanner.c writer.c +MAN= libbsdyml.3 .PATH: ${LIBYAML}/src ${LIBYAML}/include CLEANFILES= bsdyml.h Copied: user/attilio/vmcontention/lib/libyaml/libbsdyml.3 (from r247970, head/lib/libyaml/libbsdyml.3) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/attilio/vmcontention/lib/libyaml/libbsdyml.3 Thu Mar 7 23:43:03 2013 (r247973, copy of r247970, head/lib/libyaml/libbsdyml.3) @@ -0,0 +1,61 @@ +.\" Copyright (c) 2013 Baptiste Daroussin +.\" All rights reserved. +.\" +.\" 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 THE AUTHORS 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 THE AUTHORS 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$ +.\" +.Dd March 05, 2013 +.Dt LIBBSDYML 3 +.Os +.Sh NAME +.Nm libbsdyml +.Nd LibYAML library for parsing and emitting YAML +.Sh SYNOPSIS +.In bsdyml.h +.Sh DESCRIPTION +The +.Nm +library is a verbatim copy of the LibYAML version 0.1.4 +.Pp +The +.Nm +library is intended to be used within the +.Fx +base system only. +Use of the +.Nm +library for other purposes is not supported and discouraged. +.Pp +To avoid version and autoconfiguration issues, the library has been +renamed to +.Nm +rather than retain the original LibYAML library and include file names +to prevent confusion and autoconfiguration issues for 3rd party +software. +.Sh SEE ALSO +For full documentation, please see the LibYAML webpage at +.Pa http://pyyaml.org/wiki/LibYAML . +.Sh AUTHORS +.An -nosplit +The original LibYAML was written by +.An Kirill Simonov Aq xi@resolvent.net . Modified: user/attilio/vmcontention/sbin/ipfw/ipfw2.c ============================================================================== --- user/attilio/vmcontention/sbin/ipfw/ipfw2.c Thu Mar 7 23:41:57 2013 (r247972) +++ user/attilio/vmcontention/sbin/ipfw/ipfw2.c Thu Mar 7 23:43:03 2013 (r247973) @@ -3083,9 +3083,14 @@ chkarg: } else { len = sizeof(c->max_log); if (sysctlbyname("net.inet.ip.fw.verbose_limit", - &c->max_log, &len, NULL, 0) == -1) + &c->max_log, &len, NULL, 0) == -1) { + if (co.test_only) { + c->max_log = 0; + break; + } errx(1, "sysctlbyname(\"%s\")", "net.inet.ip.fw.verbose_limit"); + } } } break; @@ -3986,9 +3991,13 @@ ipfw_table_handler(int ac, char *av[]) mask = 0; // XXX uninitialized ? len = sizeof(tables_max); if (sysctlbyname("net.inet.ip.fw.tables_max", &tables_max, &len, - NULL, 0) == -1) - errx(1, "Can't determine maximum number of ipfw tables. " - "Perhaps you forgot to load ipfw module?"); + NULL, 0) == -1) { + if (co.test_only) + tables_max = 128; /* Old conservative default */ + else + errx(1, "Can't determine maximum number of ipfw tables." + " Perhaps you forgot to load ipfw module?"); + } memset(&xent, 0, sizeof(xent)); Modified: user/attilio/vmcontention/sbin/mount_cd9660/mount_cd9660.8 ============================================================================== --- user/attilio/vmcontention/sbin/mount_cd9660/mount_cd9660.8 Thu Mar 7 23:41:57 2013 (r247972) +++ user/attilio/vmcontention/sbin/mount_cd9660/mount_cd9660.8 Thu Mar 7 23:43:03 2013 (r247973) @@ -32,7 +32,7 @@ .\" @(#)mount_cd9660.8 8.3 (Berkeley) 3/27/94 .\" $FreeBSD$ .\" -.Dd October 3, 2005 +.Dd March 5, 2013 .Dt MOUNT_CD9660 8 .Os .Sh NAME @@ -80,7 +80,7 @@ See the man page for possible options and their meanings. The following cd9660 specific options are available: .Pp -.Bl -tag -width "nostrictjoliet" -compact +.Bl -tag -width "brokenjoliet" -compact .It Cm extatt Same as .Fl e . @@ -93,7 +93,7 @@ Same as .It Cm norrip Same as .Fl r . -.It Cm nostrictjoliet +.It Cm brokenjoliet Same as .Fl b . .El Modified: user/attilio/vmcontention/sbin/mount_cd9660/mount_cd9660.c ============================================================================== --- user/attilio/vmcontention/sbin/mount_cd9660/mount_cd9660.c Thu Mar 7 23:41:57 2013 (r247972) +++ user/attilio/vmcontention/sbin/mount_cd9660/mount_cd9660.c Thu Mar 7 23:43:03 2013 (r247973) @@ -83,7 +83,7 @@ main(int argc, char **argv) { struct iovec *iov; int iovlen; - int ch, mntflags, opts; + int ch, mntflags; char *dev, *dir, *p, *val, mntpath[MAXPATHLEN]; int verbose; int ssector; /* starting sector, 0 for 1st session */ @@ -91,7 +91,7 @@ main(int argc, char **argv) iov = NULL; iovlen = 0; - mntflags = opts = verbose = 0; + mntflags = verbose = 0; ssector = -1; while ((ch = getopt(argc, argv, "begjo:rs:vC:")) != -1) @@ -109,7 +109,7 @@ main(int argc, char **argv) build_iovec(&iov, &iovlen, "nojoliet", NULL, (size_t)-1); break; case 'o': - getmntopts(optarg, mopts, &mntflags, &opts); + getmntopts(optarg, mopts, &mntflags, NULL); p = strchr(optarg, '='); val = NULL; if (p != NULL) { Modified: user/attilio/vmcontention/sbin/mount_msdosfs/mount_msdosfs.c ============================================================================== --- user/attilio/vmcontention/sbin/mount_msdosfs/mount_msdosfs.c Thu Mar 7 23:41:57 2013 (r247972) +++ user/attilio/vmcontention/sbin/mount_msdosfs/mount_msdosfs.c Thu Mar 7 23:43:03 2013 (r247973) @@ -69,7 +69,7 @@ main(int argc, char **argv) struct iovec *iov = NULL; int iovlen = 0; struct stat sb; - int c, mntflags, set_gid, set_uid, set_mask, set_dirmask; + int c, set_gid, set_uid, set_mask, set_dirmask; char *dev, *dir, mntpath[MAXPATHLEN], *csp; char fstype[] = "msdosfs"; char errmsg[255] = {0}; @@ -78,9 +78,8 @@ main(int argc, char **argv) mode_t mask = 0, dirmask = 0; uid_t uid = 0; gid_t gid = 0; - getmnt_silent = 1; - mntflags = set_gid = set_uid = set_mask = set_dirmask = 0; + set_gid = set_uid = set_mask = set_dirmask = 0; while ((c = getopt(argc, argv, "sl9u:g:m:M:o:L:D:W:")) != -1) { switch (c) { @@ -219,7 +218,7 @@ main(int argc, char **argv) build_iovec_argf(&iov, &iovlen, "mask", "%u", mask); build_iovec_argf(&iov, &iovlen, "dirmask", "%u", dirmask); - if (nmount(iov, iovlen, mntflags) < 0) { + if (nmount(iov, iovlen, 0) < 0) { if (errmsg[0]) err(1, "%s: %s", dev, errmsg); else Modified: user/attilio/vmcontention/sbin/mount_nfs/mount_nfs.c ============================================================================== --- user/attilio/vmcontention/sbin/mount_nfs/mount_nfs.c Thu Mar 7 23:41:57 2013 (r247972) +++ user/attilio/vmcontention/sbin/mount_nfs/mount_nfs.c Thu Mar 7 23:43:03 2013 (r247973) @@ -130,7 +130,7 @@ enum tryret { TRYRET_LOCALERR /* Local failure. */ }; -static int fallback_mount(struct iovec *iov, int iovlen, int mntflags); +static int fallback_mount(struct iovec *iov, int iovlen); static int sec_name_to_num(char *sec); static char *sec_num_to_name(int num); static int getnfsargs(char *, struct iovec **iov, int *iovlen); @@ -149,13 +149,12 @@ main(int argc, char *argv[]) { int c; struct iovec *iov; - int mntflags, num, iovlen; + int num, iovlen; int osversion; char *name, *p, *spec, *fstype; char mntpath[MAXPATHLEN], errmsg[255]; char hostname[MAXHOSTNAMELEN + 1], *gssname, gssn[MAXHOSTNAMELEN + 50]; - mntflags = 0; iov = NULL; iovlen = 0; memset(errmsg, 0, sizeof(errmsg)); @@ -427,10 +426,10 @@ main(int argc, char *argv[]) */ osversion = getosreldate(); if (osversion >= 702100) { - if (nmount(iov, iovlen, mntflags)) + if (nmount(iov, iovlen, 0)) err(1, "%s, %s", mntpath, errmsg); } else { - if (fallback_mount(iov, iovlen, mntflags)) + if (fallback_mount(iov, iovlen)) err(1, "%s, %s", mntpath, errmsg); } @@ -473,7 +472,7 @@ copyopt(struct iovec **newiov, int *newi * parameters. It should be eventually be removed. */ static int -fallback_mount(struct iovec *iov, int iovlen, int mntflags) +fallback_mount(struct iovec *iov, int iovlen) { struct nfs_args args = { .version = NFS_ARGSVERSION, @@ -663,7 +662,7 @@ fallback_mount(struct iovec *iov, int io copyopt(&newiov, &newiovlen, iov, iovlen, "fspath"); copyopt(&newiov, &newiovlen, iov, iovlen, "errmsg"); - return nmount(newiov, newiovlen, mntflags); + return nmount(newiov, newiovlen, 0); } static int Modified: user/attilio/vmcontention/sbin/mount_nullfs/mount_nullfs.c ============================================================================== --- user/attilio/vmcontention/sbin/mount_nullfs/mount_nullfs.c Thu Mar 7 23:41:57 2013 (r247972) +++ user/attilio/vmcontention/sbin/mount_nullfs/mount_nullfs.c Thu Mar 7 23:43:03 2013 (r247973) @@ -68,12 +68,11 @@ main(int argc, char *argv[]) char source[MAXPATHLEN]; char target[MAXPATHLEN]; char errmsg[255]; - int ch, mntflags, iovlen; + int ch, iovlen; char nullfs[] = "nullfs"; iov = NULL; iovlen = 0; - mntflags = 0; errmsg[0] = '\0'; while ((ch = getopt(argc, argv, "o:")) != -1) switch(ch) { @@ -111,7 +110,7 @@ main(int argc, char *argv[]) build_iovec(&iov, &iovlen, "fspath", source, (size_t)-1); build_iovec(&iov, &iovlen, "target", target, (size_t)-1); build_iovec(&iov, &iovlen, "errmsg", errmsg, sizeof(errmsg)); - if (nmount(iov, iovlen, mntflags) < 0) { + if (nmount(iov, iovlen, 0) < 0) { if (errmsg[0] != 0) err(1, "%s: %s", source, errmsg); else Modified: user/attilio/vmcontention/sbin/mount_udf/Makefile ============================================================================== --- user/attilio/vmcontention/sbin/mount_udf/Makefile Thu Mar 7 23:41:57 2013 (r247972) +++ user/attilio/vmcontention/sbin/mount_udf/Makefile Thu Mar 7 23:43:03 2013 (r247973) @@ -9,7 +9,6 @@ LDADD= -lkiconv MOUNT= ${.CURDIR}/../mount CFLAGS+= -I${MOUNT} -I${.CURDIR}/../../sys .PATH: ${MOUNT} -WARNS?= 1 # Needs to be dynamically linked for optional dlopen() access to # userland libiconv Modified: user/attilio/vmcontention/sbin/mount_udf/mount_udf.c ============================================================================== --- user/attilio/vmcontention/sbin/mount_udf/mount_udf.c Thu Mar 7 23:41:57 2013 (r247972) +++ user/attilio/vmcontention/sbin/mount_udf/mount_udf.c Thu Mar 7 23:43:03 2013 (r247973) @@ -73,18 +73,19 @@ void usage(void); int main(int argc, char **argv) { - struct iovec iov[12]; - int ch, i, mntflags, opts, udf_flags; - char *dev, *dir, mntpath[MAXPATHLEN]; - char *cs_disk, *cs_local; - int verbose; + char mntpath[MAXPATHLEN]; + char fstype[] = "udf"; + struct iovec *iov; + char *cs_disk, *cs_local, *dev, *dir; + int ch, i, iovlen, mntflags, udf_flags, verbose; - i = mntflags = opts = udf_flags = verbose = 0; + i = iovlen = mntflags = udf_flags = verbose = 0; cs_disk = cs_local = NULL; + iov = NULL; while ((ch = getopt(argc, argv, "o:vC:")) != -1) switch (ch) { case 'o': - getmntopts(optarg, mopts, &mntflags, &opts); + getmntopts(optarg, mopts, &mntflags, NULL); break; case 'v': verbose++; @@ -120,32 +121,13 @@ main(int argc, char **argv) */ mntflags |= MNT_RDONLY; - iov[i].iov_base = "fstype"; - iov[i++].iov_len = sizeof("fstype"); - iov[i].iov_base = "udf"; - iov[i].iov_len = strlen(iov[i].iov_base) + 1; - i++; - iov[i].iov_base = "fspath"; - iov[i++].iov_len = sizeof("fspath"); - iov[i].iov_base = mntpath; - iov[i++].iov_len = strlen(mntpath) + 1; - iov[i].iov_base = "from"; - iov[i++].iov_len = sizeof("from"); - iov[i].iov_base = dev; - iov[i++].iov_len = strlen(dev) + 1; - iov[i].iov_base = "flags"; - iov[i++].iov_len = sizeof("flags"); - iov[i].iov_base = &udf_flags; - iov[i++].iov_len = sizeof(udf_flags); + build_iovec(&iov, &iovlen, "fstype", fstype, (size_t)-1); + build_iovec(&iov, &iovlen, "fspath", mntpath, (size_t)-1); + build_iovec(&iov, &iovlen, "from", dev, (size_t)-1); + build_iovec(&iov, &iovlen, "flags", &udf_flags, sizeof(udf_flags)); if (udf_flags & UDFMNT_KICONV) { - iov[i].iov_base = "cs_disk"; - iov[i++].iov_len = sizeof("cs_disk"); - iov[i].iov_base = cs_disk; - iov[i++].iov_len = strlen(cs_disk) + 1; - iov[i].iov_base = "cs_local"; - iov[i++].iov_len = sizeof("cs_local"); - iov[i].iov_base = cs_local; - iov[i++].iov_len = strlen(cs_local) + 1; + build_iovec(&iov, &iovlen, "cs_disk", cs_disk, (size_t)-1); + build_iovec(&iov, &iovlen, "cs_local", cs_local, (size_t)-1); } if (nmount(iov, i, mntflags) < 0) err(1, "%s", dev); Modified: user/attilio/vmcontention/sbin/mount_unionfs/mount_unionfs.c ============================================================================== --- user/attilio/vmcontention/sbin/mount_unionfs/mount_unionfs.c Thu Mar 7 23:41:57 2013 (r247972) +++ user/attilio/vmcontention/sbin/mount_unionfs/mount_unionfs.c Thu Mar 7 23:43:03 2013 (r247973) @@ -129,7 +129,7 @@ int main(int argc, char *argv[]) { struct iovec *iov; - int ch, mntflags, iovlen; + int ch, iovlen; char source [MAXPATHLEN], target[MAXPATHLEN], errmsg[255]; *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***