diff options
author | Evgeny Vereshchagin <evvers@ya.ru> | 2016-05-07 19:17:44 +0300 |
---|---|---|
committer | Evgeny Vereshchagin <evvers@ya.ru> | 2016-05-07 19:17:44 +0300 |
commit | 5ab42bc85a11a5250dcdf8e86291d3da90aa84bd (patch) | |
tree | 1493f86c5031484546ab98d242303101d3b43017 /src/login | |
parent | d2cc96a8e134e8166acb917f67b3e8b308e09370 (diff) | |
parent | 23be5709e10b3b88a9908f3005351ccba9e5d48b (diff) |
Merge pull request #3191 from poettering/cgroups-agent-dgram
core: use an AF_UNIX/SOCK_DGRAM socket for cgroup agent notification
Diffstat (limited to 'src/login')
-rw-r--r-- | src/login/pam_systemd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/login/pam_systemd.c b/src/login/pam_systemd.c index 40e246bb06..98dc201340 100644 --- a/src/login/pam_systemd.c +++ b/src/login/pam_systemd.c @@ -150,7 +150,7 @@ static int get_seat_from_display(const char *display, const char **seat, uint32_ if (fd < 0) return -errno; - if (connect(fd, &sa.sa, offsetof(struct sockaddr_un, sun_path) + strlen(sa.un.sun_path)) < 0) + if (connect(fd, &sa.sa, SOCKADDR_UN_LEN(sa.un)) < 0) return -errno; r = getpeercred(fd, &ucred); |