aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--coreutils/stat.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/coreutils/stat.c b/coreutils/stat.c
index dc9d81c35..769fac078 100644
--- a/coreutils/stat.c
+++ b/coreutils/stat.c
@@ -655,7 +655,7 @@ static bool do_stat(const char *filename, const char *format)
);
# if ENABLE_SELINUX
if (option_mask32 & OPT_SELINUX)
- printf(" %lc\n", *scontext);
+ printf(" %s\n", scontext);
else
bb_putchar('\n');
# endif
@@ -700,7 +700,8 @@ static bool do_stat(const char *filename, const char *format)
(unsigned long) statbuf.st_gid,
(gw_ent != NULL) ? gw_ent->gr_name : "UNKNOWN");
# if ENABLE_SELINUX
- printf(" S_Context: %lc\n", *scontext);
+ if (option_mask32 & OPT_SELINUX)
+ printf(" S_Context: %s\n", scontext);
# endif
printf("Access: %s\n", human_time(statbuf.st_atime));
printf("Modify: %s\n", human_time(statbuf.st_mtime));