aboutsummaryrefslogtreecommitdiff
path: root/src/common/compat.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2015-12-15 13:11:06 -0500
committerNick Mathewson <nickm@torproject.org>2015-12-15 13:11:06 -0500
commitaba39ea39075803c974ab6451a55b52deb425468 (patch)
treec37613f1e609098fa96e99884da7c6d0e1e1bc0e /src/common/compat.h
parent744958e0ddc74e7f4db12a5d078d1188bf9f48e1 (diff)
parent405a8d3fb4884d5e5c5f32881a1a810b733a5aad (diff)
downloadtor-aba39ea39075803c974ab6451a55b52deb425468.tar.gz
tor-aba39ea39075803c974ab6451a55b52deb425468.zip
Merge branch 'feature8195_small_squashed'
Diffstat (limited to 'src/common/compat.h')
-rw-r--r--src/common/compat.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/common/compat.h b/src/common/compat.h
index fb177832af..d38adca598 100644
--- a/src/common/compat.h
+++ b/src/common/compat.h
@@ -625,7 +625,18 @@ typedef unsigned long rlim_t;
int get_max_sockets(void);
int set_max_file_descriptors(rlim_t limit, int *max);
int tor_disable_debugger_attach(void);
-int switch_id(const char *user);
+
+#if defined(HAVE_SYS_CAPABILITY_H) && defined(HAVE_CAP_SET_PROC)
+#define HAVE_LINUX_CAPABILITIES
+#endif
+
+int have_capability_support(void);
+
+/** Flag for switch_id; see switch_id() for documentation */
+#define SWITCH_ID_KEEP_BINDLOW (1<<0)
+/** Flag for switch_id; see switch_id() for documentation */
+#define SWITCH_ID_WARN_IF_NO_CAPS (1<<1)
+int switch_id(const char *user, unsigned flags);
#ifdef HAVE_PWD_H
char *get_user_homedir(const char *username);
#endif