summaryrefslogtreecommitdiff
path: root/src/core/dbus-socket.c
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2012-11-05 12:50:19 -0500
committerDave Reisner <dreisner@archlinux.org>2012-11-05 21:17:55 -0500
commitaea54018a5e66a41318afb6c6be745b6aef48d9e (patch)
treea76adbe80c82522b3a15f2a46d6e4258905727d3 /src/core/dbus-socket.c
parentedca2e2348b314e2d892fe6f8ae276fdc223f014 (diff)
Implement SocketUser= and SocketGroup= for [Socket]
Since we already allow defining the mode of AF_UNIX sockets and FIFO, it makes sense to also allow specific user/group ownership of the socket file for restricting access.
Diffstat (limited to 'src/core/dbus-socket.c')
-rw-r--r--src/core/dbus-socket.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/dbus-socket.c b/src/core/dbus-socket.c
index 095a031612..887c80eb89 100644
--- a/src/core/dbus-socket.c
+++ b/src/core/dbus-socket.c
@@ -43,6 +43,8 @@
" <property name=\"BindToDevice\" type=\"s\" access=\"read\"/>\n" \
" <property name=\"DirectoryMode\" type=\"u\" access=\"read\"/>\n" \
" <property name=\"SocketMode\" type=\"u\" access=\"read\"/>\n" \
+ " <property name=\"SocketUser\" type=\"s\" access=\"read\"/>\n" \
+ " <property name=\"SocketGroup\" type=\"s\" access=\"read\"/>\n" \
" <property name=\"Accept\" type=\"b\" access=\"read\"/>\n" \
" <property name=\"KeepAlive\" type=\"b\" access=\"read\"/>\n" \
" <property name=\"Priority\" type=\"i\" access=\"read\"/>\n" \
@@ -109,6 +111,8 @@ static const BusProperty bus_socket_properties[] = {
{ "BindToDevice", bus_property_append_string, "s", offsetof(Socket, bind_to_device), true },
{ "DirectoryMode", bus_property_append_mode, "u", offsetof(Socket, directory_mode) },
{ "SocketMode", bus_property_append_mode, "u", offsetof(Socket, socket_mode) },
+ { "SocketUser", bus_property_append_string, "s", offsetof(Socket, socket_user), true },
+ { "SocketGroup", bus_property_append_string, "s", offsetof(Socket, socket_group), true },
{ "Accept", bus_property_append_bool, "b", offsetof(Socket, accept) },
{ "KeepAlive", bus_property_append_bool, "b", offsetof(Socket, keep_alive) },
{ "Priority", bus_property_append_int, "i", offsetof(Socket, priority) },