diff options
author | Bernd Eckenfels <bernd@eckenfels.net> | 2012-01-21 01:32:07 +0000 |
---|---|---|
committer | Bernd Eckenfels <bernd@eckenfels.net> | 2012-01-21 01:32:07 +0000 |
commit | 718258492afefd59527e52379c55e18676cfaf83 (patch) | |
tree | 8807c60b8492f970269946deac573f444469c925 | |
parent | 4c91a43c2d5717e678c5ebc33f056b5bc3ef8800 (diff) | |
download | net-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.h | 3 | ||||
-rw-r--r-- | netstat.c | 8 |
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 @@ -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 */ |