activation-helper: check_permissions: in the test build, don't have unused variables
authorSimon McVittie <simon.mcvittie@collabora.co.uk>
Thu, 14 Jul 2011 17:45:45 +0000 (18:45 +0100)
committerSimon McVittie <simon.mcvittie@collabora.co.uk>
Fri, 5 Aug 2011 11:26:57 +0000 (12:26 +0100)
In the real build they're used to check permissions.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39231
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
bus/activation-helper.c

index baba8f0..b7ea686 100644 (file)
@@ -184,6 +184,7 @@ clear_environment (DBusError *error)
 static dbus_bool_t
 check_permissions (const char *dbus_user, DBusError *error)
 {
+#ifndef ACTIVATION_LAUNCHER_TEST
   uid_t uid, euid;
   struct passwd *pw;
 
@@ -191,7 +192,6 @@ check_permissions (const char *dbus_user, DBusError *error)
   uid = 0;
   euid = 0;
 
-#ifndef ACTIVATION_LAUNCHER_TEST
   /* bail out unless the dbus user is invoking the helper */
   pw = getpwnam(dbus_user);
   if (!pw)