chiark / gitweb /
Add a snprinf wrapper which checks that the buffer was big enough
[elogind.git] / src / bus-proxyd / driver.c
index 361b14c1317d650de2083bc692bfeb9cd3fe5ae9..5287ff140b5aff894c51bd22501b5f90d9b3b038 100644 (file)
@@ -252,11 +252,11 @@ int bus_proxy_process_driver(sd_bus *a, sd_bus *b, sd_bus_message *m, SharedPoli
                 if (!sd_bus_message_has_signature(m, "s"))
                         return synthetic_reply_method_error(m, &SD_BUS_ERROR_MAKE_CONST(SD_BUS_ERROR_INVALID_ARGS, "Invalid parameters"));
 
-                r = get_creds_by_message(a, m, SD_BUS_CREDS_UID, &creds, &error);
+                r = get_creds_by_message(a, m, SD_BUS_CREDS_EUID, &creds, &error);
                 if (r < 0)
                         return synthetic_reply_method_errno(m, r, &error);
 
-                return synthetic_reply_method_return(m, "u", (uint32_t) creds->uid);
+                return synthetic_reply_method_return(m, "u", (uint32_t) creds->euid);
 
         } else if (sd_bus_message_is_method_call(m, "org.freedesktop.DBus", "GetId")) {
                 sd_id128_t server_id;