summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-rtnl
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2014-12-29 02:18:21 +0100
committerTom Gundersen <teg@jklm.no>2014-12-29 02:20:04 +0100
commit09773ef4462657bffadc568d08c962041fea9944 (patch)
tree6901af9c5b8ffcfd5a25b6079ebdaa379ecca450 /src/libsystemd/sd-rtnl
parent2da780b9763424d3133881ed9f51545cc8b9b575 (diff)
rtnl: recv_message - don't enforce sender uid
All we care about is that the kernel (pid==0) sent the message. Verifying the sender uid seems to break when using userns. Reported by Stéphane Graber.
Diffstat (limited to 'src/libsystemd/sd-rtnl')
-rw-r--r--src/libsystemd/sd-rtnl/rtnl-message.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsystemd/sd-rtnl/rtnl-message.c b/src/libsystemd/sd-rtnl/rtnl-message.c
index 640c0ea93..36eb9f5b3 100644
--- a/src/libsystemd/sd-rtnl/rtnl-message.c
+++ b/src/libsystemd/sd-rtnl/rtnl-message.c
@@ -1363,10 +1363,10 @@ static int socket_recv_message(int fd, struct iovec *iov, uint32_t *_group, bool
struct ucred *ucred = (void *)CMSG_DATA(cmsg);
/* from the kernel */
- if (ucred->uid == 0 && ucred->pid == 0)
+ if (ucred->pid == 0)
auth = true;
else
- log_debug("rtnl: ignoring message from uid %u pid %u", ucred->uid, ucred->pid);
+ log_debug("rtnl: ignoring message from pid %u", ucred->pid);
} else if (cmsg->cmsg_level == SOL_NETLINK &&
cmsg->cmsg_type == NETLINK_PKTINFO &&
cmsg->cmsg_len == CMSG_LEN(sizeof(struct nl_pktinfo))) {