aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2010-07-14 04:31:52 +0000
committerGuy Harris <guy@alum.mit.edu>2010-07-14 04:31:52 +0000
commit6a8c39c59f5531f22f13852e74072db5c8f7ca1c (patch)
tree085c893b28d4756961dd8f086ef4b28347182a20
parentb277e17e7bc1a7625b88bb8a4336a0e8f6d0da5a (diff)
Define print_caps() before we use it.
svn path=/trunk/; revision=33514
-rw-r--r--dumpcap.c35
1 files changed, 17 insertions, 18 deletions
diff --git a/dumpcap.c b/dumpcap.c
index 8d44a45aa2..3370fb0ed7 100644
--- a/dumpcap.c
+++ b/dumpcap.c
@@ -478,6 +478,23 @@ cmdarg_err_cont(const char *fmt, ...)
#ifdef HAVE_LIBCAP
static void
+#if 0 /* Set to enable capability debugging */
+/* see 'man cap_to_text()' for explanation of output */
+/* '=' means 'all= ' ie: no capabilities */
+/* '=ip' means 'all=ip' ie: all capabilities are permissible and inheritable */
+/* .... */
+print_caps(const char *pfx) {
+ cap_t caps = cap_get_proc();
+ g_log(LOG_DOMAIN_CAPTURE_CHILD, G_LOG_LEVEL_DEBUG,
+ "%s: EUID: %d Capabilities: %s", pfx,
+ geteuid(), cap_to_text(caps, NULL));
+ cap_free(caps);
+#else
+print_caps(const char *pfx _U_) {
+#endif
+}
+
+static void
relinquish_all_capabilities(void)
{
/* Drop any and all capabilities this process may have. */
@@ -1370,24 +1387,6 @@ static void exit_main(int status)
* CAP_NET_ADMIN and CAP_NET_RAW, then relinquish our permissions.
* (See comment in main() for details)
*/
-
-static void
-#if 0 /* Set to enable capability debugging */
-/* see 'man cap_to_text()' for explanation of output */
-/* '=' means 'all= ' ie: no capabilities */
-/* '=ip' means 'all=ip' ie: all capabilities are permissible and inheritable */
-/* .... */
-print_caps(const char *pfx) {
- cap_t caps = cap_get_proc();
- g_log(LOG_DOMAIN_CAPTURE_CHILD, G_LOG_LEVEL_DEBUG,
- "%s: EUID: %d Capabilities: %s", pfx,
- geteuid(), cap_to_text(caps, NULL));
- cap_free(caps);
-#else
-print_caps(const char *pfx _U_) {
-#endif
-}
-
static void
relinquish_privs_except_capture(void)
{