--- a/usr/src/cmd/ls/ls.c Thu Jun 12 14:37:08 2008 -0700
+++ b/usr/src/cmd/ls/ls.c Thu Jun 12 14:56:54 2008 -0700
@@ -294,6 +294,7 @@
static void free_sysattr(struct lbuf *);
static nvpair_t *pair;
static nvlist_t *response;
+static int acl_err;
int
main(int argc, char *argv[])
@@ -693,6 +694,8 @@
ep->lflags |= ISARG;
optind++;
nargs++; /* count good arguments stored in flist */
+ if (acl_err)
+ err = 2;
}
colwidth = fixedwidth + filewidth;
qsort(flist, (unsigned)nargs, sizeof (struct lbuf *),
@@ -1557,6 +1560,7 @@
gettext("ls: can't read ACL on %s: %s\n"),
file, acl_strerror(error));
rep->acl = ' ';
+ acl_err++;
return (rep);
}