chiark / gitweb /
nss-mymachines: map userns users of containers to real user names
[elogind.git] / src / libelogind / sd-bus / bus-container.c
index 3b3a5d357f755cd211da24ff44f8163bc703cc18..fa7a207448806f8e5cc3e5efd2a3a5217d05a7e3 100644 (file)
@@ -23,6 +23,7 @@
 #include <fcntl.h>
 
 #include "util.h"
+#include "process-util.h"
 #include "bus-internal.h"
 #include "bus-socket.h"
 #include "bus-container.h"
@@ -221,7 +222,7 @@ int bus_container_connect_kernel(sd_bus *b) {
         if (recvmsg(pair[0], &mh, MSG_NOSIGNAL|MSG_CMSG_CLOEXEC) < 0)
                 return -errno;
 
-        for (cmsg = CMSG_FIRSTHDR(&mh); cmsg; cmsg = CMSG_NXTHDR(&mh, cmsg))
+        CMSG_FOREACH(cmsg, &mh)
                 if (cmsg->cmsg_level == SOL_SOCKET && cmsg->cmsg_type == SCM_RIGHTS) {
                         int *fds;
                         unsigned n_fds;