Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
return lxc_abstract_unix_recv_one_fd(fd, fd_recv, NULL, 0) > 0;
}
-static bool attach_lsm(lxc_attach_options_t *options)
+static inline bool attach_lsm(lxc_attach_options_t *options)
{
return (options->attach_flags & (LXC_ATTACH_LSM | LXC_ATTACH_LSM_LABEL));
}
struct passwd pwent;
struct passwd *pwentp = NULL;
char *user_shell;
- size_t bufsize;
+ ssize_t bufsize;
int ret;
/* Ignore payload parameter. */
uid = getuid();
bufsize = sysconf(_SC_GETPW_R_SIZE_MAX);
- if (bufsize == -1)
+ if (bufsize < 0)
bufsize = 1024;
buf = malloc(bufsize);