aboutsummaryrefslogtreecommitdiff
path: root/bin/ls/print.c
diff options
context:
space:
mode:
authorRobert Watson <rwatson@FreeBSD.org>2002-10-24 00:07:30 +0000
committerRobert Watson <rwatson@FreeBSD.org>2002-10-24 00:07:30 +0000
commit4d33b62edc26ae71ae72c8e7a2a344d1201c11c9 (patch)
treef73db318a2d9760cf896be092cf15e5f29f06f7d /bin/ls/print.c
parent2af538eb48c431ccb17ef44fd9b2992f80b83bab (diff)
downloadsrc-4d33b62edc26ae71ae72c8e7a2a344d1201c11c9.tar.gz
src-4d33b62edc26ae71ae72c8e7a2a344d1201c11c9.zip
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
Notes
Notes: svn path=/head/; revision=105832
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 ab0a43fbfd8d..99aa732b1778 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 ",