summaryrefslogtreecommitdiff
path: root/src/ls.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ls.c')
-rw-r--r--src/ls.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ls.c b/src/ls.c
index 5eacbad0d..946e71169 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -2651,7 +2651,8 @@ gobble_file (char const *name, enum filetype type, ino_t inode,
? getfilecon (absolute_name, &f->scontext)
: lgetfilecon (absolute_name, &f->scontext));
err = (attr_len < 0);
- file_has_security_context = (err == 0);
+ file_has_security_context =
+ (err == 0 && ! STREQ ("unlabeled", f->scontext));
/* When requesting security context information, don't make
ls fail just because the file (even a command line argument)