chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Revert "bus-driverd: do not track identical matches"
[elogind.git]
/
src
/
bus-proxyd
/
bus-proxyd.c
diff --git
a/src/bus-proxyd/bus-proxyd.c
b/src/bus-proxyd/bus-proxyd.c
index fa52a387b649afc3572b875e42c94d6bcb9fd0d8..a14d7c822bab00722054a76f2f4db7d2ea365cef 100644
(file)
--- a/
src/bus-proxyd/bus-proxyd.c
+++ b/
src/bus-proxyd/bus-proxyd.c
@@
-40,17
+40,9
@@
#include "bus-util.h"
#include "build.h"
#include "strv.h"
#include "bus-util.h"
#include "build.h"
#include "strv.h"
+#include "def.h"
-#define UNIX_BUS_PATH "unix:path=/run/dbus/system_bus_socket"
-#define KERNEL_BUS_PATH "kernel:path=/dev/kdbus/0-system/bus"
-
-#ifdef ENABLE_KDBUS
-# define DEFAULT_BUS_PATH KERNEL_BUS_PATH ";" UNIX_BUS_PATH
-#else
-# define DEFAULT_BUS_PATH UNIX_BUS_PATH
-#endif
-
-static const char *arg_address = DEFAULT_BUS_PATH;
+static const char *arg_address = DEFAULT_SYSTEM_BUS_PATH;
static char *arg_command_line_buffer = NULL;
static int help(void) {
static char *arg_command_line_buffer = NULL;
static int help(void) {
@@
-60,7
+52,7
@@
static int help(void) {
" -h --help Show this help\n"
" --version Show package version\n"
" --address=ADDRESS Connect to the bus specified by ADDRESS\n"
" -h --help Show this help\n"
" --version Show package version\n"
" --address=ADDRESS Connect to the bus specified by ADDRESS\n"
- " (default: " DEFAULT_BUS_PATH ")\n",
+ " (default: " DEFAULT_
SYSTEM_
BUS_PATH ")\n",
program_invocation_short_name);
return 0;
program_invocation_short_name);
return 0;
@@
-165,9
+157,9
@@
static int rename_service(sd_bus *a, sd_bus *b) {
/* The status string gets the full command line ... */
sd_notifyf(false,
/* The status string gets the full command line ... */
sd_notifyf(false,
- "STATUS=Processing requests from client PID
%lu (%s); UID %lu
(%s)",
-
(unsigned long)
pid, p,
-
(unsigned long)
uid, name);
+ "STATUS=Processing requests from client PID
"PID_FMT" (%s); UID "UID_FMT"
(%s)",
+ pid, p,
+ uid, name);
/* ... and the argv line only the short comm */
if (arg_command_line_buffer) {
/* ... and the argv line only the short comm */
if (arg_command_line_buffer) {
@@
-175,17
+167,17
@@
static int rename_service(sd_bus *a, sd_bus *b) {
m = strlen(arg_command_line_buffer);
w = snprintf(arg_command_line_buffer, m,
m = strlen(arg_command_line_buffer);
w = snprintf(arg_command_line_buffer, m,
- "[PID
%lu/%s; UID %lu
/%s]",
-
(unsigned long)
pid, comm,
-
(unsigned long)
uid, name);
+ "[PID
"PID_FMT"/%s; UID "UID_FMT"
/%s]",
+ pid, comm,
+ uid, name);
if (m > w)
memset(arg_command_line_buffer + w, 0, m - w);
}
if (m > w)
memset(arg_command_line_buffer + w, 0, m - w);
}
- log_debug("Running on behalf of PID
%lu (%s), UID %lu
(%s), %s",
-
(unsigned long)
pid, p,
-
(unsigned long)
uid, name,
+ log_debug("Running on behalf of PID
"PID_FMT" (%s), UID "UID_FMT"
(%s), %s",
+ pid, p,
+ uid, name,
a->unique_name);
;
return 0;
a->unique_name);
;
return 0;