* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef _conf_h
-#define _conf_h
+#ifndef __LXC_CONF_H
+#define __LXC_CONF_H
#include "config.h"
typedef void * scmp_filter_ctx;
#endif
+/* worth moving to configure.ac? */
+#define subuidfile "/etc/subuid"
+#define subgidfile "/etc/subgid"
+
enum {
LXC_NET_EMPTY,
LXC_NET_VETH,
/*
* Defines the number of tty configured and contains the
- * instanciated ptys
+ * instantiated ptys
* @nbtty = number of configured ttys
*/
struct lxc_tty_info {
int pts;
int reboot;
int need_utmp_watch;
- int personality;
+ signed long personality;
struct utsname *utsname;
struct lxc_list cgroup;
struct lxc_list id_map;
struct lxc_list hooks[NUM_LXC_HOOKS];
char *lsm_aa_profile;
+ int lsm_aa_allow_incomplete;
char *lsm_se_context;
int tmp_umount_proc;
char *seccomp; // filename with the seccomp rules
#if HAVE_SCMP_FILTER_CTX
- scmp_filter_ctx *seccomp_ctx;
+ scmp_filter_ctx seccomp_ctx;
#endif
int maincmd_fd;
int autodev; // if 1, mount and fill a /dev at start
int start_delay;
int start_order;
struct lxc_list groups;
+ int nbd_idx;
+
+ /* set to true when rootfs has been setup */
+ bool rootfs_setup;
+
+ /* 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;
+
+ /* text representation of the config file */
+ char *unexpanded_config;
+ size_t unexpanded_len, unexpanded_alloced;
};
int run_lxc_hooks(const char *name, char *hook, struct lxc_conf *conf,
extern int lxc_clear_hooks(struct lxc_conf *c, const char *key);
extern int lxc_clear_idmaps(struct lxc_conf *c);
extern int lxc_clear_groups(struct lxc_conf *c);
+extern int lxc_clear_environment(struct lxc_conf *c);
+extern int lxc_delete_autodev(struct lxc_handler *handler);
+
+extern int do_rootfs_setup(struct lxc_conf *conf, const char *name,
+ const char *lxcpath);
/*
* Configure the container from inside
extern int parse_mntopts(const char *mntopts, unsigned long *mntflags,
char **mntdata);
extern void tmp_proc_unmount(struct lxc_conf *lxc_conf);
+void remount_all_slave(void);
+extern void suggest_default_idmap(void);
#endif