On 12-09-10 02:26 PM, Dwight Engen wrote: > Add a few missing #if's to fix compilation when configured without > AppArmor. > > Signed-off-by: Dwight Engen <dwight.en...@oracle.com> > --- > src/lxc/conf.c | 2 ++ > src/lxc/confile.c | 4 ++++ > 2 files changed, 6 insertions(+), 0 deletions(-) > > diff --git a/src/lxc/conf.c b/src/lxc/conf.c > index ecd89c1..1450ca6 100644 > --- a/src/lxc/conf.c > +++ b/src/lxc/conf.c > @@ -2536,8 +2536,10 @@ void lxc_conf_free(struct lxc_conf *conf) > if (conf->rootfs.mount != LXCROOTFSMOUNT) > free(conf->rootfs.mount); > lxc_clear_config_network(conf); > +#if HAVE_APPARMOR > if (conf->aa_profile) > free(conf->aa_profile); > +#endif > lxc_clear_config_caps(conf); > lxc_clear_cgroups(conf, "lxc.cgroup"); > lxc_clear_hooks(conf); > diff --git a/src/lxc/confile.c b/src/lxc/confile.c > index 0f4e11d..e18d6b8 100644 > --- a/src/lxc/confile.c > +++ b/src/lxc/confile.c > @@ -1522,8 +1522,10 @@ int lxc_get_config_item(struct lxc_conf *c, char *key, > char *retv, int inlen) > v = c->ttydir; > else if (strcmp(key, "lxc.arch") == 0) > return lxc_get_arch_entry(c, retv, inlen); > +#if HAVE_APPARMOR > else if (strcmp(key, "lxc.aa_profile") == 0) > v = c->aa_profile; > +#endif > else if (strcmp(key, "lxc.cgroup") == 0) // all cgroup info > return lxc_get_cgroup_entry(c, retv, inlen, "all"); > else if (strncmp(key, "lxc.cgroup.", 11) == 0) // specific cgroup info > @@ -1597,8 +1599,10 @@ void write_config(FILE *fout, struct lxc_conf *c) > case PER_LINUX: fprintf(fout, "lxc.arch = x86_64\n"); break; > default: break; > } > +#if HAVE_APPARMOR > if (c->aa_profile) > fprintf(fout, "lxc.aa_profile = %s\n", c->aa_profile); > +#endif > lxc_list_for_each(it, &c->cgroup) { > struct lxc_cgroup *cg = it->elem; > fprintf(fout, "lxc.cgroup.%s = %s\n", cg->subsystem, cg->value);
Reviewed by Serge and pushed to staging branch. Thanks. -- Stéphane Graber Ubuntu developer http://www.ubuntu.com
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________ Lxc-devel mailing list Lxc-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-devel