summaryrefslogtreecommitdiffstats
path: root/bin/ls/print.c
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2002-10-24 00:07:30 +0000
committerrwatson <rwatson@FreeBSD.org>2002-10-24 00:07:30 +0000
commita20ce31a589e9e23445a90849727252ecd52ce91 (patch)
treef73db318a2d9760cf896be092cf15e5f29f06f7d /bin/ls/print.c
parentc1f79de8c7e95092759b8bf882668ce50bc83a7c (diff)
downloadFreeBSD-src-a20ce31a589e9e23445a90849727252ecd52ce91.zip
FreeBSD-src-a20ce31a589e9e23445a90849727252ecd52ce91.tar.gz
Teach "ls -Z" to use the policy-agnostic MAC label interfaces rather
than the LOMAC-specific interfaces for listing MAC labels. This permits ls to view MAC labels in a manner similar to getfmac, when ls is used with the -l argument. Next generation LOMAC will use the MAC Framework so should "just" work with this and other policies. Not the prettiest code in the world, but then, neither is ls(1). Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
Diffstat (limited to 'bin/ls/print.c')
-rw-r--r--bin/ls/print.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/ls/print.c b/bin/ls/print.c
index ab0a43f..99aa732 100644
--- a/bin/ls/print.c
+++ b/bin/ls/print.c
@@ -182,8 +182,8 @@ printlong(DISPLAY *dp)
np->group);
if (f_flags)
(void)printf("%-*s ", dp->s_flags, np->flags);
- if (f_lomac)
- (void)printf("%-*s ", dp->s_lattr, np->lattr);
+ if (f_label)
+ (void)printf("%-*s ", dp->s_label, np->label);
if (S_ISCHR(sp->st_mode) || S_ISBLK(sp->st_mode))
if (minor(sp->st_rdev) > 255 || minor(sp->st_rdev) < 0)
(void)printf("%3d, 0x%08x ",
OpenPOWER on IntegriCloud