]> git.proxmox.com Git - mirror_lxc.git/blobdiff - src/lxc/conf.h
conf.c: change 'instanciate' to 'instantiate'
[mirror_lxc.git] / src / lxc / conf.h
index 865b87ac9062f36709135c8dd1d7bba0776fe166..563109c5e28824a476b11c324d723fbc09b2447a 100644 (file)
@@ -20,8 +20,8 @@
  * 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,
@@ -180,7 +184,7 @@ struct lxc_pty_info {
 
 /*
  * Defines the number of tty configured and contains the
- * instanciated ptys
+ * instantiated ptys
  * @nbtty = number of configured ttys
  */
 struct lxc_tty_info {
@@ -288,7 +292,7 @@ struct lxc_conf {
        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;
@@ -307,11 +311,12 @@ struct lxc_conf {
        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
@@ -334,6 +339,23 @@ struct lxc_conf {
        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,
@@ -369,6 +391,11 @@ extern int lxc_clear_automounts(struct lxc_conf *c);
 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
@@ -387,4 +414,6 @@ extern int userns_exec_1(struct lxc_conf *conf, int (*fn)(void *), void *data);
 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