aboutsummaryrefslogtreecommitdiff
path: root/selinux
diff options
context:
space:
mode:
Diffstat (limited to 'selinux')
-rw-r--r--selinux/sestatus.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/selinux/sestatus.c b/selinux/sestatus.c
index 216629615..1a02a6b0c 100644
--- a/selinux/sestatus.c
+++ b/selinux/sestatus.c
@@ -114,7 +114,8 @@ static void display_verbose(void)
/* files contexts */
puts("\nFile contexts:");
- cterm = ttyname(0);
+ cterm = xmalloc_ttyname(0);
+//FIXME: if cterm == NULL, we segfault!??
puts(cterm);
if (cterm && lgetfilecon(cterm, &con) >= 0) {
printf(COL_FMT "%s\n", "Controlling term:", con);
@@ -122,7 +123,7 @@ static void display_verbose(void)
freecon(con);
}
- for (i=0; fc[i] != NULL; i++) {
+ for (i = 0; fc[i] != NULL; i++) {
struct stat stbuf;
if (lgetfilecon(fc[i], &con) < 0)