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
This commit is contained in:
parent
1f15ce2846
commit
d2a50e3b52
|
@ -640,8 +640,8 @@ static void socket_dump(Unit *u, FILE *f, const char *prefix) {
|
||||||
|
|
||||||
if (!isempty(s->user) || !isempty(s->group))
|
if (!isempty(s->user) || !isempty(s->group))
|
||||||
fprintf(f,
|
fprintf(f,
|
||||||
"%sOwnerUser: %s\n"
|
"%sSocketUser: %s\n"
|
||||||
"%sOwnerGroup: %s\n",
|
"%sSocketGroup: %s\n",
|
||||||
prefix, strna(s->user),
|
prefix, strna(s->user),
|
||||||
prefix, strna(s->group));
|
prefix, strna(s->group));
|
||||||
|
|
||||||
|
@ -1291,11 +1291,13 @@ static int socket_open_fds(Socket *s) {
|
||||||
|
|
||||||
/* Apply the socket protocol */
|
/* Apply the socket protocol */
|
||||||
switch(p->address.type) {
|
switch(p->address.type) {
|
||||||
|
|
||||||
case SOCK_STREAM:
|
case SOCK_STREAM:
|
||||||
case SOCK_SEQPACKET:
|
case SOCK_SEQPACKET:
|
||||||
if (p->socket->socket_protocol == IPPROTO_SCTP)
|
if (p->socket->socket_protocol == IPPROTO_SCTP)
|
||||||
p->address.protocol = p->socket->socket_protocol;
|
p->address.protocol = p->socket->socket_protocol;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SOCK_DGRAM:
|
case SOCK_DGRAM:
|
||||||
if (p->socket->socket_protocol == IPPROTO_UDPLITE)
|
if (p->socket->socket_protocol == IPPROTO_UDPLITE)
|
||||||
p->address.protocol = p->socket->socket_protocol;
|
p->address.protocol = p->socket->socket_protocol;
|
||||||
|
@ -1359,8 +1361,7 @@ static int socket_open_fds(Socket *s) {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SOCKET_USB_FUNCTION:
|
case SOCKET_USB_FUNCTION: {
|
||||||
{
|
|
||||||
_cleanup_free_ char *ep = NULL;
|
_cleanup_free_ char *ep = NULL;
|
||||||
|
|
||||||
ep = path_make_absolute("ep0", p->path);
|
ep = path_make_absolute("ep0", p->path);
|
||||||
|
|
Loading…
Reference in New Issue