chiark / gitweb /
bus-util: simplify bus_verify_polkit_async() a bit
[elogind.git] / src / libsystemd / sd-bus / bus-socket.c
index bccf50122213aa43509c95fe856ddcf9bbd79bec..d124d9aa1367902ecd72021d112deefe1793da54 100644 (file)
@@ -648,7 +648,7 @@ static int bus_socket_start_auth_client(sd_bus *b) {
 
                 auth_prefix = "\0AUTH EXTERNAL ";
 
-                snprintf(text, sizeof(text), "%lu", (unsigned long) geteuid());
+                snprintf(text, sizeof(text), UID_FMT, geteuid());
                 char_array_0(text);
 
                 l = strlen(text);
@@ -736,7 +736,7 @@ int bus_socket_exec(sd_bus *b) {
 
         pid = fork();
         if (pid < 0) {
-                close_pipe(s);
+                safe_close_pair(s);
                 return -errno;
         }
         if (pid == 0) {