summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernd Eckenfels <bernd@eckenfels.net>2012-01-21 01:32:07 +0000
committerBernd Eckenfels <bernd@eckenfels.net>2012-01-21 01:32:07 +0000
commit718258492afefd59527e52379c55e18676cfaf83 (patch)
tree8807c60b8492f970269946deac573f444469c925
parent4c91a43c2d5717e678c5ebc33f056b5bc3ef8800 (diff)
downloadnet-tools-718258492afefd59527e52379c55e18676cfaf83.tar.gz
net-tools-718258492afefd59527e52379c55e18676cfaf83.tar.bz2
net-tools-718258492afefd59527e52379c55e18676cfaf83.zip
Make netstat -h and -V honor HAVE_SELINUX
-rw-r--r--lib/net-features.h3
-rw-r--r--netstat.c8
2 files changed, 8 insertions, 3 deletions
diff --git a/lib/net-features.h b/lib/net-features.h
index a59af20..03379fa 100644
--- a/lib/net-features.h
+++ b/lib/net-features.h
@@ -117,6 +117,9 @@ static char *Features =
"-I18N"
#endif /* I18N */
+#if HAVE_SELINUX
+" +SELINUX"
+#endif
"\nAF: "
#ifdef DFLT_AF
diff --git a/netstat.c b/netstat.c
index ad7a74f..e080b06 100644
--- a/netstat.c
+++ b/netstat.c
@@ -1846,10 +1846,12 @@ static void usage(void)
fprintf(stderr, _(" -a, --all, --listening display all sockets (default: connected)\n"));
fprintf(stderr, _(" -o, --timers display timers\n"));
fprintf(stderr, _(" -F, --fib display Forwarding Information Base (default)\n"));
- fprintf(stderr, _(" -C, --cache display routing cache instead of FIB\n\n"));
- fprintf(stderr, _(" -Z, --context display SELinux security context for sockets\n\n"));
+ fprintf(stderr, _(" -C, --cache display routing cache instead of FIB\n"));
+#if HAVE_SELINUX
+ fprintf(stderr, _(" -Z, --context display SELinux security context for sockets\n"));
+#endif
- fprintf(stderr, _(" <Socket>={-t|--tcp} {-u|--udp} {-U|--udplite} {-w|--raw} {-x|--unix} --ax25 --ipx --netrom\n"));
+ fprintf(stderr, _("\n <Socket>={-t|--tcp} {-u|--udp} {-U|--udplite} {-w|--raw} {-x|--unix} --ax25 --ipx --netrom\n"));
fprintf(stderr, _(" <AF>=Use '-6|-4' or '-A <af>' or '--<af>'; default: %s\n"), DFLT_AF);
fprintf(stderr, _(" List of possible address families (which support routing):\n"));
print_aflist(1); /* 1 = routeable */