INIT_LIST_HEAD(&new->id_map);
new->root_nsuid_map = NULL;
new->root_nsgid_map = NULL;
- lxc_list_init(&new->includes);
- lxc_list_init(&new->aliens);
lxc_list_init(&new->environment);
INIT_LIST_HEAD(&new->limits);
INIT_LIST_HEAD(&new->sysctls);
return 0;
}
-static inline void lxc_clear_aliens(struct lxc_conf *conf)
-{
- struct lxc_list *it, *next;
-
- lxc_list_for_each_safe (it, &conf->aliens, next) {
- lxc_list_del(it);
- free(it->elem);
- free(it);
- }
-
- lxc_list_init(&conf->aliens);
-}
-
-void lxc_clear_includes(struct lxc_conf *conf)
-{
- struct lxc_list *it, *next;
-
- lxc_list_for_each_safe(it, &conf->includes, next) {
- lxc_list_del(it);
- free(it->elem);
- free(it);
- }
-
- lxc_list_init(&conf->includes);
-}
-
int lxc_clear_apparmor_raw(struct lxc_conf *c)
{
struct lxc_list *it, *next;
lxc_clear_mount_entries(conf);
lxc_clear_idmaps(conf);
lxc_clear_groups(conf);
- lxc_clear_includes(conf);
- lxc_clear_aliens(conf);
lxc_clear_environment(conf);
lxc_clear_limits(conf, "lxc.prlimit");
lxc_clear_sysctls(conf, "lxc.sysctl");
unsigned int monitor_unshare;
unsigned int monitor_signal_pdeath;
- /* list of included files */
- struct lxc_list includes;
- /* config entries which are not "lxc.*" are aliens */
- struct lxc_list aliens;
-
/* list of environment variables we'll add to the container when
* started */
struct lxc_list environment;
__hidden extern int lxc_clear_limits(struct lxc_conf *c, const char *key);
__hidden extern int lxc_delete_autodev(struct lxc_handler *handler);
__hidden extern int lxc_clear_autodev_tmpfs_size(struct lxc_conf *c);
-__hidden extern void lxc_clear_includes(struct lxc_conf *conf);
__hidden extern int lxc_setup_rootfs_prepare_root(struct lxc_conf *conf, const char *name,
const char *lxcpath);
__hidden extern int lxc_setup(struct lxc_handler *handler);