* set{g,u}id().
*/
if (needs_lsm) {
- if (!sync_wait_fd(ap->ipc_socket, &lsm_fd)) {
+ if (!sync_wait_fd(ap->ipc_socket, ATTACH_SYNC_LSM(&lsm_fd))) {
SYSERROR("Failed to receive lsm label fd");
goto on_error;
}
lxc_attach_terminal_close_pts(&terminal);
/* Tell grandparent the pid of the pid of the newly created child. */
- if (!sync_wake_pid(ipc_sockets[1], pid)) {
+ if (!sync_wake_pid(ipc_sockets[1], ATTACH_SYNC_PID(pid))) {
/* If this really happens here, this is very unfortunate, since
* the parent will not know the pid of the attached process and
* will not be able to wait for it (and we won't either due to
TRACE("Told intermediate process to start initializing");
/* Get pid of attached process from intermediate process. */
- if (!sync_wait_pid(ipc_sockets[0], &attached_pid))
+ if (!sync_wait_pid(ipc_sockets[0], ATTACH_SYNC_PID(&attached_pid)))
goto close_mainloop;
TRACE("Received pid %d of attached process in parent pid namespace", attached_pid);
TRACE("Opened LSM label file descriptor %d", labelfd);
/* Send child fd of the LSM security module to write to. */
- if (!sync_wake_fd(ipc_sockets[0], labelfd)) {
+ if (!sync_wake_fd(ipc_sockets[0], ATTACH_SYNC_LSM(labelfd))) {
SYSERROR("Failed to send lsm label fd");
goto close_mainloop;
}
ATTACH_SYNC_CGROUP = 0,
};
+#define ATTACH_SYNC_PID(x) (x)
+#define ATTACH_SYNC_LSM(x) (x)
+
__hidden extern bool lxc_sync_init(struct lxc_handler *handler);
__hidden extern void lxc_sync_fini(struct lxc_handler *);
__hidden extern void lxc_sync_fini_parent(struct lxc_handler *);