#include "terminal.h"
#include "utils.h"
-#if HAVE_SYS_PERSONALITY_H
-#include <sys/personality.h>
-#endif
-
lxc_log_define(attach, lxc);
/* Define default options if no options are supplied by the user. */
}
/* Now perform additional attachments. */
-#if HAVE_SYS_PERSONALITY_H
if (options->attach_flags & LXC_ATTACH_SET_PERSONALITY) {
long new_personality;
TRACE("Set new personality");
}
}
-#endif
if (options->attach_flags & LXC_ATTACH_DROP_CAPABILITIES) {
ret = drop_capabilities(ctx);
#include <sys/capability.h>
#endif
-#if HAVE_SYS_PERSONALITY_H
-#include <sys/personality.h>
-#endif
-
#ifndef HAVE_STRLCAT
#include "include/strlcat.h"
#endif
return 0;
}
-static int setup_personality(int persona)
+static int setup_personality(signed long persona)
{
int ret;
-#if HAVE_SYS_PERSONALITY_H
if (persona == -1)
return 0;
if (ret < 0)
return log_error_errno(-1, errno, "Failed to set personality to \"0x%x\"", persona);
- INFO("Set personality to \"0x%x\"", persona);
-#endif
+ INFO("Set personality to \"0lx%lx\"", persona);
return 0;
}
#include "storage/storage.h"
#include "utils.h"
-#if HAVE_SYS_PERSONALITY_H
-#include <sys/personality.h>
-#endif
-
#ifndef HAVE_STRLCPY
#include "include/strlcpy.h"
#endif
signed long lxc_config_parse_arch(const char *arch)
{
-#if HAVE_SYS_PERSONALITY_H
static struct per_name {
char *name;
unsigned long per;
for (int i = 0; i < len; i++)
if (strequal(pername[i].name, arch))
return pername[i].per;
-#endif
return LXC_ARCH_UNCHANGED;
}
else
memset(retv, 0, inlen);
-#if HAVE_SYS_PERSONALITY_H
int len = 0;
switch (c->personality) {
default:
break;
}
-#endif
return fulllen;
}
#include <linux/openat2.h>
#endif
+#if HAVE_SYS_PERSONALITY_H
+#include <sys/personality.h>
+#endif
+
typedef int32_t key_serial_t;
#if !HAVE_KEYCTL