summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/core/dbus-execute.c13
-rw-r--r--src/shared/bus-util.c11
2 files changed, 24 insertions, 0 deletions
diff --git a/src/core/dbus-execute.c b/src/core/dbus-execute.c
index 73290002f6..b87192a9ae 100644
--- a/src/core/dbus-execute.c
+++ b/src/core/dbus-execute.c
@@ -894,6 +894,19 @@ int bus_exec_context_set_transient_property(
}
return 1;
+ } else if (streq(name, "SyslogFacility")) {
+ int facility;
+
+ r = sd_bus_message_read(message, "i", &facility);
+ if (r < 0)
+ return r;
+
+ if (mode != UNIT_CHECK) {
+ c->syslog_priority = (facility << 3) | LOG_PRI(c->syslog_priority);
+ unit_write_drop_in_private_format(u, mode, name, "SyslogFacility=%i\n", facility);
+ }
+
+ return 1;
} else if (streq(name, "Nice")) {
int n;
diff --git a/src/shared/bus-util.c b/src/shared/bus-util.c
index bf9320b0e0..3a45ac4064 100644
--- a/src/shared/bus-util.c
+++ b/src/shared/bus-util.c
@@ -1508,6 +1508,17 @@ int bus_append_unit_property_assignment(sd_bus_message *m, const char *assignmen
r = sd_bus_message_append(m, "v", "i", level);
+ } else if (streq(field, "SyslogFacility")) {
+ int facility;
+
+ facility = log_facility_unshifted_from_string(eq);
+ if (facility < 0) {
+ log_error("Failed to parse %s value %s.", field, eq);
+ return -EINVAL;
+ }
+
+ r = sd_bus_message_append(m, "v", "i", facility);
+
} else if (streq(field, "DeviceAllow")) {
if (isempty(eq))