svn commit: r184393 - in user/kmacy/HEAD_ECMP: bin/cp contrib/tcsh crypto/openssh etc etc/periodic/security lib/libarchive lib/libarchive/test lib/libc/gen lib/libc/string lib/libc/sys lib/libcam l...

Kip Macy kmacy at FreeBSD.org
Tue Oct 28 06:16:48 UTC 2008


Author: kmacy
Date: Tue Oct 28 06:16:47 2008
New Revision: 184393
URL: http://svn.freebsd.org/changeset/base/184393

Log:
  IF_HEAD part4 184043:184389

Added:
  user/kmacy/HEAD_ECMP/share/man/man4/sdhci.4
Modified:
  user/kmacy/HEAD_ECMP/bin/cp/utils.c
  user/kmacy/HEAD_ECMP/contrib/tcsh/sh.c
  user/kmacy/HEAD_ECMP/contrib/tcsh/tc.const.c
  user/kmacy/HEAD_ECMP/crypto/openssh/loginrec.c
  user/kmacy/HEAD_ECMP/crypto/openssh/sshd.c
  user/kmacy/HEAD_ECMP/etc/Makefile
  user/kmacy/HEAD_ECMP/etc/devd.conf
  user/kmacy/HEAD_ECMP/etc/periodic/security/200.chkmounts
  user/kmacy/HEAD_ECMP/etc/rc.subr
  user/kmacy/HEAD_ECMP/etc/remote
  user/kmacy/HEAD_ECMP/lib/libarchive/archive_read_support_format_zip.c
  user/kmacy/HEAD_ECMP/lib/libarchive/archive_util.c
  user/kmacy/HEAD_ECMP/lib/libarchive/test/test_read_format_zip.c
  user/kmacy/HEAD_ECMP/lib/libarchive/test/test_read_format_zip.zip.uu
  user/kmacy/HEAD_ECMP/lib/libc/gen/__xuname.c
  user/kmacy/HEAD_ECMP/lib/libc/gen/posix_spawn.c
  user/kmacy/HEAD_ECMP/lib/libc/string/strlcpy.c
  user/kmacy/HEAD_ECMP/lib/libc/string/strxfrm.c
  user/kmacy/HEAD_ECMP/lib/libc/sys/mmap.2
  user/kmacy/HEAD_ECMP/lib/libcam/camlib.c
  user/kmacy/HEAD_ECMP/lib/libfetch/http.c
  user/kmacy/HEAD_ECMP/lib/libutil/flopen.3
  user/kmacy/HEAD_ECMP/lib/libutil/flopen.c
  user/kmacy/HEAD_ECMP/lib/libutil/login_cap.h
  user/kmacy/HEAD_ECMP/lib/libutil/login_class.3
  user/kmacy/HEAD_ECMP/lib/libutil/login_class.c
  user/kmacy/HEAD_ECMP/lib/libutil/login_times.3
  user/kmacy/HEAD_ECMP/lib/libutil/login_times.c
  user/kmacy/HEAD_ECMP/lib/libutil/pidfile.3
  user/kmacy/HEAD_ECMP/lib/libutil/pidfile.c
  user/kmacy/HEAD_ECMP/lib/libutil/pty.c
  user/kmacy/HEAD_ECMP/release/Makefile
  user/kmacy/HEAD_ECMP/release/doc/en_US.ISO8859-1/hardware/article.sgml
  user/kmacy/HEAD_ECMP/sbin/geom/class/part/geom_part.c
  user/kmacy/HEAD_ECMP/sbin/ifconfig/ifconfig.8
  user/kmacy/HEAD_ECMP/share/man/man4/mmc.4
  user/kmacy/HEAD_ECMP/share/man/man4/mmcsd.4
  user/kmacy/HEAD_ECMP/share/man/man4/snd_hda.4
  user/kmacy/HEAD_ECMP/share/man/man4/u3g.4
  user/kmacy/HEAD_ECMP/share/man/man4/umodem.4
  user/kmacy/HEAD_ECMP/share/man/man9/Makefile
  user/kmacy/HEAD_ECMP/share/man/man9/malloc.9
  user/kmacy/HEAD_ECMP/share/man/man9/vinvalbuf.9
  user/kmacy/HEAD_ECMP/tools/regression/lib/libutil/test-flopen.c
  user/kmacy/HEAD_ECMP/tools/tools/ath/athdebug/athdebug.c
  user/kmacy/HEAD_ECMP/tools/tools/ath/athstats/Makefile
  user/kmacy/HEAD_ECMP/tools/tools/ath/athstats/athstats.c
  user/kmacy/HEAD_ECMP/tools/tools/ath/athstats/main.c
  user/kmacy/HEAD_ECMP/tools/tools/nanobsd/nanobsd.sh
  user/kmacy/HEAD_ECMP/usr.sbin/Makefile
  user/kmacy/HEAD_ECMP/usr.sbin/nscd/agents/group.c
  user/kmacy/HEAD_ECMP/usr.sbin/nscd/agents/passwd.c
  user/kmacy/HEAD_ECMP/usr.sbin/nscd/agents/services.c
  user/kmacy/HEAD_ECMP/usr.sbin/nscd/cachelib.c
  user/kmacy/HEAD_ECMP/usr.sbin/nscd/nscd.c
  user/kmacy/HEAD_ECMP/usr.sbin/nscd/nscdcli.c
  user/kmacy/HEAD_ECMP/usr.sbin/pciconf/pciconf.c
  user/kmacy/HEAD_ECMP/usr.sbin/sysinstall/package.c

Modified: user/kmacy/HEAD_ECMP/bin/cp/utils.c
==============================================================================
--- user/kmacy/HEAD_ECMP/bin/cp/utils.c	Tue Oct 28 06:15:43 2008	(r184392)
+++ user/kmacy/HEAD_ECMP/bin/cp/utils.c	Tue Oct 28 06:16:47 2008	(r184393)
@@ -137,41 +137,39 @@ copy_file(const FTSENT *entp, int dne)
 		 * Mmap and write if less than 8M (the limit is so we don't totally
 		 * trash memory on big files.  This is really a minor hack, but it
 		 * wins some CPU back.
+		 * Some filesystems, such as smbnetfs, don't support mmap,
+		 * so this is a best-effort attempt.
 		 */
 #ifdef VM_AND_BUFFER_CACHE_SYNCHRONIZED
 		if (S_ISREG(fs->st_mode) && fs->st_size > 0 &&
-	    	fs->st_size <= 8 * 1048576) {
-			if ((p = mmap(NULL, (size_t)fs->st_size, PROT_READ,
-		    	MAP_SHARED, from_fd, (off_t)0)) == MAP_FAILED) {
+	    	    fs->st_size <= 8 * 1024 * 1024 &&
+		    (p = mmap(NULL, (size_t)fs->st_size, PROT_READ,
+		    MAP_SHARED, from_fd, (off_t)0)) != MAP_FAILED) {
+			wtotal = 0;
+			for (bufp = p, wresid = fs->st_size; ;
+			bufp += wcount, wresid -= (size_t)wcount) {
+				wcount = write(to_fd, bufp, wresid);
+				if (wcount <= 0)
+					break;
+				wtotal += wcount;
+				if (info) {
+					info = 0;
+					(void)fprintf(stderr,
+					    "%s -> %s %3d%%\n",
+					    entp->fts_path, to.p_path,
+					    cp_pct(wtotal, fs->st_size));
+				}
+				if (wcount >= (ssize_t)wresid)
+					break;
+			}
+			if (wcount != (ssize_t)wresid) {
+				warn("%s", to.p_path);
+				rval = 1;
+			}
+			/* Some systems don't unmap on close(2). */
+			if (munmap(p, fs->st_size) < 0) {
 				warn("%s", entp->fts_path);
 				rval = 1;
-			} else {
-				wtotal = 0;
-				for (bufp = p, wresid = fs->st_size; ;
-			    	bufp += wcount, wresid -= (size_t)wcount) {
-					wcount = write(to_fd, bufp, wresid);
-					if (wcount <= 0)
-						break;
-					wtotal += wcount;
-					if (info) {
-						info = 0;
-						(void)fprintf(stderr,
-						    "%s -> %s %3d%%\n",
-						    entp->fts_path, to.p_path,
-						    cp_pct(wtotal, fs->st_size));
-					}
-					if (wcount >= (ssize_t)wresid)
-						break;
-				}
-				if (wcount != (ssize_t)wresid) {
-					warn("%s", to.p_path);
-					rval = 1;
-				}
-				/* Some systems don't unmap on close(2). */
-				if (munmap(p, fs->st_size) < 0) {
-					warn("%s", entp->fts_path);
-					rval = 1;
-				}
 			}
 		} else
 #endif

Modified: user/kmacy/HEAD_ECMP/contrib/tcsh/sh.c
==============================================================================
--- user/kmacy/HEAD_ECMP/contrib/tcsh/sh.c	Tue Oct 28 06:15:43 2008	(r184392)
+++ user/kmacy/HEAD_ECMP/contrib/tcsh/sh.c	Tue Oct 28 06:16:47 2008	(r184393)
@@ -462,7 +462,7 @@ main(int argc, char **argv)
 	    else
 		cp2 = cp;
 	    if (!(((Strncmp(cp2, STRtty, 3) == 0) && Isalpha(cp2[3])) ||
-	          Strstr(cp, STRslptssl) != NULL)) {
+	          Strstr(cp, STRptssl) != NULL)) {
 		if (getenv("DISPLAY") == NULL) {
 		    /* NOT on X window shells */
 		    setcopy(STRautologout, STRdefautologout, VAR_READWRITE);

Modified: user/kmacy/HEAD_ECMP/contrib/tcsh/tc.const.c
==============================================================================
--- user/kmacy/HEAD_ECMP/contrib/tcsh/tc.const.c	Tue Oct 28 06:15:43 2008	(r184392)
+++ user/kmacy/HEAD_ECMP/contrib/tcsh/tc.const.c	Tue Oct 28 06:16:47 2008	(r184393)
@@ -46,7 +46,7 @@ Char STRautomatic[]	= { 'a', 'u', 't', '
 Char STRhangup[]	= { 'h', 'a', 'n', 'g', 'u', 'p', '\0' };
 Char STRaout[]		= { 'a', '.', 'o', 'u', 't', '\0' };
 Char STRtty[]		= { 't', 't', 'y', '\0' };
-Char STRslptssl[]	= { '/', 'p', 't', 's', '/', '\0' };
+Char STRptssl[]		= { 'p', 't', 's', '/', '\0' };
 Char STRany[]		= { 'a', 'n', 'y', '\0' };
 Char STRstatus[]	= { 's', 't', 'a', 't', 'u', 's', '\0' };
 Char STR0[]		= { '0', '\0' };

Modified: user/kmacy/HEAD_ECMP/crypto/openssh/loginrec.c
==============================================================================
--- user/kmacy/HEAD_ECMP/crypto/openssh/loginrec.c	Tue Oct 28 06:15:43 2008	(r184392)
+++ user/kmacy/HEAD_ECMP/crypto/openssh/loginrec.c	Tue Oct 28 06:16:47 2008	(r184393)
@@ -146,7 +146,6 @@
  */
 
 #include "includes.h"
-__RCSID("$FreeBSD$");
 
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -689,8 +688,8 @@ construct_utmp(struct logininfo *li,
 	strncpy(ut->ut_name, li->username,
 	    MIN_SIZEOF(ut->ut_name, li->username));
 # ifdef HAVE_HOST_IN_UTMP
-	realhostname_sa(ut->ut_host, sizeof ut->ut_host,
-	    &li->hostaddr.sa, li->hostaddr.sa.sa_len);
+	strncpy(ut->ut_host, li->hostname,
+	    MIN_SIZEOF(ut->ut_host, li->hostname));
 # endif
 # ifdef HAVE_ADDR_IN_UTMP
 	/* this is just a 32-bit IP address */

Modified: user/kmacy/HEAD_ECMP/crypto/openssh/sshd.c
==============================================================================
--- user/kmacy/HEAD_ECMP/crypto/openssh/sshd.c	Tue Oct 28 06:15:43 2008	(r184392)
+++ user/kmacy/HEAD_ECMP/crypto/openssh/sshd.c	Tue Oct 28 06:16:47 2008	(r184393)
@@ -72,6 +72,7 @@ __RCSID("$FreeBSD$");
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
+#include <utmp.h>
 
 #include <openssl/dh.h>
 #include <openssl/bn.h>
@@ -238,7 +239,7 @@ u_char *session_id2 = NULL;
 u_int session_id2_len = 0;
 
 /* record remote hostname or ip */
-u_int utmp_len = MAXHOSTNAMELEN;
+u_int utmp_len = UT_HOSTSIZE;
 
 /* options.max_startup sized array of fd ints */
 int *startup_pipes = NULL;

Modified: user/kmacy/HEAD_ECMP/etc/Makefile
==============================================================================
--- user/kmacy/HEAD_ECMP/etc/Makefile	Tue Oct 28 06:15:43 2008	(r184392)
+++ user/kmacy/HEAD_ECMP/etc/Makefile	Tue Oct 28 06:16:47 2008	(r184393)
@@ -8,7 +8,7 @@ SUBDIR=	sendmail
 .endif
 
 BIN1=	auth.conf \
-	crontab csh.cshrc csh.login csh.logout devd.conf devfs.conf \
+	crontab devd.conf devfs.conf \
 	ddb.conf dhclient.conf disktab fbtab \
 	ftpusers gettytab group \
 	hosts hosts.allow hosts.equiv \
@@ -84,6 +84,10 @@ BIN1+= portsnap.conf
 BIN1+= pf.os
 .endif
 
+.if ${MK_TCSH} != "no"
+BIN1+= csh.cshrc csh.login csh.logout
+.endif
+
 .if ${MK_WIRELESS} != "no"
 BIN1+= regdomain.xml
 .endif
@@ -148,9 +152,12 @@ distribution:
 	    ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 755 \
 		${BIN2} ${DESTDIR}/etc; \
 	    ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \
-		master.passwd nsmb.conf opieaccess ${DESTDIR}/etc; \
-	    pwd_mkdb ${PWD_MKDB_ENDIAN} -i -p -d ${DESTDIR}/etc \
-		${DESTDIR}/etc/master.passwd
+		master.passwd nsmb.conf opieaccess ${DESTDIR}/etc;
+.if ${MK_TCSH} == "no"
+	sed -i "" -e 's;/bin/csh;;' ${DESTDIR}/etc/master.passwd
+.endif
+	pwd_mkdb ${PWD_MKDB_ENDIAN} -i -p -d ${DESTDIR}/etc \
+	    ${DESTDIR}/etc/master.passwd
 .if ${MK_BLUETOOTH} != "no"
 	${_+_}cd ${.CURDIR}/bluetooth; ${MAKE} install
 .endif
@@ -195,14 +202,18 @@ distribution:
 .endif
 	cd ${.CURDIR}/root; \
 	    ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
+		dot.profile ${DESTDIR}/root/.profile; \
+	    rm -f ${DESTDIR}/.profile; \
+	    ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile
+.if ${MK_TCSH} != "no"
+	cd ${.CURDIR}/root; \
+	    ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
 		dot.cshrc ${DESTDIR}/root/.cshrc; \
 	    ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
 		dot.login ${DESTDIR}/root/.login; \
-	    ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \
-		dot.profile ${DESTDIR}/root/.profile; \
-	    rm -f ${DESTDIR}/.cshrc ${DESTDIR}/.profile; \
-	    ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc; \
-	    ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile
+	    rm -f ${DESTDIR}/.cshrc; \
+	    ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc
+.endif
 	cd ${.CURDIR}/mtree; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \
 	    ${MTREE} ${DESTDIR}/etc/mtree
 .if ${MK_PPP} != "no"

Modified: user/kmacy/HEAD_ECMP/etc/devd.conf
==============================================================================
--- user/kmacy/HEAD_ECMP/etc/devd.conf	Tue Oct 28 06:15:43 2008	(r184392)
+++ user/kmacy/HEAD_ECMP/etc/devd.conf	Tue Oct 28 06:16:47 2008	(r184393)
@@ -256,6 +256,7 @@ notify 10 {
 };
 
 # The next blocks enable volume hotkeys that can be found on the Asus EeePC
+# The four keys above the keyboard notify 0x1a through to 0x1d respectively
 notify 0 {
         match "system"          "ACPI";
         match "subsystem"       "ASUS-Eee";

Modified: user/kmacy/HEAD_ECMP/etc/periodic/security/200.chkmounts
==============================================================================
--- user/kmacy/HEAD_ECMP/etc/periodic/security/200.chkmounts	Tue Oct 28 06:15:43 2008	(r184392)
+++ user/kmacy/HEAD_ECMP/etc/periodic/security/200.chkmounts	Tue Oct 28 06:16:47 2008	(r184393)
@@ -50,7 +50,7 @@ case "$daily_status_security_chkmounts_e
 		ignore="${ignore}|^amd:"
 	esac
 	[ -n "$ignore" ] && cmd="egrep -v ${ignore#|}" || cmd=cat
-	mount -p | ${cmd} |
+	mount -p | sort | ${cmd} |
 	  check_diff mount - "${host} changes in mounted filesystems:"
 	rc=$?;;
     *)	rc=0;;

Modified: user/kmacy/HEAD_ECMP/etc/rc.subr
==============================================================================
--- user/kmacy/HEAD_ECMP/etc/rc.subr	Tue Oct 28 06:15:43 2008	(r184392)
+++ user/kmacy/HEAD_ECMP/etc/rc.subr	Tue Oct 28 06:16:47 2008	(r184393)
@@ -913,6 +913,7 @@ run_rc_script()
 			else
 				( trap "echo Script $_file interrupted; kill -QUIT $$" 3
 				  trap "echo Script $_file interrupted; exit 1" 2
+				  trap "echo Script $_file running" 29
 				  set $_arg; . $_file )
 			fi
 		fi

Modified: user/kmacy/HEAD_ECMP/etc/remote
==============================================================================
--- user/kmacy/HEAD_ECMP/etc/remote	Tue Oct 28 06:15:43 2008	(r184392)
+++ user/kmacy/HEAD_ECMP/etc/remote	Tue Oct 28 06:16:47 2008	(r184393)
@@ -66,3 +66,11 @@ uart4|com5:dv=/dev/cuau4:br#9600:pa=none
 uart5|com6:dv=/dev/cuau5:br#9600:pa=none:
 uart6|com7:dv=/dev/cuau6:br#9600:pa=none:
 uart7|com8:dv=/dev/cuau7:br#9600:pa=none:
+ucom1:dv=/dev/cuaU0:br#9600:pa=none:
+ucom2:dv=/dev/cuaU1:br#9600:pa=none:
+ucom3:dv=/dev/cuaU2:br#9600:pa=none:
+ucom4:dv=/dev/cuaU3:br#9600:pa=none:
+ucom5:dv=/dev/cuaU4:br#9600:pa=none:
+ucom6:dv=/dev/cuaU5:br#9600:pa=none:
+ucom7:dv=/dev/cuaU6:br#9600:pa=none:
+ucom8:dv=/dev/cuaU7:br#9600:pa=none:

Modified: user/kmacy/HEAD_ECMP/lib/libarchive/archive_read_support_format_zip.c
==============================================================================
--- user/kmacy/HEAD_ECMP/lib/libarchive/archive_read_support_format_zip.c	Tue Oct 28 06:15:43 2008	(r184392)
+++ user/kmacy/HEAD_ECMP/lib/libarchive/archive_read_support_format_zip.c	Tue Oct 28 06:16:47 2008	(r184393)
@@ -444,7 +444,9 @@ zip_read_file_header(struct archive_read
 	archive_entry_set_mtime(entry, zip->mtime, 0);
 	archive_entry_set_ctime(entry, zip->ctime, 0);
 	archive_entry_set_atime(entry, zip->atime, 0);
-	archive_entry_set_size(entry, zip->uncompressed_size);
+	/* Set the size only if it's meaningful. */
+	if (0 == (zip->flags & ZIP_LENGTH_AT_END))
+		archive_entry_set_size(entry, zip->uncompressed_size);
 
 	zip->entry_bytes_remaining = zip->compressed_size;
 	zip->entry_offset = 0;
@@ -573,12 +575,16 @@ archive_read_format_zip_read_data(struct
 		}
 		break;
 	}
+	if (r != ARCHIVE_OK)
+		return (r);
 	/* Update checksum */
-	if (r == ARCHIVE_OK && *size) {
+	if (*size)
 		zip->entry_crc32 =
 		    crc32(zip->entry_crc32, *buff, *size);
-	}
-	return (r);
+	/* Return EOF immediately if this is a non-regular file. */
+	if (AE_IFREG != (zip->mode & AE_IFMT))
+		return (ARCHIVE_EOF);
+	return (ARCHIVE_OK);
 }
 
 /*

Modified: user/kmacy/HEAD_ECMP/lib/libarchive/archive_util.c
==============================================================================
--- user/kmacy/HEAD_ECMP/lib/libarchive/archive_util.c	Tue Oct 28 06:15:43 2008	(r184392)
+++ user/kmacy/HEAD_ECMP/lib/libarchive/archive_util.c	Tue Oct 28 06:16:47 2008	(r184393)
@@ -168,6 +168,7 @@ archive_set_error(struct archive *a, int
 
 	va_start(ap, fmt);
 	archive_string_vsprintf(&(a->error_string), fmt, ap);
+	va_end(ap);
 	if (error_number > 0) {
 		archive_strcat(&(a->error_string), ": ");
 #ifdef HAVE_STRERROR_R
@@ -184,7 +185,6 @@ archive_set_error(struct archive *a, int
 		archive_strcat(&(a->error_string), errp);
 	}
 	a->error = a->error_string.s;
-	va_end(ap);
 }
 
 void

Modified: user/kmacy/HEAD_ECMP/lib/libarchive/test/test_read_format_zip.c
==============================================================================
--- user/kmacy/HEAD_ECMP/lib/libarchive/test/test_read_format_zip.c	Tue Oct 28 06:15:43 2008	(r184392)
+++ user/kmacy/HEAD_ECMP/lib/libarchive/test/test_read_format_zip.c	Tue Oct 28 06:16:47 2008	(r184393)
@@ -25,6 +25,12 @@
 #include "test.h"
 __FBSDID("$FreeBSD$");
 
+/*
+ * The reference file for this has been manually tweaked so that:
+ *   * file2 has length-at-end but file1 does not
+ *   * file2 has an invalid CRC
+ */
+
 DEFINE_TEST(test_read_format_zip)
 {
 	const char *refname = "test_read_format_zip.zip";
@@ -57,7 +63,8 @@ DEFINE_TEST(test_read_format_zip)
 	assertA(0 == archive_read_next_header(a, &ae));
 	assertEqualString("file2", archive_entry_pathname(ae));
 	assertEqualInt(1179605932, archive_entry_mtime(ae));
-	assertEqualInt(18, archive_entry_size(ae));
+	failure("file2 has length-at-end, so we shouldn't see a valid size");
+	assertEqualInt(0, archive_entry_size_is_set(ae));
 	failure("file2 has a bad CRC, so reading to end should fail");
 	assertEqualInt(ARCHIVE_WARN, archive_read_data(a, buff, 19));
 	assert(0 == memcmp(buff, "hello\nhello\nhello\n", 18));

Modified: user/kmacy/HEAD_ECMP/lib/libarchive/test/test_read_format_zip.zip.uu
==============================================================================
--- user/kmacy/HEAD_ECMP/lib/libarchive/test/test_read_format_zip.zip.uu	Tue Oct 28 06:15:43 2008	(r184392)
+++ user/kmacy/HEAD_ECMP/lib/libarchive/test/test_read_format_zip.zip.uu	Tue Oct 28 06:16:47 2008	(r184393)
@@ -1,13 +1,14 @@
 $FreeBSD$
 begin 644 test_read_format_zip.zip
-M4$L#!`H``````%EFLS8````````````````$`!4`9&ER+U54"0`#&55/1AE5
-M3T95>`0`Z`/H`U!+`P04````"`!O9K,V.C=F/0H````2````!0`5`&9I;&4Q
-M550)``-!54]&K%M/1E5X!`#H`^@#RTC-R<GGRD`B`5!+`P04````"`!::K,V
-M>%8T$@H````2````!0`5`&9I;&4R550)``.L6T]&K%M/1E5X!`#H`^@#RTC-
-MR<GGRD`B`5!+`0(7`PH``````%EFLS8````````````````$``T`````````
-M$`#M00````!D:7(O550%``,954]&57@``%!+`0(7`Q0````(`&]FLS8Z-V8]
-M"@```!(````%``T```````$```"D at 3<```!F:6QE,554!0`#055/1E5X``!0
-M2P$"%P,4````"`!::K,V>%8T$@H````2````!0`-```````!````I(%Y````
-H9FEL93)55`4``ZQ;3T95>```4$L%!@`````#``,`OP```+L`````````
+M4$L#!`H`"````%EFLS8````````````````$`!4`9&ER+U54"0`#&55/1M19
+M_4A5>`0`Z`/H`U!+!P@```````````````!02P,$%`````@`;V:S-CHW9CT*
+M````$@````4`%0!F:6QE,554"0`#055/1L!9_4A5>`0`Z`/H`\M(S<G)Y\I`
+M(@%02P,$%``(``@`6FJS-@``````````$@````4`%0!F:6QE,E54"0`#K%M/
+M1L!9_4A5>`0`Z`/H`\M(S<G)Y\I`(@%02P<(.C=F$@H````2````4$L!`A<#
+M"@`(````66:S-@````````````````0`#0`````````0`.U!`````&1I<B]5
+M5`4``QE53T95>```4$L!`A<#%``(``@`;V:S-CHW9CT*````$@````4`#0``
+M`````0```.V!1P```&9I;&4Q550%``-!54]&57@``%!+`0(7`Q0`"``(`%IJ
+MLS8Z-V8]"@```!(````%``T```````$```#M at 8D```!F:6QE,E54!0`#K%M/
+;1E5X``!02P4&``````,``P"_````VP``````
 `
 end

Modified: user/kmacy/HEAD_ECMP/lib/libc/gen/__xuname.c
==============================================================================
--- user/kmacy/HEAD_ECMP/lib/libc/gen/__xuname.c	Tue Oct 28 06:15:43 2008	(r184392)
+++ user/kmacy/HEAD_ECMP/lib/libc/gen/__xuname.c	Tue Oct 28 06:16:47 2008	(r184393)
@@ -45,94 +45,102 @@ __xuname(int namesize, void *namebuf)
 {
 	int mib[2], rval;
 	size_t len;
-	char *p;
+	char *p, *q;
 	int oerrno;
-	struct xutsname {
-		char	sysname[namesize];	/* Name of this OS. */
-		char	nodename[namesize];	/* Name of this network node. */
-		char	release[namesize];	/* Release level. */
-		char	version[namesize];	/* Version level. */
-		char	machine[namesize];	/* Hardware type. */
-	} *name;
 
-	name = (struct xutsname *)namebuf;
 	rval = 0;
+	q = (char *)namebuf;
 
 	mib[0] = CTL_KERN;
-	mib[1] = KERN_OSTYPE;
-	len = sizeof(name->sysname);
-	oerrno = errno;
-	if (sysctl(mib, 2, &name->sysname, &len, NULL, 0) == -1) {
-		if(errno == ENOMEM)
-			errno = oerrno;
-		else
-			rval = -1;
-	}
-	name->sysname[sizeof(name->sysname) - 1] = '\0';
+
 	if ((p = getenv("UNAME_s")))
-		strlcpy(name->sysname, p, sizeof(name->sysname));
+		strlcpy(q, p, namesize);
+	else {
+		mib[1] = KERN_OSTYPE;
+		len = namesize;
+		oerrno = errno;
+		if (sysctl(mib, 2, q, &len, NULL, 0) == -1) {
+			if (errno == ENOMEM)
+				errno = oerrno;
+			else
+				rval = -1;
+		}
+		q[namesize - 1] = '\0';
+	}
+	q += namesize;
 
-	mib[0] = CTL_KERN;
 	mib[1] = KERN_HOSTNAME;
-	len = sizeof(name->nodename);
+	len = namesize;
 	oerrno = errno;
-	if (sysctl(mib, 2, &name->nodename, &len, NULL, 0) == -1) {
-		if(errno == ENOMEM)
+	if (sysctl(mib, 2, q, &len, NULL, 0) == -1) {
+		if (errno == ENOMEM)
 			errno = oerrno;
 		else
 			rval = -1;
 	}
-	name->nodename[sizeof(name->nodename) - 1] = '\0';
+	q[namesize - 1] = '\0';
+	q += namesize;
 
-	mib[0] = CTL_KERN;
-	mib[1] = KERN_OSRELEASE;
-	len = sizeof(name->release);
-	oerrno = errno;
-	if (sysctl(mib, 2, &name->release, &len, NULL, 0) == -1) {
-		if(errno == ENOMEM)
-			errno = oerrno;
-		else
-			rval = -1;
-	}
-	name->release[sizeof(name->release) - 1] = '\0';
 	if ((p = getenv("UNAME_r")))
-		strlcpy(name->release, p, sizeof(name->release));
-
-	/* The version may have newlines in it, turn them into spaces. */
-	mib[0] = CTL_KERN;
-	mib[1] = KERN_VERSION;
-	len = sizeof(name->version);
-	oerrno = errno;
-	if (sysctl(mib, 2, &name->version, &len, NULL, 0) == -1) {
-		if (errno == ENOMEM)
-			errno = oerrno;
-		else
-			rval = -1;
-	}
-	name->version[sizeof(name->version) - 1] = '\0';
-	for (p = name->version; len--; ++p) {
-		if (*p == '\n' || *p == '\t') {
-			if (len > 1)
-				*p = ' ';
+		strlcpy(q, p, namesize);
+	else {
+		mib[1] = KERN_OSRELEASE;
+		len = namesize;
+		oerrno = errno;
+		if (sysctl(mib, 2, q, &len, NULL, 0) == -1) {
+			if (errno == ENOMEM)
+				errno = oerrno;
 			else
-				*p = '\0';
+				rval = -1;
 		}
+		q[namesize - 1] = '\0';
 	}
+	q += namesize;
+
 	if ((p = getenv("UNAME_v")))
-		strlcpy(name->version, p, sizeof(name->version));
+		strlcpy(q, p, namesize);
+	else {
 
-	mib[0] = CTL_HW;
-	mib[1] = HW_MACHINE;
-	len = sizeof(name->machine);
-	oerrno = errno;
-	if (sysctl(mib, 2, &name->machine, &len, NULL, 0) == -1) {
-		if (errno == ENOMEM)
-			errno = oerrno;
-		else
-			rval = -1;
+		/*
+		 * The version may have newlines in it, turn them into
+		 * spaces.
+		 */
+		mib[1] = KERN_VERSION;
+		len = namesize;
+		oerrno = errno;
+		if (sysctl(mib, 2, q, &len, NULL, 0) == -1) {
+			if (errno == ENOMEM)
+				errno = oerrno;
+			else
+				rval = -1;
+		}
+		q[namesize - 1] = '\0';
+		for (p = q; len--; ++p) {
+			if (*p == '\n' || *p == '\t') {
+				if (len > 1)
+					*p = ' ';
+				else
+					*p = '\0';
+			}
+		}
 	}
-	name->machine[sizeof(name->machine) - 1] = '\0';
+	q += namesize;
+
 	if ((p = getenv("UNAME_m")))
-		strlcpy(name->machine, p, sizeof(name->machine));
+		strlcpy(q, p, namesize);
+	else {
+		mib[0] = CTL_HW;
+		mib[1] = HW_MACHINE;
+		len = namesize;
+		oerrno = errno;
+		if (sysctl(mib, 2, q, &len, NULL, 0) == -1) {
+			if (errno == ENOMEM)
+				errno = oerrno;
+			else
+				rval = -1;
+		}
+		q[namesize - 1] = '\0';
+	}
+
 	return (rval);
 }

Modified: user/kmacy/HEAD_ECMP/lib/libc/gen/posix_spawn.c
==============================================================================
--- user/kmacy/HEAD_ECMP/lib/libc/gen/posix_spawn.c	Tue Oct 28 06:15:43 2008	(r184392)
+++ user/kmacy/HEAD_ECMP/lib/libc/gen/posix_spawn.c	Tue Oct 28 06:16:47 2008	(r184393)
@@ -444,7 +444,7 @@ posix_spawnattr_setpgroup(posix_spawnatt
 }
 
 int
-posix_spawnattr_setschedparam(posix_spawnattr_t *sa __restrict,
+posix_spawnattr_setschedparam(posix_spawnattr_t * __restrict sa,
     const struct sched_param * __restrict schedparam)
 {
 	(*sa)->sa_schedparam = *schedparam;

Modified: user/kmacy/HEAD_ECMP/lib/libc/string/strlcpy.c
==============================================================================
--- user/kmacy/HEAD_ECMP/lib/libc/string/strlcpy.c	Tue Oct 28 06:15:43 2008	(r184392)
+++ user/kmacy/HEAD_ECMP/lib/libc/string/strlcpy.c	Tue Oct 28 06:16:47 2008	(r184393)
@@ -1,35 +1,21 @@
-/*	$OpenBSD: strlcpy.c,v 1.4 1999/05/01 18:56:41 millert Exp $	*/
+/*	$OpenBSD: strlcpy.c,v 1.11 2006/05/05 15:27:38 millert Exp $	*/
 
 /*
  * Copyright (c) 1998 Todd C. Miller <Todd.Miller at courtesan.com>
- * 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.
- * 3. The name of the author may not be used to endorse or promote products
- *    derived from this software without specific prior written permission.
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
  *
- * THIS SOFTWARE IS PROVIDED ``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 AUTHOR 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.
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: strlcpy.c,v 1.4 1999/05/01 18:56:41 millert Exp $";
-#endif /* LIBC_SCCS and not lint */
 #include <sys/cdefs.h>
 __FBSDID("$FreeBSD$");
 
@@ -42,21 +28,18 @@ __FBSDID("$FreeBSD$");
  * Returns strlen(src); if retval >= siz, truncation occurred.
  */
 size_t
-strlcpy(dst, src, siz)
-	char *dst;
-	const char *src;
-	size_t siz;
+strlcpy(char *dst, const char *src, size_t siz)
 {
 	char *d = dst;
 	const char *s = src;
 	size_t n = siz;
 
 	/* Copy as many bytes as will fit */
-	if (n != 0 && --n != 0) {
-		do {
-			if ((*d++ = *s++) == 0)
+	if (n != 0) {
+		while (--n != 0) {
+			if ((*d++ = *s++) == '\0')
 				break;
-		} while (--n != 0);
+		}
 	}
 
 	/* Not enough room in dst, add NUL and traverse rest of src */

Modified: user/kmacy/HEAD_ECMP/lib/libc/string/strxfrm.c
==============================================================================
--- user/kmacy/HEAD_ECMP/lib/libc/string/strxfrm.c	Tue Oct 28 06:15:43 2008	(r184392)
+++ user/kmacy/HEAD_ECMP/lib/libc/string/strxfrm.c	Tue Oct 28 06:16:47 2008	(r184393)
@@ -45,17 +45,8 @@ strxfrm(char * __restrict dest, const ch
 		return 0;
 	}
 
-	if (__collate_load_error) {
-		slen = strlen(src);
-		if (len > 0) {
-			if (slen < len)
-				strcpy(dest, src);
-			else {
-				strlcpy(dest, src, len);
-			}
-		}
-		return slen;
-	}
+	if (__collate_load_error)
+		return strlcpy(dest, src, len);
 
 	slen = 0;
 	prim = sec = 0;

Modified: user/kmacy/HEAD_ECMP/lib/libc/sys/mmap.2
==============================================================================
--- user/kmacy/HEAD_ECMP/lib/libc/sys/mmap.2	Tue Oct 28 06:15:43 2008	(r184392)
+++ user/kmacy/HEAD_ECMP/lib/libc/sys/mmap.2	Tue Oct 28 06:16:47 2008	(r184393)
@@ -28,7 +28,7 @@
 .\"	@(#)mmap.2	8.4 (Berkeley) 5/11/95
 .\" $FreeBSD$
 .\"
-.Dd April 21, 2006
+.Dd October 24, 2008
 .Dt MMAP 2
 .Os
 .Sh NAME
@@ -252,6 +252,11 @@ In the future we may define an additiona
 in which
 the file descriptor argument specifies a file or device to which swapping
 should be done.
+.Sh NOTES
+Although this implementation does not impose any alignment restrictions on
+the
+.Fa offset
+argument, a portable program must only use page-aligned values.
 .Sh RETURN VALUES
 Upon successful completion,
 .Fn mmap
@@ -307,13 +312,6 @@ was negative.
 was specified and the
 .Fa fd
 argument was not -1.
-The
-.Fa offset
-argument
-was not page-aligned.
-(See
-.Sx BUGS
-below.)
 .It Bq Er ENODEV
 .Dv MAP_ANON
 has not been specified and

Modified: user/kmacy/HEAD_ECMP/lib/libcam/camlib.c
==============================================================================
--- user/kmacy/HEAD_ECMP/lib/libcam/camlib.c	Tue Oct 28 06:15:43 2008	(r184392)
+++ user/kmacy/HEAD_ECMP/lib/libcam/camlib.c	Tue Oct 28 06:16:47 2008	(r184393)
@@ -346,6 +346,9 @@ cam_open_btl(path_id_t path_id, target_i
 
 	bzero(&ccb, sizeof(union ccb));
 	ccb.ccb_h.func_code = XPT_DEV_MATCH;
+	ccb.ccb_h.path_id = CAM_XPT_PATH_ID;
+	ccb.ccb_h.target_id = CAM_TARGET_WILDCARD;
+	ccb.ccb_h.target_lun = CAM_LUN_WILDCARD;
 
 	/* Setup the result buffer */
 	bufsize = sizeof(struct dev_match_result);

Modified: user/kmacy/HEAD_ECMP/lib/libfetch/http.c
==============================================================================
--- user/kmacy/HEAD_ECMP/lib/libfetch/http.c	Tue Oct 28 06:15:43 2008	(r184392)
+++ user/kmacy/HEAD_ECMP/lib/libfetch/http.c	Tue Oct 28 06:16:47 2008	(r184393)
@@ -1064,6 +1064,7 @@ http_request(struct url *URL, const char
 			if (url->offset == size && url->length == 0) {
 				/* asked for 0 bytes; fake it */
 				offset = url->offset;
+				clength = -1;
 				conn->err = HTTP_OK;
 				break;
 			} else {

Modified: user/kmacy/HEAD_ECMP/lib/libutil/flopen.3
==============================================================================
--- user/kmacy/HEAD_ECMP/lib/libutil/flopen.3	Tue Oct 28 06:15:43 2008	(r184392)
+++ user/kmacy/HEAD_ECMP/lib/libutil/flopen.3	Tue Oct 28 06:16:47 2008	(r184393)
@@ -46,12 +46,13 @@ The
 function opens or creates a file and acquires an exclusive lock on it.
 It is essentially equivalent with calling
 .Fn open
-with the same parameters followed by
-.Fn flock
-with an
-.Va operation
-argument of
-.Dv LOCK_EX ,
+with the same parameters followed by an
+.Fn fcntl
+.Dv F_SETLK
+or
+.Dv F_SETLKW
+operation with lock type
+.Dv F_WRLCK ,
 except that
 .Fn flopen
 will attempt to detect and handle races that may occur between opening
@@ -86,12 +87,12 @@ returns a valid file descriptor.
 Otherwise, it returns -1, and sets
 .Va errno
 as described in
-.Xr flock 2
+.Xr fcntl 2
 and
 .Xr open 2 .
 .Sh SEE ALSO
 .Xr errno 2 ,
-.Xr flock 2 ,
+.Xr fcntl 2 ,
 .Xr open 2
 .Sh HISTORY
 The

Modified: user/kmacy/HEAD_ECMP/lib/libutil/flopen.c
==============================================================================
--- user/kmacy/HEAD_ECMP/lib/libutil/flopen.c	Tue Oct 28 06:15:43 2008	(r184392)
+++ user/kmacy/HEAD_ECMP/lib/libutil/flopen.c	Tue Oct 28 06:16:47 2008	(r184393)
@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 2007 Dag-Erling Coïdan Smørgrav
+ * Copyright (c) 2007 Dag-Erling Coïdan Smørgrav
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -28,12 +28,12 @@
 #include <sys/cdefs.h>
 __FBSDID("$FreeBSD$");
 
-#include <sys/file.h>
 #include <sys/stat.h>
 
 #include <errno.h>
 #include <fcntl.h>
 #include <stdarg.h>
+#include <string.h>
 #include <unistd.h>
 
 #include <libutil.h>
@@ -42,6 +42,7 @@ int
 flopen(const char *path, int flags, ...)
 {
 	int fd, operation, serrno, trunc;
+	struct flock lock;
 	struct stat sb, fsb;
 	mode_t mode;
 
@@ -54,13 +55,14 @@ flopen(const char *path, int flags, ...)
 		va_list ap;
 
 		va_start(ap, flags);
-		mode = va_arg(ap, int); /* mode_t promoted to int */
+		mode = (mode_t)va_arg(ap, int); /* mode_t promoted to int */
 		va_end(ap);
 	}
 
-	operation = LOCK_EX;
-	if (flags & O_NONBLOCK)
-		operation |= LOCK_NB;
+	memset(&lock, 0, sizeof lock);
+	lock.l_type = ((flags & O_ACCMODE) == O_RDONLY) ? F_RDLCK : F_WRLCK;
+	lock.l_whence = SEEK_SET;
+	operation = (flags & O_NONBLOCK) ? F_SETLK : F_SETLKW;
 
 	trunc = (flags & O_TRUNC);
 	flags &= ~O_TRUNC;
@@ -69,35 +71,35 @@ flopen(const char *path, int flags, ...)
 		if ((fd = open(path, flags, mode)) == -1)
 			/* non-existent or no access */
 			return (-1);
-		if (flock(fd, operation) == -1) {
+		if (fcntl(fd, operation, &lock) == -1) {
 			/* unsupported or interrupted */
 			serrno = errno;
-			close(fd);
+			(void)close(fd);
 			errno = serrno;
 			return (-1);
 		}
 		if (stat(path, &sb) == -1) {
 			/* disappeared from under our feet */
-			close(fd);
+			(void)close(fd);
 			continue;
 		}
 		if (fstat(fd, &fsb) == -1) {
 			/* can't happen [tm] */
 			serrno = errno;
-			close(fd);
+			(void)close(fd);
 			errno = serrno;
 			return (-1);
 		}
 		if (sb.st_dev != fsb.st_dev ||
 		    sb.st_ino != fsb.st_ino) {
 			/* changed under our feet */
-			close(fd);
+			(void)close(fd);
 			continue;
 		}
 		if (trunc && ftruncate(fd, 0) != 0) {
 			/* can't happen [tm] */
 			serrno = errno;
-			close(fd);
+			(void)close(fd);
 			errno = serrno;
 			return (-1);
 		}

Modified: user/kmacy/HEAD_ECMP/lib/libutil/login_cap.h
==============================================================================
--- user/kmacy/HEAD_ECMP/lib/libutil/login_cap.h	Tue Oct 28 06:15:43 2008	(r184392)
+++ user/kmacy/HEAD_ECMP/lib/libutil/login_cap.h	Tue Oct 28 06:16:47 2008	(r184393)
@@ -81,7 +81,7 @@ typedef struct login_time {
 #define LTM_NONE  0x00
 #define LTM_SUN   0x01
 #define LTM_MON   0x02
-#define LTM_TUE   0x04 
+#define LTM_TUE   0x04
 #define LTM_WED   0x08
 #define LTM_THU   0x10
 #define LTM_FRI   0x20
@@ -104,7 +104,8 @@ login_cap_t *login_getclass(const char *
 login_cap_t *login_getpwclass(const struct passwd *);
 login_cap_t *login_getuserclass(const struct passwd *);
 
-const char *login_getcapstr(login_cap_t*, const char *, const char *, const char *);
+const char *login_getcapstr(login_cap_t *, const char *, const char *,
+    const char *);
 const char **login_getcaplist(login_cap_t *, const char *, const char *);
 const char *login_getstyle(login_cap_t *, const char *, const char *);
 rlim_t login_getcaptime(login_cap_t *, const char *, rlim_t, rlim_t);
@@ -114,45 +115,51 @@ const char *login_getpath(login_cap_t *,
 int login_getcapbool(login_cap_t *, const char *, int);
 const char *login_setcryptfmt(login_cap_t *, const char *, const char *);
 
-int setclasscontext(const char*, unsigned int);
-int setusercontext(login_cap_t*, const struct passwd*, uid_t, unsigned int);
+int setclasscontext(const char *, unsigned int);
+void setclasscpumask(login_cap_t *);
+int setusercontext(login_cap_t *, const struct passwd *, uid_t, unsigned int);
 void setclassresources(login_cap_t *);
 void setclassenvironment(login_cap_t *, const struct passwd *, int);
 
 /* Most of these functions are deprecated */
-int auth_approve(login_cap_t*, const char*, const char*);
+int auth_approve(login_cap_t *, const char *, const char *);
 int auth_check(const char *, const char *, const char *, const char *, int *);
 void auth_env(void);
-char *auth_mkvalue(const char *n);
-int auth_response(const char *, const char *, const char *, const char *, int *, const char *, const char *);
+char *auth_mkvalue(const char *);
+int auth_response(const char *, const char *, const char *, const char *, int *,
+    const char *, const char *);
 void auth_rmfiles(void);
 int auth_scan(int);
-int auth_script(const char*, ...);
+int auth_script(const char *, ...);
 int auth_script_data(const char *, int, const char *, ...);
 char *auth_valud(const char *);
 int auth_setopt(const char *, const char *);
 void auth_clropts(void);
 
-void auth_checknologin(login_cap_t*);
-int auth_cat(const char*);
+void auth_checknologin(login_cap_t *);
+int auth_cat(const char *);
 
-int auth_ttyok(login_cap_t*, const char *);
-int auth_hostok(login_cap_t*, const char *, char const *);
-int auth_timeok(login_cap_t*, time_t);
+int auth_ttyok(login_cap_t *, const char *);
+int auth_hostok(login_cap_t *, const char *, char const *);
+int auth_timeok(login_cap_t *, time_t);
 
 struct tm;
 
 login_time_t parse_lt(const char *);
+int in_lt(const login_time_t *, time_t *);
 int in_ltm(const login_time_t *, struct tm *, time_t *);
 int in_ltms(const login_time_t *, struct tm *, time_t *);
+int in_lts(const login_time_t *, time_t *);
 
 /* helper functions */
 
 int login_strinlist(const char **, char const *, int);
 int login_str2inlist(const char **, const char *, const char *, int);
-login_time_t * login_timelist(login_cap_t *, char const *, int *, login_time_t **);
+login_time_t * login_timelist(login_cap_t *, char const *, int *,
+    login_time_t **);
 int login_ttyok(login_cap_t *, const char *, const char *, const char *);
-int login_hostok(login_cap_t *, const char *, const char *, const char *, const char *);
+int login_hostok(login_cap_t *, const char *, const char *, const char *,
+    const char *);
 
 __END_DECLS
 

Modified: user/kmacy/HEAD_ECMP/lib/libutil/login_class.3
==============================================================================
--- user/kmacy/HEAD_ECMP/lib/libutil/login_class.3	Tue Oct 28 06:15:43 2008	(r184392)
+++ user/kmacy/HEAD_ECMP/lib/libutil/login_class.3	Tue Oct 28 06:16:47 2008	(r184393)
@@ -19,11 +19,12 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd December 28, 1996
+.Dd October 20, 2008
 .Os
 .Dt LOGIN_CLASS 3
 .Sh NAME
 .Nm setclasscontext ,
+.Nm setclasscpumask ,
 .Nm setclassenvironment ,
 .Nm setclassresources ,
 .Nm setusercontext
@@ -35,12 +36,14 @@
 .In login_cap.h
 .Ft int
 .Fn setclasscontext "const char *classname" "unsigned int flags"
-.Ft int
-.Fn setusercontext "login_cap_t *lc" "const struct passwd *pwd" "uid_t uid" "unsigned int flags"
 .Ft void
-.Fn setclassresources "login_cap_t *lc"
+.Fn setclasscpumask "login_cap_t *lc"
 .Ft void
 .Fn setclassenvironment "login_cap_t *lc" "const struct passwd *pwd" "int paths"
+.Ft void
+.Fn setclassresources "login_cap_t *lc"
+.Ft int
+.Fn setusercontext "login_cap_t *lc" "const struct passwd *pwd" "uid_t uid" "unsigned int flags"
 .Sh DESCRIPTION
 These functions provide a higher level interface to the login class
 database than those documented in
@@ -162,7 +165,7 @@ and set the cpu affinity to the specifie
 The string may contain a comma separated list of numbers and/or number
 ranges as handled by the
 .Xr cpuset 1
-utility or the case-insensitive string 
+utility or the case-insensitive string
 .Ql default .
 If the string is
 .Ql default
@@ -182,6 +185,7 @@ are substituted for the user's home dire
 respectively.
 .Pp
 The
+.Fn setclasscpumask ,
 .Fn setclassresources
 and
 .Fn setclassenvironment

Modified: user/kmacy/HEAD_ECMP/lib/libutil/login_class.c
==============================================================================
--- user/kmacy/HEAD_ECMP/lib/libutil/login_class.c	Tue Oct 28 06:15:43 2008	(r184392)
+++ user/kmacy/HEAD_ECMP/lib/libutil/login_class.c	Tue Oct 28 06:16:47 2008	(r184393)
@@ -25,14 +25,16 @@
 #include <sys/cdefs.h>
 __FBSDID("$FreeBSD$");
 
-#include <sys/types.h>
 #include <sys/param.h>
-#include <sys/stat.h>
-#include <sys/time.h>
-#include <sys/resource.h>
 #include <sys/cpuset.h>
 #include <sys/mac.h>
+#include <sys/resource.h>
 #include <sys/rtprio.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+
+#include <ctype.h>
+#include <err.h>
 #include <errno.h>
 #include <fcntl.h>
 #include <login_cap.h>
@@ -92,7 +94,7 @@ setclassresources(login_cap_t *lc)
 	if (getrlimit(lr->why, &rlim) != 0)
 	    syslog(LOG_ERR, "getting %s resource limit: %m", lr->what);
 	else {
-	    char  	name_cur[40];
+	    char	name_cur[40];
 	    char	name_max[40];
 	    rlim_t	rcur = rlim.rlim_cur;
 	    rlim_t	rmax = rlim.rlim_max;
@@ -104,7 +106,7 @@ setclassresources(login_cap_t *lc)
 	    rmax = (*lr->who)(lc, lr->what, rmax, rmax);
 	    rlim.rlim_cur = (*lr->who)(lc, name_cur, rcur, rcur);
 	    rlim.rlim_max = (*lr->who)(lc, name_max, rmax, rmax);
-    
+
 	    if (setrlimit(lr->why, &rlim) == -1)
 		syslog(LOG_WARNING, "set class '%s' resource limit %s: %m", lc->lc_class, lr->what);
 	}
@@ -185,7 +187,7 @@ substvar(const char * var, const struct 
 	}
     }
 
-    return np;
+    return (np);
 }
 
 
@@ -309,7 +311,7 @@ list2cpuset(const char *list, cpuset_t *

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


More information about the svn-src-user mailing list