summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-05-05 13:45:18 +0200
committerLennart Poettering <lennart@poettering.net>2016-05-05 22:34:47 +0200
commitd2a50e3b5279714218b76f30c29ecfb90b5fb15a (patch)
treefda155b4533b4ef488e931354a1b467ba5001174 /src
parent1f15ce28461ec54f85908efc063f99dc5a65b4ca (diff)
core: fix owner user/group output in socket dump
The unit file settings are called SocketUser= and SocketGroup= hence name these fields that way in the "systemd-analyze dump" output too. https://github.com/systemd/systemd/issues/3171#issuecomment-216216995
Diffstat (limited to 'src')
-rw-r--r--src/core/socket.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/core/socket.c b/src/core/socket.c
index 4fc66af0b8..016df40b8c 100644
--- a/src/core/socket.c
+++ b/src/core/socket.c
@@ -640,8 +640,8 @@ static void socket_dump(Unit *u, FILE *f, const char *prefix) {
if (!isempty(s->user) || !isempty(s->group))
fprintf(f,
- "%sOwnerUser: %s\n"
- "%sOwnerGroup: %s\n",
+ "%sSocketUser: %s\n"
+ "%sSocketGroup: %s\n",
prefix, strna(s->user),
prefix, strna(s->group));
@@ -1291,11 +1291,13 @@ static int socket_open_fds(Socket *s) {
/* Apply the socket protocol */
switch(p->address.type) {
+
case SOCK_STREAM:
case SOCK_SEQPACKET:
if (p->socket->socket_protocol == IPPROTO_SCTP)
p->address.protocol = p->socket->socket_protocol;
break;
+
case SOCK_DGRAM:
if (p->socket->socket_protocol == IPPROTO_UDPLITE)
p->address.protocol = p->socket->socket_protocol;
@@ -1359,8 +1361,7 @@ static int socket_open_fds(Socket *s) {
}
break;
- case SOCKET_USB_FUNCTION:
- {
+ case SOCKET_USB_FUNCTION: {
_cleanup_free_ char *ep = NULL;
ep = path_make_absolute("ep0", p->path);