From: Kay Sievers Date: Sun, 11 Jul 2010 21:57:11 +0000 (+0200) Subject: udevd: init_notify() fix abstract namespace name handling X-Git-Tag: 174~412 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=35df38c36a65bd0a9fd108f7e10ea6a593d5cdd7;p=systemd udevd: init_notify() fix abstract namespace name handling --- diff --git a/udev/udevd.c b/udev/udevd.c index e38c6016..873634fe 100644 --- a/udev/udevd.c +++ b/udev/udevd.c @@ -1006,7 +1006,9 @@ static int init_notify(const char *state) memset(&msghdr, 0, sizeof(msghdr)); msghdr.msg_name = &sockaddr; - msghdr.msg_namelen = sizeof(struct sockaddr_un); + msghdr.msg_namelen = sizeof(sa_family_t) + strlen(e); + if (msghdr.msg_namelen > sizeof(struct sockaddr_un)) + msghdr.msg_namelen = sizeof(struct sockaddr_un); msghdr.msg_iov = &iovec; msghdr.msg_iovlen = 1; msghdr.msg_control = &control;