Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 Sep 2009 13:18:56 GMT
From:      Alexander Motin <mav@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 168102 for review
Message-ID:  <200909031318.n83DIuEx073094@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=168102

Change 168102 by mav@mav_mavtest on 2009/09/03 13:18:30

	IFC

Affected files ...

.. //depot/projects/scottl-camlock/src/ObsoleteFiles.inc#13 integrate
.. //depot/projects/scottl-camlock/src/bin/chmod/chmod.c#4 integrate
.. //depot/projects/scottl-camlock/src/bin/cp/utils.c#4 integrate
.. //depot/projects/scottl-camlock/src/bin/ls/print.c#3 integrate
.. //depot/projects/scottl-camlock/src/contrib/ee/ee.c#2 integrate
.. //depot/projects/scottl-camlock/src/etc/Makefile#4 integrate
.. //depot/projects/scottl-camlock/src/etc/mtree/BSD.local.dist#4 delete
.. //depot/projects/scottl-camlock/src/etc/mtree/BSD.x11-4.dist#3 delete
.. //depot/projects/scottl-camlock/src/etc/mtree/BSD.x11.dist#2 delete
.. //depot/projects/scottl-camlock/src/lib/libc/locale/ctype.3#2 integrate
.. //depot/projects/scottl-camlock/src/lib/libc/locale/digittoint.3#2 integrate
.. //depot/projects/scottl-camlock/src/lib/libc/locale/isalnum.3#2 integrate
.. //depot/projects/scottl-camlock/src/lib/libc/locale/isalpha.3#2 integrate
.. //depot/projects/scottl-camlock/src/lib/libc/locale/isascii.3#2 integrate
.. //depot/projects/scottl-camlock/src/lib/libc/locale/isblank.3#2 integrate
.. //depot/projects/scottl-camlock/src/lib/libc/locale/iscntrl.3#2 integrate
.. //depot/projects/scottl-camlock/src/lib/libc/locale/isdigit.3#3 integrate
.. //depot/projects/scottl-camlock/src/lib/libc/locale/isgraph.3#2 integrate
.. //depot/projects/scottl-camlock/src/lib/libc/locale/isideogram.3#2 integrate
.. //depot/projects/scottl-camlock/src/lib/libc/locale/islower.3#2 integrate
.. //depot/projects/scottl-camlock/src/lib/libc/locale/isphonogram.3#2 integrate
.. //depot/projects/scottl-camlock/src/lib/libc/locale/isprint.3#2 integrate
.. //depot/projects/scottl-camlock/src/lib/libc/locale/ispunct.3#2 integrate
.. //depot/projects/scottl-camlock/src/lib/libc/locale/isrune.3#2 integrate
.. //depot/projects/scottl-camlock/src/lib/libc/locale/isspace.3#2 integrate
.. //depot/projects/scottl-camlock/src/lib/libc/locale/isspecial.3#2 integrate
.. //depot/projects/scottl-camlock/src/lib/libc/locale/isupper.3#2 integrate
.. //depot/projects/scottl-camlock/src/lib/libc/locale/isxdigit.3#2 integrate
.. //depot/projects/scottl-camlock/src/lib/libc/locale/toascii.3#2 integrate
.. //depot/projects/scottl-camlock/src/lib/libc/locale/tolower.3#2 integrate
.. //depot/projects/scottl-camlock/src/lib/libc/locale/toupper.3#2 integrate
.. //depot/projects/scottl-camlock/src/lib/libc/posix1e/acl_calc_mask.c#4 integrate
.. //depot/projects/scottl-camlock/src/lib/libc/posix1e/acl_to_text.c#3 integrate
.. //depot/projects/scottl-camlock/src/lib/libc/stdtime/strptime.c#3 integrate
.. //depot/projects/scottl-camlock/src/share/man/man4/ips.4#2 integrate
.. //depot/projects/scottl-camlock/src/share/man/man4/mfi.4#4 integrate
.. //depot/projects/scottl-camlock/src/share/man/man5/make.conf.5#3 integrate
.. //depot/projects/scottl-camlock/src/sys/amd64/amd64/local_apic.c#23 integrate
.. //depot/projects/scottl-camlock/src/sys/amd64/amd64/pmap.c#32 integrate
.. //depot/projects/scottl-camlock/src/sys/arm/arm/vm_machdep.c#18 integrate
.. //depot/projects/scottl-camlock/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c#3 integrate
.. //depot/projects/scottl-camlock/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c#3 integrate
.. //depot/projects/scottl-camlock/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c#3 integrate
.. //depot/projects/scottl-camlock/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h#3 integrate
.. //depot/projects/scottl-camlock/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c#6 integrate
.. //depot/projects/scottl-camlock/src/sys/conf/files#45 integrate
.. //depot/projects/scottl-camlock/src/sys/conf/files.amd64#21 integrate
.. //depot/projects/scottl-camlock/src/sys/conf/files.i386#21 integrate
.. //depot/projects/scottl-camlock/src/sys/conf/files.ia64#15 integrate
.. //depot/projects/scottl-camlock/src/sys/conf/files.powerpc#19 integrate
.. //depot/projects/scottl-camlock/src/sys/conf/files.sparc64#16 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/ahci/ahci.c#60 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/ath/if_ath.c#29 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/hwpmc/hwpmc_core.c#3 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/hwpmc/pmc_events.h#4 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/sound/pci/hda/hdac.c#17 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/sound/pci/hda/hdac_private.h#8 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/sound/pci/hda/hdac_reg.h#2 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/syscons/scterm-teken.c#5 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/syscons/teken/Makefile#2 delete
.. //depot/projects/scottl-camlock/src/sys/dev/syscons/teken/gensequences#2 delete
.. //depot/projects/scottl-camlock/src/sys/dev/syscons/teken/sequences#3 delete
.. //depot/projects/scottl-camlock/src/sys/dev/syscons/teken/teken.c#4 delete
.. //depot/projects/scottl-camlock/src/sys/dev/syscons/teken/teken.h#3 delete
.. //depot/projects/scottl-camlock/src/sys/dev/syscons/teken/teken_demo.c#3 delete
.. //depot/projects/scottl-camlock/src/sys/dev/syscons/teken/teken_scs.h#2 delete
.. //depot/projects/scottl-camlock/src/sys/dev/syscons/teken/teken_stress.c#3 delete
.. //depot/projects/scottl-camlock/src/sys/dev/syscons/teken/teken_subr.h#2 delete
.. //depot/projects/scottl-camlock/src/sys/dev/syscons/teken/teken_subr_compat.h#3 delete
.. //depot/projects/scottl-camlock/src/sys/dev/syscons/teken/teken_wcwidth.h#2 delete
.. //depot/projects/scottl-camlock/src/sys/dev/txp/if_txp.c#13 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/xen/blkfront/blkfront.c#3 integrate
.. //depot/projects/scottl-camlock/src/sys/fs/pseudofs/pseudofs_vnops.c#15 integrate
.. //depot/projects/scottl-camlock/src/sys/i386/i386/local_apic.c#24 integrate
.. //depot/projects/scottl-camlock/src/sys/i386/i386/pmap.c#33 integrate
.. //depot/projects/scottl-camlock/src/sys/i386/include/pmap.h#20 integrate
.. //depot/projects/scottl-camlock/src/sys/i386/isa/vesa.c#9 integrate
.. //depot/projects/scottl-camlock/src/sys/i386/xen/locore.s#2 integrate
.. //depot/projects/scottl-camlock/src/sys/i386/xen/pmap.c#8 integrate
.. //depot/projects/scottl-camlock/src/sys/kern/kern_fork.c#25 integrate
.. //depot/projects/scottl-camlock/src/sys/kern/kern_kthread.c#10 integrate
.. //depot/projects/scottl-camlock/src/sys/kern/kern_lock.c#18 integrate
.. //depot/projects/scottl-camlock/src/sys/kern/kern_proc.c#16 integrate
.. //depot/projects/scottl-camlock/src/sys/kern/kern_sx.c#13 integrate
.. //depot/projects/scottl-camlock/src/sys/kern/kern_thr.c#18 integrate
.. //depot/projects/scottl-camlock/src/sys/kern/kern_thread.c#18 integrate
.. //depot/projects/scottl-camlock/src/sys/kern/vfs_vnops.c#21 integrate
.. //depot/projects/scottl-camlock/src/sys/net/rtsock.c#24 integrate
.. //depot/projects/scottl-camlock/src/sys/netinet/if_ether.c#23 integrate
.. //depot/projects/scottl-camlock/src/sys/netinet/in.c#23 integrate
.. //depot/projects/scottl-camlock/src/sys/sys/proc.h#26 integrate
.. //depot/projects/scottl-camlock/src/sys/teken/Makefile#1 branch
.. //depot/projects/scottl-camlock/src/sys/teken/gensequences#1 branch
.. //depot/projects/scottl-camlock/src/sys/teken/sequences#1 branch
.. //depot/projects/scottl-camlock/src/sys/teken/teken.c#1 branch
.. //depot/projects/scottl-camlock/src/sys/teken/teken.h#1 branch
.. //depot/projects/scottl-camlock/src/sys/teken/teken_demo.c#1 branch
.. //depot/projects/scottl-camlock/src/sys/teken/teken_scs.h#1 branch
.. //depot/projects/scottl-camlock/src/sys/teken/teken_stress.c#1 branch
.. //depot/projects/scottl-camlock/src/sys/teken/teken_subr.h#1 branch
.. //depot/projects/scottl-camlock/src/sys/teken/teken_subr_compat.h#1 branch
.. //depot/projects/scottl-camlock/src/sys/teken/teken_wcwidth.h#1 branch
.. //depot/projects/scottl-camlock/src/sys/vm/vm_extern.h#15 integrate
.. //depot/projects/scottl-camlock/src/sys/vm/vm_glue.c#16 integrate
.. //depot/projects/scottl-camlock/src/tools/regression/acltools/tools-posix.test#3 integrate
.. //depot/projects/scottl-camlock/src/usr.sbin/pkg_install/lib/lib.h#5 integrate

Differences ...

==== //depot/projects/scottl-camlock/src/ObsoleteFiles.inc#13 (text+ko) ====

@@ -1,5 +1,5 @@
 #
-# $FreeBSD: src/ObsoleteFiles.inc,v 1.206 2009/08/23 18:28:58 antoine Exp $
+# $FreeBSD: src/ObsoleteFiles.inc,v 1.207 2009/09/02 14:56:23 flz Exp $
 #
 # This file lists old files (OLD_FILES), libraries (OLD_LIBS) and
 # directories (OLD_DIRS) which should get removed at an update. Recently
@@ -14,6 +14,10 @@
 # The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last.
 #
 
+# 20090902: BSD.{x11,x11-4}.dist are dead and BSD.local.dist lives in ports/
+OLD_FILES+=etc/mtree/BSD.local.dist
+OLD_FILES+=etc/mtree/BSD.x11.dist
+OLD_FILES+=etc/mtree/BSD.x11-4.dist
 # 20090801: vimage.h removed in favour of vnet.h
 OLD_FILES+=usr/include/sys/vimage.h
 # 20090719: library version bump for 8.0

==== //depot/projects/scottl-camlock/src/bin/chmod/chmod.c#4 (text+ko) ====

@@ -39,9 +39,9 @@
 #endif /* not lint */
 #endif
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/bin/chmod/chmod.c,v 1.35 2009/07/01 15:52:19 trasz Exp $");
+__FBSDID("$FreeBSD: src/bin/chmod/chmod.c,v 1.37 2009/09/02 05:26:59 trasz Exp $");
 
-#include <sys/types.h>
+#include <sys/param.h>
 #include <sys/stat.h>
 
 #include <err.h>
@@ -54,7 +54,7 @@
 #include <unistd.h>
 
 static void usage(void);
-static int may_have_nfs4acl(const FTSENT *ent);
+static int may_have_nfs4acl(const FTSENT *ent, int hflag);
 
 int
 main(int argc, char *argv[])
@@ -62,11 +62,10 @@
 	FTS *ftsp;
 	FTSENT *p;
 	mode_t *set;
-	int Hflag, Lflag, Rflag, ch, fflag, fts_options, hflag, rval;
+	int Hflag, Lflag, Rflag, ch, error, fflag, fts_options, hflag, rval;
 	int vflag;
 	char *mode;
 	mode_t newmode;
-	int (*change_mode)(const char *, mode_t);
 
 	set = NULL;
 	Hflag = Lflag = Rflag = fflag = hflag = vflag = 0;
@@ -140,11 +139,6 @@
 	} else
 		fts_options = hflag ? FTS_PHYSICAL : FTS_LOGICAL;
 
-	if (hflag)
-		change_mode = lchmod;
-	else
-		change_mode = chmod;
-
 	mode = *argv;
 	if ((set = setmode(mode)) == NULL)
 		errx(1, "invalid file mode: %s", mode);
@@ -175,7 +169,6 @@
 			 */
 			if (!hflag)
 				continue;
-			/* else */
 			/* FALLTHROUGH */
 		default:
 			break;
@@ -186,12 +179,18 @@
 		 * identical to the one computed from an ACL will change
 		 * that ACL.
 		 */
-		if (may_have_nfs4acl(p) == 0 &&
+		if (may_have_nfs4acl(p, hflag) == 0 &&
 		    (newmode & ALLPERMS) == (p->fts_statp->st_mode & ALLPERMS))
 				continue;
-		if ((*change_mode)(p->fts_accpath, newmode) && !fflag) {
-			warn("%s", p->fts_path);
-			rval = 1;
+		if (hflag)
+			error = lchmod(p->fts_accpath, newmode);
+		else
+			error = chmod(p->fts_accpath, newmode);
+		if (error) {
+			if (!fflag) {
+				warn("%s", p->fts_path);
+				rval = 1;
+			}
 		} else {
 			if (vflag) {
 				(void)printf("%s", p->fts_path);
@@ -202,7 +201,6 @@
 					strmode(p->fts_statp->st_mode, m1);
 					strmode((p->fts_statp->st_mode &
 					    S_IFMT) | newmode, m2);
-
 					(void)printf(": 0%o [%s] -> 0%o [%s]",
 					    p->fts_statp->st_mode, m1,
 					    (p->fts_statp->st_mode & S_IFMT) |
@@ -210,12 +208,10 @@
 				}
 				(void)printf("\n");
 			}
-
 		}
 	}
 	if (errno)
 		err(1, "fts_read");
-	free(set);
 	exit(rval);
 }
 
@@ -228,17 +224,20 @@
 }
 
 static int
-may_have_nfs4acl(const FTSENT *ent)
+may_have_nfs4acl(const FTSENT *ent, int hflag)
 {
 	int ret;
-	static dev_t previous_dev = (dev_t)-1;
+	static dev_t previous_dev = NODEV;
 	static int supports_acls = -1;
 
 	if (previous_dev != ent->fts_statp->st_dev) {
 		previous_dev = ent->fts_statp->st_dev;
 		supports_acls = 0;
 
-		ret = pathconf(ent->fts_accpath, _PC_ACL_NFS4);
+		if (hflag)
+			ret = lpathconf(ent->fts_accpath, _PC_ACL_NFS4);
+		else
+			ret = pathconf(ent->fts_accpath, _PC_ACL_NFS4);
 		if (ret > 0)
 			supports_acls = 1;
 		else if (ret < 0 && errno != EINVAL)

==== //depot/projects/scottl-camlock/src/bin/cp/utils.c#4 (text+ko) ====

@@ -33,7 +33,7 @@
 #endif
 #endif /* not lint */
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/bin/cp/utils.c,v 1.58 2009/05/30 10:36:14 jilles Exp $");
+__FBSDID("$FreeBSD: src/bin/cp/utils.c,v 1.59 2009/09/02 08:08:57 trasz Exp $");
 
 #include <sys/types.h>
 #include <sys/acl.h>
@@ -377,24 +377,52 @@
 int
 preserve_fd_acls(int source_fd, int dest_fd)
 {
-	struct acl *aclp;
 	acl_t acl;
+	acl_type_t acl_type;
+	int acl_supported = 0, ret, trivial;
 
-	if (fpathconf(source_fd, _PC_ACL_EXTENDED) != 1 ||
-	    fpathconf(dest_fd, _PC_ACL_EXTENDED) != 1)
+	ret = fpathconf(source_fd, _PC_ACL_NFS4);
+	if (ret > 0 ) {
+		acl_supported = 1;
+		acl_type = ACL_TYPE_NFS4;
+	} else if (ret < 0 && errno != EINVAL) {
+		warn("fpathconf(..., _PC_ACL_NFS4) failed for %s", to.p_path);
+		return (1);
+	}
+	if (acl_supported == 0) {
+		ret = fpathconf(source_fd, _PC_ACL_EXTENDED);
+		if (ret > 0 ) {
+			acl_supported = 1;
+			acl_type = ACL_TYPE_ACCESS;
+		} else if (ret < 0 && errno != EINVAL) {
+			warn("fpathconf(..., _PC_ACL_EXTENDED) failed for %s",
+			    to.p_path);
+			return (1);
+		}
+	}
+	if (acl_supported == 0)
 		return (0);
-	acl = acl_get_fd(source_fd);
+
+	acl = acl_get_fd_np(source_fd, acl_type);
 	if (acl == NULL) {
 		warn("failed to get acl entries while setting %s", to.p_path);
 		return (1);
 	}
-	aclp = &acl->ats_acl;
-	if (aclp->acl_cnt == 3)
+	if (acl_is_trivial_np(acl, &trivial)) {
+		warn("acl_is_trivial() failed for %s", to.p_path);
+		acl_free(acl);
+		return (1);
+	}
+	if (trivial) {
+		acl_free(acl);
 		return (0);
-	if (acl_set_fd(dest_fd, acl) < 0) {
+	}
+	if (acl_set_fd_np(dest_fd, acl, acl_type) < 0) {
 		warn("failed to set acl entries for %s", to.p_path);
+		acl_free(acl);
 		return (1);
 	}
+	acl_free(acl);
 	return (0);
 }
 
@@ -405,10 +433,31 @@
 	int (*aclsetf)(const char *, acl_type_t, acl_t);
 	struct acl *aclp;
 	acl_t acl;
+	acl_type_t acl_type;
+	int acl_supported = 0, ret, trivial;
 
-	if (pathconf(source_dir, _PC_ACL_EXTENDED) != 1 ||
-	    pathconf(dest_dir, _PC_ACL_EXTENDED) != 1)
+	ret = pathconf(source_dir, _PC_ACL_NFS4);
+	if (ret > 0) {
+		acl_supported = 1;
+		acl_type = ACL_TYPE_NFS4;
+	} else if (ret < 0 && errno != EINVAL) {
+		warn("fpathconf(..., _PC_ACL_NFS4) failed for %s", source_dir);
+		return (1);
+	}
+	if (acl_supported == 0) {
+		ret = pathconf(source_dir, _PC_ACL_EXTENDED);
+		if (ret > 0) {
+			acl_supported = 1;
+			acl_type = ACL_TYPE_ACCESS;
+		} else if (ret < 0 && errno != EINVAL) {
+			warn("fpathconf(..., _PC_ACL_EXTENDED) failed for %s",
+			    source_dir);
+			return (1);
+		}
+	}
+	if (acl_supported == 0)
 		return (0);
+
 	/*
 	 * If the file is a link we will not follow it
 	 */
@@ -419,34 +468,48 @@
 		aclgetf = acl_get_file;
 		aclsetf = acl_set_file;
 	}
-	/*
-	 * Even if there is no ACL_TYPE_DEFAULT entry here, a zero
-	 * size ACL will be returned. So it is not safe to simply
-	 * check the pointer to see if the default ACL is present.
-	 */
-	acl = aclgetf(source_dir, ACL_TYPE_DEFAULT);
+	if (acl_type == ACL_TYPE_ACCESS) {
+		/*
+		 * Even if there is no ACL_TYPE_DEFAULT entry here, a zero
+		 * size ACL will be returned. So it is not safe to simply
+		 * check the pointer to see if the default ACL is present.
+		 */
+		acl = aclgetf(source_dir, ACL_TYPE_DEFAULT);
+		if (acl == NULL) {
+			warn("failed to get default acl entries on %s",
+			    source_dir);
+			return (1);
+		}
+		aclp = &acl->ats_acl;
+		if (aclp->acl_cnt != 0 && aclsetf(dest_dir,
+		    ACL_TYPE_DEFAULT, acl) < 0) {
+			warn("failed to set default acl entries on %s",
+			    dest_dir);
+			acl_free(acl);
+			return (1);
+		}
+		acl_free(acl);
+	}
+	acl = aclgetf(source_dir, acl_type);
 	if (acl == NULL) {
-		warn("failed to get default acl entries on %s",
-		    source_dir);
+		warn("failed to get acl entries on %s", source_dir);
 		return (1);
 	}
-	aclp = &acl->ats_acl;
-	if (aclp->acl_cnt != 0 && aclsetf(dest_dir,
-	    ACL_TYPE_DEFAULT, acl) < 0) {
-		warn("failed to set default acl entries on %s",
-		    dest_dir);
+	if (acl_is_trivial_np(acl, &trivial)) {
+		warn("acl_is_trivial() failed on %s", source_dir);
+		acl_free(acl);
 		return (1);
 	}
-	acl = aclgetf(source_dir, ACL_TYPE_ACCESS);
-	if (acl == NULL) {
-		warn("failed to get acl entries on %s", source_dir);
-		return (1);
+	if (trivial) {
+		acl_free(acl);
+		return (0);
 	}
-	aclp = &acl->ats_acl;
-	if (aclsetf(dest_dir, ACL_TYPE_ACCESS, acl) < 0) {
+	if (aclsetf(dest_dir, acl_type, acl) < 0) {
 		warn("failed to set acl entries on %s", dest_dir);
+		acl_free(acl);
 		return (1);
 	}
+	acl_free(acl);
 	return (0);
 }
 

==== //depot/projects/scottl-camlock/src/bin/ls/print.c#3 (text+ko) ====

@@ -36,7 +36,7 @@
 #endif /* not lint */
 #endif
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/bin/ls/print.c,v 1.78 2008/04/05 21:26:25 imp Exp $");
+__FBSDID("$FreeBSD: src/bin/ls/print.c,v 1.80 2009/09/02 20:50:39 trasz Exp $");
 
 #include <sys/param.h>
 #include <sys/stat.h>
@@ -70,7 +70,7 @@
 static void	endcolor(int);
 static int	colortype(mode_t);
 #endif
-static void	aclmode(char *, const FTSENT *, int *);
+static void	aclmode(char *, const FTSENT *);
 
 #define	IS_NOPRINT(p)	((p)->fts_number == NO_PRINT)
 
@@ -139,16 +139,12 @@
 #ifdef COLORLS
 	int color_printed = 0;
 #endif
-	int haveacls;
-	dev_t prevdev;
 
 	if ((dp->list == NULL || dp->list->fts_level != FTS_ROOTLEVEL) &&
 	    (f_longform || f_size)) {
 		(void)printf("total %lu\n", howmany(dp->btotal, blocksize));
 	}
 
-	haveacls = 1;
-	prevdev = (dev_t)-1;
 	for (p = dp->list; p; p = p->fts_link) {
 		if (IS_NOPRINT(p))
 			continue;
@@ -159,14 +155,7 @@
 			(void)printf("%*jd ",
 			    dp->s_block, howmany(sp->st_blocks, blocksize));
 		strmode(sp->st_mode, buf);
-		/*
-		 * Cache whether or not the filesystem supports ACL's to
-		 * avoid expensive syscalls. Try again when we change devices.
-		 */
-		if (haveacls || sp->st_dev != prevdev) {
-			aclmode(buf, p, &haveacls);
-			prevdev = sp->st_dev;
-		}
+		aclmode(buf, p);
 		np = p->fts_pointer;
 		(void)printf("%s %*u %-*s  %-*s  ", buf, dp->s_nlink,
 		    sp->st_nlink, dp->s_user, np->user, dp->s_group,
@@ -612,56 +601,73 @@
 		(void)printf("%*jd ", (u_int)width, bytes);
 }
 
+/*
+ * Add a + after the standard rwxrwxrwx mode if the file has an
+ * ACL. strmode() reserves space at the end of the string.
+ */
 static void
-aclmode(char *buf, const FTSENT *p, int *haveacls)
+aclmode(char *buf, const FTSENT *p)
 {
 	char name[MAXPATHLEN + 1];
-	int entries, ret;
+	int ret, trivial;
+	static dev_t previous_dev = NODEV;
+	static int supports_acls = -1;
+	static int type = ACL_TYPE_ACCESS;
 	acl_t facl;
-	acl_entry_t ae;
 
 	/*
-	 * Add a + after the standard rwxrwxrwx mode if the file has an
-	 * extended ACL. strmode() reserves space at the end of the string.
+	 * XXX: ACLs are not supported on whiteouts and device files
+	 * residing on UFS.
 	 */
+	if (S_ISCHR(p->fts_statp->st_mode) || S_ISBLK(p->fts_statp->st_mode) ||
+	    S_ISWHT(p->fts_statp->st_mode))
+		return;
+
+	if (previous_dev == p->fts_statp->st_dev && supports_acls == 0)
+		return;
+
 	if (p->fts_level == FTS_ROOTLEVEL)
 		snprintf(name, sizeof(name), "%s", p->fts_name);
 	else
 		snprintf(name, sizeof(name), "%s/%s",
 		    p->fts_parent->fts_accpath, p->fts_name);
-	/*
-	 * We have no way to tell whether a symbolic link has an ACL since
-	 * pathconf() and acl_get_file() both follow them.  They also don't
-	 * support whiteouts.
-	 */
-	if (S_ISLNK(p->fts_statp->st_mode) || S_ISWHT(p->fts_statp->st_mode)) {
-		*haveacls = 1;
+
+	if (previous_dev != p->fts_statp->st_dev) {
+		previous_dev = p->fts_statp->st_dev;
+		supports_acls = 0;
+
+		ret = lpathconf(name, _PC_ACL_NFS4);
+		if (ret > 0) {
+			type = ACL_TYPE_NFS4;
+			supports_acls = 1;
+		} else if (ret < 0 && errno != EINVAL) {
+			warn("%s", name);
+			return;
+		}
+		if (supports_acls == 0) {
+			ret = lpathconf(name, _PC_ACL_EXTENDED);
+			if (ret > 0) {
+				type = ACL_TYPE_ACCESS;
+				supports_acls = 1;
+			} else if (ret < 0 && errno != EINVAL) {
+				warn("%s", name);
+				return;
+			}
+		}
+	}
+	if (supports_acls == 0)
 		return;
-	}
-	if ((ret = pathconf(name, _PC_ACL_EXTENDED)) <= 0) {
-		if (ret < 0 && errno != EINVAL)
-			warn("%s", name);
-		else
-			*haveacls = 0;
+	facl = acl_get_link_np(name, type);
+	if (facl == NULL) {
+		warn("%s", name);
 		return;
 	}
-	*haveacls = 1;
-	if ((facl = acl_get_file(name, ACL_TYPE_ACCESS)) != NULL) {
-		if (acl_get_entry(facl, ACL_FIRST_ENTRY, &ae) == 1) {
-			entries = 1;
-			while (acl_get_entry(facl, ACL_NEXT_ENTRY, &ae) == 1)
-				if (++entries > 3)
-					break;
-			/*
-			 * POSIX.1e requires that ACLs of type ACL_TYPE_ACCESS
-			 * must have at least three entries (owner, group,
-			 * and other). So anything with more than 3 ACLs looks
-			 * interesting to us.
-			 */
-			if (entries > 3)
-				buf[10] = '+';
-		}
+	if (acl_is_trivial_np(facl, &trivial)) {
 		acl_free(facl);
-	} else
 		warn("%s", name);
+		return;
+	}
+	if (!trivial)
+		buf[10] = '+';
+	acl_free(facl);
 }

==== //depot/projects/scottl-camlock/src/contrib/ee/ee.c#2 (text+ko) ====

@@ -55,7 +55,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/contrib/ee/ee.c,v 1.4 2009/05/28 04:25:38 marcel Exp $");
+__FBSDID("$FreeBSD: src/contrib/ee/ee.c,v 1.6 2009/09/02 04:43:46 ache Exp $");
 
 char *ee_copyright_message = 
 "Copyright (c) 1986, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 2009 Hugh Mahon ";
@@ -83,6 +83,7 @@
 #include <errno.h>
 #include <string.h>
 #include <pwd.h>
+#include <locale.h>
 
 #ifdef HAS_SYS_WAIT
 #include <sys/wait.h>
@@ -100,9 +101,7 @@
 #include <unistd.h>
 #endif
 
-
 #ifndef NO_CATGETS
-#include <locale.h>
 #include <nl_types.h>
 
 nl_catd catalog;
@@ -726,7 +725,7 @@
 	}
 	*point = character;	/* insert new character			*/
 	wclrtoeol(text_win);
-	if (((character >= 0) && (character < ' ')) || (character >= 127)) /* check for TAB character*/
+	if (!isprint((unsigned char)character)) /* check for TAB character*/
 	{
 		scr_pos = scr_horz += out_char(text_win, character, scr_horz);
 		point++;
@@ -734,7 +733,7 @@
 	}
 	else
 	{
-		waddch(text_win, character);
+		waddch(text_win, (unsigned char)character);
 		scr_pos = ++scr_horz;
 		point++;
 		position ++;
@@ -969,17 +968,17 @@
 		}
 		else
 		{
-			waddch(window, (char)character );
+			waddch(window, (unsigned char)character );
 			return(1);
 		}
 	}
 	else
 	{
-		waddch(window, (char)character);
+		waddch(window, (unsigned char)character);
 		return(1);
 	}
 	for (i2 = 0; (string[i2] != '\0') && (((column+i2+1)-horiz_offset) < last_col); i2++)
-		waddch(window, string[i2]);
+		waddch(window, (unsigned char)string[i2]);
 	return(strlen(string));
 }
 
@@ -1044,7 +1043,7 @@
 	wclrtoeol(text_win);
 	while ((posit < length) && (column <= last_col))
 	{
-		if ((*temp < 32) || (*temp >= 127))
+		if (!isprint(*temp))
 		{
 			column += len_char(*temp, abs_column);
 			abs_column += out_char(text_win, *temp, abs_column);
@@ -1923,13 +1922,13 @@
 			}
 			*nam_str = in;
 			g_pos++;
-			if (((in < ' ') || (in > 126)) && (g_horz < (last_col - 1)))
+			if (!isprint((unsigned char)in) && (g_horz < (last_col - 1)))
 				g_horz += out_char(com_win, in, g_horz);
 			else
 			{
 				g_horz++;
 				if (g_horz < (last_col - 1))
-					waddch(com_win, in);
+					waddch(com_win, (unsigned char)in);
 			}
 			nam_str++;
 		}
@@ -5085,8 +5084,8 @@
 {
 	int counter;
 
+	setlocale(LC_ALL, "");
 #ifndef NO_CATGETS
-	setlocale(LC_ALL, "");
 	catalog = catopen("ee", NL_CAT_LOCALE);
 #endif /* NO_CATGETS */
 

==== //depot/projects/scottl-camlock/src/etc/Makefile#4 (text+ko) ====

@@ -1,5 +1,5 @@
 #	from: @(#)Makefile	5.11 (Berkeley) 5/21/91
-# $FreeBSD: src/etc/Makefile,v 1.375 2009/06/07 13:26:57 edwin Exp $
+# $FreeBSD: src/etc/Makefile,v 1.376 2009/09/02 14:54:47 flz Exp $
 
 .include <bsd.own.mk>
 
@@ -99,8 +99,7 @@
 # -rwxr-xr-x root:wheel, for the new cron root:wheel
 BIN2=	netstart pccard_ether rc.suspend rc.resume
 
-MTREE=	BSD.include.dist BSD.local.dist BSD.root.dist BSD.usr.dist \
-	BSD.var.dist BSD.x11.dist BSD.x11-4.dist
+MTREE=	BSD.include.dist BSD.root.dist BSD.usr.dist BSD.var.dist
 .if ${MK_SENDMAIL} != "no"
 MTREE+=	BSD.sendmail.dist
 .endif

==== //depot/projects/scottl-camlock/src/lib/libc/locale/ctype.3#2 (text+ko) ====

@@ -26,9 +26,9 @@
 .\" SUCH DAMAGE.
 .\"
 .\"     @(#)ctype.3	8.1 (Berkeley) 6/4/93
-.\" $FreeBSD: src/lib/libc/locale/ctype.3,v 1.16 2007/01/09 00:28:00 imp Exp $
+.\" $FreeBSD: src/lib/libc/locale/ctype.3,v 1.17 2009/09/03 10:06:37 des Exp $
 .\"
-.Dd March 30, 2004
+.Dd September 3, 2009
 .Dt CTYPE 3
 .Os
 .Sh NAME
@@ -111,6 +111,13 @@
 .In ctype.h ,
 or as true functions in the C library.
 See the specific manual pages for more information.
+.Pp
+.Em NOTE :
+if the value passed to one of these functions is a
+.Vt signed char ,
+as is usually the case, it must be cast to an
+.Vt unsigned char
+to avoid sign-extension errors.
 .Sh SEE ALSO
 .Xr digittoint 3 ,
 .Xr isalnum 3 ,

==== //depot/projects/scottl-camlock/src/lib/libc/locale/digittoint.3#2 (text+ko) ====

@@ -26,9 +26,9 @@
 .\" SUCH DAMAGE.
 .\"
 .\"	@(#)digittoint.3	8.1 (Berkeley) 6/4/93
-.\" $FreeBSD: src/lib/libc/locale/digittoint.3,v 1.4 2007/01/09 00:28:00 imp Exp $
+.\" $FreeBSD: src/lib/libc/locale/digittoint.3,v 1.5 2009/09/03 10:06:37 des Exp $
 .\"
-.Dd April 6, 2001
+.Dd September 3, 2009
 .Dt DIGITTOINT 3
 .Os
 .Sh NAME
@@ -46,6 +46,15 @@
 function converts a numeric character to its corresponding integer value.
 The character can be any decimal digit or hexadecimal digit.
 With hexadecimal characters, the case of the values does not matter.
+.Pp
+.Em NOTE :
+if the value passed to the
+.Fn digittoint
+function is a
+.Vt signed char ,
+as is usually the case, it must be cast to an
+.Vt unsigned char
+to avoid sign-extension errors.
 .Sh RETURN VALUES
 The
 .Fn digittoint

==== //depot/projects/scottl-camlock/src/lib/libc/locale/isalnum.3#2 (text+ko) ====

@@ -30,9 +30,9 @@
 .\" SUCH DAMAGE.
 .\"
 .\"     @(#)isalnum.3	8.1 (Berkeley) 6/4/93
-.\" $FreeBSD: src/lib/libc/locale/isalnum.3,v 1.22 2007/01/09 00:28:00 imp Exp $
+.\" $FreeBSD: src/lib/libc/locale/isalnum.3,v 1.23 2009/09/03 10:06:37 des Exp $
 .\"
-.Dd July 17, 2005
+.Dd September 3, 2009
 .Dt ISALNUM 3
 .Os
 .Sh NAME
@@ -75,6 +75,15 @@
 .It "\&164\ ``t'' \t165\ ``u'' \t166\ ``v'' \t167\ ``w'' \t170\ ``x''"
 .It "\&171\ ``y'' \t172\ ``z''"
 .El
+.Pp
+.Em NOTE :
+if the value passed to the
+.Fn isalnum
+function is a
+.Vt signed char ,
+as is usually the case, it must be cast to an
+.Vt unsigned char
+to avoid sign-extension errors.
 .Sh RETURN VALUES
 The
 .Fn isalnum

==== //depot/projects/scottl-camlock/src/lib/libc/locale/isalpha.3#2 (text+ko) ====

@@ -30,9 +30,9 @@
 .\" SUCH DAMAGE.
 .\"
 .\"     @(#)isalpha.3	8.1 (Berkeley) 6/4/93
-.\" $FreeBSD: src/lib/libc/locale/isalpha.3,v 1.21 2007/01/09 00:28:00 imp Exp $
+.\" $FreeBSD: src/lib/libc/locale/isalpha.3,v 1.22 2009/09/03 10:06:37 des Exp $
 .\"
-.Dd July 17, 2005
+.Dd September 3, 2009
 .Dt ISALPHA 3
 .Os
 .Sh NAME
@@ -73,6 +73,15 @@
 .It "\&164\ ``t'' \t165\ ``u'' \t166\ ``v'' \t167\ ``w'' \t170\ ``x''"
 .It "\&171\ ``y'' \t172\ ``z''"
 .El
+.Pp
+.Em NOTE :
+if the value passed to the
+.Fn isalpha
+function is a
+.Vt signed char ,
+as is usually the case, it must be cast to an
+.Vt unsigned char
+to avoid sign-extension errors.
 .Sh RETURN VALUES
 The
 .Fn isalpha

==== //depot/projects/scottl-camlock/src/lib/libc/locale/isascii.3#2 (text+ko) ====

@@ -26,9 +26,9 @@
 .\" SUCH DAMAGE.
 .\"
 .\"     @(#)isascii.3	8.2 (Berkeley) 12/11/93
-.\" $FreeBSD: src/lib/libc/locale/isascii.3,v 1.14 2007/01/09 00:28:00 imp Exp $
+.\" $FreeBSD: src/lib/libc/locale/isascii.3,v 1.15 2009/09/03 10:06:37 des Exp $
 .\"
-.Dd October 6, 2002
+.Dd September 3, 2009
 .Dt ISASCII 3
 .Os
 .Sh NAME
@@ -47,6 +47,15 @@
 .Tn ASCII
 character, which is any character
 between 0 and octal 0177 inclusive.
+.Pp
+.Em NOTE :
+if the value passed to the
+.Fn isascii
+function is a
+.Vt signed char ,
+as is usually the case, it must be cast to an
+.Vt unsigned char
+to avoid sign-extension errors.
 .Sh SEE ALSO
 .Xr ctype 3 ,
 .Xr iswascii 3 ,

==== //depot/projects/scottl-camlock/src/lib/libc/locale/isblank.3#2 (text+ko) ====

@@ -26,9 +26,9 @@
 .\" SUCH DAMAGE.
 .\"
 .\"     @(#)isblank.3	8.1 (Berkeley) 6/4/93
-.\" $FreeBSD: src/lib/libc/locale/isblank.3,v 1.23 2007/01/09 00:28:00 imp Exp $
+.\" $FreeBSD: src/lib/libc/locale/isblank.3,v 1.24 2009/09/03 10:06:37 des Exp $
 .\"
-.Dd July 17, 2005
+.Dd September 3, 2009
 .Dt ISBLANK 3
 .Os
 .Sh NAME
@@ -57,6 +57,15 @@
 .Vt "unsigned char"
 or the value of
 .Dv EOF .
+.Pp
+.Em NOTE :
+if the value passed to the
+.Fn isblank
+function is a
+.Vt signed char ,
+as is usually the case, it must be cast to an
+.Vt unsigned char
+to avoid sign-extension errors.
 .Sh RETURN VALUES
 The
 .Fn isblank

==== //depot/projects/scottl-camlock/src/lib/libc/locale/iscntrl.3#2 (text+ko) ====

@@ -30,9 +30,9 @@
 .\" SUCH DAMAGE.
 .\"
 .\"     @(#)iscntrl.3	8.1 (Berkeley) 6/4/93
-.\" $FreeBSD: src/lib/libc/locale/iscntrl.3,v 1.20 2007/01/09 00:28:00 imp Exp $
+.\" $FreeBSD: src/lib/libc/locale/iscntrl.3,v 1.21 2009/09/03 10:06:37 des Exp $
 .\"
-.Dd July 17, 2005
+.Dd September 3, 2009
 .Dt ISCNTRL 3
 .Os
 .Sh NAME
@@ -65,6 +65,15 @@
 .It "\&031\ EM \t032\ SUB \t033\ ESC \t034\ FS \t035\ GS"
 .It "\&036\ RS \t037\ US \t177\ DEL"
 .El
+.Pp
+.Em NOTE :
+if the value passed to the
+.Fn iscntrl
+function is a
+.Vt signed char ,
+as is usually the case, it must be cast to an
+.Vt unsigned char
+to avoid sign-extension errors.
 .Sh RETURN VALUES
 The
 .Fn iscntrl

==== //depot/projects/scottl-camlock/src/lib/libc/locale/isdigit.3#3 (text+ko) ====

@@ -30,9 +30,9 @@
 .\" SUCH DAMAGE.
 .\"
 .\"     @(#)isdigit.3	8.1 (Berkeley) 6/4/93
-.\" $FreeBSD: src/lib/libc/locale/isdigit.3,v 1.23 2007/05/04 16:01:07 gabor Exp $
+.\" $FreeBSD: src/lib/libc/locale/isdigit.3,v 1.24 2009/09/03 10:06:37 des Exp $
 .\"
-.Dd May 4, 2007
+.Dd September 3, 2009
 .Dt ISDIGIT 3
 .Os
 .Sh NAME
@@ -68,6 +68,15 @@
 .Vt "unsigned char"
 or the value of
 .Dv EOF .
+.Pp
+.Em NOTE :
+if the value passed to the
+.Fn isdigit
+function is a
+.Vt signed char ,
+as is usually the case, it must be cast to an
+.Vt unsigned char
+to avoid sign-extension errors.
 .Sh RETURN VALUES
 The
 .Fn isdigit

==== //depot/projects/scottl-camlock/src/lib/libc/locale/isgraph.3#2 (text+ko) ====

@@ -30,9 +30,9 @@
 .\" SUCH DAMAGE.
 .\"
 .\"     @(#)isgraph.3	8.2 (Berkeley) 12/11/93
-.\" $FreeBSD: src/lib/libc/locale/isgraph.3,v 1.22 2007/01/09 00:28:00 imp Exp $
+.\" $FreeBSD: src/lib/libc/locale/isgraph.3,v 1.23 2009/09/03 10:06:37 des Exp $
 .\"
-.Dd July 17, 2005
+.Dd September 3, 2009
 .Dt ISGRAPH 3
 .Os
 .Sh NAME
@@ -80,6 +80,15 @@
 .It "\&166\ ``v'' \t167\ ``w'' \t170\ ``x'' \t171\ ``y'' \t172\ ``z''"
 .It "\&173\ ``{'' \t174\ ``|'' \t175\ ``}'' \t176\ ``~''"
 .El
+.Pp
+.Em NOTE :
+if the value passed to the
+.Fn isgraph
+function is a
+.Vt signed char ,
+as is usually the case, it must be cast to an
+.Vt unsigned char
+to avoid sign-extension errors.
 .Sh RETURN VALUES
 The
 .Fn isgraph

==== //depot/projects/scottl-camlock/src/lib/libc/locale/isideogram.3#2 (text+ko) ====

>>> TRUNCATED FOR MAIL (1000 lines) <<<



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