projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4d32b44
)
udevd: init_notify() fix abstract namespace name handling
author
Kay Sievers
<kay.sievers@vrfy.org>
Sun, 11 Jul 2010 21:57:11 +0000
(23:57 +0200)
committer
Kay Sievers
<kay.sievers@vrfy.org>
Sun, 11 Jul 2010 21:57:11 +0000
(23:57 +0200)
udev/udevd.c
patch
|
blob
|
history
diff --git
a/udev/udevd.c
b/udev/udevd.c
index
e38c601
..
873634f
100644
(file)
--- 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;