]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/core/execute.c
tree-wide: introduce new SOCKADDR_UN_LEN() macro, and use it everywhere
[thirdparty/systemd.git] / src / core / execute.c
index ac2ac398926c69322abbb902be3019d79a8b4503..5eb3f13695cacfd1a34f937eed163c4e351d7771 100644 (file)
@@ -271,7 +271,7 @@ static int connect_journal_socket(int fd, uid_t uid, gid_t gid) {
                 }
         }
 
-        r = connect(fd, &sa.sa, offsetof(struct sockaddr_un, sun_path) + strlen(sa.un.sun_path));
+        r = connect(fd, &sa.sa, SOCKADDR_UN_LEN(sa.un));
         if (r < 0)
                 r = -errno;