summaryrefslogtreecommitdiffstats
path: root/src/capabilities.c
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2014-05-25 04:59:35 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2014-05-25 04:59:35 +0200
commit5e72359e9a2f4008c408acbd3fe5d389e11a15b4 (patch)
tree5f1aede16a3b1e6985d4b7a309c6999416a638a3 /src/capabilities.c
parentf34e51a1c3b98df2b7c8c7d7eb415a33f42f2d75 (diff)
downloadfastd-5e72359e9a2f4008c408acbd3fe5d389e11a15b4.tar
fastd-5e72359e9a2f4008c408acbd3fe5d389e11a15b4.zip
Completely document fastd.h
Diffstat (limited to 'src/capabilities.c')
-rw-r--r--src/capabilities.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/capabilities.c b/src/capabilities.c
index 897ca3c..8a7e823 100644
--- a/src/capabilities.c
+++ b/src/capabilities.c
@@ -68,6 +68,7 @@ static void try_cap(cap_value_t cap) {
cap_free(name);
}
+/** Tries to acquire the capabilities needed to perform initialization without root privileges */
void fastd_cap_init(void) {
/* interface creation */
try_cap(CAP_NET_ADMIN);
@@ -79,6 +80,7 @@ void fastd_cap_init(void) {
try_cap(CAP_NET_RAW);
}
+/** Drops all capabilities */
void fastd_cap_drop(void) {
cap_t caps = cap_init();