svn commit: r255836 - in projects/camlock: contrib/libcxxrt crypto/openssh etc/rc.d secure/lib/libssh secure/usr.bin/ssh secure/usr.sbin/sshd share/man/man4 share/misc sys/amd64/amd64 sys/arm/broad...

Alexander Motin mav at FreeBSD.org
Tue Sep 24 08:40:48 UTC 2013


Author: mav
Date: Tue Sep 24 08:40:41 2013
New Revision: 255836
URL: http://svnweb.freebsd.org/changeset/base/255836

Log:
  MFC @ r255835

Added:
  projects/camlock/crypto/openssh/freebsd-configure.sh
     - copied unchanged from r255835, head/crypto/openssh/freebsd-configure.sh
  projects/camlock/crypto/openssh/krb5_config.h
     - copied unchanged from r255835, head/crypto/openssh/krb5_config.h
  projects/camlock/usr.sbin/bsdconfig/examples/browse_packages_ftp.sh
     - copied unchanged from r255835, head/usr.sbin/bsdconfig/examples/browse_packages_ftp.sh
  projects/camlock/usr.sbin/bsdconfig/examples/browse_packages_http.sh
     - copied unchanged from r255835, head/usr.sbin/bsdconfig/examples/browse_packages_http.sh
Deleted:
  projects/camlock/usr.sbin/bsdconfig/examples/browse_packages.sh
Modified:
  projects/camlock/contrib/libcxxrt/libelftc_dem_gnu3.c
  projects/camlock/contrib/libcxxrt/typeinfo.cc
  projects/camlock/contrib/libcxxrt/unwind-itanium.h
  projects/camlock/crypto/openssh/FREEBSD-upgrade
  projects/camlock/crypto/openssh/config.h
  projects/camlock/crypto/openssh/ssh-gss.h
  projects/camlock/crypto/openssh/sshd.c
  projects/camlock/etc/rc.d/local_unbound
  projects/camlock/secure/lib/libssh/Makefile
  projects/camlock/secure/usr.bin/ssh/Makefile
  projects/camlock/secure/usr.sbin/sshd/Makefile
  projects/camlock/share/man/man4/netmap.4
  projects/camlock/share/misc/committers-ports.dot
  projects/camlock/sys/amd64/amd64/vm_machdep.c
  projects/camlock/sys/arm/broadcom/bcm2835/bcm2835_systimer.c
  projects/camlock/sys/cam/ctl/ctl_frontend_iscsi.c
  projects/camlock/sys/dev/iscsi/iscsi.c
  projects/camlock/sys/dev/iscsi_initiator/iscsi.c
  projects/camlock/sys/i386/i386/vm_machdep.c
  projects/camlock/sys/kern/kern_synch.c
  projects/camlock/usr.bin/calendar/calendars/calendar.freebsd
  projects/camlock/usr.sbin/arp/arp.c
  projects/camlock/usr.sbin/bsdconfig/examples/Makefile
  projects/camlock/usr.sbin/bsdconfig/share/media/http.subr
  projects/camlock/usr.sbin/bsdinstall/partedit/gpart_ops.c
  projects/camlock/usr.sbin/bsdinstall/partedit/partedit_powerpc.c
  projects/camlock/usr.sbin/unbound/local-setup/local-unbound-setup.sh
Directory Properties:
  projects/camlock/   (props changed)
  projects/camlock/contrib/libcxxrt/   (props changed)
  projects/camlock/crypto/openssh/   (props changed)
  projects/camlock/share/man/man4/   (props changed)
  projects/camlock/sys/   (props changed)
  projects/camlock/usr.bin/calendar/   (props changed)

Modified: projects/camlock/contrib/libcxxrt/libelftc_dem_gnu3.c
==============================================================================
--- projects/camlock/contrib/libcxxrt/libelftc_dem_gnu3.c	Tue Sep 24 07:03:16 2013	(r255835)
+++ projects/camlock/contrib/libcxxrt/libelftc_dem_gnu3.c	Tue Sep 24 08:40:41 2013	(r255836)
@@ -405,6 +405,7 @@ static int	cpp_demangle_read_expression_
 		    const char *, size_t, const char *, size_t);
 static int	cpp_demangle_read_function(struct cpp_demangle_data *, int *,
 		    struct vector_type_qualifier *);
+static int	cpp_demangle_local_source_name(struct cpp_demangle_data *ddata);
 static int	cpp_demangle_read_local_name(struct cpp_demangle_data *);
 static int	cpp_demangle_read_name(struct cpp_demangle_data *);
 static int	cpp_demangle_read_nested_name(struct cpp_demangle_data *);
@@ -453,13 +454,22 @@ __cxa_demangle_gnu3(const char *org)
 	struct cpp_demangle_data ddata;
 	ssize_t org_len;
 	unsigned int limit;
-	char *rtn;
+	char *rtn = NULL;
 
 	if (org == NULL)
 		return (NULL);
 
+	org_len = strlen(org);
+	if (org_len > 11 && !strncmp(org, "_GLOBAL__I_", 11)) {
+		if ((rtn = malloc(org_len + 19)) == NULL)
+			return (NULL);
+		snprintf(rtn, org_len + 19,
+		    "global constructors keyed to %s", org + 11);
+		return (rtn);
+	}
+
 	// Try demangling as a type for short encodings
-	if (((org_len = strlen(org)) < 2) || (org[0] != '_' || org[1] != 'Z' )) {
+	if ((org_len < 2) || (org[0] != '_' || org[1] != 'Z' )) {
 		if (!cpp_demangle_data_init(&ddata, org))
 			return (NULL);
 		if (!cpp_demangle_read_type(&ddata, 0))
@@ -467,13 +477,6 @@ __cxa_demangle_gnu3(const char *org)
 		rtn = vector_str_get_flat(&ddata.output, (size_t *) NULL);
 		goto clean;
 	}
-	if (org_len > 11 && !strncmp(org, "_GLOBAL__I_", 11)) {
-		if ((rtn = malloc(org_len + 19)) == NULL)
-			return (NULL);
-		snprintf(rtn, org_len + 19,
-		    "global constructors keyed to %s", org + 11);
-		return (rtn);
-	}
 
 
 	if (!cpp_demangle_data_init(&ddata, org + 2))
@@ -604,13 +607,12 @@ cpp_demangle_push_fp(struct cpp_demangle
 		return (0);
 
 	rtn = 0;
-	if ((len = strlen(f)) > 0 &&
-	    cpp_demangle_push_str(ddata, f, len))
-		rtn = 1;
+	if ((len = strlen(f)) > 0)
+		rtn = cpp_demangle_push_str(ddata, f, len); 
 
 	free(f);
 
-	return (0);
+	return (rtn);
 }
 
 static int
@@ -655,6 +657,7 @@ cpp_demangle_push_subst_v(struct cpp_dem
 		return (0);
 
 	rtn = cpp_demangle_push_subst(ddata, str, str_len);
+
 	free(str);
 
 	return (rtn);
@@ -1868,9 +1871,18 @@ static int
 cpp_demangle_read_sname(struct cpp_demangle_data *ddata)
 {
 	long len;
+	int err;
 
 	if (ddata == NULL || cpp_demangle_read_number(ddata, &len) == 0 ||
-	    len <= 0 || cpp_demangle_push_str(ddata, ddata->cur, len) == 0)
+	    len <= 0)
+		return (0);
+
+ 	if (len == 12 && (memcmp("_GLOBAL__N_1", ddata->cur, 12) == 0))
+		err = cpp_demangle_push_str(ddata, "(anonymous namespace)", 21);
+	else
+		err = cpp_demangle_push_str(ddata, ddata->cur, len);
+	
+	if (err == 0)
 		return (0);
 
 	assert(ddata->output.size > 0);
@@ -2054,7 +2066,7 @@ clean:
 	free(subst_str);
 	vector_str_dest(&v);
 
-	return (1);
+	return (rtn);
 }
 
 static int
@@ -2996,6 +3008,40 @@ cpp_demangle_read_uqname(struct cpp_dema
 	if (ELFTC_ISDIGIT(*ddata->cur) != 0)
 		return (cpp_demangle_read_sname(ddata));
 
+ 
+	/* local source name */ 
+	if (*ddata->cur == 'L') 
+		return (cpp_demangle_local_source_name(ddata)); 
+ 
+	return (1); 
+} 
+ 
+/* 
+ * Read local source name. 
+ * 
+ * References: 
+ *   http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31775 
+ *   http://gcc.gnu.org/viewcvs?view=rev&revision=124467 
+ */ 
+static int 
+cpp_demangle_local_source_name(struct cpp_demangle_data *ddata) 
+{ 
+	/* L */ 
+	if (ddata == NULL || *ddata->cur != 'L') 
+		return (0); 
+	++ddata->cur; 
+
+	/* source name */ 
+	if (!cpp_demangle_read_sname(ddata)) 
+		return (0); 
+
+	/* discriminator */ 
+	if (*ddata->cur == '_') { 
+		++ddata->cur; 
+		while (ELFTC_ISDIGIT(*ddata->cur) != 0) 
+			++ddata->cur; 
+	} 
+
 	return (1);
 }
 

Modified: projects/camlock/contrib/libcxxrt/typeinfo.cc
==============================================================================
--- projects/camlock/contrib/libcxxrt/typeinfo.cc	Tue Sep 24 07:03:16 2013	(r255835)
+++ projects/camlock/contrib/libcxxrt/typeinfo.cc	Tue Sep 24 08:40:41 2013	(r255836)
@@ -86,7 +86,18 @@ extern "C" char* __cxa_demangle(const ch
 	if (NULL != demangled)
 	{
 		size_t len = strlen(demangled);
-		buf = (char*)realloc(buf, len+1);
+		if (buf == NULL)
+		{
+			if (n)
+			{
+				*n = len;
+			}
+			return demangled;
+		}
+		if (*n < len+1)
+		{
+			buf = (char*)realloc(buf, len+1);
+		}
 		if (0 != buf)
 		{
 			memcpy(buf, demangled, len);

Modified: projects/camlock/contrib/libcxxrt/unwind-itanium.h
==============================================================================
--- projects/camlock/contrib/libcxxrt/unwind-itanium.h	Tue Sep 24 07:03:16 2013	(r255835)
+++ projects/camlock/contrib/libcxxrt/unwind-itanium.h	Tue Sep 24 08:40:41 2013	(r255836)
@@ -80,7 +80,7 @@ struct _Unwind_Exception
     _Unwind_Exception_Cleanup_Fn exception_cleanup;
     unsigned long private_1;
     unsigned long private_2;
-  };
+  } ;
 
 extern _Unwind_Reason_Code _Unwind_RaiseException (struct _Unwind_Exception *);
 extern _Unwind_Reason_Code _Unwind_ForcedUnwind (struct _Unwind_Exception *,

Modified: projects/camlock/crypto/openssh/FREEBSD-upgrade
==============================================================================
--- projects/camlock/crypto/openssh/FREEBSD-upgrade	Tue Sep 24 07:03:16 2013	(r255835)
+++ projects/camlock/crypto/openssh/FREEBSD-upgrade	Tue Sep 24 08:40:41 2013	(r255836)
@@ -3,7 +3,13 @@
 	    FreeBSD maintainer's guide to OpenSSH-portable
 	    ==============================================
 
-[needs rewriting for svn]
+XXX
+XXX this needs a complete rewrite
+XXX svn merge from vendor branch, resolve conflicts manually
+XXX   (see FREEBSD-tricks for tips on how to reduce conflicts)
+XXX run freebsd-configure.sh to generate config.h and krb5_config.h
+XXX svn diff Makefile.in to see if the Makefiles need adjusting
+XXX
 
 0) Make sure your mail spool has plenty of free space.  It'll fill up
    pretty fast once you're done with this checklist.
@@ -116,7 +122,7 @@ B) Re-commit everything on repoman (you 
 
 
 This port was brought to you by (in no particular order) DARPA, NAI
-Labs, ThinkSec, Nescafé, the Aberlour Glenlivet Distillery Co.,
+Labs, ThinkSec, Nescafé, the Aberlour Glenlivet Distillery Co.,
 Suzanne Vega, and a Sanford's #69 Deluxe Marker.
 
 					-- des at FreeBSD.org

Modified: projects/camlock/crypto/openssh/config.h
==============================================================================
--- projects/camlock/crypto/openssh/config.h	Tue Sep 24 07:03:16 2013	(r255835)
+++ projects/camlock/crypto/openssh/config.h	Tue Sep 24 08:40:41 2013	(r255836)
@@ -157,7 +157,7 @@
 /* #undef GLOB_HAS_GL_STATV */
 
 /* Define this if you want GSSAPI support in the version 2 protocol */
-#define GSSAPI 1
+/* #undef GSSAPI */
 
 /* Define if you want to use shadow password expire field */
 /* #undef HAS_SHADOW_EXPIRE */
@@ -271,7 +271,7 @@
 
 /* Define to 1 if you have the declaration of `GSS_C_NT_HOSTBASED_SERVICE',
    and to 0 if you don't. */
-#define HAVE_DECL_GSS_C_NT_HOSTBASED_SERVICE 1
+/* #undef HAVE_DECL_GSS_C_NT_HOSTBASED_SERVICE */
 
 /* Define to 1 if you have the declaration of `howmany', and to 0 if you
    don't. */
@@ -535,10 +535,10 @@
 /* #undef HAVE_GSSAPI_GSSAPI_GENERIC_H */
 
 /* Define to 1 if you have the <gssapi/gssapi.h> header file. */
-#define HAVE_GSSAPI_GSSAPI_H 1
+/* #undef HAVE_GSSAPI_GSSAPI_H */
 
 /* Define to 1 if you have the <gssapi/gssapi_krb5.h> header file. */
-#define HAVE_GSSAPI_GSSAPI_KRB5_H 1
+/* #undef HAVE_GSSAPI_GSSAPI_KRB5_H */
 
 /* Define to 1 if you have the <gssapi.h> header file. */
 /* #undef HAVE_GSSAPI_H */
@@ -601,13 +601,13 @@
 #define HAVE_ISBLANK 1
 
 /* Define to 1 if you have the `krb5_cc_new_unique' function. */
-#define HAVE_KRB5_CC_NEW_UNIQUE 1
+/* #undef HAVE_KRB5_CC_NEW_UNIQUE */
 
 /* Define to 1 if you have the `krb5_free_error_message' function. */
-#define HAVE_KRB5_FREE_ERROR_MESSAGE 1
+/* #undef HAVE_KRB5_FREE_ERROR_MESSAGE */
 
 /* Define to 1 if you have the `krb5_get_error_message' function. */
-#define HAVE_KRB5_GET_ERROR_MESSAGE 1
+/* #undef HAVE_KRB5_GET_ERROR_MESSAGE */
 
 /* Define to 1 if you have the <lastlog.h> header file. */
 /* #undef HAVE_LASTLOG_H */
@@ -1310,7 +1310,7 @@
 #define HAVE___func__ 1
 
 /* Define this if you are using the Heimdal version of Kerberos V5 */
-#define HEIMDAL 1
+/* #undef HEIMDAL */
 
 /* Define if you need to use IP address instead of hostname in $DISPLAY */
 /* #undef IPADDR_IN_DISPLAY */
@@ -1322,7 +1322,7 @@
 /* #undef IP_TOS_IS_BROKEN */
 
 /* Define if you want Kerberos 5 support */
-#define KRB5 1
+/* #undef KRB5 */
 
 /* Define if pututxline updates lastlog too */
 /* #undef LASTLOG_WRITE_PUTUTXLINE */

Copied: projects/camlock/crypto/openssh/freebsd-configure.sh (from r255835, head/crypto/openssh/freebsd-configure.sh)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ projects/camlock/crypto/openssh/freebsd-configure.sh	Tue Sep 24 08:40:41 2013	(r255836, copy of r255835, head/crypto/openssh/freebsd-configure.sh)
@@ -0,0 +1,30 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+configure_args="
+    --prefix=/usr
+    --sysconfdir=/etc/ssh
+    --with-pam
+    --with-tcp-wrappers
+    --with-libedit
+    --with-ssl-engine
+    --without-xauth
+" 
+
+set -e
+
+# generate config.h with krb5 and stash it
+sh configure $configure_args --with-kerberos5
+mv config.log config.log.orig
+mv config.h config.h.orig
+
+# generate config.h without krb5
+sh configure $configure_args --without-kerberos5
+
+# extract the difference
+echo '/* $Free''BSD$ */' > krb5_config.h
+diff -u config.h.orig config.h |
+	sed -n '/^-#define/s/^-//p' |
+	grep -Ff /dev/stdin config.h.orig >> krb5_config.h

Copied: projects/camlock/crypto/openssh/krb5_config.h (from r255835, head/crypto/openssh/krb5_config.h)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ projects/camlock/crypto/openssh/krb5_config.h	Tue Sep 24 08:40:41 2013	(r255836, copy of r255835, head/crypto/openssh/krb5_config.h)
@@ -0,0 +1,11 @@
+/* $FreeBSD$ */
+#define GSSAPI 1
+#define HAVE_DECL_GSS_C_NT_HOSTBASED_SERVICE 1
+#define HAVE_GSSAPI_GSSAPI_H 1
+#define HAVE_GSSAPI_GSSAPI_KRB5_H 1
+#define HAVE_GSSAPI_H 1
+#define HAVE_KRB5_CC_NEW_UNIQUE 1
+#define HAVE_KRB5_FREE_ERROR_MESSAGE 1
+#define HAVE_KRB5_GET_ERROR_MESSAGE 1
+#define HEIMDAL 1
+#define KRB5 1

Modified: projects/camlock/crypto/openssh/ssh-gss.h
==============================================================================
--- projects/camlock/crypto/openssh/ssh-gss.h	Tue Sep 24 07:03:16 2013	(r255835)
+++ projects/camlock/crypto/openssh/ssh-gss.h	Tue Sep 24 08:40:41 2013	(r255836)
@@ -28,10 +28,10 @@
 
 #ifdef GSSAPI
 
-#ifdef HAVE_GSSAPI_H
-#include <gssapi.h>
-#elif defined(HAVE_GSSAPI_GSSAPI_H)
+#if defined(HAVE_GSSAPI_GSSAPI_H)
 #include <gssapi/gssapi.h>
+#elif defined(HAVE_GSSAPI_H)
+#include <gssapi.h>
 #endif
 
 #ifdef KRB5

Modified: projects/camlock/crypto/openssh/sshd.c
==============================================================================
--- projects/camlock/crypto/openssh/sshd.c	Tue Sep 24 07:03:16 2013	(r255835)
+++ projects/camlock/crypto/openssh/sshd.c	Tue Sep 24 08:40:41 2013	(r255836)
@@ -88,10 +88,10 @@ __RCSID("$FreeBSD$");
 
 #ifdef __FreeBSD__
 #include <resolv.h>
-#if defined(GSSAPI) && defined(HAVE_GSSAPI_H)
-#include <gssapi.h>
-#elif defined(GSSAPI) && defined(HAVE_GSSAPI_GSSAPI_H)
+#if defined(GSSAPI) && defined(HAVE_GSSAPI_GSSAPI_H)
 #include <gssapi/gssapi.h>
+#elif defined(GSSAPI) && defined(HAVE_GSSAPI_H)
+#include <gssapi.h>
 #endif
 #endif
 

Modified: projects/camlock/etc/rc.d/local_unbound
==============================================================================
--- projects/camlock/etc/rc.d/local_unbound	Tue Sep 24 07:03:16 2013	(r255835)
+++ projects/camlock/etc/rc.d/local_unbound	Tue Sep 24 08:40:41 2013	(r255836)
@@ -4,7 +4,7 @@
 #
 
 # PROVIDE: local_unbound
-# REQUIRE: SERVERS cleanvar
+# REQUIRE: FILESYSTEMS netif resolv
 # KEYWORD: shutdown
 
 . /etc/rc.subr

Modified: projects/camlock/secure/lib/libssh/Makefile
==============================================================================
--- projects/camlock/secure/lib/libssh/Makefile	Tue Sep 24 07:03:16 2013	(r255835)
+++ projects/camlock/secure/lib/libssh/Makefile	Tue Sep 24 08:40:41 2013	(r255836)
@@ -39,7 +39,7 @@ USEPRIVATELIB+= ldns
 CFLAGS+= -I${SSHDIR} -include ssh_namespace.h
 
 .if ${MK_KERBEROS_SUPPORT} != "no"
-CFLAGS+= -DGSSAPI -DHAVE_GSSAPI_GSSAPI_H=1 -DKRB5 -DHEIMDAL
+CFLAGS+= -include krb5_config.h
 DPADD+=	${LIBGSSAPI} ${LIBKRB5} ${LIBHX509} ${LIBASN1} ${LIBCOM_ERR} ${LIBMD} ${LIBROKEN}
 LDADD+=	-lgssapi -lkrb5 -lhx509 -lasn1 -lcom_err -lmd -lroken
 .endif
@@ -58,3 +58,6 @@ LDADD+=	-lcrypto -lcrypt -lz
 .PATH: ${SSHDIR} ${SSHDIR}/openbsd-compat
 
 ${OBJS} ${POBJS} ${SOBJS}: ssh_namespace.h
+.if ${MK_KERBEROS_SUPPORT} != "no"
+${OBJS} ${POBJS} ${SOBJS}: krb5_config.h
+.endif

Modified: projects/camlock/secure/usr.bin/ssh/Makefile
==============================================================================
--- projects/camlock/secure/usr.bin/ssh/Makefile	Tue Sep 24 07:03:16 2013	(r255835)
+++ projects/camlock/secure/usr.bin/ssh/Makefile	Tue Sep 24 08:40:41 2013	(r255836)
@@ -27,7 +27,7 @@ USEPRIVATELIB+= ldns
 .endif
 
 .if ${MK_KERBEROS_SUPPORT} != "no"
-CFLAGS+= -DGSSAPI -DHAVE_GSSAPI_GSSAPI_H=1 -DKRB5 -DHEIMDAL
+CFLAGS+= -include krb5_config.h
 DPADD+=	 ${LIBGSSAPI}
 LDADD+=	 -lgssapi
 .endif
@@ -48,3 +48,6 @@ CFLAGS+= -DXAUTH_PATH=\"${LOCALBASE}/bin
 .PATH:	${SSHDIR}
 
 ${OBJS} ${POBJS} ${SOBJS}: ssh_namespace.h
+.if ${MK_KERBEROS_SUPPORT} != "no"
+${OBJS} ${POBJS} ${SOBJS}: krb5_config.h
+.endif

Modified: projects/camlock/secure/usr.sbin/sshd/Makefile
==============================================================================
--- projects/camlock/secure/usr.sbin/sshd/Makefile	Tue Sep 24 07:03:16 2013	(r255835)
+++ projects/camlock/secure/usr.sbin/sshd/Makefile	Tue Sep 24 08:40:41 2013	(r255836)
@@ -42,8 +42,7 @@ LDADD+=  -lbsm
 .endif
 
 .if ${MK_KERBEROS_SUPPORT} != "no"
-CFLAGS+= -DGSSAPI -DKRB5 -DHEIMDAL \
-	-DHAVE_GSSAPI_GSSAPI_H=1 -DHAVE_GSSAPI_GSSAPI_KRB5_H=1
+CFLAGS+= -include krb5_config.h
 DPADD+=	 ${LIBGSSAPI_KRB5} ${LIBGSSAPI} ${LIBKRB5} ${LIBHX509} ${LIBASN1} \
 	${LIBCOM_ERR} ${LIBROKEN} ${LIBWIND} ${LIBHEIMBASE} ${LIBHEIMIPCC}
 LDADD+=	 -lgssapi_krb5 -lgssapi -lkrb5 -lhx509 -lasn1 \
@@ -66,3 +65,6 @@ CFLAGS+= -DXAUTH_PATH=\"${LOCALBASE}/bin
 .PATH:	${SSHDIR}
 
 ${OBJS} ${POBJS} ${SOBJS}: ssh_namespace.h
+.if ${MK_KERBEROS_SUPPORT} != "no"
+${OBJS} ${POBJS} ${SOBJS}: krb5_config.h
+.endif

Modified: projects/camlock/share/man/man4/netmap.4
==============================================================================
--- projects/camlock/share/man/man4/netmap.4	Tue Sep 24 07:03:16 2013	(r255835)
+++ projects/camlock/share/man/man4/netmap.4	Tue Sep 24 08:40:41 2013	(r255836)
@@ -28,7 +28,7 @@
 .\" $FreeBSD$
 .\" $Id: netmap.4 11563 2012-08-02 08:59:12Z luigi $: stable/8/share/man/man4/bpf.4 181694 2008-08-13 17:45:06Z ed $
 .\"
-.Dd February 27, 2012
+.Dd September 23, 2013
 .Dt NETMAP 4
 .Os
 .Sh NAME
@@ -267,14 +267,14 @@ The following code implements a traffic 
 #include <net/netmap_user.h>
 struct netmap_if *nifp;
 struct netmap_ring *ring;
-struct netmap_request nmr;
+struct nmreq nmr;
 
 fd = open("/dev/netmap", O_RDWR);
 bzero(&nmr, sizeof(nmr));
-strcpy(nmr.nm_name, "ix0");
-nmr.nm_version = NETMAP_API;
+strcpy(nmr.nr_name, "ix0");
+nmr.nr_version = NETMAP_API;
 ioctl(fd, NIOCREG, &nmr);
-p = mmap(0, nmr.memsize, fd);
+p = mmap(0, nmr.nr_memsize, fd);
 nifp = NETMAP_IF(p, nmr.offset);
 ring = NETMAP_TXRING(nifp, 0);
 fds.fd = fd;

Modified: projects/camlock/share/misc/committers-ports.dot
==============================================================================
--- projects/camlock/share/misc/committers-ports.dot	Tue Sep 24 07:03:16 2013	(r255835)
+++ projects/camlock/share/misc/committers-ports.dot	Tue Sep 24 08:40:41 2013	(r255836)
@@ -77,6 +77,7 @@ cs [label="Carlo Strub\ncs at FreeBSD.org\n
 culot [label="Frederic Culot\nculot at FreeBSD.org\n2010/10/16"]
 daichi [label="Daichi Goto\ndaichi at FreeBSD.org\n2002/10/17"]
 danfe [label="Alexey Dokuchaev\ndanfe at FreeBSD.org\n2004/08/20"]
+danilo [label="Danilo E. Gondolfo\ndanilo at FreeBSD.org\n2013/09/23"]
 db [label="Diane Bruce\ndb at FreeBSD.org\n2007/01/18"]
 dbn [label="David Naylor\ndbn at FreeBSD.org\n2013/01/14"]
 decke [label="Bernhard Froehlich\ndecke at FreeBSD.org\n2010/03/21"]
@@ -278,9 +279,10 @@ crees -> madpilot
 crees -> gblach
 crees -> tijl
 
+culot -> danilo
 culot -> jase
-culot -> wg
 culot -> marino
+culot -> wg
 
 db -> tj
 
@@ -532,6 +534,7 @@ wen -> cs
 wen -> culot
 wen -> pawel
 
+wg -> danilo
 wg -> nemysis
 
 will -> lioux

Modified: projects/camlock/sys/amd64/amd64/vm_machdep.c
==============================================================================
--- projects/camlock/sys/amd64/amd64/vm_machdep.c	Tue Sep 24 07:03:16 2013	(r255835)
+++ projects/camlock/sys/amd64/amd64/vm_machdep.c	Tue Sep 24 08:40:41 2013	(r255836)
@@ -341,7 +341,7 @@ cpu_thread_clean(struct thread *td)
 	 * Clean TSS/iomap
 	 */
 	if (pcb->pcb_tssp != NULL) {
-		kva_free((vm_offset_t)pcb->pcb_tssp,
+		kmem_free(kernel_arena, (vm_offset_t)pcb->pcb_tssp,
 		    ctob(IOPAGES + 1));
 		pcb->pcb_tssp = NULL;
 	}

Modified: projects/camlock/sys/arm/broadcom/bcm2835/bcm2835_systimer.c
==============================================================================
--- projects/camlock/sys/arm/broadcom/bcm2835/bcm2835_systimer.c	Tue Sep 24 07:03:16 2013	(r255835)
+++ projects/camlock/sys/arm/broadcom/bcm2835/bcm2835_systimer.c	Tue Sep 24 08:40:41 2013	(r255836)
@@ -296,7 +296,7 @@ DELAY(int usec)
 	}
 
 	/* Get the number of times to count */
-	counts = usec * ((bcm_systimer_tc.tc_frequency / 1000000) + 1);
+	counts = usec * (bcm_systimer_tc.tc_frequency / 1000000) + 1;
 
 	first = bcm_systimer_tc_read_4(SYSTIMER_CLO);
 

Modified: projects/camlock/sys/cam/ctl/ctl_frontend_iscsi.c
==============================================================================
--- projects/camlock/sys/cam/ctl/ctl_frontend_iscsi.c	Tue Sep 24 07:03:16 2013	(r255835)
+++ projects/camlock/sys/cam/ctl/ctl_frontend_iscsi.c	Tue Sep 24 08:40:41 2013	(r255836)
@@ -930,7 +930,11 @@ cfiscsi_callout(void *context)
 	if (cs->cs_timeout < 2)
 		return;
 
-	cp = icl_pdu_new_bhs(cs->cs_conn, M_WAITOK);
+	cp = icl_pdu_new_bhs(cs->cs_conn, M_NOWAIT);
+	if (cp == NULL) {
+		CFISCSI_SESSION_WARN(cs, "failed to allocate PDU");
+		return;
+	}
 	bhsni = (struct iscsi_bhs_nop_in *)cp->ip_bhs;
 	bhsni->bhsni_opcode = ISCSI_BHS_OPCODE_NOP_IN;
 	bhsni->bhsni_flags = 0x80;
@@ -2245,7 +2249,7 @@ cfiscsi_datamove(union ctl_io *io)
 	struct ctl_sg_entry ctl_sg_entry, *ctl_sglist;
 	size_t copy_len, len, off;
 	const char *addr;
-	int ctl_sg_count, i;
+	int ctl_sg_count, error, i;
 	uint32_t target_transfer_tag;
 	bool done;
 
@@ -2298,7 +2302,13 @@ cfiscsi_datamove(union ctl_io *io)
 			KASSERT(i < ctl_sg_count, ("i >= ctl_sg_count"));
 			if (response == NULL) {
 				response =
-				    cfiscsi_pdu_new_response(request, M_WAITOK);
+				    cfiscsi_pdu_new_response(request, M_NOWAIT);
+				if (response == NULL) {
+					CFISCSI_SESSION_WARN(cs, "failed to "
+					    "allocate memory; dropping connection");
+					cfiscsi_session_terminate(cs);
+					return;
+				}
 				bhsdi = (struct iscsi_bhs_data_in *)
 				    response->ip_bhs;
 				bhsdi->bhsdi_opcode =
@@ -2323,7 +2333,14 @@ cfiscsi_datamove(union ctl_io *io)
 				copy_len = cs->cs_max_data_segment_length -
 				    response->ip_data_len;
 			KASSERT(copy_len <= len, ("copy_len > len"));
-			icl_pdu_append_data(response, addr, copy_len, M_WAITOK);
+			error = icl_pdu_append_data(response, addr, copy_len, M_NOWAIT);
+			if (error != 0) {
+				CFISCSI_SESSION_WARN(cs, "failed to "
+				    "allocate memory; dropping connection");
+				icl_pdu_free(response);
+				cfiscsi_session_terminate(cs);
+				return;
+			}
 			addr += copy_len;
 			len -= copy_len;
 			off += copy_len;

Modified: projects/camlock/sys/dev/iscsi/iscsi.c
==============================================================================
--- projects/camlock/sys/dev/iscsi/iscsi.c	Tue Sep 24 07:03:16 2013	(r255835)
+++ projects/camlock/sys/dev/iscsi/iscsi.c	Tue Sep 24 08:40:41 2013	(r255836)
@@ -558,7 +558,11 @@ iscsi_callout(void *context)
 	if (is->is_timeout < 2)
 		return;
 
-	request = icl_pdu_new_bhs(is->is_conn, M_WAITOK);
+	request = icl_pdu_new_bhs(is->is_conn, M_NOWAIT);
+	if (request == NULL) {
+		ISCSI_SESSION_WARN(is, "failed to allocate PDU");
+		return;
+	}
 	bhsno = (struct iscsi_bhs_nop_out *)request->ip_bhs;
 	bhsno->bhsno_opcode = ISCSI_BHS_OPCODE_NOP_OUT |
 	    ISCSI_BHS_OPCODE_IMMEDIATE;

Modified: projects/camlock/sys/dev/iscsi_initiator/iscsi.c
==============================================================================
--- projects/camlock/sys/dev/iscsi_initiator/iscsi.c	Tue Sep 24 07:03:16 2013	(r255835)
+++ projects/camlock/sys/dev/iscsi_initiator/iscsi.c	Tue Sep 24 08:40:41 2013	(r255836)
@@ -717,7 +717,7 @@ iscsi_start(void)
      isc =  malloc(sizeof(struct isc_softc), M_ISCSI, M_ZERO|M_WAITOK);
      isc->dev = make_dev(&iscsi_cdevsw, max_sessions, UID_ROOT, GID_WHEEL, 0600, "iscsi");
      isc->dev->si_drv1 = isc;
-     mtx_init(&isc->isc_mtx, "iscsi", NULL, MTX_DEF);
+     mtx_init(&isc->isc_mtx, "iscsi-isc", NULL, MTX_DEF);
 
      TAILQ_INIT(&isc->isc_sess);
      /*

Modified: projects/camlock/sys/i386/i386/vm_machdep.c
==============================================================================
--- projects/camlock/sys/i386/i386/vm_machdep.c	Tue Sep 24 07:03:16 2013	(r255835)
+++ projects/camlock/sys/i386/i386/vm_machdep.c	Tue Sep 24 08:40:41 2013	(r255836)
@@ -367,7 +367,7 @@ cpu_thread_clean(struct thread *td)
 		 * XXX do we need to move the TSS off the allocated pages
 		 * before freeing them?  (not done here)
 		 */
-		kva_free((vm_offset_t)pcb->pcb_ext,
+		kmem_free(kernel_arena, (vm_offset_t)pcb->pcb_ext,
 		    ctob(IOPAGES + 1));
 		pcb->pcb_ext = NULL;
 	}

Modified: projects/camlock/sys/kern/kern_synch.c
==============================================================================
--- projects/camlock/sys/kern/kern_synch.c	Tue Sep 24 07:03:16 2013	(r255835)
+++ projects/camlock/sys/kern/kern_synch.c	Tue Sep 24 08:40:41 2013	(r255836)
@@ -570,8 +570,8 @@ loadav(void *arg)
 	 * run at regular intervals.
 	 */
 	callout_reset_sbt(&loadav_callout,
-	    tick_sbt * (hz * 4 + (int)(random() % (hz * 2 + 1))), 0,
-	    loadav, NULL, C_DIRECT_EXEC | C_HARDCLOCK);
+	    SBT_1US * (4000000 + (int)(random() % 2000001)), SBT_1US,
+	    loadav, NULL, C_DIRECT_EXEC | C_PREL(32));
 }
 
 /* ARGSUSED */

Modified: projects/camlock/usr.bin/calendar/calendars/calendar.freebsd
==============================================================================
--- projects/camlock/usr.bin/calendar/calendars/calendar.freebsd	Tue Sep 24 07:03:16 2013	(r255835)
+++ projects/camlock/usr.bin/calendar/calendars/calendar.freebsd	Tue Sep 24 08:40:41 2013	(r255836)
@@ -329,6 +329,7 @@
 11/09	Coleman Kane <cokane at FreeBSD.org> born in Cincinnati, Ohio, United States, 1980
 11/09	Antoine Brodin <antoine at FreeBSD.org> born in Bagnolet, France, 1981
 11/10	Gregory Neil Shapiro <gshapiro at FreeBSD.org> born in Providence, Rhode Island, United States, 1970
+11/11	Danilo E. Gondolfo <danilo at FreeBSD.org> born in Lobato, Parana, Brazil, 1987
 11/13	John Baldwin <jhb at FreeBSD.org> born in Stuart, Virginia, United States, 1977
 11/14	Jeremie Le Hen <jlh at FreeBSD.org> born in Nancy, France, 1980
 11/15	Lars Engels <lme at FreeBSD.org> born in Hilden, Nordrhein-Westfalen, Germany, 1980

Modified: projects/camlock/usr.sbin/arp/arp.c
==============================================================================
--- projects/camlock/usr.sbin/arp/arp.c	Tue Sep 24 07:03:16 2013	(r255835)
+++ projects/camlock/usr.sbin/arp/arp.c	Tue Sep 24 08:40:41 2013	(r255836)
@@ -187,8 +187,11 @@ main(int argc, char *argv[])
 			if (argc != 0)
 				usage();
 			search(0, nuke_entry);
-		} else
+		} else {
+			if (argc != 1)
+				usage();
 			rtn = delete(argv[0]);
+		}
 		break;
 	case F_FILESET:
 		if (argc != 1)

Modified: projects/camlock/usr.sbin/bsdconfig/examples/Makefile
==============================================================================
--- projects/camlock/usr.sbin/bsdconfig/examples/Makefile	Tue Sep 24 07:03:16 2013	(r255835)
+++ projects/camlock/usr.sbin/bsdconfig/examples/Makefile	Tue Sep 24 08:40:41 2013	(r255836)
@@ -3,7 +3,7 @@
 NO_OBJ=
 
 FILESDIR=	${SHAREDIR}/examples/bsdconfig
-FILES=		browse_packages.sh bsdconfigrc
+FILES=		browse_packages_ftp.sh browse_packages_http.sh bsdconfigrc
 
 beforeinstall:
 	mkdir -p ${DESTDIR}${FILESDIR}

Copied: projects/camlock/usr.sbin/bsdconfig/examples/browse_packages_ftp.sh (from r255835, head/usr.sbin/bsdconfig/examples/browse_packages_ftp.sh)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ projects/camlock/usr.sbin/bsdconfig/examples/browse_packages_ftp.sh	Tue Sep 24 08:40:41 2013	(r255836, copy of r255835, head/usr.sbin/bsdconfig/examples/browse_packages_ftp.sh)
@@ -0,0 +1,25 @@
+#!/bin/sh
+# $FreeBSD$
+#
+# This sample downloads the package INDEX file from FTP to /tmp (if it doesn't
+# already exist) and then displays the package configuration/management screen
+# using the local INDEX file (results in faster browsing of packages from-start
+# since the INDEX can be loaded from local media).
+#
+# NOTE: Packages cannot be installed unless staged to /tmp/packages/All
+#
+. /usr/share/bsdconfig/script.subr
+nonInteractive=1
+TMPDIR=/tmp
+if [ ! -e "$TMPDIR/packages/INDEX" ]; then
+	[ -d "$TMPDIR/packages" ] || mkdir -p "$TMPDIR/packages" || exit 1
+	_ftpPath=ftp://ftp.freebsd.org
+	# For older releases, use ftp://ftp-archive.freebsd.org
+	mediaSetFTP
+	mediaOpen
+	f_show_info "Downloading packages/INDEX from\n %s" "$_ftpPath" 
+	f_device_get media packages/INDEX > $TMPDIR/packages/INDEX
+fi
+_directoryPath=$TMPDIR
+mediaSetDirectory
+configPackages

Copied: projects/camlock/usr.sbin/bsdconfig/examples/browse_packages_http.sh (from r255835, head/usr.sbin/bsdconfig/examples/browse_packages_http.sh)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ projects/camlock/usr.sbin/bsdconfig/examples/browse_packages_http.sh	Tue Sep 24 08:40:41 2013	(r255836, copy of r255835, head/usr.sbin/bsdconfig/examples/browse_packages_http.sh)
@@ -0,0 +1,25 @@
+#!/bin/sh
+# $FreeBSD$
+#
+# This sample downloads the package INDEX file from HTTP to /tmp (if it doesn't
+# already exist) and then displays the package configuration/management screen
+# using the local INDEX file (results in faster browsing of packages from-start
+# since the INDEX can be loaded from local media).
+#
+# NOTE: Packages cannot be installed unless staged to /tmp/packages/All
+#
+. /usr/share/bsdconfig/script.subr
+nonInteractive=1
+TMPDIR=/tmp
+if [ ! -e "$TMPDIR/packages/INDEX" ]; then
+	[ -d "$TMPDIR/packages" ] || mkdir -p "$TMPDIR/packages" || exit 1
+	_httpPath=http://ftp.freebsd.org
+	# For older releases, use http://ftp-archive.freebsd.org
+	mediaSetHTTP
+	mediaOpen
+	f_show_info "Downloading packages/INDEX from\n %s" "$_httpPath"
+	f_device_get media packages/INDEX > $TMPDIR/packages/INDEX
+fi
+_directoryPath=$TMPDIR
+mediaSetDirectory
+configPackages

Modified: projects/camlock/usr.sbin/bsdconfig/share/media/http.subr
==============================================================================
--- projects/camlock/usr.sbin/bsdconfig/share/media/http.subr	Tue Sep 24 07:03:16 2013	(r255835)
+++ projects/camlock/usr.sbin/bsdconfig/share/media/http.subr	Tue Sep 24 08:40:41 2013	(r255836)
@@ -77,7 +77,8 @@ f_dialog_menu_media_http()
 	f_dialog_title_restore
 	local prompt="$msg_please_select_the_site_closest_to_you_or_other"
 	local menu_list="
-		'URL' '$msg_specify_some_other_http_site'
+		'$msg_main_site'      'ftp.freebsd.org'
+		'URL'                 '$msg_specify_some_other_http_site'
 	" # END-QUOTE
 	local hline="$msg_select_a_site_thats_close"
 
@@ -390,8 +391,12 @@ f_http_check_access()
 	f_show_info "$msg_checking_access_to" "$http_path"
 
 	local rx
+	case "$http_path" in
+	http://*|/*) : valid request ;;
+	*) http_path="/$http_path" # full URI requests only
+	esac
 	if ! rx=$(
-		printf "GET /%s/ HTTP/1.0\r\n\r\n" "${http_path%/}" |
+		printf "GET %s/ HTTP/1.0\r\n\r\n" "${http_path%/}" |
 			nc -n "$host" "$http_port"
 	); then
 		f_show_msg "$msg_couldnt_connect_to_server http://%s:%s/" \
@@ -583,8 +588,12 @@ f_media_get_http()
 
 	local http_path
 	f_getvar $VAR_HTTP_PATH%/ http_path
-	local url="/$http_path/$file" rx
+	case "$http_path" in
+	http://*|/*) : valid request ;;
+	*) http_path="/$http_path" # full URI requests only
+	esac
 
+	local url="$http_path/$file" rx
 	f_dprintf "sending http request for: %s" "$url"
 	printf "GET %s HTTP/1.0\r\n\r\n" "$url" | nc -n "$host" "$http_port" |
 	(

Modified: projects/camlock/usr.sbin/bsdinstall/partedit/gpart_ops.c
==============================================================================
--- projects/camlock/usr.sbin/bsdinstall/partedit/gpart_ops.c	Tue Sep 24 07:03:16 2013	(r255835)
+++ projects/camlock/usr.sbin/bsdinstall/partedit/gpart_ops.c	Tue Sep 24 08:40:41 2013	(r255836)
@@ -954,7 +954,8 @@ addpartform:
 	}
 
 	/* If there isn't one, and we need one, ask */
-	if (strcmp(items[2].text, "/") == 0 && bootpart_size(scheme) > 0 &&
+	if ((strcmp(items[0].text, "freebsd") == 0 ||
+	    strcmp(items[2].text, "/") == 0) && bootpart_size(scheme) > 0 &&
 	    pp == NULL) {
 		if (interactive)
 			choice = dialog_yesno("Boot Partition",

Modified: projects/camlock/usr.sbin/bsdinstall/partedit/partedit_powerpc.c
==============================================================================
--- projects/camlock/usr.sbin/bsdinstall/partedit/partedit_powerpc.c	Tue Sep 24 07:03:16 2013	(r255835)
+++ projects/camlock/usr.sbin/bsdinstall/partedit/partedit_powerpc.c	Tue Sep 24 08:40:41 2013	(r255836)
@@ -59,7 +59,8 @@ is_scheme_bootable(const char *part_type
 		return (1);
 	if (strcmp(platform, "ps3") == 0 && strcmp(part_type, "GPT") == 0)
 		return (1);
-	if (strcmp(platform, "chrp") == 0 && strcmp(part_type, "MBR") == 0)
+	if (strcmp(platform, "chrp") == 0 &&
+	    (strcmp(part_type, "MBR") == 0 || strcmp(part_type, "BSD") == 0))
 		return (1);
 
 	return (0);

Modified: projects/camlock/usr.sbin/unbound/local-setup/local-unbound-setup.sh
==============================================================================
--- projects/camlock/usr.sbin/unbound/local-setup/local-unbound-setup.sh	Tue Sep 24 07:03:16 2013	(r255835)
+++ projects/camlock/usr.sbin/unbound/local-setup/local-unbound-setup.sh	Tue Sep 24 08:40:41 2013	(r255836)
@@ -156,13 +156,12 @@ gen_resolv_conf() {
 #
 gen_resolvconf_conf() {
 	echo "# Generated by $self"
-	echo "name_servers=\"127.0.0.1\""
+	echo "resolv_conf=\"/dev/null\" # prevent updating ${resolv_conf}"
 	echo "unbound_conf=\"${forward_conf}\""
 	echo "unbound_pid=\"${pidfile}\""
 	echo "unbound_service=\"${service}\""
-	# resolvconf(8) likes to restart rather than reload - consider
-	# forcing its hand?
-	#echo "unbound_restart=\"service ${service} reload\""
+	# resolvconf(8) likes to restart rather than reload
+	echo "unbound_restart=\"service ${service} reload\""
 }
 
 #


More information about the svn-src-projects mailing list