confile.c revision df2d4205073d3f57543951ca7ffabf891b230634
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen * lxc: linux Container library
8aacc9e7c84f8376822823ec98c2f551d4919b2eTimo Sirainen * (C) Copyright IBM Corp. 2007, 2008
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen * Daniel Lezcano <daniel.lezcano at free.fr>
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen * This library is free software; you can redistribute it and/or
463e82bdf0e990f4f2252d2b53ea23a5abe5883cTimo Sirainen * modify it under the terms of the GNU Lesser General Public
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen * License as published by the Free Software Foundation; either
d41573018e85896ec836d897fd554e87126147f5Timo Sirainen * version 2.1 of the License, or (at your option) any later version.
d41573018e85896ec836d897fd554e87126147f5Timo Sirainen * This library is distributed in the hope that it will be useful,
d41573018e85896ec836d897fd554e87126147f5Timo Sirainen * but WITHOUT ANY WARRANTY; without even the implied warranty of
945631faab2bf1aed8d95a1fd0c317a9ce153725Timo Sirainen * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
945631faab2bf1aed8d95a1fd0c317a9ce153725Timo Sirainen * Lesser General Public License for more details.
945631faab2bf1aed8d95a1fd0c317a9ce153725Timo Sirainen * You should have received a copy of the GNU Lesser General Public
945631faab2bf1aed8d95a1fd0c317a9ce153725Timo Sirainen * License along with this library; if not, write to the Free Software
945631faab2bf1aed8d95a1fd0c317a9ce153725Timo Sirainen * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
f81a4d2002da0db33d11ca694d3a91b3ee2a0fdbTimo Sirainenstatic int config_personality(const char *, const char *, struct lxc_conf *);
b0be0bead3d6963149f7f2a9504b8ab5aced9af5Timo Sirainenstatic int config_pts(const char *, const char *, struct lxc_conf *);
bbf796c17f02538058d7559bfe96d677e5b55015Timo Sirainenstatic int config_tty(const char *, const char *, struct lxc_conf *);
e6d7d19c328e7043ad35d5a52c1617bde915a16fTimo Sirainenstatic int config_ttydir(const char *, const char *, struct lxc_conf *);
8d131435ba4648c8821160ec38d508c97177c715Timo Sirainenstatic int config_kmsg(const char *, const char *, struct lxc_conf *);
9315dd69233d554452df0c12bc57002d2042a8f4Timo Sirainenstatic int config_lsm_aa_profile(const char *, const char *, struct lxc_conf *);
2a6af811ea3de3cf9e2f15e446674dd21b0705f3Timo Sirainenstatic int config_lsm_se_context(const char *, const char *, struct lxc_conf *);
538c58fc95200fcc5e91abdda8b912b574a2f968Timo Sirainenstatic int config_cgroup(const char *, const char *, struct lxc_conf *);
2a6af811ea3de3cf9e2f15e446674dd21b0705f3Timo Sirainenstatic int config_idmap(const char *, const char *, struct lxc_conf *);
2a6af811ea3de3cf9e2f15e446674dd21b0705f3Timo Sirainenstatic int config_loglevel(const char *, const char *, struct lxc_conf *);
2a6af811ea3de3cf9e2f15e446674dd21b0705f3Timo Sirainenstatic int config_logfile(const char *, const char *, struct lxc_conf *);
945631faab2bf1aed8d95a1fd0c317a9ce153725Timo Sirainenstatic int config_mount(const char *, const char *, struct lxc_conf *);
bf91bed88d4e294b4577ba2a3b14d87cf35ae135Timo Sirainenstatic int config_rootfs(const char *, const char *, struct lxc_conf *);
bf91bed88d4e294b4577ba2a3b14d87cf35ae135Timo Sirainenstatic int config_rootfs_mount(const char *, const char *, struct lxc_conf *);
bf91bed88d4e294b4577ba2a3b14d87cf35ae135Timo Sirainenstatic int config_pivotdir(const char *, const char *, struct lxc_conf *);
2a6af811ea3de3cf9e2f15e446674dd21b0705f3Timo Sirainenstatic int config_utsname(const char *, const char *, struct lxc_conf *);
2a6af811ea3de3cf9e2f15e446674dd21b0705f3Timo Sirainenstatic int config_hook(const char *, const char *, struct lxc_conf *lxc_conf);
2a6af811ea3de3cf9e2f15e446674dd21b0705f3Timo Sirainenstatic int config_network_type(const char *, const char *, struct lxc_conf *);
2a6af811ea3de3cf9e2f15e446674dd21b0705f3Timo Sirainenstatic int config_network_flags(const char *, const char *, struct lxc_conf *);
2a6af811ea3de3cf9e2f15e446674dd21b0705f3Timo Sirainenstatic int config_network_link(const char *, const char *, struct lxc_conf *);
bf91bed88d4e294b4577ba2a3b14d87cf35ae135Timo Sirainenstatic int config_network_name(const char *, const char *, struct lxc_conf *);
bf91bed88d4e294b4577ba2a3b14d87cf35ae135Timo Sirainenstatic int config_network_veth_pair(const char *, const char *, struct lxc_conf *);
bf91bed88d4e294b4577ba2a3b14d87cf35ae135Timo Sirainenstatic int config_network_macvlan_mode(const char *, const char *, struct lxc_conf *);
bf91bed88d4e294b4577ba2a3b14d87cf35ae135Timo Sirainenstatic int config_network_hwaddr(const char *, const char *, struct lxc_conf *);
bf91bed88d4e294b4577ba2a3b14d87cf35ae135Timo Sirainenstatic int config_network_vlan_id(const char *, const char *, struct lxc_conf *);
bf91bed88d4e294b4577ba2a3b14d87cf35ae135Timo Sirainenstatic int config_network_mtu(const char *, const char *, struct lxc_conf *);
bf91bed88d4e294b4577ba2a3b14d87cf35ae135Timo Sirainenstatic int config_network_ipv4(const char *, const char *, struct lxc_conf *);
bf91bed88d4e294b4577ba2a3b14d87cf35ae135Timo Sirainenstatic int config_network_ipv4_gateway(const char *, const char *, struct lxc_conf *);
bf91bed88d4e294b4577ba2a3b14d87cf35ae135Timo Sirainenstatic int config_network_script_up(const char *, const char *, struct lxc_conf *);
2a6af811ea3de3cf9e2f15e446674dd21b0705f3Timo Sirainenstatic int config_network_script_down(const char *, const char *, struct lxc_conf *);
2a6af811ea3de3cf9e2f15e446674dd21b0705f3Timo Sirainenstatic int config_network_ipv6(const char *, const char *, struct lxc_conf *);
2a6af811ea3de3cf9e2f15e446674dd21b0705f3Timo Sirainenstatic int config_network_ipv6_gateway(const char *, const char *, struct lxc_conf *);
bf91bed88d4e294b4577ba2a3b14d87cf35ae135Timo Sirainenstatic int config_cap_drop(const char *, const char *, struct lxc_conf *);
2a6af811ea3de3cf9e2f15e446674dd21b0705f3Timo Sirainenstatic int config_cap_keep(const char *, const char *, struct lxc_conf *);
2a6af811ea3de3cf9e2f15e446674dd21b0705f3Timo Sirainenstatic int config_console(const char *, const char *, struct lxc_conf *);
bbf796c17f02538058d7559bfe96d677e5b55015Timo Sirainenstatic int config_seccomp(const char *, const char *, struct lxc_conf *);
8aacc9e7c84f8376822823ec98c2f551d4919b2eTimo Sirainenstatic int config_includefile(const char *, const char *, struct lxc_conf *);
1cad0dd34667548ba39f794ddeb9fc486cf4c666Timo Sirainenstatic int config_network_nic(const char *, const char *, struct lxc_conf *);
1cad0dd34667548ba39f794ddeb9fc486cf4c666Timo Sirainenstatic int config_autodev(const char *, const char *, struct lxc_conf *);
1cad0dd34667548ba39f794ddeb9fc486cf4c666Timo Sirainenstatic int config_haltsignal(const char *, const char *, struct lxc_conf *);
1cad0dd34667548ba39f794ddeb9fc486cf4c666Timo Sirainenstatic int config_stopsignal(const char *, const char *, struct lxc_conf *);
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainenstatic int config_start(const char *, const char *, struct lxc_conf *);
d482b35af87f5fd872bad007da0475813a401a49Timo Sirainenstatic int config_group(const char *, const char *, struct lxc_conf *);
1cad0dd34667548ba39f794ddeb9fc486cf4c666Timo Sirainen { "lxc.network.flags", config_network_flags },
1cad0dd34667548ba39f794ddeb9fc486cf4c666Timo Sirainen { "lxc.network.macvlan.mode", config_network_macvlan_mode },
1cad0dd34667548ba39f794ddeb9fc486cf4c666Timo Sirainen { "lxc.network.veth.pair", config_network_veth_pair },
1cad0dd34667548ba39f794ddeb9fc486cf4c666Timo Sirainen { "lxc.network.script.up", config_network_script_up },
1cad0dd34667548ba39f794ddeb9fc486cf4c666Timo Sirainen { "lxc.network.script.down", config_network_script_down },
1cad0dd34667548ba39f794ddeb9fc486cf4c666Timo Sirainen { "lxc.network.hwaddr", config_network_hwaddr },
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen { "lxc.network.vlan.id", config_network_vlan_id },
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen { "lxc.network.ipv4.gateway", config_network_ipv4_gateway },
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen { "lxc.network.ipv6.gateway", config_network_ipv6_gateway },
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen /* config_network_nic must come after all other 'lxc.network.*' entries */
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainenstatic const size_t config_size = sizeof(config)/sizeof(struct lxc_config_t);
2a6af811ea3de3cf9e2f15e446674dd21b0705f3Timo Sirainenextern struct lxc_config_t *lxc_getconfig(const char *key)
2a6af811ea3de3cf9e2f15e446674dd21b0705f3Timo Sirainen for (i = 0; i < config_size; i++)
6a19e109ee8c5a6f688da83a86a7f6abeb71abddTimo Sirainen if (len < 0) { SYSERROR("snprintf"); return -1; }; \
2a6af811ea3de3cf9e2f15e446674dd21b0705f3Timo Sirainen for (i = 0; i < config_size; i++) {
2a6af811ea3de3cf9e2f15e446674dd21b0705f3Timo Sirainenstatic int config_string_item(char **conf_item, const char *value)
2a6af811ea3de3cf9e2f15e446674dd21b0705f3Timo Sirainenstatic int config_string_item_max(char **conf_item, const char *value,
2a6af811ea3de3cf9e2f15e446674dd21b0705f3Timo Sirainen ERROR("%s is too long (>= %lu)", value, (unsigned long)max);
e06c0b65c16ccce69bbee009ead14d7d3d17a256Timo Sirainenstatic int config_path_item(char **conf_item, const char *value)
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen return config_string_item_max(conf_item, value, PATH_MAX);
2a6af811ea3de3cf9e2f15e446674dd21b0705f3Timo Sirainen * config entry is something like "lxc.network.0.ipv4"
2a6af811ea3de3cf9e2f15e446674dd21b0705f3Timo Sirainen * the key 'lxc.network.' was found. So we make sure next
abfcd9f73b9ad1eeef4fe6e9940383defabf68c3Timo Sirainen * comes an integer, find the right callback (by rewriting
abfcd9f73b9ad1eeef4fe6e9940383defabf68c3Timo Sirainen * the key), and call it.
abfcd9f73b9ad1eeef4fe6e9940383defabf68c3Timo Sirainenstatic int config_network_nic(const char *key, const char *value,
1b3bb8d39686ed24730cbc31cc9a33dc62c8c6c3Timo Sirainen * ok we know that to get here we've got "lxc.network."
9887c39c5ba429169389153ca99de49e084a73f0Timo Sirainen * and it isn't any of the other network entries. So
e06c0b65c16ccce69bbee009ead14d7d3d17a256Timo Sirainen * after the second . should come an integer (# of defined
1b3bb8d39686ed24730cbc31cc9a33dc62c8c6c3Timo Sirainen * nic) followed by a valid entry.
e06c0b65c16ccce69bbee009ead14d7d3d17a256Timo Sirainenstatic int config_network_type(const char *key, const char *value,
ace3c14e47a5a865df8aeea2fabc993b609dd163Timo Sirainen struct lxc_list *network = &lxc_conf->network;
fa5957ffc9b676bfd649fa9953e63e72ee4ebeb4Timo Sirainenstatic int config_ip_prefix(struct in_addr *addr)
5a07b37a9df398b5189c14872a600384208ab74bTimo Sirainen * if you have p="lxc.network.0.link", pass it p+12
1b3bb8d39686ed24730cbc31cc9a33dc62c8c6c3Timo Sirainen * to get back '0' (the index of the nic)
5a07b37a9df398b5189c14872a600384208ab74bTimo Sirainenstatic int get_network_netdev_idx(const char *key)
1b3bb8d39686ed24730cbc31cc9a33dc62c8c6c3Timo Sirainen * if you have p="lxc.network.0", pass this p+12 and it will return
1b3bb8d39686ed24730cbc31cc9a33dc62c8c6c3Timo Sirainen * the netdev of the first configured nic
1b3bb8d39686ed24730cbc31cc9a33dc62c8c6c3Timo Sirainenstatic struct lxc_netdev *get_netdev_from_key(const char *key,
5a7b52012bf77132bb8f466d07e0e88c63fdba42Timo Sirainen if (idx == i++) {
d143077bd518de129b8d446fb58e003903e50867Timo Sirainenextern int lxc_list_nicconfigs(struct lxc_conf *c, const char *key,
d143077bd518de129b8d446fb58e003903e50867Timo Sirainen netdev = get_netdev_from_key(key+12, &c->network);
d143077bd518de129b8d446fb58e003903e50867Timo Sirainenstatic struct lxc_netdev *network_netdev(const char *key, const char *value,
d143077bd518de129b8d446fb58e003903e50867Timo Sirainen ERROR("network is not created for '%s' = '%s' option",
2c677e9d339bc91d5b54376ba2986f71476c06abTimo Sirainen netdev = get_netdev_from_key(key+12, network);
2c677e9d339bc91d5b54376ba2986f71476c06abTimo Sirainen ERROR("no network device defined for '%s' = '%s' option",
d143077bd518de129b8d446fb58e003903e50867Timo Sirainenstatic int network_ifname(char **valuep, const char *value)
d143077bd518de129b8d446fb58e003903e50867Timo Sirainen return config_string_item_max(valuep, value, IFNAMSIZ);
d143077bd518de129b8d446fb58e003903e50867Timo Sirainenstatic int macvlan_mode(int *valuep, const char *value)
a5b331e18b220fac557480b569b85215a1b3bd8eTimo Sirainen for (i = 0; i < sizeof(m)/sizeof(m[0]); i++) {
a5b331e18b220fac557480b569b85215a1b3bd8eTimo Sirainenstatic int config_network_flags(const char *key, const char *value,
a5b331e18b220fac557480b569b85215a1b3bd8eTimo Sirainen netdev = network_netdev(key, value, &lxc_conf->network);
d143077bd518de129b8d446fb58e003903e50867Timo Sirainenstatic int config_network_link(const char *key, const char *value,
a5b331e18b220fac557480b569b85215a1b3bd8eTimo Sirainen netdev = network_netdev(key, value, &lxc_conf->network);
6a19e109ee8c5a6f688da83a86a7f6abeb71abddTimo Sirainenstatic int config_network_name(const char *key, const char *value,
6a19e109ee8c5a6f688da83a86a7f6abeb71abddTimo Sirainen netdev = network_netdev(key, value, &lxc_conf->network);
2d79e603e20a32bdae4c2b516ead5c5c9169545aTimo Sirainenstatic int config_network_veth_pair(const char *key, const char *value,
a5b331e18b220fac557480b569b85215a1b3bd8eTimo Sirainen netdev = network_netdev(key, value, &lxc_conf->network);
a5b331e18b220fac557480b569b85215a1b3bd8eTimo Sirainen return network_ifname(&netdev->priv.veth_attr.pair, value);
a0d34d3982507f513a9d800082481e9faeb9a943Timo Sirainenstatic int config_network_macvlan_mode(const char *key, const char *value,
d143077bd518de129b8d446fb58e003903e50867Timo Sirainen netdev = network_netdev(key, value, &lxc_conf->network);
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen return macvlan_mode(&netdev->priv.macvlan_attr.mode, value);
faed8babca9914257f34fb2e603d74016d563b2dTimo Sirainenstatic int config_network_hwaddr(const char *key, const char *value,
faed8babca9914257f34fb2e603d74016d563b2dTimo Sirainen netdev = network_netdev(key, value, &lxc_conf->network);
16c89b1260c9d07c01c83a9219424d3727069b2eTimo Sirainen return config_string_item(&netdev->hwaddr, value);
20c26f4fcf9ef87434761829cc209c2f84ff5716Timo Sirainenstatic int config_network_vlan_id(const char *key, const char *value,
5626ae5e3316eced244adb6485c0927f1c7fdc41Timo Sirainen netdev = network_netdev(key, value, &lxc_conf->network);
6a19e109ee8c5a6f688da83a86a7f6abeb71abddTimo Sirainen if (get_u16(&netdev->priv.vlan_attr.vid, value, 0))
190237ce467d2389dfb809874b0fec86d3c7968dTimo Sirainenstatic int config_network_mtu(const char *key, const char *value,
5626ae5e3316eced244adb6485c0927f1c7fdc41Timo Sirainen netdev = network_netdev(key, value, &lxc_conf->network);
6a19e109ee8c5a6f688da83a86a7f6abeb71abddTimo Sirainen return config_string_item(&netdev->mtu, value);
ccffbed92cb02c24fd717808a84138240bf1885bTimo Sirainenstatic int config_network_ipv4(const char *key, const char *value,
2a6af811ea3de3cf9e2f15e446674dd21b0705f3Timo Sirainen char *cursor, *slash, *addr = NULL, *bcast = NULL, *prefix = NULL;
2a6af811ea3de3cf9e2f15e446674dd21b0705f3Timo Sirainen netdev = network_netdev(key, value, &lxc_conf->network);
2a6af811ea3de3cf9e2f15e446674dd21b0705f3Timo Sirainen if (!inet_pton(AF_INET, addr, &inetdev->addr)) {
c3248869ddd406a7a46b8c05633f0cccc72fcb77Timo Sirainen if (bcast && !inet_pton(AF_INET, bcast, &inetdev->bcast)) {
c3248869ddd406a7a46b8c05633f0cccc72fcb77Timo Sirainen SYSERROR("invalid ipv4 broadcast address: %s", value);
14c474d9f4591c397ed0b5206af6537c7b52c924Timo Sirainen /* no prefix specified, determine it from the network class */
2a6af811ea3de3cf9e2f15e446674dd21b0705f3Timo Sirainen /* if no broadcast address, let compute one from the
2a6af811ea3de3cf9e2f15e446674dd21b0705f3Timo Sirainen * prefix and address
2a6af811ea3de3cf9e2f15e446674dd21b0705f3Timo Sirainenstatic int config_network_ipv4_gateway(const char *key, const char *value,
2a6af811ea3de3cf9e2f15e446674dd21b0705f3Timo Sirainen netdev = network_netdev(key, value, &lxc_conf->network);
1dec807061d7d428dba5c5a92cd2a5ff843a2039Timo Sirainen SYSERROR("failed to allocate ipv4 gateway address");
2a6af811ea3de3cf9e2f15e446674dd21b0705f3Timo Sirainen SYSERROR("invalid ipv4 gateway address: %s", value);
2a6af811ea3de3cf9e2f15e446674dd21b0705f3Timo Sirainenstatic int config_network_ipv6(const char *key, const char *value,
ae8817f05005f57bba32479a610b52d083e2b6ebTimo Sirainen netdev = network_netdev(key, value, &lxc_conf->network);
8aacc9e7c84f8376822823ec98c2f551d4919b2eTimo Sirainen if (!inet_pton(AF_INET6, valdup, &inet6dev->addr)) {
51795bfe9d05d92fe942cb451aec2b9d16d32a11Timo Sirainenstatic int config_network_ipv6_gateway(const char *key, const char *value,
bf91bed88d4e294b4577ba2a3b14d87cf35ae135Timo Sirainen netdev = network_netdev(key, value, &lxc_conf->network);
2a6af811ea3de3cf9e2f15e446674dd21b0705f3Timo Sirainen SYSERROR("failed to allocate ipv6 gateway address");
if (!netdev)
if (!netdev)
if (!hooklist) {
char *copy;
if (!copy) {
if (personality >= 0)
if (!groups) {
if (!token) {
ret = 0;
if (!grouplist) {
return ret;
int ret;
if (ret == 0)
return ret;
int newlevel;
errno = 0;
int sig_n = 0;
int rtmax = 0;
return sig_n;
if (sig_n < 0)
if (sig_n < 0)
char *subkey;
if (!subkey)
if (!cglist)
goto out;
if (!cgelem)
goto out;
goto out;
out:
if (cglist)
if (cgelem) {
char *subkey;
char type;
int ret;
if (!subkey)
if (!idmaplist)
goto out;
if (!idmap)
goto out;
goto out;
goto out;
out:
if (idmaplist)
if (idmap) {
{ NULL, 0 }
if (!autos) {
if (!token) {
ret = 0;
return ret;
char *subkey;
char *mntelem;
if (!subkey) {
if (!subkey) {
if (!subkey)
if (!mntlist)
if (!mntelem) {
if (!keepcaps) {
if (!token) {
ret = 0;
if (!keeplist) {
return ret;
if (!dropcaps) {
if (!token) {
ret = 0;
if (!droplist) {
return ret;
if (!utsname) {
char *dot;
char *key;
char *value;
int ret = 0;
if (!line) {
goto out;
if (!dot) {
goto out;
if (!config) {
goto out;
out:
return ret;
if (!dent)
int ret = 0;
if (ret)
return ret;
struct per_name {
char *name;
unsigned long per;
for (i = 0; i < len; i++) {
int i, aflag;
{ NULL, 0 }
if (!flaglist) {
while (token) {
if (aflag < 0)
if (!retv)
inlen = 0;
int fulllen = 0;
if (!retv)
inlen = 0;
int len = 0;
switch(c->personality) {
return fulllen;
* If you ask for a specific cgroup value, i.e. lxc.cgroup.devices.list,
* If you ask for 'lxc.cgroup", then all cgroup entries will be printed,
* in 'lxc.cgroup.subsystem.key = value' format.
const char *key)
int all = 0;
if (!retv)
inlen = 0;
if (all) {
return fulllen;
const char *key)
char *subkey;
/* "lxc.hook.mount" */
if (!subkey)
subkey++;
if (!*subkey)
for (i=0; i<NUM_LXC_HOOKS; i++) {
found=i;
if (!retv)
inlen = 0;
return fulllen;
if (!retv)
inlen = 0;
return fulllen;
if (!retv)
inlen = 0;
return fulllen;
if (!retv)
inlen = 0;
return fulllen;
if (!retv)
inlen = 0;
return fulllen;
const char *key)
char *p1;
if (!retv)
inlen = 0;
p1++;
if (!netdev)
const char *mode;
return fulllen;
if (!retv)
inlen = 0;
return fulllen;
int inlen)
const char *v = NULL;
v = c->fstab;
v = c->ttydir;
v = c->lsm_aa_profile;
v = c->lsm_se_context;
v = lxc_log_get_file();
return strlen(v);
return lxc_clear_config_network(c);
return lxc_clear_config_caps(c);
return lxc_clear_config_keepcaps(c);
return lxc_clear_mount_entries(c);
return lxc_clear_groups(c);
if (c->fstab)
if (c->tty)
if (c->pts)
if (c->ttydir)
if (c->haltsignal)
if (c->stopsignal)
switch(c->personality) {
if (c->lsm_aa_profile)
if (c->lsm_se_context)
if (c->seccomp)
if (c->kmsg == 0)
if (c->autodev)
if (c->logfile)
if (c->utsname)
if (n->link)
if (n->name)
const char *mode;
if (n->upscript)
if (n->downscript)
if (n->hwaddr)
if (n->mtu)
if (n->ipv4_gateway_auto)
else if (n->ipv4_gateway) {
if (n->ipv6_gateway_auto)
else if (n->ipv6_gateway) {
for (i=0; i<NUM_LXC_HOOKS; i++) {
if (c->start_auto)
if (c->start_delay)
if (c->start_order)