]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
capabilities: Check effective UID as fallback if capabilities are not supported
authorTobias Brunner <tobias@strongswan.org>
Tue, 25 Jun 2013 08:09:38 +0000 (10:09 +0200)
committerTobias Brunner <tobias@strongswan.org>
Tue, 25 Jun 2013 15:16:33 +0000 (17:16 +0200)
src/libstrongswan/utils/capabilities.c

index 059271713f3231e916b64e47aaaa95272abc8e16..98cd7383254b78247f57ff661f2a195e1709a510 100644 (file)
@@ -80,7 +80,7 @@ static bool has_capability(u_int cap)
 {
 #ifndef CAPABILITIES
        /* if we can't check the actual capabilities assume only root has it */
-       return getuid() == 0;
+       return geteuid() == 0;
 #endif /* !CAPABILITIES */
 #ifdef CAPABILITIES_LIBCAP
        cap_flag_value_t val;