static bool can_use_sys_cpu;
static bool has_versioned_opts;
static bool memory_is_cgroupv2;
+static __u32 host_personality;
static volatile sig_atomic_t reload_successful;
return memory_is_cgroupv2;
}
+__u32 liblxcfs_personality(void)
+{
+ return host_personality;
+}
+
/* Define pivot_root() if missing from the C library */
#ifndef HAVE_PIVOT_ROOT
static int pivot_root(const char *new_root, const char *put_old)
goto broken_upgrade;
}
+ if (get_task_personality(getpid(), &host_personality) < 0) {
+ lxcfs_info("Failed to retrieve host personality");
+ goto broken_upgrade;
+ }
+
reload_successful = 1;
return;