diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-12-23 23:36:47 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-12-23 23:36:47 +0000 |
commit | 4e12b1a2a9e68685dff61acaee1e1f6c377d978c (patch) | |
tree | 6d2745f77060d05f843eb186c5227246667d33cb /selinux | |
parent | b3523b9cd3ba71b82e36466b17aae3d65a53203e (diff) | |
download | busybox-w32-4e12b1a2a9e68685dff61acaee1e1f6c377d978c.tar.gz busybox-w32-4e12b1a2a9e68685dff61acaee1e1f6c377d978c.tar.bz2 busybox-w32-4e12b1a2a9e68685dff61acaee1e1f6c377d978c.zip |
libbb: introduce and use xmalloc_ttyname (-32 in bss).
ash: small code shrink
text data bss dec hex filename
793669 504 7524 801697 c3ba1 busybox_old
793659 504 7492 801655 c3b77 busybox_unstripped
Diffstat (limited to 'selinux')
-rw-r--r-- | selinux/sestatus.c | 5 |
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) | |||
114 | /* files contexts */ | 114 | /* files contexts */ |
115 | puts("\nFile contexts:"); | 115 | puts("\nFile contexts:"); |
116 | 116 | ||
117 | cterm = ttyname(0); | 117 | cterm = xmalloc_ttyname(0); |
118 | //FIXME: if cterm == NULL, we segfault!?? | ||
118 | puts(cterm); | 119 | puts(cterm); |
119 | if (cterm && lgetfilecon(cterm, &con) >= 0) { | 120 | if (cterm && lgetfilecon(cterm, &con) >= 0) { |
120 | printf(COL_FMT "%s\n", "Controlling term:", con); | 121 | printf(COL_FMT "%s\n", "Controlling term:", con); |
@@ -122,7 +123,7 @@ static void display_verbose(void) | |||
122 | freecon(con); | 123 | freecon(con); |
123 | } | 124 | } |
124 | 125 | ||
125 | for (i=0; fc[i] != NULL; i++) { | 126 | for (i = 0; fc[i] != NULL; i++) { |
126 | struct stat stbuf; | 127 | struct stat stbuf; |
127 | 128 | ||
128 | if (lgetfilecon(fc[i], &con) < 0) | 129 | if (lgetfilecon(fc[i], &con) < 0) |