chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
user-sessions: add minimal utility to kill user sessions that shall be called before...
[elogind.git]
/
src
/
manager.c
diff --git
a/src/manager.c
b/src/manager.c
index c062cfb5ed3f19fb33bde2d7456843022902c960..4ee04e181fb6c62e47f84232b438761017f8734d 100644
(file)
--- a/
src/manager.c
+++ b/
src/manager.c
@@
-92,7
+92,7
@@
static int manager_setup_notify(Manager *m) {
else
strncpy(sa.un.sun_path+1, NOTIFY_SOCKET, sizeof(sa.un.sun_path)-1);
else
strncpy(sa.un.sun_path+1, NOTIFY_SOCKET, sizeof(sa.un.sun_path)-1);
- if (bind(m->notify_watch.fd, &sa.sa,
sizeof(sa_family_t
) + 1 + strlen(sa.un.sun_path+1)) < 0) {
+ if (bind(m->notify_watch.fd, &sa.sa,
offsetof(struct sockaddr_un, sun_path
) + 1 + strlen(sa.un.sun_path+1)) < 0) {
log_error("bind() failed: %m");
return -errno;
}
log_error("bind() failed: %m");
return -errno;
}