Commit a013bd94 authored by Lennart Poettering's avatar Lennart Poettering
Browse files

sd-daemon: fix abstract namespace sockaddr for notification socket

parent c2ad5129
......@@ -381,7 +381,11 @@ int sd_notify(int unset_environment, 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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment