Date: Wed, 12 Mar 2003 17:47:52 -0800 (PST) From: Peter Wemm <peter@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 26804 for review Message-ID: <200303130147.h2D1lqag068533@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=26804 Change 26804 by peter@peter_daintree on 2003/03/12 17:47:38 force resolve Affected files ... .. //depot/projects/hammer/bin/ls/Makefile#3 integrate .. //depot/projects/hammer/bin/ls/cmp.c#2 integrate .. //depot/projects/hammer/bin/ls/extern.h#3 integrate .. //depot/projects/hammer/bin/ls/ls.1#5 integrate .. //depot/projects/hammer/bin/ls/ls.c#6 integrate .. //depot/projects/hammer/bin/ls/ls.h#3 integrate .. //depot/projects/hammer/bin/ls/print.c#5 integrate .. //depot/projects/hammer/bin/ls/util.c#2 integrate Differences ... ==== //depot/projects/hammer/bin/ls/Makefile#3 (text+ko) ==== ==== //depot/projects/hammer/bin/ls/cmp.c#2 (text+ko) ==== ==== //depot/projects/hammer/bin/ls/extern.h#3 (text+ko) ==== ==== //depot/projects/hammer/bin/ls/ls.1#5 (text+ko) ==== @@ -33,7 +33,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)ls.1 8.7 (Berkeley) 7/29/94 -.\" $FreeBSD: src/bin/ls/ls.1,v 1.71 2002/11/03 07:29:08 tjr Exp $ +.\" $FreeBSD: src/bin/ls/ls.1,v 1.73 2003/01/20 21:25:00 chris Exp $ .\" .Dd May 19, 2002 .Dt LS 1 @@ -146,7 +146,8 @@ .It Fl W Display whiteouts when scanning directories. .It Fl Z -Display each file's MAC label. +Display each file's MAC label; see +.Xr maclabel 7 . .It Fl a Include directory entries whose names begin with a dot @@ -420,10 +421,10 @@ .Pp The next field contains a plus -.Pq Sq Li + +.Pq Ql + character if the file has an ACL, or a space -.Pq Sq Li " " +.Pq Ql " " if it does not. The .Nm @@ -461,7 +462,7 @@ will be displayed in units of that size block. .It Ev CLICOLOR Use -\*[Ai] +.Tn ANSI color sequences to distinguish file types. See .Ev LSCOLORS @@ -570,7 +571,7 @@ .El .Pp Note that the above are standard -\*[Ai] +.Tn ANSI colors. The actual display may differ depending on the color capabilities of the terminal in use. @@ -639,6 +640,7 @@ .Xr sort 1 , .Xr xterm 1 , .Xr termcap 5 , +.Xr maclabel 7 , .Xr symlink 7 , .Xr getfmac 8 , .Xr sticky 8 @@ -648,8 +650,11 @@ utility conforms to .St -p1003.1-2001 . .Pp -.No The ACL support is compatible with IEEE\ Std\ 1003.2c\ ( Ns Dq "POSIX.2c" Ns ) -Draft\ 17 +The ACL support is compatible with +.Tn IEEE +Std\~1003.2c +.Pq Dq Tn POSIX Ns .2c +Draft\~17 (withdrawn). .Sh HISTORY An ==== //depot/projects/hammer/bin/ls/ls.c#6 (text+ko) ==== @@ -46,7 +46,7 @@ #endif /* not lint */ #endif #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/bin/ls/ls.c,v 1.71 2002/11/06 01:18:12 tjr Exp $"); +__FBSDID("$FreeBSD: src/bin/ls/ls.c,v 1.72 2002/12/18 21:05:15 rwatson Exp $"); #include <sys/types.h> #include <sys/stat.h> @@ -448,7 +448,8 @@ * If not recursing down this tree and don't need stat info, just get * the names. */ - ch_options = !f_recursive && options & FTS_NOSTAT ? FTS_NAMEONLY : 0; + ch_options = !f_recursive && !f_label && + options & FTS_NOSTAT ? FTS_NAMEONLY : 0; while ((p = fts_read(ftsp)) != NULL) switch (p->fts_info) { @@ -691,7 +692,9 @@ error = mac_prepare_file_label(&label); if (error == -1) { - warn("%s", cur->fts_name); + warn("MAC label for %s/%s", + cur->fts_parent->fts_path, + cur->fts_name); goto label_out; } @@ -700,8 +703,8 @@ "%s", cur->fts_name); else snprintf(name, sizeof(name), - "%s/%s", cur->fts_parent->fts_accpath, - cur->fts_name); + "%s/%s", cur->fts_parent-> + fts_accpath, cur->fts_name); if (options & FTS_LOGICAL) error = mac_get_file(name, @@ -710,7 +713,9 @@ error = mac_get_link(name, label); if (error == -1) { - warn("%s", cur->fts_name); + warn("MAC label for %s/%s", + cur->fts_parent->fts_path, + cur->fts_name); mac_free(label); goto label_out; } @@ -718,7 +723,9 @@ error = mac_to_text(label, &labelstr); if (error == -1) { - warn("%s", cur->fts_name); + warn("MAC label for %s/%s", + cur->fts_parent->fts_path, + cur->fts_name); mac_free(label); goto label_out; } ==== //depot/projects/hammer/bin/ls/ls.h#3 (text+ko) ==== ==== //depot/projects/hammer/bin/ls/print.c#5 (text+ko) ==== @@ -40,7 +40,7 @@ #endif /* not lint */ #endif #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/bin/ls/print.c,v 1.63 2002/11/06 01:18:12 tjr Exp $"); +__FBSDID("$FreeBSD: src/bin/ls/print.c,v 1.64 2002/12/19 01:13:23 tjr Exp $"); #include <sys/param.h> #include <sys/stat.h> @@ -674,6 +674,14 @@ 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. + */ + if (S_ISLNK(p->fts_statp->st_mode)) { + *haveacls = 1; + return; + } if ((ret = pathconf(name, _PC_ACL_EXTENDED)) <= 0) { if (ret < 0 && errno != EINVAL) warn("%s", name); ==== //depot/projects/hammer/bin/ls/util.c#2 (text+ko) ==== To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200303130147.h2D1lqag068533>