]> git.proxmox.com Git - mirror_lxc.git/blobdiff - src/lxc/af_unix.c
confile: cleanup parse_line()
[mirror_lxc.git] / src / lxc / af_unix.c
index e17208888aff688f0148e96c1c15b41a6a7cc013..bd29b09da07134d6977d627bd975e63a2465ade4 100644 (file)
 #include <sys/syscall.h>
 #include <sys/un.h>
 
+#include "af_unix.h"
 #include "config.h"
 #include "log.h"
 #include "macro.h"
 #include "memory_utils.h"
-#include "raw_syscalls.h"
+#include "process_utils.h"
 #include "utils.h"
 
 #ifndef HAVE_STRLCPY
@@ -189,7 +190,7 @@ static int lxc_abstract_unix_recv_fds_iov(int fd, int *recvfds, int num_recvfds,
        msg.msg_iovlen = iovlen;
 
        do {
-               ret = recvmsg(fd, &msg, 0);
+               ret = recvmsg(fd, &msg, MSG_CMSG_CLOEXEC);
        } while (ret < 0 && errno == EINTR);
        if (ret < 0 || ret == 0)
                return ret;
@@ -349,7 +350,7 @@ int lxc_unix_connect_type(struct sockaddr_un *addr, int type)
        return move_fd(fd);
 }
 
-int lxc_unix_connect(struct sockaddr_un *addr, int type)
+int lxc_unix_connect(struct sockaddr_un *addr)
 {
        return lxc_unix_connect_type(addr, SOCK_STREAM);
 }