summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-rtnl/rtnl-message.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2014-12-29 00:19:36 +0100
committerTom Gundersen <teg@jklm.no>2014-12-29 00:19:36 +0100
commit2263bb9a92f25571f837700cfee4fb79721baf46 (patch)
treedc0489f2ec8507a5362ecd489046859ebc53ae38 /src/libsystemd/sd-rtnl/rtnl-message.c
parente95e909d820429ba34fa6f6f1b0109ac22743b47 (diff)
sd-rtnl: recv_message - log when dropping message
We drop messages received from the wrong uid/pid, log this at debug level.
Diffstat (limited to 'src/libsystemd/sd-rtnl/rtnl-message.c')
-rw-r--r--src/libsystemd/sd-rtnl/rtnl-message.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libsystemd/sd-rtnl/rtnl-message.c b/src/libsystemd/sd-rtnl/rtnl-message.c
index 9099440ad4..cfb2af3142 100644
--- a/src/libsystemd/sd-rtnl/rtnl-message.c
+++ b/src/libsystemd/sd-rtnl/rtnl-message.c
@@ -1363,6 +1363,8 @@ static int socket_recv_message(int fd, struct iovec *iov, uint32_t *_group, bool
/* from the kernel */
if (ucred->uid == 0 && ucred->pid == 0)
auth = true;
+ else
+ log_debug("rtnl: ignoring message from uid %u pid %u", ucred->uid, ucred->pid);
} else if (cmsg->cmsg_level == SOL_NETLINK &&
cmsg->cmsg_type == NETLINK_PKTINFO &&
cmsg->cmsg_len == CMSG_LEN(sizeof(struct nl_pktinfo))) {