summaryrefslogtreecommitdiff
path: root/src/core/dbus-socket.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-06-05 09:55:53 +0200
committerLennart Poettering <lennart@poettering.net>2014-06-05 09:55:53 +0200
commit3900e5fdff688dc3c273f177d9d913b7389d5561 (patch)
tree7752c89ee7d52087e03fc915594ee54c38bc32cb /src/core/dbus-socket.c
parenta8330cd118993c20629565684144e0cc0e2edabe (diff)
socket: add SocketUser= and SocketGroup= for chown()ing sockets in the file system
This is relatively complex, as we cannot invoke NSS from PID 1, and thus need to fork a helper process temporarily.
Diffstat (limited to 'src/core/dbus-socket.c')
-rw-r--r--src/core/dbus-socket.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/dbus-socket.c b/src/core/dbus-socket.c
index f0c4568a9b..ad135a1ac2 100644
--- a/src/core/dbus-socket.c
+++ b/src/core/dbus-socket.c
@@ -91,8 +91,10 @@ const sd_bus_vtable bus_socket_vtable[] = {
SD_BUS_PROPERTY("Backlog", "u", bus_property_get_unsigned, offsetof(Socket, backlog), SD_BUS_VTABLE_PROPERTY_CONST),
SD_BUS_PROPERTY("TimeoutUSec", "t", bus_property_get_usec, offsetof(Socket, timeout_usec), SD_BUS_VTABLE_PROPERTY_CONST),
SD_BUS_PROPERTY("BindToDevice", "s", NULL, offsetof(Socket, bind_to_device), SD_BUS_VTABLE_PROPERTY_CONST),
- SD_BUS_PROPERTY("DirectoryMode", "u", bus_property_get_mode, offsetof(Socket, directory_mode), SD_BUS_VTABLE_PROPERTY_CONST),
+ SD_BUS_PROPERTY("SocketUser", "s", NULL, offsetof(Socket, user), SD_BUS_VTABLE_PROPERTY_CONST),
+ SD_BUS_PROPERTY("SocketGroup", "s", NULL, offsetof(Socket, group), SD_BUS_VTABLE_PROPERTY_CONST),
SD_BUS_PROPERTY("SocketMode", "u", bus_property_get_mode, offsetof(Socket, socket_mode), SD_BUS_VTABLE_PROPERTY_CONST),
+ SD_BUS_PROPERTY("DirectoryMode", "u", bus_property_get_mode, offsetof(Socket, directory_mode), SD_BUS_VTABLE_PROPERTY_CONST),
SD_BUS_PROPERTY("Accept", "b", bus_property_get_bool, offsetof(Socket, accept), SD_BUS_VTABLE_PROPERTY_CONST),
SD_BUS_PROPERTY("KeepAlive", "b", bus_property_get_bool, offsetof(Socket, keep_alive), SD_BUS_VTABLE_PROPERTY_CONST),
SD_BUS_PROPERTY("Priority", "i", bus_property_get_int, offsetof(Socket, priority), SD_BUS_VTABLE_PROPERTY_CONST),