Imported Upstream version 1.1.4 upstream/1.1.4
authorDariusz Michaluk <d.michaluk@samsung.com>
Wed, 7 Oct 2015 14:07:31 +0000 (16:07 +0200)
committerDariusz Michaluk <d.michaluk@samsung.com>
Mon, 30 Nov 2015 10:32:04 +0000 (11:32 +0100)
97 files changed:
Makefile.in
aclocal.m4
config/Makefile.in
config/apparmor/Makefile.in
config/apparmor/profiles/lxc-default-with-nesting
config/bash/Makefile.in
config/compile
config/config.guess
config/config.sub
config/depcomp
config/etc/Makefile.in
config/init/Makefile.in
config/init/common/Makefile.in
config/init/systemd/Makefile.in
config/init/systemd/lxc-apparmor-load
config/init/sysvinit/Makefile.in
config/init/upstart/Makefile.in
config/init/upstart/lxc.conf
config/install-sh
config/missing
config/selinux/Makefile.in
config/sysconfig/Makefile.in
config/templates/Makefile.am
config/templates/Makefile.in
config/templates/common.conf.d/Makefile.in
config/templates/nesting.conf.in [new file with mode: 0644]
config/templates/ubuntu.common.conf.in
config/yum/Makefile.in
configure
configure.ac
doc/Makefile.in
doc/api/Makefile.in
doc/examples/Makefile.in
doc/ja/Makefile.in
doc/ja/lxc-destroy.sgml.in
doc/ja/lxc-ls.sgml.in
doc/ja/lxc.container.conf.sgml.in
doc/ja/lxc.system.conf.sgml.in
doc/lxc-destroy.sgml.in
doc/lxc-ls.sgml.in
doc/lxc.container.conf.sgml.in
doc/lxc.system.conf.sgml.in
doc/rootfs/Makefile.in
hooks/Makefile.in
lxc.spec
src/Makefile.in
src/lua-lxc/Makefile.in
src/lxc/Makefile.in
src/lxc/bdev.c
src/lxc/bdev.h
src/lxc/caps.c
src/lxc/caps.h
src/lxc/cgfs.c
src/lxc/cgmanager.c
src/lxc/commands.c
src/lxc/conf.c
src/lxc/confile.c
src/lxc/genl.c
src/lxc/genl.h
src/lxc/list.h
src/lxc/lxc-checkconfig.in
src/lxc/lxc-start-ephemeral.in
src/lxc/lxc_attach.c
src/lxc/lxc_cgroup.c
src/lxc/lxc_checkpoint.c
src/lxc/lxc_console.c
src/lxc/lxc_create.c
src/lxc/lxc_device.c
src/lxc/lxc_execute.c
src/lxc/lxc_freeze.c
src/lxc/lxc_info.c
src/lxc/lxc_init.c
src/lxc/lxc_monitor.c
src/lxc/lxc_start.c
src/lxc/lxc_stop.c
src/lxc/lxc_unfreeze.c
src/lxc/lxc_unshare.c
src/lxc/lxc_wait.c
src/lxc/lxccontainer.c
src/lxc/lxccontainer.h
src/lxc/nl.c
src/lxc/nl.h
src/lxc/seccomp.c
src/lxc/start.c
src/lxc/utils.c
src/lxc/utils.h
src/lxc/version.h
src/python-lxc/Makefile.in
src/python-lxc/lxc.c
src/tests/Makefile.am
src/tests/Makefile.in
src/tests/concurrent.c
src/tests/lxc-test-symlink [new file with mode: 0755]
src/tests/reboot.c
templates/Makefile.in
templates/lxc-alpine.in
templates/lxc-debian.in

index 869a906..9ad480e 100644 (file)
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # Makefile.am
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -83,21 +93,13 @@ host_triplet = @host@
 @ENABLE_LUA_TRUE@am__append_1 = --with lua
 @ENABLE_PYTHON_TRUE@am__append_2 = --with python
 subdir = .
-DIST_COMMON = INSTALL NEWS README AUTHORS ChangeLog \
-       $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-       $(top_srcdir)/configure $(am__configure_deps) \
-       $(srcdir)/lxc.pc.in $(srcdir)/lxc.spec.in \
-       $(top_srcdir)/doc/legacy/lxc-ls.sgml.in \
-       $(top_srcdir)/doc/ja/legacy/lxc-ls.sgml.in \
-       $(top_srcdir)/src/lxc/legacy/lxc-ls.in COPYING \
-       $(top_srcdir)/config/compile $(top_srcdir)/config/config.guess \
-       $(top_srcdir)/config/config.sub \
-       $(top_srcdir)/config/install-sh $(top_srcdir)/config/missing
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \
        $(top_srcdir)/config/tls.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
+       $(am__configure_deps) $(am__DIST_COMMON)
 am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
  configure.lineno config.status.lineno
 mkinstalldirs = $(install_sh) -d
@@ -189,6 +191,15 @@ am__define_uniq_tagged_files = \
 ETAGS = etags
 CTAGS = ctags
 CSCOPE = cscope
+am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/lxc.pc.in \
+       $(srcdir)/lxc.spec.in $(top_srcdir)/config/compile \
+       $(top_srcdir)/config/config.guess \
+       $(top_srcdir)/config/config.sub \
+       $(top_srcdir)/config/install-sh $(top_srcdir)/config/missing \
+       $(top_srcdir)/doc/ja/legacy/lxc-ls.sgml.in \
+       $(top_srcdir)/doc/legacy/lxc-ls.sgml.in \
+       $(top_srcdir)/src/lxc/legacy/lxc-ls.in AUTHORS COPYING \
+       ChangeLog INSTALL NEWS README
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 distdir = $(PACKAGE)-$(VERSION)
 top_distdir = $(distdir)
@@ -424,7 +435,6 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
        $(am__cd) $(top_srcdir) && \
          $(AUTOMAKE) --gnu Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
          *config.status*) \
@@ -662,15 +672,15 @@ dist-xz: distdir
        $(am__post_remove_distdir)
 
 dist-tarZ: distdir
-       @echo WARNING: "Support for shar distribution archives is" \
-                      "deprecated." >&2
+       @echo WARNING: "Support for distribution archives compressed with" \
+                      "legacy program 'compress' is deprecated." >&2
        @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
        tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
        $(am__post_remove_distdir)
 
 dist-shar: distdir
-       @echo WARNING: "Support for distribution archives compressed with" \
-                      "legacy program 'compress' is deprecated." >&2
+       @echo WARNING: "Support for shar distribution archives is" \
+                      "deprecated." >&2
        @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
        shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
        $(am__post_remove_distdir)
@@ -706,17 +716,17 @@ distcheck: dist
        esac
        chmod -R a-w $(distdir)
        chmod u+w $(distdir)
-       mkdir $(distdir)/_build $(distdir)/_inst
+       mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst
        chmod a-w $(distdir)
        test -d $(distdir)/_build || exit 0; \
        dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
          && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
          && am__cwd=`pwd` \
-         && $(am__cd) $(distdir)/_build \
-         && ../configure \
+         && $(am__cd) $(distdir)/_build/sub \
+         && ../../configure \
            $(AM_DISTCHECK_CONFIGURE_FLAGS) \
            $(DISTCHECK_CONFIGURE_FLAGS) \
-           --srcdir=.. --prefix="$$dc_install_base" \
+           --srcdir=../.. --prefix="$$dc_install_base" \
          && $(MAKE) $(AM_MAKEFLAGS) \
          && $(MAKE) $(AM_MAKEFLAGS) dvi \
          && $(MAKE) $(AM_MAKEFLAGS) check \
@@ -894,6 +904,8 @@ uninstall-am: uninstall-pcdataDATA
        mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \
        tags-am uninstall uninstall-am uninstall-pcdataDATA
 
+.PRECIOUS: Makefile
+
 
 install-data-local:
        $(MKDIR_P) $(DESTDIR)$(LXCPATH)
index 8e31bb3..e9378bb 100644 (file)
@@ -1,6 +1,6 @@
-# generated automatically by aclocal 1.14.1 -*- Autoconf -*-
+# generated automatically by aclocal 1.15 -*- Autoconf -*-
 
-# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
 
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -180,7 +180,62 @@ else
 fi[]dnl
 ])# PKG_CHECK_MODULES
 
-# Copyright (C) 2002-2013 Free Software Foundation, Inc.
+
+# PKG_INSTALLDIR(DIRECTORY)
+# -------------------------
+# Substitutes the variable pkgconfigdir as the location where a module
+# should install pkg-config .pc files. By default the directory is
+# $libdir/pkgconfig, but the default can be changed by passing
+# DIRECTORY. The user can override through the --with-pkgconfigdir
+# parameter.
+AC_DEFUN([PKG_INSTALLDIR],
+[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
+m4_pushdef([pkg_description],
+    [pkg-config installation directory @<:@]pkg_default[@:>@])
+AC_ARG_WITH([pkgconfigdir],
+    [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
+    [with_pkgconfigdir=]pkg_default)
+AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
+m4_popdef([pkg_default])
+m4_popdef([pkg_description])
+]) dnl PKG_INSTALLDIR
+
+
+# PKG_NOARCH_INSTALLDIR(DIRECTORY)
+# -------------------------
+# Substitutes the variable noarch_pkgconfigdir as the location where a
+# module should install arch-independent pkg-config .pc files. By
+# default the directory is $datadir/pkgconfig, but the default can be
+# changed by passing DIRECTORY. The user can override through the
+# --with-noarch-pkgconfigdir parameter.
+AC_DEFUN([PKG_NOARCH_INSTALLDIR],
+[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
+m4_pushdef([pkg_description],
+    [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
+AC_ARG_WITH([noarch-pkgconfigdir],
+    [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
+    [with_noarch_pkgconfigdir=]pkg_default)
+AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
+m4_popdef([pkg_default])
+m4_popdef([pkg_description])
+]) dnl PKG_NOARCH_INSTALLDIR
+
+
+# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
+# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+# -------------------------------------------
+# Retrieves the value of the pkg-config variable for the given module.
+AC_DEFUN([PKG_CHECK_VAR],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
+
+_PKG_CONFIG([$1], [variable="][$3]["], [$2])
+AS_VAR_COPY([$1], [pkg_cv_][$1])
+
+AS_VAR_IF([$1], [""], [$5], [$4])dnl
+])# PKG_CHECK_VAR
+
+# Copyright (C) 2002-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -192,10 +247,10 @@ fi[]dnl
 # generated from the m4 files accompanying Automake X.Y.
 # (This private macro should not be called outside this file.)
 AC_DEFUN([AM_AUTOMAKE_VERSION],
-[am__api_version='1.14'
+[am__api_version='1.15'
 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
 dnl require some minimum version.  Point them to the right macro.
-m4_if([$1], [1.14.1], [],
+m4_if([$1], [1.15], [],
       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
 ])
 
@@ -211,14 +266,14 @@ m4_define([_AM_AUTOCONF_VERSION], [])
 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.14.1])dnl
+[AM_AUTOMAKE_VERSION([1.15])dnl
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 
 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 
-# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -263,15 +318,14 @@ _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 # configured tree to be moved without reconfiguration.
 
 AC_DEFUN([AM_AUX_DIR_EXPAND],
-[dnl Rely on autoconf to set up CDPATH properly.
-AC_PREREQ([2.50])dnl
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
+[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
+# Expand $ac_aux_dir to an absolute path.
+am_aux_dir=`cd "$ac_aux_dir" && pwd`
 ])
 
 # AM_COND_IF                                            -*- Autoconf -*-
 
-# Copyright (C) 2008-2013 Free Software Foundation, Inc.
+# Copyright (C) 2008-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -308,7 +362,7 @@ fi[]dnl
 
 # AM_CONDITIONAL                                            -*- Autoconf -*-
 
-# Copyright (C) 1997-2013 Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -339,7 +393,7 @@ AC_CONFIG_COMMANDS_PRE(
 Usually this means the macro was only invoked conditionally.]])
 fi])])
 
-# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -530,7 +584,7 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
 
 # Generate code to set up dependency tracking.              -*- Autoconf -*-
 
-# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -606,7 +660,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 
 # Do all the work for Automake.                             -*- Autoconf -*-
 
-# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -696,8 +750,8 @@ AC_REQUIRE([AC_PROG_MKDIR_P])dnl
 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
 AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
-# We need awk for the "check" target.  The system "awk" is bad on
-# some platforms.
+# We need awk for the "check" target (and possibly the TAP driver).  The
+# system "awk" is bad on some platforms.
 AC_REQUIRE([AC_PROG_AWK])dnl
 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
@@ -770,7 +824,11 @@ to "yes", and re-run configure.
 END
     AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
   fi
-fi])
+fi
+dnl The trailing newline in this macro's definition is deliberate, for
+dnl backward compatibility and to allow trailing 'dnl'-style comments
+dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
+])
 
 dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
@@ -799,7 +857,7 @@ for _am_header in $config_headers :; do
 done
 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
 
-# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -810,7 +868,7 @@ echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_co
 # Define $install_sh.
 AC_DEFUN([AM_PROG_INSTALL_SH],
 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-if test x"${install_sh}" != xset; then
+if test x"${install_sh+set}" != xset; then
   case $am_aux_dir in
   *\ * | *\    *)
     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
@@ -820,7 +878,7 @@ if test x"${install_sh}" != xset; then
 fi
 AC_SUBST([install_sh])])
 
-# Copyright (C) 2003-2013 Free Software Foundation, Inc.
+# Copyright (C) 2003-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -841,7 +899,7 @@ AC_SUBST([am__leading_dot])])
 
 # Check to see how 'make' treats includes.                 -*- Autoconf -*-
 
-# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -891,7 +949,7 @@ rm -f confinc confmf
 
 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
 
-# Copyright (C) 1997-2013 Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -930,7 +988,7 @@ fi
 
 # Helper functions for option handling.                     -*- Autoconf -*-
 
-# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -959,7 +1017,7 @@ AC_DEFUN([_AM_SET_OPTIONS],
 AC_DEFUN([_AM_IF_OPTION],
 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
 
-# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1006,7 +1064,7 @@ AC_LANG_POP([C])])
 # For backward compatibility.
 AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
 
-# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1241,7 +1299,7 @@ for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]]
 sys.exit(sys.hexversion < minverhex)"
   AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])])
 
-# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1260,7 +1318,7 @@ AC_DEFUN([AM_RUN_LOG],
 
 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
 
-# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1341,7 +1399,7 @@ AC_CONFIG_COMMANDS_PRE(
 rm -f conftest.file
 ])
 
-# Copyright (C) 2009-2013 Free Software Foundation, Inc.
+# Copyright (C) 2009-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1401,7 +1459,7 @@ AC_SUBST([AM_BACKSLASH])dnl
 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
 ])
 
-# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1429,7 +1487,7 @@ fi
 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
-# Copyright (C) 2006-2013 Free Software Foundation, Inc.
+# Copyright (C) 2006-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1448,7 +1506,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
 
 # Check how to create a tarball.                            -*- Autoconf -*-
 
-# Copyright (C) 2004-2013 Free Software Foundation, Inc.
+# Copyright (C) 2004-2014 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
index 46c61bb..caa7b51 100644 (file)
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 
 @SET_MAKE@
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -78,13 +88,12 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = config
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am compile \
-       config.guess config.sub install-sh missing
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \
        $(top_srcdir)/config/tls.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/src/config.h
 CONFIG_CLEAN_FILES =
@@ -144,6 +153,8 @@ am__define_uniq_tagged_files = \
 ETAGS = etags
 CTAGS = ctags
 DIST_SUBDIRS = $(SUBDIRS)
+am__DIST_COMMON = $(srcdir)/Makefile.in compile config.guess \
+       config.sub install-sh missing
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 am__relativize = \
   dir0=`pwd`; \
@@ -349,7 +360,6 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu config/Makefile'; \
        $(am__cd) $(top_srcdir) && \
          $(AUTOMAKE) --gnu config/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
          *config.status*) \
@@ -637,6 +647,8 @@ uninstall-am:
        maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
        pdf-am ps ps-am tags tags-am uninstall uninstall-am
 
+.PRECIOUS: Makefile
+
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
index 6e6b2f8..a793d3e 100644 (file)
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 
 @SET_MAKE@
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -78,12 +88,12 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = config/apparmor
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am README
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \
        $(top_srcdir)/config/tls.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/src/config.h
 CONFIG_CLEAN_FILES =
@@ -108,6 +118,7 @@ am__can_run_installinfo = \
     *) (install-info --version) >/dev/null 2>&1;; \
   esac
 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in README
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
@@ -300,7 +311,6 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu config/apparmor/Makefile'; \
        $(am__cd) $(top_srcdir) && \
          $(AUTOMAKE) --gnu config/apparmor/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
          *config.status*) \
@@ -470,6 +480,8 @@ uninstall-am: uninstall-local
        maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
        pdf-am ps ps-am tags-am uninstall uninstall-am uninstall-local
 
+.PRECIOUS: Makefile
+
 
 @ENABLE_APPARMOR_TRUE@install-apparmor:
 @ENABLE_APPARMOR_TRUE@ $(MKDIR_P) $(DESTDIR)$(sysconfdir)/apparmor.d/
index 91ad6de..66aa5fd 100644 (file)
@@ -8,6 +8,8 @@ profile lxc-container-default-with-nesting flags=(attach_disconnected,mediate_de
 #  Uncomment the line below if you are not using cgmanager
 #  mount fstype=cgroup -> /sys/fs/cgroup/**,
 
+  deny /dev/.lxc/proc/** rw,
+  deny /dev/.lxc/sys/** rw,
   mount fstype=proc -> /var/cache/lxc/**,
   mount fstype=sysfs -> /var/cache/lxc/**,
   mount options=(rw,bind),
index b275333..f93a236 100644 (file)
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 
 @SET_MAKE@
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -78,13 +88,12 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = config/bash
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-       $(srcdir)/lxc.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \
        $(top_srcdir)/config/tls.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/src/config.h
 CONFIG_CLEAN_FILES = lxc
@@ -109,6 +118,7 @@ am__can_run_installinfo = \
     *) (install-info --version) >/dev/null 2>&1;; \
   esac
 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/lxc.in
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
@@ -289,7 +299,6 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu config/bash/Makefile'; \
        $(am__cd) $(top_srcdir) && \
          $(AUTOMAKE) --gnu config/bash/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
          *config.status*) \
@@ -380,8 +389,8 @@ distclean-generic:
 maintainer-clean-generic:
        @echo "This command is intended for maintainers to use"
        @echo "it deletes files that may require special tools to rebuild."
-@ENABLE_BASH_FALSE@install-data-local:
 @ENABLE_BASH_FALSE@uninstall-local:
+@ENABLE_BASH_FALSE@install-data-local:
 clean: clean-am
 
 clean-am: clean-generic mostlyclean-am
@@ -461,6 +470,8 @@ uninstall-am: uninstall-local
        maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
        pdf-am ps ps-am tags-am uninstall uninstall-am uninstall-local
 
+.PRECIOUS: Makefile
+
 
 @ENABLE_BASH_TRUE@install-bash:
 @ENABLE_BASH_TRUE@     $(MKDIR_P) $(DESTDIR)$(sysconfdir)/bash_completion.d/
index 531136b..a85b723 100755 (executable)
@@ -3,7 +3,7 @@
 
 scriptversion=2012-10-14.11; # UTC
 
-# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
 # Written by Tom Tromey <tromey@cygnus.com>.
 #
 # This program is free software; you can redistribute it and/or modify
index b79252d..1f5c50c 100755 (executable)
@@ -1,8 +1,8 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
-#   Copyright 1992-2013 Free Software Foundation, Inc.
+#   Copyright 1992-2014 Free Software Foundation, Inc.
 
-timestamp='2013-06-10'
+timestamp='2014-03-23'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -50,7 +50,7 @@ version="\
 GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
-Copyright 1992-2013 Free Software Foundation, Inc.
+Copyright 1992-2014 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -149,7 +149,7 @@ Linux|GNU|GNU/*)
        LIBC=gnu
        #endif
        EOF
-       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
+       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
        ;;
 esac
 
@@ -826,7 +826,7 @@ EOF
     *:MINGW*:*)
        echo ${UNAME_MACHINE}-pc-mingw32
        exit ;;
-    i*:MSYS*:*)
+    *:MSYS*:*)
        echo ${UNAME_MACHINE}-pc-msys
        exit ;;
     i*:windows32*:*)
@@ -969,10 +969,10 @@ EOF
        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
        test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
        ;;
-    or1k:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+    openrisc*:Linux:*:*)
+       echo or1k-unknown-linux-${LIBC}
        exit ;;
-    or32:Linux:*:*)
+    or32:Linux:*:* | or1k*:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
        exit ;;
     padre:Linux:*:*)
@@ -1260,16 +1260,26 @@ EOF
        if test "$UNAME_PROCESSOR" = unknown ; then
            UNAME_PROCESSOR=powerpc
        fi
-       if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
-           if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
-               (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
-               grep IS_64BIT_ARCH >/dev/null
-           then
-               case $UNAME_PROCESSOR in
-                   i386) UNAME_PROCESSOR=x86_64 ;;
-                   powerpc) UNAME_PROCESSOR=powerpc64 ;;
-               esac
+       if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
+           if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+               if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+                   (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+                   grep IS_64BIT_ARCH >/dev/null
+               then
+                   case $UNAME_PROCESSOR in
+                       i386) UNAME_PROCESSOR=x86_64 ;;
+                       powerpc) UNAME_PROCESSOR=powerpc64 ;;
+                   esac
+               fi
            fi
+       elif test "$UNAME_PROCESSOR" = i386 ; then
+           # Avoid executing cc on OS X 10.9, as it ships with a stub
+           # that puts up a graphical alert prompting to install
+           # developer tools.  Any system running Mac OS X 10.7 or
+           # later (Darwin 11 and later) is required to have a 64-bit
+           # processor. This is not true of the ARM version of Darwin
+           # that Apple uses in portable devices.
+           UNAME_PROCESSOR=x86_64
        fi
        echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
        exit ;;
@@ -1361,154 +1371,6 @@ EOF
        exit ;;
 esac
 
-eval $set_cc_for_build
-cat >$dummy.c <<EOF
-#ifdef _SEQUENT_
-# include <sys/types.h>
-# include <sys/utsname.h>
-#endif
-main ()
-{
-#if defined (sony)
-#if defined (MIPSEB)
-  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
-     I don't know....  */
-  printf ("mips-sony-bsd\n"); exit (0);
-#else
-#include <sys/param.h>
-  printf ("m68k-sony-newsos%s\n",
-#ifdef NEWSOS4
-       "4"
-#else
-       ""
-#endif
-       ); exit (0);
-#endif
-#endif
-
-#if defined (__arm) && defined (__acorn) && defined (__unix)
-  printf ("arm-acorn-riscix\n"); exit (0);
-#endif
-
-#if defined (hp300) && !defined (hpux)
-  printf ("m68k-hp-bsd\n"); exit (0);
-#endif
-
-#if defined (NeXT)
-#if !defined (__ARCHITECTURE__)
-#define __ARCHITECTURE__ "m68k"
-#endif
-  int version;
-  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
-  if (version < 4)
-    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
-  else
-    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
-  exit (0);
-#endif
-
-#if defined (MULTIMAX) || defined (n16)
-#if defined (UMAXV)
-  printf ("ns32k-encore-sysv\n"); exit (0);
-#else
-#if defined (CMU)
-  printf ("ns32k-encore-mach\n"); exit (0);
-#else
-  printf ("ns32k-encore-bsd\n"); exit (0);
-#endif
-#endif
-#endif
-
-#if defined (__386BSD__)
-  printf ("i386-pc-bsd\n"); exit (0);
-#endif
-
-#if defined (sequent)
-#if defined (i386)
-  printf ("i386-sequent-dynix\n"); exit (0);
-#endif
-#if defined (ns32000)
-  printf ("ns32k-sequent-dynix\n"); exit (0);
-#endif
-#endif
-
-#if defined (_SEQUENT_)
-    struct utsname un;
-
-    uname(&un);
-
-    if (strncmp(un.version, "V2", 2) == 0) {
-       printf ("i386-sequent-ptx2\n"); exit (0);
-    }
-    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
-       printf ("i386-sequent-ptx1\n"); exit (0);
-    }
-    printf ("i386-sequent-ptx\n"); exit (0);
-
-#endif
-
-#if defined (vax)
-# if !defined (ultrix)
-#  include <sys/param.h>
-#  if defined (BSD)
-#   if BSD == 43
-      printf ("vax-dec-bsd4.3\n"); exit (0);
-#   else
-#    if BSD == 199006
-      printf ("vax-dec-bsd4.3reno\n"); exit (0);
-#    else
-      printf ("vax-dec-bsd\n"); exit (0);
-#    endif
-#   endif
-#  else
-    printf ("vax-dec-bsd\n"); exit (0);
-#  endif
-# else
-    printf ("vax-dec-ultrix\n"); exit (0);
-# endif
-#endif
-
-#if defined (alliant) && defined (i860)
-  printf ("i860-alliant-bsd\n"); exit (0);
-#endif
-
-  exit (1);
-}
-EOF
-
-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
-       { echo "$SYSTEM_NAME"; exit; }
-
-# Apollos put the system type in the environment.
-
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
-
-# Convex versions that predate uname can use getsysinfo(1)
-
-if [ -x /usr/convex/getsysinfo ]
-then
-    case `getsysinfo -f cpu_type` in
-    c1*)
-       echo c1-convex-bsd
-       exit ;;
-    c2*)
-       if getsysinfo -f scalar_acc
-       then echo c32-convex-bsd
-       else echo c2-convex-bsd
-       fi
-       exit ;;
-    c34*)
-       echo c34-convex-bsd
-       exit ;;
-    c38*)
-       echo c38-convex-bsd
-       exit ;;
-    c4*)
-       echo c4-convex-bsd
-       exit ;;
-    esac
-fi
-
 cat >&2 <<EOF
 $0: unable to guess system type
 
index 9633db7..bba4efb 100755 (executable)
@@ -1,8 +1,8 @@
 #! /bin/sh
 # Configuration validation subroutine script.
-#   Copyright 1992-2013 Free Software Foundation, Inc.
+#   Copyright 1992-2014 Free Software Foundation, Inc.
 
-timestamp='2013-08-10'
+timestamp='2014-09-11'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -68,7 +68,7 @@ Report bugs and patches to <config-patches@gnu.org>."
 version="\
 GNU config.sub ($timestamp)
 
-Copyright 1992-2013 Free Software Foundation, Inc.
+Copyright 1992-2014 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -265,6 +265,7 @@ case $basic_machine in
        | hexagon \
        | i370 | i860 | i960 | ia64 \
        | ip2k | iq2000 \
+       | k1om \
        | le32 | le64 \
        | lm32 \
        | m32c | m32r | m32rle | m68000 | m68k | m88k \
@@ -282,8 +283,10 @@ case $basic_machine in
        | mips64vr5900 | mips64vr5900el \
        | mipsisa32 | mipsisa32el \
        | mipsisa32r2 | mipsisa32r2el \
+       | mipsisa32r6 | mipsisa32r6el \
        | mipsisa64 | mipsisa64el \
        | mipsisa64r2 | mipsisa64r2el \
+       | mipsisa64r6 | mipsisa64r6el \
        | mipsisa64sb1 | mipsisa64sb1el \
        | mipsisa64sr71k | mipsisa64sr71kel \
        | mipsr5900 | mipsr5900el \
@@ -295,11 +298,11 @@ case $basic_machine in
        | nds32 | nds32le | nds32be \
        | nios | nios2 | nios2eb | nios2el \
        | ns16k | ns32k \
-       | open8 \
-       | or1k | or32 \
+       | open8 | or1k | or1knd | or32 \
        | pdp10 | pdp11 | pj | pjl \
        | powerpc | powerpc64 | powerpc64le | powerpcle \
        | pyramid \
+       | riscv32 | riscv64 \
        | rl78 | rx \
        | score \
        | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
@@ -324,7 +327,7 @@ case $basic_machine in
        c6x)
                basic_machine=tic6x-unknown
                ;;
-       m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
+       m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
                basic_machine=$basic_machine-unknown
                os=-none
                ;;
@@ -381,6 +384,7 @@ case $basic_machine in
        | hexagon-* \
        | i*86-* | i860-* | i960-* | ia64-* \
        | ip2k-* | iq2000-* \
+       | k1om-* \
        | le32-* | le64-* \
        | lm32-* \
        | m32c-* | m32r-* | m32rle-* \
@@ -400,8 +404,10 @@ case $basic_machine in
        | mips64vr5900-* | mips64vr5900el-* \
        | mipsisa32-* | mipsisa32el-* \
        | mipsisa32r2-* | mipsisa32r2el-* \
+       | mipsisa32r6-* | mipsisa32r6el-* \
        | mipsisa64-* | mipsisa64el-* \
        | mipsisa64r2-* | mipsisa64r2el-* \
+       | mipsisa64r6-* | mipsisa64r6el-* \
        | mipsisa64sb1-* | mipsisa64sb1el-* \
        | mipsisa64sr71k-* | mipsisa64sr71kel-* \
        | mipsr5900-* | mipsr5900el-* \
@@ -413,6 +419,7 @@ case $basic_machine in
        | nios-* | nios2-* | nios2eb-* | nios2el-* \
        | none-* | np1-* | ns16k-* | ns32k-* \
        | open8-* \
+       | or1k*-* \
        | orion-* \
        | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
        | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
@@ -822,6 +829,10 @@ case $basic_machine in
                basic_machine=powerpc-unknown
                os=-morphos
                ;;
+       moxiebox)
+               basic_machine=moxie-unknown
+               os=-moxiebox
+               ;;
        msdos)
                basic_machine=i386-pc
                os=-msdos
@@ -1367,14 +1378,14 @@ case $os in
              | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
              | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
              | -linux-newlib* | -linux-musl* | -linux-uclibc* \
-             | -uxpv* | -beos* | -mpeix* | -udk* \
+             | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
              | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
              | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
              | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
              | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
              | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
              | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
-             | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
+             | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*)
        # Remember, each alternative MUST END IN *, to match a version number.
                ;;
        -qnx*)
@@ -1592,9 +1603,6 @@ case $basic_machine in
        mips*-*)
                os=-elf
                ;;
-       or1k-*)
-               os=-elf
-               ;;
        or32-*)
                os=-coff
                ;;
index 4ebd5b3..fc98710 100755 (executable)
@@ -3,7 +3,7 @@
 
 scriptversion=2013-05-30.07; # UTC
 
-# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
index 39c5439..992be76 100644 (file)
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 @SET_MAKE@
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -79,12 +89,12 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = config/etc
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \
        $(top_srcdir)/config/tls.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/src/config.h
 CONFIG_CLEAN_FILES = default.conf
@@ -138,6 +148,7 @@ am__uninstall_files_from_dir = { \
 am__installdirs = "$(DESTDIR)$(configdir)"
 DATA = $(config_DATA)
 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
@@ -320,7 +331,6 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu config/etc/Makefile'; \
        $(am__cd) $(top_srcdir) && \
          $(AUTOMAKE) --gnu config/etc/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
          *config.status*) \
@@ -513,6 +523,8 @@ uninstall-am: uninstall-configDATA
        mostlyclean-generic pdf pdf-am ps ps-am tags-am uninstall \
        uninstall-am uninstall-configDATA
 
+.PRECIOUS: Makefile
+
 
 distclean-local:
        @$(RM) -f default.conf
index aa4a9e3..21b3ad6 100644 (file)
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 
 @SET_MAKE@
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -78,12 +88,12 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = config/init
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \
        $(top_srcdir)/config/tls.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/src/config.h
 CONFIG_CLEAN_FILES =
@@ -143,6 +153,7 @@ am__define_uniq_tagged_files = \
 ETAGS = etags
 CTAGS = ctags
 DIST_SUBDIRS = $(SUBDIRS)
+am__DIST_COMMON = $(srcdir)/Makefile.in
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 am__relativize = \
   dir0=`pwd`; \
@@ -348,7 +359,6 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu config/init/Makefile'; \
        $(am__cd) $(top_srcdir) && \
          $(AUTOMAKE) --gnu config/init/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
          *config.status*) \
@@ -636,6 +646,8 @@ uninstall-am:
        maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
        pdf-am ps ps-am tags tags-am uninstall uninstall-am
 
+.PRECIOUS: Makefile
+
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
index 692f0d2..bdb51f4 100644 (file)
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 @SET_MAKE@
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -79,13 +89,12 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = config/init/common
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-       $(srcdir)/lxc-containers.in $(srcdir)/lxc-net.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \
        $(top_srcdir)/config/tls.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/src/config.h
 CONFIG_CLEAN_FILES = lxc-containers lxc-net
@@ -139,6 +148,8 @@ am__can_run_installinfo = \
     *) (install-info --version) >/dev/null 2>&1;; \
   esac
 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/lxc-containers.in \
+       $(srcdir)/lxc-net.in
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
@@ -320,7 +331,6 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu config/init/common/Makefile'; \
        $(am__cd) $(top_srcdir) && \
          $(AUTOMAKE) --gnu config/init/common/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
          *config.status*) \
@@ -531,6 +541,8 @@ uninstall-am: uninstall-pkglibexecSCRIPTS
        mostlyclean-generic pdf pdf-am ps ps-am tags-am uninstall \
        uninstall-am uninstall-pkglibexecSCRIPTS
 
+.PRECIOUS: Makefile
+
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
index 4534960..e450d39 100644 (file)
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 @SET_MAKE@
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -79,13 +89,12 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = config/init/systemd
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-       $(srcdir)/lxc.service.in $(srcdir)/lxc-net.service.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \
        $(top_srcdir)/config/tls.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/src/config.h
 CONFIG_CLEAN_FILES = lxc.service lxc-net.service
@@ -139,6 +148,8 @@ am__can_run_installinfo = \
     *) (install-info --version) >/dev/null 2>&1;; \
   esac
 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/lxc-net.service.in \
+       $(srcdir)/lxc.service.in
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
@@ -327,7 +338,6 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu config/init/systemd/Makefile'; \
        $(am__cd) $(top_srcdir) && \
          $(AUTOMAKE) --gnu config/init/systemd/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
          *config.status*) \
@@ -544,6 +554,8 @@ uninstall-am: uninstall-local uninstall-pkglibexecSCRIPTS
        uninstall uninstall-am uninstall-local \
        uninstall-pkglibexecSCRIPTS
 
+.PRECIOUS: Makefile
+
 
 @INIT_SCRIPT_SYSTEMD_TRUE@install-systemd: lxc.service lxc-net.service lxc-devsetup lxc-apparmor-load
 @INIT_SCRIPT_SYSTEMD_TRUE@     $(MKDIR_P) $(DESTDIR)$(SYSTEMD_UNIT_DIR)
index 619cd53..abca581 100755 (executable)
@@ -9,6 +9,8 @@ if [ -f $SYSF ]; then
        if [ -x /lib/apparmor/profile-load ]; then
                /lib/apparmor/profile-load usr.bin.lxc-start
                /lib/apparmor/profile-load lxc-containers
+       elif [ -x /lib/init/apparmor-profile-load ]; then
+               /lib/init/apparmor-profile-load usr.bin.lxc-start
+               /lib/init/apparmor-profile-load lxc-containers
        fi
 fi
-
index e01d557..0b5c84b 100644 (file)
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 
 @SET_MAKE@
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -78,13 +88,12 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = config/init/sysvinit
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-       $(srcdir)/lxc-containers.in $(srcdir)/lxc-net.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \
        $(top_srcdir)/config/tls.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/src/config.h
 CONFIG_CLEAN_FILES = lxc-containers lxc-net
@@ -109,6 +118,8 @@ am__can_run_installinfo = \
     *) (install-info --version) >/dev/null 2>&1;; \
   esac
 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/lxc-containers.in \
+       $(srcdir)/lxc-net.in
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
@@ -294,7 +305,6 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu config/init/sysvinit/Makefile'; \
        $(am__cd) $(top_srcdir) && \
          $(AUTOMAKE) --gnu config/init/sysvinit/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
          *config.status*) \
@@ -468,6 +478,8 @@ uninstall-am: uninstall-local
        maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
        pdf-am ps ps-am tags-am uninstall uninstall-am uninstall-local
 
+.PRECIOUS: Makefile
+
 
 @INIT_SCRIPT_SYSV_TRUE@install-sysvinit: lxc-containers lxc-net
 @INIT_SCRIPT_SYSV_TRUE@        $(MKDIR_P) $(DESTDIR)$(sysconfdir)/$(initdir)
index 7ae2569..02983ce 100644 (file)
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 
 @SET_MAKE@
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -78,13 +88,12 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = config/init/upstart
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-       $(srcdir)/lxc-net.conf.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \
        $(top_srcdir)/config/tls.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/src/config.h
 CONFIG_CLEAN_FILES = lxc-net.conf
@@ -109,6 +118,7 @@ am__can_run_installinfo = \
     *) (install-info --version) >/dev/null 2>&1;; \
   esac
 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/lxc-net.conf.in
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
@@ -289,7 +299,6 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu config/init/upstart/Makefile'; \
        $(am__cd) $(top_srcdir) && \
          $(AUTOMAKE) --gnu config/init/upstart/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
          *config.status*) \
@@ -461,6 +470,8 @@ uninstall-am: uninstall-local
        maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
        pdf-am ps ps-am tags-am uninstall uninstall-am uninstall-local
 
+.PRECIOUS: Makefile
+
 
 @INIT_SCRIPT_UPSTART_TRUE@install-upstart: lxc.conf lxc-instance.conf lxc-net.conf
 @INIT_SCRIPT_UPSTART_TRUE@     $(MKDIR_P) $(DESTDIR)$(sysconfdir)/init/
index ff21137..437db3c 100644 (file)
@@ -39,6 +39,9 @@ pre-start script
                if [ -x /lib/apparmor/profile-load ]; then
                        /lib/apparmor/profile-load usr.bin.lxc-start
                        /lib/apparmor/profile-load lxc-containers
+               elif [ -x /lib/init/apparmor-profile-load ]; then
+                       /lib/init/apparmor-profile-load usr.bin.lxc-start
+                       /lib/init/apparmor-profile-load lxc-containers
                fi
        fi
 
index 377bb86..0b0fdcb 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 # install - install a program, script, or datafile
 
-scriptversion=2011-11-20.07; # UTC
+scriptversion=2013-12-25.23; # UTC
 
 # This originates from X11R5 (mit/util/scripts/install.sh), which was
 # later released in X11R6 (xc/config/util/install.sh) with the
@@ -41,19 +41,15 @@ scriptversion=2011-11-20.07; # UTC
 # This script is compatible with the BSD install script, but was written
 # from scratch.
 
+tab='  '
 nl='
 '
-IFS=" ""       $nl"
+IFS=" $tab$nl"
 
-# set DOITPROG to echo to test this script
+# Set DOITPROG to "echo" to test this script.
 
-# Don't use :- since 4.3BSD and earlier shells don't like it.
 doit=${DOITPROG-}
-if test -z "$doit"; then
-  doit_exec=exec
-else
-  doit_exec=$doit
-fi
+doit_exec=${doit:-exec}
 
 # Put in absolute file names if you don't have them in your path;
 # or use environment vars.
@@ -68,17 +64,6 @@ mvprog=${MVPROG-mv}
 rmprog=${RMPROG-rm}
 stripprog=${STRIPPROG-strip}
 
-posix_glob='?'
-initialize_posix_glob='
-  test "$posix_glob" != "?" || {
-    if (set -f) 2>/dev/null; then
-      posix_glob=
-    else
-      posix_glob=:
-    fi
-  }
-'
-
 posix_mkdir=
 
 # Desired mode of installed file.
@@ -97,7 +82,7 @@ dir_arg=
 dst_arg=
 
 copy_on_change=false
-no_target_directory=
+is_target_a_directory=possibly
 
 usage="\
 Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
@@ -137,46 +122,57 @@ while test $# -ne 0; do
     -d) dir_arg=true;;
 
     -g) chgrpcmd="$chgrpprog $2"
-       shift;;
+        shift;;
 
     --help) echo "$usage"; exit $?;;
 
     -m) mode=$2
-       case $mode in
-         *' '* | *'    '* | *'
-'*       | *'*'* | *'?'* | *'['*)
-           echo "$0: invalid mode: $mode" >&2
-           exit 1;;
-       esac
-       shift;;
+        case $mode in
+          *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
+            echo "$0: invalid mode: $mode" >&2
+            exit 1;;
+        esac
+        shift;;
 
     -o) chowncmd="$chownprog $2"
-       shift;;
+        shift;;
 
     -s) stripcmd=$stripprog;;
 
-    -t) dst_arg=$2
-       # Protect names problematic for 'test' and other utilities.
-       case $dst_arg in
-         -* | [=\(\)!]) dst_arg=./$dst_arg;;
-       esac
-       shift;;
+    -t)
+        is_target_a_directory=always
+        dst_arg=$2
+        # Protect names problematic for 'test' and other utilities.
+        case $dst_arg in
+          -* | [=\(\)!]) dst_arg=./$dst_arg;;
+        esac
+        shift;;
 
-    -T) no_target_directory=true;;
+    -T) is_target_a_directory=never;;
 
     --version) echo "$0 $scriptversion"; exit $?;;
 
-    --)        shift
-       break;;
+    --) shift
+        break;;
 
-    -*)        echo "$0: invalid option: $1" >&2
-       exit 1;;
+    -*) echo "$0: invalid option: $1" >&2
+        exit 1;;
 
     *)  break;;
   esac
   shift
 done
 
+# We allow the use of options -d and -T together, by making -d
+# take the precedence; this is for compatibility with GNU install.
+
+if test -n "$dir_arg"; then
+  if test -n "$dst_arg"; then
+    echo "$0: target directory not allowed when installing a directory." >&2
+    exit 1
+  fi
+fi
+
 if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
   # When -d is used, all remaining arguments are directories to create.
   # When -t is used, the destination is already specified.
@@ -208,6 +204,15 @@ if test $# -eq 0; then
 fi
 
 if test -z "$dir_arg"; then
+  if test $# -gt 1 || test "$is_target_a_directory" = always; then
+    if test ! -d "$dst_arg"; then
+      echo "$0: $dst_arg: Is not a directory." >&2
+      exit 1
+    fi
+  fi
+fi
+
+if test -z "$dir_arg"; then
   do_exit='(exit $ret); exit $ret'
   trap "ret=129; $do_exit" 1
   trap "ret=130; $do_exit" 2
@@ -223,16 +228,16 @@ if test -z "$dir_arg"; then
 
     *[0-7])
       if test -z "$stripcmd"; then
-       u_plus_rw=
+        u_plus_rw=
       else
-       u_plus_rw='% 200'
+        u_plus_rw='% 200'
       fi
       cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
     *)
       if test -z "$stripcmd"; then
-       u_plus_rw=
+        u_plus_rw=
       else
-       u_plus_rw=,u+rw
+        u_plus_rw=,u+rw
       fi
       cp_umask=$mode$u_plus_rw;;
   esac
@@ -269,41 +274,15 @@ do
     # If destination is a directory, append the input filename; won't work
     # if double slashes aren't ignored.
     if test -d "$dst"; then
-      if test -n "$no_target_directory"; then
-       echo "$0: $dst_arg: Is a directory" >&2
-       exit 1
+      if test "$is_target_a_directory" = never; then
+        echo "$0: $dst_arg: Is a directory" >&2
+        exit 1
       fi
       dstdir=$dst
       dst=$dstdir/`basename "$src"`
       dstdir_status=0
     else
-      # Prefer dirname, but fall back on a substitute if dirname fails.
-      dstdir=`
-       (dirname "$dst") 2>/dev/null ||
-       expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-            X"$dst" : 'X\(//\)[^/]' \| \
-            X"$dst" : 'X\(//\)$' \| \
-            X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
-       echo X"$dst" |
-           sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-                  s//\1/
-                  q
-                }
-                /^X\(\/\/\)[^/].*/{
-                  s//\1/
-                  q
-                }
-                /^X\(\/\/\)$/{
-                  s//\1/
-                  q
-                }
-                /^X\(\/\).*/{
-                  s//\1/
-                  q
-                }
-                s/.*/./; q'
-      `
-
+      dstdir=`dirname "$dst"`
       test -d "$dstdir"
       dstdir_status=$?
     fi
@@ -314,74 +293,74 @@ do
   if test $dstdir_status != 0; then
     case $posix_mkdir in
       '')
-       # Create intermediate dirs using mode 755 as modified by the umask.
-       # This is like FreeBSD 'install' as of 1997-10-28.
-       umask=`umask`
-       case $stripcmd.$umask in
-         # Optimize common cases.
-         *[2367][2367]) mkdir_umask=$umask;;
-         .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
-
-         *[0-7])
-           mkdir_umask=`expr $umask + 22 \
-             - $umask % 100 % 40 + $umask % 20 \
-             - $umask % 10 % 4 + $umask % 2
-           `;;
-         *) mkdir_umask=$umask,go-w;;
-       esac
-
-       # With -d, create the new directory with the user-specified mode.
-       # Otherwise, rely on $mkdir_umask.
-       if test -n "$dir_arg"; then
-         mkdir_mode=-m$mode
-       else
-         mkdir_mode=
-       fi
-
-       posix_mkdir=false
-       case $umask in
-         *[123567][0-7][0-7])
-           # POSIX mkdir -p sets u+wx bits regardless of umask, which
-           # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
-           ;;
-         *)
-           tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
-           trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
-
-           if (umask $mkdir_umask &&
-               exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
-           then
-             if test -z "$dir_arg" || {
-                  # Check for POSIX incompatibilities with -m.
-                  # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
-                  # other-writable bit of parent directory when it shouldn't.
-                  # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
-                  ls_ld_tmpdir=`ls -ld "$tmpdir"`
-                  case $ls_ld_tmpdir in
-                    d????-?r-*) different_mode=700;;
-                    d????-?--*) different_mode=755;;
-                    *) false;;
-                  esac &&
-                  $mkdirprog -m$different_mode -p -- "$tmpdir" && {
-                    ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
-                    test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
-                  }
-                }
-             then posix_mkdir=:
-             fi
-             rmdir "$tmpdir/d" "$tmpdir"
-           else
-             # Remove any dirs left behind by ancient mkdir implementations.
-             rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
-           fi
-           trap '' 0;;
-       esac;;
+        # Create intermediate dirs using mode 755 as modified by the umask.
+        # This is like FreeBSD 'install' as of 1997-10-28.
+        umask=`umask`
+        case $stripcmd.$umask in
+          # Optimize common cases.
+          *[2367][2367]) mkdir_umask=$umask;;
+          .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+
+          *[0-7])
+            mkdir_umask=`expr $umask + 22 \
+              - $umask % 100 % 40 + $umask % 20 \
+              - $umask % 10 % 4 + $umask % 2
+            `;;
+          *) mkdir_umask=$umask,go-w;;
+        esac
+
+        # With -d, create the new directory with the user-specified mode.
+        # Otherwise, rely on $mkdir_umask.
+        if test -n "$dir_arg"; then
+          mkdir_mode=-m$mode
+        else
+          mkdir_mode=
+        fi
+
+        posix_mkdir=false
+        case $umask in
+          *[123567][0-7][0-7])
+            # POSIX mkdir -p sets u+wx bits regardless of umask, which
+            # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+            ;;
+          *)
+            tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+            trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
+
+            if (umask $mkdir_umask &&
+                exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
+            then
+              if test -z "$dir_arg" || {
+                   # Check for POSIX incompatibilities with -m.
+                   # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+                   # other-writable bit of parent directory when it shouldn't.
+                   # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+                   ls_ld_tmpdir=`ls -ld "$tmpdir"`
+                   case $ls_ld_tmpdir in
+                     d????-?r-*) different_mode=700;;
+                     d????-?--*) different_mode=755;;
+                     *) false;;
+                   esac &&
+                   $mkdirprog -m$different_mode -p -- "$tmpdir" && {
+                     ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
+                     test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+                   }
+                 }
+              then posix_mkdir=:
+              fi
+              rmdir "$tmpdir/d" "$tmpdir"
+            else
+              # Remove any dirs left behind by ancient mkdir implementations.
+              rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
+            fi
+            trap '' 0;;
+        esac;;
     esac
 
     if
       $posix_mkdir && (
-       umask $mkdir_umask &&
-       $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+        umask $mkdir_umask &&
+        $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
       )
     then :
     else
@@ -391,53 +370,51 @@ do
       # directory the slow way, step by step, checking for races as we go.
 
       case $dstdir in
-       /*) prefix='/';;
-       [-=\(\)!]*) prefix='./';;
-       *)  prefix='';;
+        /*) prefix='/';;
+        [-=\(\)!]*) prefix='./';;
+        *)  prefix='';;
       esac
 
-      eval "$initialize_posix_glob"
-
       oIFS=$IFS
       IFS=/
-      $posix_glob set -f
+      set -f
       set fnord $dstdir
       shift
-      $posix_glob set +f
+      set +f
       IFS=$oIFS
 
       prefixes=
 
       for d
       do
-       test X"$d" = X && continue
-
-       prefix=$prefix$d
-       if test -d "$prefix"; then
-         prefixes=
-       else
-         if $posix_mkdir; then
-           (umask=$mkdir_umask &&
-            $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
-           # Don't fail if two instances are running concurrently.
-           test -d "$prefix" || exit 1
-         else
-           case $prefix in
-             *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
-             *) qprefix=$prefix;;
-           esac
-           prefixes="$prefixes '$qprefix'"
-         fi
-       fi
-       prefix=$prefix/
+        test X"$d" = X && continue
+
+        prefix=$prefix$d
+        if test -d "$prefix"; then
+          prefixes=
+        else
+          if $posix_mkdir; then
+            (umask=$mkdir_umask &&
+             $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+            # Don't fail if two instances are running concurrently.
+            test -d "$prefix" || exit 1
+          else
+            case $prefix in
+              *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+              *) qprefix=$prefix;;
+            esac
+            prefixes="$prefixes '$qprefix'"
+          fi
+        fi
+        prefix=$prefix/
       done
 
       if test -n "$prefixes"; then
-       # Don't fail if two instances are running concurrently.
-       (umask $mkdir_umask &&
-        eval "\$doit_exec \$mkdirprog $prefixes") ||
-         test -d "$dstdir" || exit 1
-       obsolete_mkdir_used=true
+        # Don't fail if two instances are running concurrently.
+        (umask $mkdir_umask &&
+         eval "\$doit_exec \$mkdirprog $prefixes") ||
+          test -d "$dstdir" || exit 1
+        obsolete_mkdir_used=true
       fi
     fi
   fi
@@ -472,15 +449,12 @@ do
 
     # If -C, don't bother to copy if it wouldn't change the file.
     if $copy_on_change &&
-       old=`LC_ALL=C ls -dlL "$dst"    2>/dev/null` &&
-       new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
-
-       eval "$initialize_posix_glob" &&
-       $posix_glob set -f &&
+       old=`LC_ALL=C ls -dlL "$dst"     2>/dev/null` &&
+       new=`LC_ALL=C ls -dlL "$dsttmp"  2>/dev/null` &&
+       set -f &&
        set X $old && old=:$2:$4:$5:$6 &&
        set X $new && new=:$2:$4:$5:$6 &&
-       $posix_glob set +f &&
-
+       set +f &&
        test "$old" = "$new" &&
        $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
     then
@@ -493,24 +467,24 @@ do
       # to itself, or perhaps because mv is so ancient that it does not
       # support -f.
       {
-       # Now remove or move aside any old file at destination location.
-       # We try this two ways since rm can't unlink itself on some
-       # systems and the destination file might be busy for other
-       # reasons.  In this case, the final cleanup might fail but the new
-       # file should still install successfully.
-       {
-         test ! -f "$dst" ||
-         $doit $rmcmd -f "$dst" 2>/dev/null ||
-         { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
-           { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
-         } ||
-         { echo "$0: cannot unlink or rename $dst" >&2
-           (exit 1); exit 1
-         }
-       } &&
-
-       # Now rename the file to the real destination.
-       $doit $mvcmd "$dsttmp" "$dst"
+        # Now remove or move aside any old file at destination location.
+        # We try this two ways since rm can't unlink itself on some
+        # systems and the destination file might be busy for other
+        # reasons.  In this case, the final cleanup might fail but the new
+        # file should still install successfully.
+        {
+          test ! -f "$dst" ||
+          $doit $rmcmd -f "$dst" 2>/dev/null ||
+          { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+            { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+          } ||
+          { echo "$0: cannot unlink or rename $dst" >&2
+            (exit 1); exit 1
+          }
+        } &&
+
+        # Now rename the file to the real destination.
+        $doit $mvcmd "$dsttmp" "$dst"
       }
     fi || exit 1
 
index db98974..f62bbae 100755 (executable)
@@ -3,7 +3,7 @@
 
 scriptversion=2013-10-28.13; # UTC
 
-# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
 # Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
 
 # This program is free software; you can redistribute it and/or modify
index ddb020b..2c2dc5a 100644 (file)
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 @SET_MAKE@
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -79,12 +89,12 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = config/selinux
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \
        $(top_srcdir)/config/tls.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/src/config.h
 CONFIG_CLEAN_FILES =
@@ -138,6 +148,7 @@ am__uninstall_files_from_dir = { \
 am__installdirs = "$(DESTDIR)$(selinuxdir)"
 DATA = $(selinux_DATA)
 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
@@ -325,7 +336,6 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu config/selinux/Makefile'; \
        $(am__cd) $(top_srcdir) && \
          $(AUTOMAKE) --gnu config/selinux/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
          *config.status*) \
@@ -518,6 +528,8 @@ uninstall-am: uninstall-selinuxDATA
        pdf-am ps ps-am tags-am uninstall uninstall-am \
        uninstall-selinuxDATA
 
+.PRECIOUS: Makefile
+
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
index 0dc4497..1dfcb41 100644 (file)
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 @SET_MAKE@
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -79,13 +89,12 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = config/sysconfig
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-       $(srcdir)/lxc.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \
        $(top_srcdir)/config/tls.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/src/config.h
 CONFIG_CLEAN_FILES = lxc
@@ -139,6 +148,7 @@ am__uninstall_files_from_dir = { \
 am__installdirs = "$(DESTDIR)$(sysconfigdir)"
 DATA = $(sysconfig_DATA)
 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/lxc.in
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
@@ -323,7 +333,6 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu config/sysconfig/Makefile'; \
        $(am__cd) $(top_srcdir) && \
          $(AUTOMAKE) --gnu config/sysconfig/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
          *config.status*) \
@@ -518,6 +527,8 @@ uninstall-am: uninstall-sysconfigDATA
        pdf-am ps ps-am tags-am uninstall uninstall-am \
        uninstall-sysconfigDATA
 
+.PRECIOUS: Makefile
+
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
index 329f919..e587899 100644 (file)
@@ -18,6 +18,7 @@ templatesconfig_DATA = \
        gentoo.common.conf \
        gentoo.moresecure.conf \
        gentoo.userns.conf \
+       nesting.conf \
        opensuse.common.conf \
        opensuse.userns.conf \
        oracle.common.conf \
index 6b42767..90a4907 100644 (file)
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 @SET_MAKE@
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -79,43 +89,21 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = config/templates
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-       $(srcdir)/archlinux.common.conf.in \
-       $(srcdir)/archlinux.userns.conf.in \
-       $(srcdir)/centos.common.conf.in \
-       $(srcdir)/centos.userns.conf.in $(srcdir)/common.conf.in \
-       $(srcdir)/debian.common.conf.in \
-       $(srcdir)/debian.userns.conf.in \
-       $(srcdir)/fedora.common.conf.in \
-       $(srcdir)/fedora.userns.conf.in \
-       $(srcdir)/gentoo.common.conf.in \
-       $(srcdir)/gentoo.moresecure.conf.in \
-       $(srcdir)/gentoo.userns.conf.in \
-       $(srcdir)/opensuse.common.conf.in \
-       $(srcdir)/opensuse.userns.conf.in \
-       $(srcdir)/oracle.common.conf.in \
-       $(srcdir)/oracle.userns.conf.in $(srcdir)/plamo.common.conf.in \
-       $(srcdir)/plamo.userns.conf.in \
-       $(srcdir)/ubuntu-cloud.common.conf.in \
-       $(srcdir)/ubuntu-cloud.lucid.conf.in \
-       $(srcdir)/ubuntu-cloud.userns.conf.in \
-       $(srcdir)/ubuntu.common.conf.in $(srcdir)/ubuntu.lucid.conf.in \
-       $(srcdir)/ubuntu.userns.conf.in \
-       $(srcdir)/openwrt.common.conf.in $(srcdir)/userns.conf.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \
        $(top_srcdir)/config/tls.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/src/config.h
 CONFIG_CLEAN_FILES = archlinux.common.conf archlinux.userns.conf \
        centos.common.conf centos.userns.conf common.conf \
        debian.common.conf debian.userns.conf fedora.common.conf \
        fedora.userns.conf gentoo.common.conf gentoo.moresecure.conf \
-       gentoo.userns.conf opensuse.common.conf opensuse.userns.conf \
-       oracle.common.conf oracle.userns.conf plamo.common.conf \
-       plamo.userns.conf ubuntu-cloud.common.conf \
+       gentoo.userns.conf nesting.conf opensuse.common.conf \
+       opensuse.userns.conf oracle.common.conf oracle.userns.conf \
+       plamo.common.conf plamo.userns.conf ubuntu-cloud.common.conf \
        ubuntu-cloud.lucid.conf ubuntu-cloud.userns.conf \
        ubuntu.common.conf ubuntu.lucid.conf ubuntu.userns.conf \
        openwrt.common.conf userns.conf
@@ -204,6 +192,29 @@ am__define_uniq_tagged_files = \
 ETAGS = etags
 CTAGS = ctags
 DIST_SUBDIRS = $(SUBDIRS)
+am__DIST_COMMON = $(srcdir)/Makefile.in \
+       $(srcdir)/archlinux.common.conf.in \
+       $(srcdir)/archlinux.userns.conf.in \
+       $(srcdir)/centos.common.conf.in \
+       $(srcdir)/centos.userns.conf.in $(srcdir)/common.conf.in \
+       $(srcdir)/debian.common.conf.in \
+       $(srcdir)/debian.userns.conf.in \
+       $(srcdir)/fedora.common.conf.in \
+       $(srcdir)/fedora.userns.conf.in \
+       $(srcdir)/gentoo.common.conf.in \
+       $(srcdir)/gentoo.moresecure.conf.in \
+       $(srcdir)/gentoo.userns.conf.in $(srcdir)/nesting.conf.in \
+       $(srcdir)/opensuse.common.conf.in \
+       $(srcdir)/opensuse.userns.conf.in \
+       $(srcdir)/openwrt.common.conf.in \
+       $(srcdir)/oracle.common.conf.in \
+       $(srcdir)/oracle.userns.conf.in $(srcdir)/plamo.common.conf.in \
+       $(srcdir)/plamo.userns.conf.in \
+       $(srcdir)/ubuntu-cloud.common.conf.in \
+       $(srcdir)/ubuntu-cloud.lucid.conf.in \
+       $(srcdir)/ubuntu-cloud.userns.conf.in \
+       $(srcdir)/ubuntu.common.conf.in $(srcdir)/ubuntu.lucid.conf.in \
+       $(srcdir)/ubuntu.userns.conf.in $(srcdir)/userns.conf.in
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 am__relativize = \
   dir0=`pwd`; \
@@ -410,6 +421,7 @@ templatesconfig_DATA = \
        gentoo.common.conf \
        gentoo.moresecure.conf \
        gentoo.userns.conf \
+       nesting.conf \
        opensuse.common.conf \
        opensuse.userns.conf \
        oracle.common.conf \
@@ -440,7 +452,6 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu config/templates/Makefile'; \
        $(am__cd) $(top_srcdir) && \
          $(AUTOMAKE) --gnu config/templates/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
          *config.status*) \
@@ -482,6 +493,8 @@ gentoo.moresecure.conf: $(top_builddir)/config.status $(srcdir)/gentoo.moresecur
        cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
 gentoo.userns.conf: $(top_builddir)/config.status $(srcdir)/gentoo.userns.conf.in
        cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+nesting.conf: $(top_builddir)/config.status $(srcdir)/nesting.conf.in
+       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
 opensuse.common.conf: $(top_builddir)/config.status $(srcdir)/opensuse.common.conf.in
        cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
 opensuse.userns.conf: $(top_builddir)/config.status $(srcdir)/opensuse.userns.conf.in
@@ -806,6 +819,8 @@ uninstall-am: uninstall-templatesconfigDATA
        pdf-am ps ps-am tags tags-am uninstall uninstall-am \
        uninstall-templatesconfigDATA
 
+.PRECIOUS: Makefile
+
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
index ccbed68..c05b05d 100644 (file)
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 @SET_MAKE@
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -79,12 +89,12 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = config/templates/common.conf.d
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am README
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \
        $(top_srcdir)/config/tls.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/src/config.h
 CONFIG_CLEAN_FILES =
@@ -138,6 +148,7 @@ am__uninstall_files_from_dir = { \
 am__installdirs = "$(DESTDIR)$(templatesconfigdir)"
 DATA = $(templatesconfig_DATA)
 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in README
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
@@ -322,7 +333,6 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu config/templates/common.conf.d/Makefile'; \
        $(am__cd) $(top_srcdir) && \
          $(AUTOMAKE) --gnu config/templates/common.conf.d/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
          *config.status*) \
@@ -515,6 +525,8 @@ uninstall-am: uninstall-templatesconfigDATA
        mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags-am \
        uninstall uninstall-am uninstall-templatesconfigDATA
 
+.PRECIOUS: Makefile
+
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/config/templates/nesting.conf.in b/config/templates/nesting.conf.in
new file mode 100644 (file)
index 0000000..b712ef6
--- /dev/null
@@ -0,0 +1,8 @@
+# Use a profile which allows nesting
+lxc.aa_profile = lxc-container-default-with-nesting
+
+# Add uncovered mounts of proc and sys, else unprivileged users
+# cannot remount those
+
+lxc.mount.entry = proc dev/.lxc/proc proc create=dir,optional 0 0
+lxc.mount.entry = sys dev/.lxc/sys sysfs create=dir,optional 0 0
index 857c255..7e171de 100644 (file)
@@ -5,6 +5,7 @@ lxc.include = @LXCTEMPLATECONFIG@/common.conf
 lxc.mount.entry = /sys/kernel/debug sys/kernel/debug none bind,optional 0 0
 lxc.mount.entry = /sys/kernel/security sys/kernel/security none bind,optional 0 0
 lxc.mount.entry = /sys/fs/pstore sys/fs/pstore none bind,optional 0 0
+lxc.mount.entry = mqueue dev/mqueue mqueue rw,relatime,create=dir,optional 0 0
 
 # When using LXC with apparmor, the container will be confined by default.
 # If you wish for it to instead run unconfined, copy the following line
index 4f8431d..ba94cb3 100644 (file)
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 @SET_MAKE@
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -79,12 +89,12 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = config/yum
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \
        $(top_srcdir)/config/tls.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/src/config.h
 CONFIG_CLEAN_FILES =
@@ -138,6 +148,7 @@ am__uninstall_files_from_dir = { \
 am__installdirs = "$(DESTDIR)$(yumpluginsdir)"
 DATA = $(yumplugins_DATA)
 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
@@ -322,7 +333,6 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu config/yum/Makefile'; \
        $(am__cd) $(top_srcdir) && \
          $(AUTOMAKE) --gnu config/yum/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
          *config.status*) \
@@ -515,6 +525,8 @@ uninstall-am: uninstall-yumpluginsDATA
        pdf-am ps ps-am tags-am uninstall uninstall-am \
        uninstall-yumpluginsDATA
 
+.PRECIOUS: Makefile
+
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
index 590e7ad..a7a572b 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for lxc 1.1.3.
+# Generated by GNU Autoconf 2.69 for lxc 1.1.4.
 #
 #
 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -577,8 +577,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='lxc'
 PACKAGE_TARNAME='lxc'
-PACKAGE_VERSION='1.1.3'
-PACKAGE_STRING='lxc 1.1.3'
+PACKAGE_VERSION='1.1.4'
+PACKAGE_STRING='lxc 1.1.4'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -1435,7 +1435,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures lxc 1.1.3 to adapt to many kinds of systems.
+\`configure' configures lxc 1.1.4 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1505,7 +1505,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of lxc 1.1.3:";;
+     short | recursive ) echo "Configuration of lxc 1.1.4:";;
    esac
   cat <<\_ACEOF
 
@@ -1665,7 +1665,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-lxc configure 1.1.3
+lxc configure 1.1.4
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2130,7 +2130,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by lxc $as_me 1.1.3, which was
+It was created by lxc $as_me 1.1.4, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2601,7 +2601,7 @@ $as_echo "no" >&6; }
        fi
 fi
 
-LXC_VERSION_BASE=1.1.3
+LXC_VERSION_BASE=1.1.4
 
 
 
@@ -2609,9 +2609,9 @@ LXC_VERSION_MAJOR=1
 
 LXC_VERSION_MINOR=1
 
-LXC_VERSION_MICRO=3
+LXC_VERSION_MICRO=4
 
-LXC_VERSION=1.1.3
+LXC_VERSION=1.1.4
 
 
 
@@ -2646,7 +2646,7 @@ ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
 
 ac_config_headers="$ac_config_headers src/config.h"
 
-am__api_version='1.14'
+am__api_version='1.15'
 
 # Find a good install program.  We prefer a C program (faster),
 # so one script is as good as another.  But avoid the broken or
@@ -2818,8 +2818,8 @@ test "$program_suffix" != NONE &&
 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
 
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
+# Expand $ac_aux_dir to an absolute path.
+am_aux_dir=`cd "$ac_aux_dir" && pwd`
 
 if test x"${MISSING+set}" != xset; then
   case $am_aux_dir in
@@ -2838,7 +2838,7 @@ else
 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
 fi
 
-if test x"${install_sh}" != xset; then
+if test x"${install_sh+set}" != xset; then
   case $am_aux_dir in
   *\ * | *\    *)
     install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
@@ -3132,7 +3132,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='lxc'
- VERSION='1.1.3'
+ VERSION='1.1.4'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -3166,8 +3166,8 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
 mkdir_p='$(MKDIR_P)'
 
-# We need awk for the "check" target.  The system "awk" is bad on
-# some platforms.
+# We need awk for the "check" target (and possibly the TAP driver).  The
+# system "awk" is bad on some platforms.
 # Always define AMTAR for backward compatibility.  Yes, it's still used
 # in the wild :-(  We should find a proper way to deprecate it ...
 AMTAR='$${TAR-tar}'
@@ -3224,6 +3224,7 @@ END
     as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
   fi
 fi
+
 # Make sure we can run config.sub.
 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
@@ -7140,7 +7141,6 @@ fi
 # shell variable SOURCE.
 
 
-# PKG_CHECK_VAR
 
 
 # Lua module and scripts
@@ -7884,7 +7884,8 @@ fi
 if test -z "$ENABLE_LUA_TRUE"; then :
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking Lua version" >&5
 $as_echo_n "checking Lua version... " >&6; }
-                 if test -n "$LUA_VERSION"; then
+
+if test -n "$LUA_VERSION"; then
     pkg_cv_LUA_VERSION="$LUA_VERSION"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
@@ -7901,9 +7902,11 @@ fi
  else
     pkg_failed=untried
 fi
-     LUA_VERSION=$pkg_cv_LUA_VERSION
-     if test "x$LUA_VERSION" = x""; then :
-            if test -n "$LUA_VERSION"; then
+LUA_VERSION=$pkg_cv_LUA_VERSION
+
+if test "x$LUA_VERSION" = x""; then :
+
+if test -n "$LUA_VERSION"; then
     pkg_cv_LUA_VERSION="$LUA_VERSION"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
@@ -7920,8 +7923,9 @@ fi
  else
     pkg_failed=untried
 fi
-     LUA_VERSION=$pkg_cv_LUA_VERSION
-     if test "x$LUA_VERSION" = x""; then :
+LUA_VERSION=$pkg_cv_LUA_VERSION
+
+if test "x$LUA_VERSION" = x""; then :
 
 fi
 fi
@@ -9305,7 +9309,7 @@ if test "x$GCC" = "xyes"; then
 fi
 
 # Files requiring some variable expansion
-ac_config_files="$ac_config_files Makefile lxc.pc lxc.spec config/Makefile config/apparmor/Makefile config/selinux/Makefile config/bash/Makefile config/bash/lxc config/init/Makefile config/init/common/Makefile config/init/common/lxc-containers config/init/common/lxc-net config/init/systemd/Makefile config/init/systemd/lxc.service config/init/systemd/lxc-net.service config/init/sysvinit/Makefile config/init/sysvinit/lxc-containers config/init/sysvinit/lxc-net config/init/upstart/lxc-net.conf config/init/upstart/Makefile config/etc/Makefile config/templates/Makefile config/templates/archlinux.common.conf config/templates/archlinux.userns.conf config/templates/centos.common.conf config/templates/centos.userns.conf config/templates/common.conf config/templates/common.conf.d/Makefile config/templates/debian.common.conf config/templates/debian.userns.conf config/templates/fedora.common.conf config/templates/fedora.userns.conf config/templates/gentoo.common.conf config/templates/gentoo.moresecure.conf config/templates/gentoo.userns.conf config/templates/opensuse.common.conf config/templates/opensuse.userns.conf config/templates/oracle.common.conf config/templates/oracle.userns.conf config/templates/plamo.common.conf config/templates/plamo.userns.conf config/templates/ubuntu-cloud.common.conf config/templates/ubuntu-cloud.lucid.conf config/templates/ubuntu-cloud.userns.conf config/templates/ubuntu.common.conf config/templates/ubuntu.lucid.conf config/templates/ubuntu.userns.conf config/templates/openwrt.common.conf config/templates/userns.conf config/yum/Makefile config/sysconfig/Makefile config/sysconfig/lxc doc/Makefile doc/api/Makefile doc/legacy/lxc-ls.sgml doc/lxc-attach.sgml doc/lxc-autostart.sgml doc/lxc-cgroup.sgml doc/lxc-checkconfig.sgml doc/lxc-checkpoint.sgml doc/lxc-clone.sgml doc/lxc-config.sgml doc/lxc-console.sgml doc/lxc-create.sgml doc/lxc-destroy.sgml doc/lxc-device.sgml doc/lxc-execute.sgml doc/lxc-freeze.sgml doc/lxc-info.sgml doc/lxc-ls.sgml doc/lxc-monitor.sgml doc/lxc-snapshot.sgml doc/lxc-start-ephemeral.sgml doc/lxc-start.sgml doc/lxc-stop.sgml doc/lxc-top.sgml doc/lxc-unfreeze.sgml doc/lxc-unshare.sgml doc/lxc-user-nic.sgml doc/lxc-usernsexec.sgml doc/lxc-wait.sgml doc/lxc.conf.sgml doc/lxc.container.conf.sgml doc/lxc.system.conf.sgml doc/lxc-usernet.sgml doc/lxc.sgml doc/common_options.sgml doc/see_also.sgml doc/rootfs/Makefile doc/examples/Makefile doc/examples/lxc-macvlan.conf doc/examples/lxc-vlan.conf doc/examples/lxc-no-netns.conf doc/examples/lxc-empty-netns.conf doc/examples/lxc-phys.conf doc/examples/lxc-veth.conf doc/examples/lxc-complex.conf doc/ja/Makefile doc/ja/legacy/lxc-ls.sgml doc/ja/lxc-attach.sgml doc/ja/lxc-autostart.sgml doc/ja/lxc-cgroup.sgml doc/ja/lxc-checkconfig.sgml doc/ja/lxc-checkpoint.sgml doc/ja/lxc-clone.sgml doc/ja/lxc-config.sgml doc/ja/lxc-console.sgml doc/ja/lxc-create.sgml doc/ja/lxc-destroy.sgml doc/ja/lxc-device.sgml doc/ja/lxc-execute.sgml doc/ja/lxc-freeze.sgml doc/ja/lxc-info.sgml doc/ja/lxc-ls.sgml doc/ja/lxc-monitor.sgml doc/ja/lxc-snapshot.sgml doc/ja/lxc-start-ephemeral.sgml doc/ja/lxc-start.sgml doc/ja/lxc-stop.sgml doc/ja/lxc-top.sgml doc/ja/lxc-unfreeze.sgml doc/ja/lxc-unshare.sgml doc/ja/lxc-user-nic.sgml doc/ja/lxc-usernsexec.sgml doc/ja/lxc-wait.sgml doc/ja/lxc.conf.sgml doc/ja/lxc.container.conf.sgml doc/ja/lxc.system.conf.sgml doc/ja/lxc-usernet.sgml doc/ja/lxc.sgml doc/ja/common_options.sgml doc/ja/see_also.sgml hooks/Makefile templates/Makefile templates/lxc-alpine templates/lxc-altlinux templates/lxc-archlinux templates/lxc-busybox templates/lxc-centos templates/lxc-cirros templates/lxc-debian templates/lxc-download templates/lxc-fedora templates/lxc-gentoo templates/lxc-openmandriva templates/lxc-opensuse templates/lxc-oracle templates/lxc-plamo templates/lxc-sshd templates/lxc-ubuntu templates/lxc-ubuntu-cloud src/Makefile src/lxc/Makefile src/lxc/lxc-checkconfig src/lxc/lxc-ls src/lxc/lxc-start-ephemeral src/lxc/legacy/lxc-ls src/lxc/lxc.functions src/lxc/version.h src/python-lxc/Makefile src/python-lxc/setup.py src/lua-lxc/Makefile src/tests/Makefile src/tests/lxc-test-usernic"
+ac_config_files="$ac_config_files Makefile lxc.pc lxc.spec config/Makefile config/apparmor/Makefile config/selinux/Makefile config/bash/Makefile config/bash/lxc config/init/Makefile config/init/common/Makefile config/init/common/lxc-containers config/init/common/lxc-net config/init/systemd/Makefile config/init/systemd/lxc.service config/init/systemd/lxc-net.service config/init/sysvinit/Makefile config/init/sysvinit/lxc-containers config/init/sysvinit/lxc-net config/init/upstart/lxc-net.conf config/init/upstart/Makefile config/etc/Makefile config/templates/Makefile config/templates/archlinux.common.conf config/templates/archlinux.userns.conf config/templates/centos.common.conf config/templates/centos.userns.conf config/templates/common.conf config/templates/common.conf.d/Makefile config/templates/debian.common.conf config/templates/debian.userns.conf config/templates/fedora.common.conf config/templates/fedora.userns.conf config/templates/gentoo.common.conf config/templates/gentoo.moresecure.conf config/templates/gentoo.userns.conf config/templates/nesting.conf config/templates/opensuse.common.conf config/templates/opensuse.userns.conf config/templates/oracle.common.conf config/templates/oracle.userns.conf config/templates/plamo.common.conf config/templates/plamo.userns.conf config/templates/ubuntu-cloud.common.conf config/templates/ubuntu-cloud.lucid.conf config/templates/ubuntu-cloud.userns.conf config/templates/ubuntu.common.conf config/templates/ubuntu.lucid.conf config/templates/ubuntu.userns.conf config/templates/openwrt.common.conf config/templates/userns.conf config/yum/Makefile config/sysconfig/Makefile config/sysconfig/lxc doc/Makefile doc/api/Makefile doc/legacy/lxc-ls.sgml doc/lxc-attach.sgml doc/lxc-autostart.sgml doc/lxc-cgroup.sgml doc/lxc-checkconfig.sgml doc/lxc-checkpoint.sgml doc/lxc-clone.sgml doc/lxc-config.sgml doc/lxc-console.sgml doc/lxc-create.sgml doc/lxc-destroy.sgml doc/lxc-device.sgml doc/lxc-execute.sgml doc/lxc-freeze.sgml doc/lxc-info.sgml doc/lxc-ls.sgml doc/lxc-monitor.sgml doc/lxc-snapshot.sgml doc/lxc-start-ephemeral.sgml doc/lxc-start.sgml doc/lxc-stop.sgml doc/lxc-top.sgml doc/lxc-unfreeze.sgml doc/lxc-unshare.sgml doc/lxc-user-nic.sgml doc/lxc-usernsexec.sgml doc/lxc-wait.sgml doc/lxc.conf.sgml doc/lxc.container.conf.sgml doc/lxc.system.conf.sgml doc/lxc-usernet.sgml doc/lxc.sgml doc/common_options.sgml doc/see_also.sgml doc/rootfs/Makefile doc/examples/Makefile doc/examples/lxc-macvlan.conf doc/examples/lxc-vlan.conf doc/examples/lxc-no-netns.conf doc/examples/lxc-empty-netns.conf doc/examples/lxc-phys.conf doc/examples/lxc-veth.conf doc/examples/lxc-complex.conf doc/ja/Makefile doc/ja/legacy/lxc-ls.sgml doc/ja/lxc-attach.sgml doc/ja/lxc-autostart.sgml doc/ja/lxc-cgroup.sgml doc/ja/lxc-checkconfig.sgml doc/ja/lxc-checkpoint.sgml doc/ja/lxc-clone.sgml doc/ja/lxc-config.sgml doc/ja/lxc-console.sgml doc/ja/lxc-create.sgml doc/ja/lxc-destroy.sgml doc/ja/lxc-device.sgml doc/ja/lxc-execute.sgml doc/ja/lxc-freeze.sgml doc/ja/lxc-info.sgml doc/ja/lxc-ls.sgml doc/ja/lxc-monitor.sgml doc/ja/lxc-snapshot.sgml doc/ja/lxc-start-ephemeral.sgml doc/ja/lxc-start.sgml doc/ja/lxc-stop.sgml doc/ja/lxc-top.sgml doc/ja/lxc-unfreeze.sgml doc/ja/lxc-unshare.sgml doc/ja/lxc-user-nic.sgml doc/ja/lxc-usernsexec.sgml doc/ja/lxc-wait.sgml doc/ja/lxc.conf.sgml doc/ja/lxc.container.conf.sgml doc/ja/lxc.system.conf.sgml doc/ja/lxc-usernet.sgml doc/ja/lxc.sgml doc/ja/common_options.sgml doc/ja/see_also.sgml hooks/Makefile templates/Makefile templates/lxc-alpine templates/lxc-altlinux templates/lxc-archlinux templates/lxc-busybox templates/lxc-centos templates/lxc-cirros templates/lxc-debian templates/lxc-download templates/lxc-fedora templates/lxc-gentoo templates/lxc-openmandriva templates/lxc-opensuse templates/lxc-oracle templates/lxc-plamo templates/lxc-sshd templates/lxc-ubuntu templates/lxc-ubuntu-cloud src/Makefile src/lxc/Makefile src/lxc/lxc-checkconfig src/lxc/lxc-ls src/lxc/lxc-start-ephemeral src/lxc/legacy/lxc-ls src/lxc/lxc.functions src/lxc/version.h src/python-lxc/Makefile src/python-lxc/setup.py src/lua-lxc/Makefile src/tests/Makefile src/tests/lxc-test-usernic"
 
 ac_config_commands="$ac_config_commands default"
 
@@ -9947,7 +9951,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by lxc $as_me 1.1.3, which was
+This file was extended by lxc $as_me 1.1.4, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -10017,7 +10021,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-lxc config.status 1.1.3
+lxc config.status 1.1.4
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
@@ -10185,6 +10189,7 @@ do
     "config/templates/gentoo.common.conf") CONFIG_FILES="$CONFIG_FILES config/templates/gentoo.common.conf" ;;
     "config/templates/gentoo.moresecure.conf") CONFIG_FILES="$CONFIG_FILES config/templates/gentoo.moresecure.conf" ;;
     "config/templates/gentoo.userns.conf") CONFIG_FILES="$CONFIG_FILES config/templates/gentoo.userns.conf" ;;
+    "config/templates/nesting.conf") CONFIG_FILES="$CONFIG_FILES config/templates/nesting.conf" ;;
     "config/templates/opensuse.common.conf") CONFIG_FILES="$CONFIG_FILES config/templates/opensuse.common.conf" ;;
     "config/templates/opensuse.userns.conf") CONFIG_FILES="$CONFIG_FILES config/templates/opensuse.userns.conf" ;;
     "config/templates/oracle.common.conf") CONFIG_FILES="$CONFIG_FILES config/templates/oracle.common.conf" ;;
index 44a946f..3bac397 100644 (file)
@@ -3,7 +3,7 @@
 
 m4_define([lxc_version_major], 1)
 m4_define([lxc_version_minor], 1)
-m4_define([lxc_version_micro], 3)
+m4_define([lxc_version_micro], 4)
 m4_define([lxc_version_beta], [])
 
 m4_define([lxc_version_base], [lxc_version_major.lxc_version_minor.lxc_version_micro])
@@ -646,6 +646,7 @@ AC_CONFIG_FILES([
        config/templates/gentoo.common.conf
        config/templates/gentoo.moresecure.conf
        config/templates/gentoo.userns.conf
+       config/templates/nesting.conf
        config/templates/opensuse.common.conf
        config/templates/opensuse.userns.conf
        config/templates/oracle.common.conf
index 1ab8c6c..ba9cce5 100644 (file)
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 
 @SET_MAKE@
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -84,31 +94,12 @@ host_triplet = @host@
 @ENABLE_DOCBOOK_TRUE@@ENABLE_PYTHON_TRUE@      lxc-start-ephemeral.1
 @ENABLE_DOCBOOK_TRUE@@ENABLE_PYTHON_FALSE@am__append_4 = legacy/lxc-ls.1
 subdir = doc
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-       $(srcdir)/lxc-attach.sgml.in $(srcdir)/lxc-autostart.sgml.in \
-       $(srcdir)/lxc-cgroup.sgml.in $(srcdir)/lxc-checkconfig.sgml.in \
-       $(srcdir)/lxc-checkpoint.sgml.in $(srcdir)/lxc-clone.sgml.in \
-       $(srcdir)/lxc-config.sgml.in $(srcdir)/lxc-console.sgml.in \
-       $(srcdir)/lxc-create.sgml.in $(srcdir)/lxc-destroy.sgml.in \
-       $(srcdir)/lxc-device.sgml.in $(srcdir)/lxc-execute.sgml.in \
-       $(srcdir)/lxc-freeze.sgml.in $(srcdir)/lxc-info.sgml.in \
-       $(srcdir)/lxc-ls.sgml.in $(srcdir)/lxc-monitor.sgml.in \
-       $(srcdir)/lxc-snapshot.sgml.in \
-       $(srcdir)/lxc-start-ephemeral.sgml.in \
-       $(srcdir)/lxc-start.sgml.in $(srcdir)/lxc-stop.sgml.in \
-       $(srcdir)/lxc-top.sgml.in $(srcdir)/lxc-unfreeze.sgml.in \
-       $(srcdir)/lxc-unshare.sgml.in $(srcdir)/lxc-user-nic.sgml.in \
-       $(srcdir)/lxc-usernsexec.sgml.in $(srcdir)/lxc-wait.sgml.in \
-       $(srcdir)/lxc.conf.sgml.in \
-       $(srcdir)/lxc.container.conf.sgml.in \
-       $(srcdir)/lxc.system.conf.sgml.in \
-       $(srcdir)/lxc-usernet.sgml.in $(srcdir)/lxc.sgml.in \
-       $(srcdir)/common_options.sgml.in $(srcdir)/see_also.sgml.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \
        $(top_srcdir)/config/tls.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/src/config.h
 CONFIG_CLEAN_FILES = lxc-attach.sgml lxc-autostart.sgml \
@@ -211,6 +202,25 @@ am__define_uniq_tagged_files = \
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in \
+       $(srcdir)/common_options.sgml.in $(srcdir)/lxc-attach.sgml.in \
+       $(srcdir)/lxc-autostart.sgml.in $(srcdir)/lxc-cgroup.sgml.in \
+       $(srcdir)/lxc-checkconfig.sgml.in \
+       $(srcdir)/lxc-checkpoint.sgml.in $(srcdir)/lxc-clone.sgml.in \
+       $(srcdir)/lxc-config.sgml.in $(srcdir)/lxc-console.sgml.in \
+       $(srcdir)/lxc-create.sgml.in $(srcdir)/lxc-destroy.sgml.in \
+       $(srcdir)/lxc-device.sgml.in $(srcdir)/lxc-execute.sgml.in \
+       $(srcdir)/lxc-freeze.sgml.in $(srcdir)/lxc-info.sgml.in \
+       $(srcdir)/lxc-ls.sgml.in $(srcdir)/lxc-monitor.sgml.in \
+       $(srcdir)/lxc-snapshot.sgml.in \
+       $(srcdir)/lxc-start-ephemeral.sgml.in \
+       $(srcdir)/lxc-start.sgml.in $(srcdir)/lxc-stop.sgml.in \
+       $(srcdir)/lxc-top.sgml.in $(srcdir)/lxc-unfreeze.sgml.in \
+       $(srcdir)/lxc-unshare.sgml.in $(srcdir)/lxc-user-nic.sgml.in \
+       $(srcdir)/lxc-usernet.sgml.in $(srcdir)/lxc-usernsexec.sgml.in \
+       $(srcdir)/lxc-wait.sgml.in $(srcdir)/lxc.conf.sgml.in \
+       $(srcdir)/lxc.container.conf.sgml.in $(srcdir)/lxc.sgml.in \
+       $(srcdir)/lxc.system.conf.sgml.in $(srcdir)/see_also.sgml.in
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 am__relativize = \
   dir0=`pwd`; \
@@ -434,7 +444,6 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \
        $(am__cd) $(top_srcdir) && \
          $(AUTOMAKE) --gnu doc/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
          *config.status*) \
@@ -925,6 +934,8 @@ uninstall-man: uninstall-man1 uninstall-man5 uninstall-man7
        pdf-am ps ps-am tags tags-am uninstall uninstall-am \
        uninstall-man uninstall-man1 uninstall-man5 uninstall-man7
 
+.PRECIOUS: Makefile
+
 
 @ENABLE_DOCBOOK_TRUE@%.1 : %.sgml
 @ENABLE_DOCBOOK_TRUE@  $(db2xman) $<
index ef8599e..de20e6c 100644 (file)
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 
 @SET_MAKE@
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -78,12 +88,12 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = doc/api
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \
        $(top_srcdir)/config/tls.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/src/config.h
 CONFIG_CLEAN_FILES =
@@ -108,6 +118,7 @@ am__can_run_installinfo = \
     *) (install-info --version) >/dev/null 2>&1;; \
   esac
 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
@@ -288,7 +299,6 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/api/Makefile'; \
        $(am__cd) $(top_srcdir) && \
          $(AUTOMAKE) --gnu doc/api/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
          *config.status*) \
@@ -457,6 +467,8 @@ uninstall-am:
        mostlyclean-generic pdf pdf-am ps ps-am tags-am uninstall \
        uninstall-am
 
+.PRECIOUS: Makefile
+
 
 @ENABLE_API_DOCS_TRUE@html: Doxyfile
 @ENABLE_API_DOCS_TRUE@ doxygen
index 13fac90..eed7935 100644 (file)
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 @SET_MAKE@
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -79,16 +89,12 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = doc/examples
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-       $(srcdir)/lxc-macvlan.conf.in $(srcdir)/lxc-vlan.conf.in \
-       $(srcdir)/lxc-no-netns.conf.in \
-       $(srcdir)/lxc-empty-netns.conf.in $(srcdir)/lxc-phys.conf.in \
-       $(srcdir)/lxc-veth.conf.in $(srcdir)/lxc-complex.conf.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \
        $(top_srcdir)/config/tls.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/src/config.h
 CONFIG_CLEAN_FILES = lxc-macvlan.conf lxc-vlan.conf lxc-no-netns.conf \
@@ -144,6 +150,11 @@ am__uninstall_files_from_dir = { \
 am__installdirs = "$(DESTDIR)$(pkgexamplesdir)"
 DATA = $(noinst_DATA) $(pkgexamples_DATA)
 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/lxc-complex.conf.in \
+       $(srcdir)/lxc-empty-netns.conf.in \
+       $(srcdir)/lxc-macvlan.conf.in $(srcdir)/lxc-no-netns.conf.in \
+       $(srcdir)/lxc-phys.conf.in $(srcdir)/lxc-veth.conf.in \
+       $(srcdir)/lxc-vlan.conf.in
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
@@ -353,7 +364,6 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/examples/Makefile'; \
        $(am__cd) $(top_srcdir) && \
          $(AUTOMAKE) --gnu doc/examples/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
          *config.status*) \
@@ -560,6 +570,8 @@ uninstall-am: uninstall-pkgexamplesDATA
        pdf-am ps ps-am tags-am uninstall uninstall-am \
        uninstall-pkgexamplesDATA
 
+.PRECIOUS: Makefile
+
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
index 910dcbf..32c6fc9 100644 (file)
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 
 @SET_MAKE@
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -82,31 +92,12 @@ host_triplet = @host@
 @ENABLE_DOCBOOK_TRUE@@ENABLE_PYTHON_TRUE@      lxc-start-ephemeral.1
 @ENABLE_DOCBOOK_TRUE@@ENABLE_PYTHON_FALSE@am__append_2 = legacy/lxc-ls.1
 subdir = doc/ja
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-       $(srcdir)/lxc-attach.sgml.in $(srcdir)/lxc-autostart.sgml.in \
-       $(srcdir)/lxc-cgroup.sgml.in $(srcdir)/lxc-checkconfig.sgml.in \
-       $(srcdir)/lxc-checkpoint.sgml.in $(srcdir)/lxc-clone.sgml.in \
-       $(srcdir)/lxc-config.sgml.in $(srcdir)/lxc-console.sgml.in \
-       $(srcdir)/lxc-create.sgml.in $(srcdir)/lxc-destroy.sgml.in \
-       $(srcdir)/lxc-device.sgml.in $(srcdir)/lxc-execute.sgml.in \
-       $(srcdir)/lxc-freeze.sgml.in $(srcdir)/lxc-info.sgml.in \
-       $(srcdir)/lxc-ls.sgml.in $(srcdir)/lxc-monitor.sgml.in \
-       $(srcdir)/lxc-snapshot.sgml.in \
-       $(srcdir)/lxc-start-ephemeral.sgml.in \
-       $(srcdir)/lxc-start.sgml.in $(srcdir)/lxc-stop.sgml.in \
-       $(srcdir)/lxc-top.sgml.in $(srcdir)/lxc-unfreeze.sgml.in \
-       $(srcdir)/lxc-unshare.sgml.in $(srcdir)/lxc-user-nic.sgml.in \
-       $(srcdir)/lxc-usernsexec.sgml.in $(srcdir)/lxc-wait.sgml.in \
-       $(srcdir)/lxc.conf.sgml.in \
-       $(srcdir)/lxc.container.conf.sgml.in \
-       $(srcdir)/lxc.system.conf.sgml.in \
-       $(srcdir)/lxc-usernet.sgml.in $(srcdir)/lxc.sgml.in \
-       $(srcdir)/common_options.sgml.in $(srcdir)/see_also.sgml.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \
        $(top_srcdir)/config/tls.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/src/config.h
 CONFIG_CLEAN_FILES = lxc-attach.sgml lxc-autostart.sgml \
@@ -209,6 +200,25 @@ am__define_uniq_tagged_files = \
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in \
+       $(srcdir)/common_options.sgml.in $(srcdir)/lxc-attach.sgml.in \
+       $(srcdir)/lxc-autostart.sgml.in $(srcdir)/lxc-cgroup.sgml.in \
+       $(srcdir)/lxc-checkconfig.sgml.in \
+       $(srcdir)/lxc-checkpoint.sgml.in $(srcdir)/lxc-clone.sgml.in \
+       $(srcdir)/lxc-config.sgml.in $(srcdir)/lxc-console.sgml.in \
+       $(srcdir)/lxc-create.sgml.in $(srcdir)/lxc-destroy.sgml.in \
+       $(srcdir)/lxc-device.sgml.in $(srcdir)/lxc-execute.sgml.in \
+       $(srcdir)/lxc-freeze.sgml.in $(srcdir)/lxc-info.sgml.in \
+       $(srcdir)/lxc-ls.sgml.in $(srcdir)/lxc-monitor.sgml.in \
+       $(srcdir)/lxc-snapshot.sgml.in \
+       $(srcdir)/lxc-start-ephemeral.sgml.in \
+       $(srcdir)/lxc-start.sgml.in $(srcdir)/lxc-stop.sgml.in \
+       $(srcdir)/lxc-top.sgml.in $(srcdir)/lxc-unfreeze.sgml.in \
+       $(srcdir)/lxc-unshare.sgml.in $(srcdir)/lxc-user-nic.sgml.in \
+       $(srcdir)/lxc-usernet.sgml.in $(srcdir)/lxc-usernsexec.sgml.in \
+       $(srcdir)/lxc-wait.sgml.in $(srcdir)/lxc.conf.sgml.in \
+       $(srcdir)/lxc.container.conf.sgml.in $(srcdir)/lxc.sgml.in \
+       $(srcdir)/lxc.system.conf.sgml.in $(srcdir)/see_also.sgml.in
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 am__relativize = \
   dir0=`pwd`; \
@@ -430,7 +440,6 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/ja/Makefile'; \
        $(am__cd) $(top_srcdir) && \
          $(AUTOMAKE) --gnu doc/ja/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
          *config.status*) \
@@ -921,6 +930,8 @@ uninstall-man: uninstall-man1 uninstall-man5 uninstall-man7
        pdf-am ps ps-am tags tags-am uninstall uninstall-am \
        uninstall-man uninstall-man1 uninstall-man5 uninstall-man7
 
+.PRECIOUS: Makefile
+
 
 @ENABLE_DOCBOOK_TRUE@%.1 : %.sgml
 @ENABLE_DOCBOOK_TRUE@  $(db2xman) --encoding=UTF-8 $<
index 5d5c5fa..4a79397 100644 (file)
@@ -68,7 +68,7 @@ by KATOH Yasufumi <karma at jazz.email.ne.jp>
       <command>lxc-destroy</command> destroys the system object
       previously created by the <command>lxc-create</command> command.
       -->
-      <command>lxc-destroy</command> は、<command>lxc-create</command> で以前に作成したシステムオブジェクトを破壊します。
+      <command>lxc-destroy</command> は、<command>lxc-create</command> で以前に作成したシステムオブジェクトを削除します。
     </para>
 
   </refsect1>
@@ -80,7 +80,7 @@ by KATOH Yasufumi <karma at jazz.email.ne.jp>
     <variablelist>
       <varlistentry>
        <term>
-         <option>-f</option>
+         <option>-f, --force</option>
        </term>
        <listitem>
          <para>
@@ -90,27 +90,16 @@ by KATOH Yasufumi <karma at jazz.email.ne.jp>
            <command>lxc-destroy</command> will be aborted.
             -->
             コンテナが実行中の場合、まずコンテナを停止させます。
-            ã\81\93ã\81®ã\82ªã\83\97ã\82·ã\83§ã\83³ã\81\8cæ\8c\87å®\9aã\81\95ã\82\8cã\81¦ã\81\84ã\81ªã\81\84å ´å\90\88ã\81§ã\82³ã\83³ã\83\86ã\83\8aã\81\8cå®\9fè¡\8c中ã\81®å ´å\90\88ã\80\81<command>lxc-destroy</command> コマンドは実行を中断します。
+            ã\81\93ã\81®ã\82ªã\83\97ã\82·ã\83§ã\83³ã\81\8cæ\8c\87å®\9aã\81\95ã\82\8cã\81¦ã\81\84ã\81ªã\81\84å ´å\90\88ã\80\81ã\82³ã\83³ã\83\86ã\83\8aã\81\8cå®\9fè¡\8c中ã\81®ã\81¨ã\81\8dã\81¯ <command>lxc-destroy</command> コマンドは実行を中断します。
          </para>
        </listitem>
       </varlistentry>
-
-      <varlistentry>
-        <term><option>-P, --lxcpath=<replaceable>PATH</replaceable></option></term>
-        <listitem>
-         <para>
-            <!--
-           Use an alternate container path.  The default is @LXCPATH@.
-            -->
-            コンテナパスを指定します。デフォルトは @LXCPATH@ です。
-         </para>
-        </listitem>
-      </varlistentry>
-
     </variablelist>
 
   </refsect1>
 
+  &commonoptions;
+
   <refsect1>
     <title><!-- Diagnostic -->診断</title>
 
@@ -126,8 +115,8 @@ by KATOH Yasufumi <karma at jazz.email.ne.jp>
            destroyed.You can use the <command>lxc-ls</command>
            command to list the available containers on the system.
             -->
-            破壊するために指定したコンテナが見つかりません。
-            おそらくそのコンテナが存在しないのか、既に破壊された後なのでしょう。
+            削除するために指定したコンテナが見つかりません。
+            おそらくそのコンテナが存在しないのか、既に削除された後なのでしょう。
             <command>lxc-ls</command> コマンドを使って、システム上に存在するコンテナのリストを得ることができます。
           </para>
         </listitem>
index 1fb4b46..5860783 100644 (file)
@@ -99,7 +99,7 @@ by KATOH Yasufumi <karma at jazz.email.ne.jp>
 
       <varlistentry>
         <term>
-          <option><optional>-P</optional></option>
+          <option><optional>-P, --lxcpath</optional></option>
         </term>
         <listitem>
           <para>
index e11387a..98b8f4d 100644 (file)
@@ -1027,6 +1027,16 @@ proc proc proc nodev,noexec,nosuid 0 0
              fstab format.
               -->
               fstab フォーマットの一行と同じフォーマットのマウントポイントの指定をします。
+
+              <!--
+              Moreover lxc add two options to mount.
+              <option>optional</option> don't fail if mount does not work.
+              <option>create=dir</option> or <option>create=file</option>
+              to create dir (or file) when the point will be mounted.
+              -->
+              fstab フォーマットに加えて、LXC ではマウントに対して独自の 2 つのオプションが使えます。
+              <option>optional</option> は、マウントが失敗しても失敗を返さずに無視します。
+              <option>create=dir</option> と <option>create=file</option> は、マウントポイントをマウントする際にディレクトリもしくはファイルを作成します。
            </para>
          </listitem>
        </varlistentry>
index ae6a2f6..a9c9ef8 100644 (file)
@@ -118,11 +118,10 @@ by KATOH Yasufumi <karma at jazz.email.ne.jp>
             <para>
               <!--
               Comma separated list of cgroup controllers to setup.
-              Currently this configration will be ignored when LXC
-              uses cgmanager to manage cgroups.
+              If none is specified, all available controllers will be used.
               -->
               使用する cgroup コントローラのコンマ区切りのリスト。
-              現時点では、LXC が cgroup の管理を cgmanager 経由で行っている場合、この設定は無視されます。
+              何も指定されていない場合、全ての利用可能なコントローラが使われます。
             </para>
           </listitem>
         </varlistentry>
index 6e3204f..435df3e 100644 (file)
@@ -71,7 +71,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
     <variablelist>
       <varlistentry>
        <term>
-         <option>-f</option>
+         <option>-f, --force</option>
        </term>
        <listitem>
          <para>
@@ -81,18 +81,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
          </para>
        </listitem>
       </varlistentry>
-      <varlistentry>
-        <term><option>-P, --lxcpath=<replaceable>PATH</replaceable></option></term>
-        <listitem>
-          <para>
-           Use an alternate container path.  The default is @LXCPATH@.
-          </para>
-        </listitem>
-      </varlistentry>
     </variablelist>
 
   </refsect1>
 
+  &commonoptions;
+
   <refsect1>
     <title>Diagnostic</title>
 
index fec7f38..63826e1 100644 (file)
@@ -88,7 +88,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 
       <varlistentry>
         <term>
-          <option><optional>-P</optional></option>
+          <option><optional>-P, --lxcpath</optional></option>
         </term>
         <listitem>
           <para>
index 50c6a2a..8b57e05 100644 (file)
@@ -699,6 +699,18 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
         container. This is useful to mount /etc, /var or /home for
         examples.
       </para>
+      <para>
+       NOTE - LXC will generally ensure that mount targets and relative
+       bind-mount sources are properly confined under the container
+       root, to avoid attacks involving over-mounting host directories
+       and files.  (Symbolic links in absolute mount sources are ignored)
+       However, if the container configuration first mounts a directory which
+       is under the control of the container user, such as /home/joe, into
+        the container at some <filename>path</filename>, and then mounts
+        under <filename>path</filename>, then a TOCTTOU attack would be
+        possible where the container user modifies a symbolic link under
+        his home directory at just the right time.
+      </para>
       <variablelist>
         <varlistentry>
           <term>
@@ -742,6 +754,11 @@ proc proc proc nodev,noexec,nosuid 0 0
             <para>
               specify a mount point corresponding to a line in the
               fstab format.
+
+              Moreover lxc add two options to mount.
+              <option>optional</option> don't fail if mount does not work.
+              <option>create=dir</option> or <option>create=file</option>
+              to create dir (or file) when the point will be mounted.
             </para>
           </listitem>
         </varlistentry>
index e7aed7e..65ec5b1 100644 (file)
@@ -98,8 +98,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
           <listitem>
             <para>
               Comma separated list of cgroup controllers to setup.
-              Currently this configration will be ignored when LXC
-              uses cgmanager to manage cgroups.
+              If none is specified, all available controllers will be used.
             </para>
           </listitem>
         </varlistentry>
index 7ad71aa..8b7f195 100644 (file)
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 @SET_MAKE@
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -79,12 +89,12 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = doc/rootfs
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am README
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \
        $(top_srcdir)/config/tls.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/src/config.h
 CONFIG_CLEAN_FILES =
@@ -138,6 +148,7 @@ am__uninstall_files_from_dir = { \
 am__installdirs = "$(DESTDIR)$(READMEdir)"
 DATA = $(README_DATA)
 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in README
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
@@ -319,7 +330,6 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/rootfs/Makefile'; \
        $(am__cd) $(top_srcdir) && \
          $(AUTOMAKE) --gnu doc/rootfs/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
          *config.status*) \
@@ -512,6 +522,8 @@ uninstall-am: uninstall-READMEDATA
        pdf-am ps ps-am tags-am uninstall uninstall-READMEDATA \
        uninstall-am
 
+.PRECIOUS: Makefile
+
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
index 9f4ec62..03988d6 100644 (file)
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 @SET_MAKE@
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -79,12 +89,12 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = hooks
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \
        $(top_srcdir)/config/tls.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/src/config.h
 CONFIG_CLEAN_FILES =
@@ -138,6 +148,7 @@ am__can_run_installinfo = \
     *) (install-info --version) >/dev/null 2>&1;; \
   esac
 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
@@ -325,7 +336,6 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu hooks/Makefile'; \
        $(am__cd) $(top_srcdir) && \
          $(AUTOMAKE) --gnu hooks/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
          *config.status*) \
@@ -532,6 +542,8 @@ uninstall-am: uninstall-hooksSCRIPTS
        mostlyclean-generic pdf pdf-am ps ps-am tags-am uninstall \
        uninstall-am uninstall-hooksSCRIPTS
 
+.PRECIOUS: Makefile
+
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
index fcd9a86..37615f5 100644 (file)
--- a/lxc.spec
+++ b/lxc.spec
@@ -60,7 +60,7 @@ BuildRequires: systemd
 %endif
 
 Name: lxc
-Version: 1.1.3
+Version: 1.1.4
 Release: %{?beta_rel:0.1.%{beta_rel}}%{?!beta_rel:%{norm_rel}}%{?dist}
 URL: http://linuxcontainers.org
 Source: http://linuxcontainers.org/downloads/%{name}-%{version}%{?beta_dot}.tar.gz
index 29f3332..74c9ffe 100644 (file)
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 
 @SET_MAKE@
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -78,13 +88,12 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = src
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-       $(srcdir)/config.h.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \
        $(top_srcdir)/config/tls.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = config.h
 CONFIG_CLEAN_FILES =
@@ -145,6 +154,7 @@ am__define_uniq_tagged_files = \
 ETAGS = etags
 CTAGS = ctags
 DIST_SUBDIRS = $(SUBDIRS)
+am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 am__relativize = \
   dir0=`pwd`; \
@@ -351,7 +361,6 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \
        $(am__cd) $(top_srcdir) && \
          $(AUTOMAKE) --gnu src/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
          *config.status*) \
@@ -655,6 +664,8 @@ uninstall-am:
        mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \
        tags-am uninstall uninstall-am
 
+.PRECIOUS: Makefile
+
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
index 112e4f5..b1ce635 100644 (file)
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -81,13 +91,12 @@ build_triplet = @build@
 host_triplet = @host@
 @ENABLE_LUA_TRUE@so_PROGRAMS = core.so$(EXEEXT)
 subdir = src/lua-lxc
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-       $(top_srcdir)/config/depcomp
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \
        $(top_srcdir)/config/tls.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/src/config.h
 CONFIG_CLEAN_FILES =
@@ -186,6 +195,7 @@ am__define_uniq_tagged_files = \
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
@@ -384,7 +394,6 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lua-lxc/Makefile'; \
        $(am__cd) $(top_srcdir) && \
          $(AUTOMAKE) --gnu src/lua-lxc/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
          *config.status*) \
@@ -712,6 +721,8 @@ uninstall-am: uninstall-luaDATA uninstall-soPROGRAMS
        ps ps-am tags tags-am uninstall uninstall-am uninstall-luaDATA \
        uninstall-soPROGRAMS
 
+.PRECIOUS: Makefile
+
 
 @ENABLE_LUA_TRUE@lxc.lua:
 
index 4449452..984c345 100644 (file)
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -120,16 +130,13 @@ pkglibexec_PROGRAMS = lxc-monitord$(EXEEXT) lxc-user-nic$(EXEEXT)
 @HAVE_STATIC_LIBCAP_TRUE@am__append_19 = init.lxc.static
 @HAVE_FGETLN_TRUE@@HAVE_GETLINE_FALSE@@HAVE_STATIC_LIBCAP_TRUE@am__append_20 = ../include/getline.c
 subdir = src/lxc
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-       $(srcdir)/lxc-checkconfig.in $(srcdir)/lxc-ls.in \
-       $(srcdir)/lxc-start-ephemeral.in $(srcdir)/lxc.functions.in \
-       $(srcdir)/version.h.in $(top_srcdir)/config/depcomp \
-       $(am__noinst_HEADERS_DIST) $(pkginclude_HEADERS)
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \
        $(top_srcdir)/config/tls.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__noinst_HEADERS_DIST) \
+       $(pkginclude_HEADERS) $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/src/config.h
 CONFIG_CLEAN_FILES = lxc-checkconfig lxc-ls lxc-start-ephemeral \
@@ -429,6 +436,10 @@ am__define_uniq_tagged_files = \
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/lxc-checkconfig.in \
+       $(srcdir)/lxc-ls.in $(srcdir)/lxc-start-ephemeral.in \
+       $(srcdir)/lxc.functions.in $(srcdir)/version.h.in \
+       $(top_srcdir)/config/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
@@ -692,7 +703,6 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lxc/Makefile'; \
        $(am__cd) $(top_srcdir) && \
          $(AUTOMAKE) --gnu src/lxc/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
          *config.status*) \
@@ -2076,6 +2086,8 @@ uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \
        uninstall-pkgincludeHEADERS uninstall-pkglibexecPROGRAMS \
        uninstall-sbinPROGRAMS uninstall-soPROGRAMS
 
+.PRECIOUS: Makefile
+
 
 install-exec-local: install-soPROGRAMS
        mkdir -p $(DESTDIR)$(datadir)/lxc
index ada3958..846fd82 100644 (file)
 
 lxc_log_define(bdev, lxc);
 
+struct ovl_rsync_data {
+       struct bdev *orig;
+       struct bdev *new;
+};
+
 struct rsync_data_char {
        char *src;
        char *dest;
@@ -98,7 +103,7 @@ static int do_rsync(const char *src, const char *dest)
        s[l-2] = '/';
        s[l-1] = '\0';
 
-       execlp("rsync", "rsync", "-aHX", s, dest, (char *)NULL);
+       execlp("rsync", "rsync", "-aHX", "--delete", s, dest, (char *)NULL);
        exit(1);
 }
 
@@ -2219,6 +2224,10 @@ static int overlayfs_mount(struct bdev *bdev)
        *upper = '\0';
        upper++;
 
+       // if delta doesn't yet exist, create it
+       if (mkdir_p(upper, 0755) < 0 && errno != EEXIST)
+               return -22;
+
        // overlayfs.v22 or higher needs workdir option
        // if upper is /var/lib/lxc/c2/delta0,
        // then workdir is /var/lib/lxc/c2/olwork
@@ -2328,6 +2337,75 @@ static int rsync_delta_wrapper(void *data)
        return rsync_delta(arg);
 }
 
+static int ovl_rsync(struct ovl_rsync_data *data)
+{
+       int ret;
+
+       if (setgid(0) < 0) {
+               ERROR("Failed to setgid to 0");
+               return -1;
+       }
+       if (setgroups(0, NULL) < 0)
+               WARN("Failed to clear groups");
+       if (setuid(0) < 0) {
+               ERROR("Failed to setuid to 0");
+               return -1;
+       }
+
+       if (unshare(CLONE_NEWNS) < 0) {
+               SYSERROR("Unable to unshare mounts ns");
+               return -1;
+       }
+       if (detect_shared_rootfs()) {
+               if (mount(NULL, "/", NULL, MS_SLAVE|MS_REC, NULL)) {
+                       SYSERROR("Failed to make / rslave");
+                       ERROR("Continuing...");
+               }
+       }
+       if (overlayfs_mount(data->orig) < 0) {
+               ERROR("Failed mounting original container fs");
+               return -1;
+       }
+       if (overlayfs_mount(data->new) < 0) {
+               ERROR("Failed mounting new container fs");
+               return -1;
+       }
+       ret = do_rsync(data->orig->dest, data->new->dest);
+
+       overlayfs_umount(data->new);
+       overlayfs_umount(data->orig);
+
+       if (ret < 0) {
+               ERROR("rsyncing %s to %s", data->orig->dest, data->new->dest);
+               return -1;
+       }
+
+       return 0;
+}
+
+static int ovl_rsync_wrapper(void *data)
+{
+       struct ovl_rsync_data *arg = data;
+       return ovl_rsync(arg);
+}
+
+static int ovl_do_rsync(struct bdev *orig, struct bdev *new, struct lxc_conf *conf)
+{
+       int ret = -1;
+       struct ovl_rsync_data rdata;
+
+       rdata.orig = orig;
+       rdata.new = new;
+       if (am_unpriv())
+               ret = userns_exec_1(conf, ovl_rsync_wrapper, &rdata);
+       else
+               ret = ovl_rsync(&rdata);
+       if (ret)
+               ERROR("copying overlayfs delta");
+
+       return ret;
+}
+
 static int overlayfs_clonepaths(struct bdev *orig, struct bdev *new, const char *oldname,
                const char *cname, const char *oldpath, const char *lxcpath, int snap,
                uint64_t newsize, struct lxc_conf *conf)
@@ -2383,12 +2461,15 @@ static int overlayfs_clonepaths(struct bdev *orig, struct bdev *new, const char
                // and needs to be on the same filesystem as upperdir,
                // so it's OK for it to be empty.
                work = malloc(lastslashidx + 7);
-               if (!work)
+               if (!work) {
+                       free(delta);
                        return -1;
+               }
                strncpy(work, new->dest, lastslashidx+1);
                strcpy(work+lastslashidx, "olwork");
                if (mkdir(work, 0755) < 0) {
                        SYSERROR("error: mkdir %s", work);
+                       free(delta);
                        free(work);
                        return -1;
                }
@@ -2460,19 +2541,6 @@ static int overlayfs_clonepaths(struct bdev *orig, struct bdev *new, const char
                        WARN("Failed to update ownership of %s", work);
                free(work);
 
-               struct rsync_data_char rdata;
-               rdata.src = odelta;
-               rdata.dest = ndelta;
-               if (am_unpriv())
-                       ret = userns_exec_1(conf, rsync_delta_wrapper, &rdata);
-               else
-                       ret = rsync_delta(&rdata);
-               if (ret) {
-                       free(osrc);
-                       free(ndelta);
-                       ERROR("copying overlayfs delta");
-                       return -1;
-               }
                len = strlen(nsrc) + strlen(ndelta) + 12;
                new->src = malloc(len);
                if (!new->src) {
@@ -2485,6 +2553,8 @@ static int overlayfs_clonepaths(struct bdev *orig, struct bdev *new, const char
                free(ndelta);
                if (ret < 0 || ret >= len)
                        return -ENOMEM;
+
+               return ovl_do_rsync(orig, new, conf);
        } else {
                ERROR("overlayfs clone of %s container is not yet supported",
                        orig->type);
@@ -3614,3 +3684,40 @@ bool rootfs_is_blockdev(struct lxc_conf *conf)
                return true;
        return false;
 }
+
+bool bdev_destroy(struct lxc_conf *conf)
+{
+       struct bdev *r;
+       bool ret = false;
+
+       r = bdev_init(conf, conf->rootfs.path, conf->rootfs.mount, NULL);
+       if (!r)
+               return ret;
+
+       if (r->ops->destroy(r) == 0)
+               ret = true;
+       bdev_put(r);
+
+       return ret;
+}
+
+int bdev_destroy_wrapper(void *data)
+{
+       struct lxc_conf *conf = data;
+
+       if (setgid(0) < 0) {
+               ERROR("Failed to setgid to 0");
+               return -1;
+       }
+       if (setgroups(0, NULL) < 0)
+               WARN("Failed to clear groups");
+       if (setuid(0) < 0) {
+               ERROR("Failed to setuid to 0");
+               return -1;
+       }
+       if (!bdev_destroy(conf))
+               return -1;
+       else
+               return 0;
+}
+
index 428b3b7..f7b3fca 100644 (file)
@@ -123,6 +123,9 @@ struct bdev *bdev_copy(struct lxc_container *c0, const char *cname,
 struct bdev *bdev_create(const char *dest, const char *type,
                        const char *cname, struct bdev_specs *specs);
 void bdev_put(struct bdev *bdev);
+bool bdev_destroy(struct lxc_conf *conf);
+/* callback function to be used with userns_exec_1() */
+int bdev_destroy_wrapper(void *data);
 
 /*
  * these are really for qemu-nbd support, as container shutdown
index 9f3e96c..9712e11 100644 (file)
@@ -71,7 +71,7 @@ int lxc_caps_down(void)
 
 out:
        cap_free(caps);
-        return 0;
+       return 0;
 }
 
 int lxc_caps_up(void)
@@ -121,7 +121,7 @@ int lxc_caps_up(void)
 
 out:
        cap_free(caps);
-        return 0;
+       return 0;
 }
 
 int lxc_caps_init(void)
index ac508e3..f39fec6 100644 (file)
@@ -33,17 +33,17 @@ extern int lxc_caps_init(void);
 extern int lxc_caps_last_cap(void);
 #else
 static inline int lxc_caps_down(void) {
-        return 0;
+       return 0;
 }
 static inline int lxc_caps_up(void) {
-        return 0;
+       return 0;
 }
 static inline int lxc_caps_init(void) {
-        return 0;
+       return 0;
 }
 
 static inline int lxc_caps_last_cap(void) {
-        return 0;
+       return 0;
 }
 #endif
 
index fcb3cde..df2e6b2 100644 (file)
@@ -1363,7 +1363,10 @@ static bool cgroupfs_mount_cgroup(void *hdata, const char *root, int type)
        if (!path)
                return false;
        snprintf(path, bufsz, "%s/sys/fs/cgroup", root);
-       r = mount("cgroup_root", path, "tmpfs", MS_NOSUID|MS_NODEV|MS_NOEXEC|MS_RELATIME, "size=10240k,mode=755");
+       r = safe_mount("cgroup_root", path, "tmpfs",
+                       MS_NOSUID|MS_NODEV|MS_NOEXEC|MS_RELATIME,
+                       "size=10240k,mode=755",
+                       root);
        if (r < 0) {
                SYSERROR("could not mount tmpfs to /sys/fs/cgroup in the container");
                return false;
index c143bea..a677c22 100644 (file)
@@ -122,13 +122,13 @@ static void cull_user_controllers(void);
 
 static void cgm_dbus_disconnect(void)
 {
-       if (cgroup_manager) {
-              dbus_connection_flush(cgroup_manager->connection);
-              dbus_connection_close(cgroup_manager->connection);
-               nih_free(cgroup_manager);
-       }
-       cgroup_manager = NULL;
-       cgm_unlock();
+       if (cgroup_manager) {
+               dbus_connection_flush(cgroup_manager->connection);
+               dbus_connection_close(cgroup_manager->connection);
+               nih_free(cgroup_manager);
+       }
+       cgroup_manager = NULL;
+       cgm_unlock();
 }
 
 #define CGMANAGER_DBUS_SOCK "unix:path=/sys/fs/cgroup/cgmanager/sock"
@@ -1477,7 +1477,7 @@ static bool cgm_bind_dir(const char *root, const char *dirname)
        }
 
        /* mount a tmpfs there so we can create subdirs */
-       if (mount("cgroup", cgpath, "tmpfs", 0, "size=10000,mode=755")) {
+       if (safe_mount("cgroup", cgpath, "tmpfs", 0, "size=10000,mode=755", root)) {
                SYSERROR("Failed to mount tmpfs at %s", cgpath);
                return false;
        }
@@ -1488,7 +1488,7 @@ static bool cgm_bind_dir(const char *root, const char *dirname)
                return false;
        }
 
-       if (mount(dirname, cgpath, "none", MS_BIND, 0)) {
+       if (safe_mount(dirname, cgpath, "none", MS_BIND, 0, root)) {
                SYSERROR("Failed to bind mount %s to %s", dirname, cgpath);
                return false;
        }
index b70ee72..a807da3 100644 (file)
@@ -279,7 +279,12 @@ static int lxc_cmd(const char *name, struct lxc_cmd_rr *cmd, int *stopped,
 
        *stopped = 0;
 
-       len = sizeof(path)-1;
+       /* -2 here because this is an abstract unix socket so it needs a
+        * leading \0, and we null terminate, so it needs a trailing \0.
+        * Although null termination isn't required by the API, we do it anyway
+        * because we print the sockname out sometimes.
+        */
+       len = sizeof(path)-2;
        if (fill_sock_name(offset, len, name, lxcpath, hashed_sock_name))
                return -1;
 
@@ -972,7 +977,12 @@ int lxc_cmd_init(const char *name, struct lxc_handler *handler,
        char *offset = &path[1];
        int len;
 
-       len = sizeof(path)-1;
+       /* -2 here because this is an abstract unix socket so it needs a
+        * leading \0, and we null terminate, so it needs a trailing \0.
+        * Although null termination isn't required by the API, we do it anyway
+        * because we print the sockname out sometimes.
+        */
+       len = sizeof(path)-2;
        if (fill_sock_name(offset, len, name, lxcpath, NULL))
                return -1;
 
index d37112b..5289466 100644 (file)
@@ -284,6 +284,9 @@ static struct caps_opt caps_opt[] = {
        { "sys_tty_config",    CAP_SYS_TTY_CONFIG    },
        { "mknod",             CAP_MKNOD             },
        { "lease",             CAP_LEASE             },
+#ifdef CAP_AUDIT_READ
+       { "audit_read",        CAP_AUDIT_READ        },
+#endif
 #ifdef CAP_AUDIT_WRITE
        { "audit_write",       CAP_AUDIT_WRITE       },
 #endif
@@ -299,6 +302,9 @@ static struct caps_opt caps_opt[] = {
 #ifdef CAP_WAKE_ALARM
        { "wake_alarm",        CAP_WAKE_ALARM        },
 #endif
+#ifdef CAP_BLOCK_SUSPEND
+       { "block_suspend",     CAP_BLOCK_SUSPEND     },
+#endif
 };
 #else
 static struct caps_opt caps_opt[] = {};
@@ -741,7 +747,7 @@ static unsigned long add_required_remount_flags(const char *s, const char *d,
 static int lxc_mount_auto_mounts(struct lxc_conf *conf, int flags, struct lxc_handler *handler)
 {
        int r;
-       size_t i;
+       int i;
        static struct {
                int match_mask;
                int match_flag;
@@ -763,10 +769,11 @@ static int lxc_mount_auto_mounts(struct lxc_conf *conf, int flags, struct lxc_ha
                 * 2.6.32...
                 */
                { LXC_AUTO_PROC_MASK, LXC_AUTO_PROC_MIXED, "proc",                                              "%r/proc",                      "proc",     MS_NODEV|MS_NOEXEC|MS_NOSUID,   NULL },
-               { LXC_AUTO_PROC_MASK, LXC_AUTO_PROC_MIXED, "%r/proc/sys/net",                                   "%r/proc/net",                  NULL,       MS_BIND,                        NULL },
+               /* proc/tty is used as a temporary placeholder for proc/sys/net which we'll move back in a few steps */
+               { LXC_AUTO_PROC_MASK, LXC_AUTO_PROC_MIXED, "%r/proc/sys/net",                                   "%r/proc/tty",                  NULL,       MS_BIND,                        NULL },
                { LXC_AUTO_PROC_MASK, LXC_AUTO_PROC_MIXED, "%r/proc/sys",                                       "%r/proc/sys",                  NULL,       MS_BIND,                        NULL },
                { LXC_AUTO_PROC_MASK, LXC_AUTO_PROC_MIXED, NULL,                                                "%r/proc/sys",                  NULL,       MS_REMOUNT|MS_BIND|MS_RDONLY,   NULL },
-               { LXC_AUTO_PROC_MASK, LXC_AUTO_PROC_MIXED, "%r/proc/net",                                       "%r/proc/sys/net",              NULL,       MS_MOVE,                        NULL },
+               { LXC_AUTO_PROC_MASK, LXC_AUTO_PROC_MIXED, "%r/proc/tty",                                       "%r/proc/sys/net",              NULL,       MS_MOVE,                        NULL },
                { LXC_AUTO_PROC_MASK, LXC_AUTO_PROC_MIXED, "%r/proc/sysrq-trigger",                             "%r/proc/sysrq-trigger",        NULL,       MS_BIND,                        NULL },
                { LXC_AUTO_PROC_MASK, LXC_AUTO_PROC_MIXED, NULL,                                                "%r/proc/sysrq-trigger",        NULL,       MS_REMOUNT|MS_BIND|MS_RDONLY,   NULL },
                { LXC_AUTO_PROC_MASK, LXC_AUTO_PROC_RW,    "proc",                                              "%r/proc",                      "proc",     MS_NODEV|MS_NOEXEC|MS_NOSUID,   NULL },
@@ -790,26 +797,28 @@ static int lxc_mount_auto_mounts(struct lxc_conf *conf, int flags, struct lxc_ha
 
                        if (default_mounts[i].source) {
                                /* will act like strdup if %r is not present */
-                               source = lxc_string_replace("%r", conf->rootfs.mount, default_mounts[i].source);
+                               source = lxc_string_replace("%r", conf->rootfs.path ? conf->rootfs.mount : "", default_mounts[i].source);
                                if (!source) {
                                        SYSERROR("memory allocation error");
                                        return -1;
                                }
                        }
-                       if (default_mounts[i].destination) {
-                               /* will act like strdup if %r is not present */
-                               destination = lxc_string_replace("%r", conf->rootfs.mount, default_mounts[i].destination);
-                               if (!destination) {
-                                       saved_errno = errno;
-                                       SYSERROR("memory allocation error");
-                                       free(source);
-                                       errno = saved_errno;
-                                       return -1;
-                               }
+                       if (!default_mounts[i].destination) {
+                               ERROR("BUG: auto mounts destination %d was NULL", i);
+                               return -1;
+                       }
+                       /* will act like strdup if %r is not present */
+                       destination = lxc_string_replace("%r", conf->rootfs.path ? conf->rootfs.mount : "", default_mounts[i].destination);
+                       if (!destination) {
+                               saved_errno = errno;
+                               SYSERROR("memory allocation error");
+                               free(source);
+                               errno = saved_errno;
+                               return -1;
                        }
                        mflags = add_required_remount_flags(source, destination,
                                        default_mounts[i].flags);
-                       r = mount(source, destination, default_mounts[i].fstype, mflags, default_mounts[i].options);
+                       r = safe_mount(source, destination, default_mounts[i].fstype, mflags, default_mounts[i].options, conf->rootfs.path ? conf->rootfs.mount : NULL);
                        saved_errno = errno;
                        if (r < 0 && errno == ENOENT) {
                                INFO("Mount source or target for %s on %s doesn't exist. Skipping.", source, destination);
@@ -853,7 +862,7 @@ static int lxc_mount_auto_mounts(struct lxc_conf *conf, int flags, struct lxc_ha
                        }
                }
 
-               if (!cgroup_mount(conf->rootfs.mount, handler, cg_flags)) {
+               if (!cgroup_mount(conf->rootfs.path ? conf->rootfs.mount : "", handler, cg_flags)) {
                        SYSERROR("error mounting /sys/fs/cgroup");
                        return -1;
                }
@@ -942,7 +951,7 @@ static int setup_dev_symlinks(const struct lxc_rootfs *rootfs)
 
        for (i = 0; i < sizeof(dev_symlinks) / sizeof(dev_symlinks[0]); i++) {
                const struct dev_symlinks *d = &dev_symlinks[i];
-               ret = snprintf(path, sizeof(path), "%s/dev/%s", rootfs->mount, d->name);
+               ret = snprintf(path, sizeof(path), "%s/dev/%s", rootfs->path ? rootfs->mount : "", d->name);
                if (ret < 0 || ret >= MAXPATHLEN)
                        return -1;
 
@@ -1139,36 +1148,37 @@ fail:
  * Just create a path for /dev under $lxcpath/$name and in rootfs
  * If we hit an error, log it but don't fail yet.
  */
-static int mount_autodev(const char *name, char *root, const char *lxcpath)
+static int mount_autodev(const char *name, const struct lxc_rootfs *rootfs, const char *lxcpath)
 {
        int ret;
        size_t clen;
        char *path;
 
-       INFO("Mounting /dev under %s", root);
+       INFO("Mounting container /dev");
 
-       /* $(root) + "/dev/pts" + '\0' */
-       clen = strlen(root) + 9;
+       /* $(rootfs->mount) + "/dev/pts" + '\0' */
+       clen = (rootfs->path ? strlen(rootfs->mount) : 0) + 9;
        path = alloca(clen);
 
-       ret = snprintf(path, clen, "%s/dev", root);
+       ret = snprintf(path, clen, "%s/dev", rootfs->path ? rootfs->mount : "");
        if (ret < 0 || ret >= clen)
                return -1;
 
        if (!dir_exists(path)) {
-               WARN("No /dev on container rootfs.");
+               WARN("No /dev in container.");
                WARN("Proceeding without autodev setup");
                return 0;
        }
 
-       if (mount("none", path, "tmpfs", 0, "size=100000,mode=755")) {
+       if (safe_mount("none", path, "tmpfs", 0, "size=100000,mode=755",
+                               rootfs->path ? rootfs->mount : NULL)) {
                SYSERROR("Failed mounting tmpfs onto %s\n", path);
                return false;
        }
 
        INFO("Mounted tmpfs onto %s",  path);
 
-       ret = snprintf(path, clen, "%s/dev/pts", root);
+       ret = snprintf(path, clen, "%s/dev/pts", rootfs->path ? rootfs->mount : "");
        if (ret < 0 || ret >= clen)
                return -1;
 
@@ -1184,7 +1194,7 @@ static int mount_autodev(const char *name, char *root, const char *lxcpath)
                }
        }
 
-       INFO("Mounted /dev under %s", root);
+       INFO("Mounted container /dev");
        return 0;
 }
 
@@ -1205,16 +1215,16 @@ static const struct lxc_devs lxc_devs[] = {
        { "console",    S_IFCHR | S_IRUSR | S_IWUSR,           5, 1     },
 };
 
-static int fill_autodev(const char *root)
+static int fill_autodev(const struct lxc_rootfs *rootfs)
 {
        int ret;
        char path[MAXPATHLEN];
        int i;
        mode_t cmask;
 
-       INFO("Creating initial consoles under %s/dev", root);
+       INFO("Creating initial consoles under container /dev");
 
-       ret = snprintf(path, MAXPATHLEN, "%s/dev", root);
+       ret = snprintf(path, MAXPATHLEN, "%s/dev", rootfs->path ? rootfs->mount : "");
        if (ret < 0 || ret >= MAXPATHLEN) {
                ERROR("Error calculating container /dev location");
                return -1;
@@ -1223,11 +1233,11 @@ static int fill_autodev(const char *root)
        if (!dir_exists(path))  // ignore, just don't try to fill in
                return 0;
 
-       INFO("Populating /dev under %s", root);
+       INFO("Populating container /dev");
        cmask = umask(S_IXUSR | S_IXGRP | S_IXOTH);
        for (i = 0; i < sizeof(lxc_devs) / sizeof(lxc_devs[0]); i++) {
                const struct lxc_devs *d = &lxc_devs[i];
-               ret = snprintf(path, MAXPATHLEN, "%s/dev/%s", root, d->name);
+               ret = snprintf(path, MAXPATHLEN, "%s/dev/%s", rootfs->path ? rootfs->mount : "", d->name);
                if (ret < 0 || ret >= MAXPATHLEN)
                        return -1;
                ret = mknod(path, d->mode, makedev(d->maj, d->min));
@@ -1246,7 +1256,8 @@ static int fill_autodev(const char *root)
                                return -1;
                        }
                        fclose(pathfile);
-                       if (mount(hostpath, path, 0, MS_BIND, NULL) != 0) {
+                       if (safe_mount(hostpath, path, 0, MS_BIND, NULL,
+                                               rootfs->path ? rootfs->mount : NULL) != 0) {
                                SYSERROR("Failed bind mounting device %s from host into container",
                                        d->name);
                                return -1;
@@ -1255,7 +1266,7 @@ static int fill_autodev(const char *root)
        }
        umask(cmask);
 
-       INFO("Populated /dev under %s", root);
+       INFO("Populated container /dev");
        return 0;
 }
 
@@ -1499,7 +1510,7 @@ static int setup_dev_console(const struct lxc_rootfs *rootfs,
                return -1;
        }
 
-       if (mount(console->name, path, "none", MS_BIND, 0)) {
+       if (safe_mount(console->name, path, "none", MS_BIND, 0, rootfs->mount)) {
                ERROR("failed to mount '%s' on '%s'", console->name, path);
                return -1;
        }
@@ -1554,7 +1565,7 @@ static int setup_ttydir_console(const struct lxc_rootfs *rootfs,
                return 0;
        }
 
-       if (mount(console->name, lxcpath, "none", MS_BIND, 0)) {
+       if (safe_mount(console->name, lxcpath, "none", MS_BIND, 0, rootfs->mount)) {
                ERROR("failed to mount '%s' on '%s'", console->name, lxcpath);
                return -1;
        }
@@ -1704,13 +1715,13 @@ static char *get_field(char *src, int nfields)
 
 static int mount_entry(const char *fsname, const char *target,
                       const char *fstype, unsigned long mountflags,
-                      const char *data, int optional)
+                      const char *data, int optional, const char *rootfs)
 {
 #ifdef HAVE_STATVFS
        struct statvfs sb;
 #endif
 
-       if (mount(fsname, target, fstype, mountflags & ~MS_REMOUNT, data)) {
+       if (safe_mount(fsname, target, fstype, mountflags & ~MS_REMOUNT, data, rootfs)) {
                if (optional) {
                        INFO("failed to mount '%s' on '%s' (optional): %s", fsname,
                             target, strerror(errno));
@@ -1757,7 +1768,7 @@ static int mount_entry(const char *fsname, const char *target,
 #endif
 
                if (mount(fsname, target, fstype,
-                         mountflags | MS_REMOUNT, data)) {
+                         mountflags | MS_REMOUNT, data) < 0) {
                        if (optional) {
                                INFO("failed to mount '%s' on '%s' (optional): %s",
                                         fsname, target, strerror(errno));
@@ -1804,36 +1815,50 @@ static void cull_mntent_opt(struct mntent *mntent)
        }
 }
 
-static inline int mount_entry_on_systemfs(struct mntent *mntent)
+static int mount_entry_create_dir_file(const struct mntent *mntent,
+                                      const char* path)
 {
-       unsigned long mntflags;
-       char *mntdata;
-       int ret;
+       char *pathdirname = NULL;
+       int ret = 0;
        FILE *pathfile = NULL;
-       char* pathdirname = NULL;
-       bool optional = hasmntopt(mntent, "optional") != NULL;
 
        if (hasmntopt(mntent, "create=dir")) {
-               if (mkdir_p(mntent->mnt_dir, 0755) < 0) {
-                       WARN("Failed to create mount target '%s'", mntent->mnt_dir);
+               if (mkdir_p(path, 0755) < 0) {
+                       WARN("Failed to create mount target '%s'", path);
                        ret = -1;
                }
        }
 
-       if (hasmntopt(mntent, "create=file") && access(mntent->mnt_dir, F_OK)) {
-               pathdirname = strdup(mntent->mnt_dir);
+       if (hasmntopt(mntent, "create=file") && access(path, F_OK)) {
+               pathdirname = strdup(path);
                pathdirname = dirname(pathdirname);
                if (mkdir_p(pathdirname, 0755) < 0) {
                        WARN("Failed to create target directory");
                }
-               pathfile = fopen(mntent->mnt_dir, "wb");
+               pathfile = fopen(path, "wb");
                if (!pathfile) {
-                       WARN("Failed to create mount target '%s'", mntent->mnt_dir);
+                       WARN("Failed to create mount target '%s'", path);
                        ret = -1;
                }
                else
                        fclose(pathfile);
        }
+       free(pathdirname);
+       return ret;
+}
+
+static inline int mount_entry_on_generic(struct mntent *mntent,
+                 const char* path, const char *rootfs)
+{
+       unsigned long mntflags;
+       char *mntdata;
+       int ret;
+       bool optional = hasmntopt(mntent, "optional") != NULL;
+
+       ret = mount_entry_create_dir_file(mntent, path);
+
+       if (ret < 0)
+               return optional ? 0 : -1;
 
        cull_mntent_opt(mntent);
 
@@ -1842,28 +1867,27 @@ static inline int mount_entry_on_systemfs(struct mntent *mntent)
                return -1;
        }
 
-       ret = mount_entry(mntent->mnt_fsname, mntent->mnt_dir,
-                         mntent->mnt_type, mntflags, mntdata, optional);
+       ret = mount_entry(mntent->mnt_fsname, path, mntent->mnt_type,
+                         mntflags, mntdata, optional, rootfs);
 
-       free(pathdirname);
        free(mntdata);
 
        return ret;
 }
 
+static inline int mount_entry_on_systemfs(struct mntent *mntent)
+{
+  return mount_entry_on_generic(mntent, mntent->mnt_dir, NULL);
+}
+
 static int mount_entry_on_absolute_rootfs(struct mntent *mntent,
                                          const struct lxc_rootfs *rootfs,
                                          const char *lxc_name)
 {
        char *aux;
        char path[MAXPATHLEN];
-       unsigned long mntflags;
-       char *mntdata;
        int r, ret = 0, offset;
        const char *lxcpath;
-       FILE *pathfile = NULL;
-       char *pathdirname = NULL;
-       bool optional = hasmntopt(mntent, "optional") != NULL;
 
        lxcpath = lxc_global_config_value("lxc.lxcpath");
        if (!lxcpath) {
@@ -1887,7 +1911,7 @@ skipvarlib:
        aux = strstr(mntent->mnt_dir, rootfs->path);
        if (!aux) {
                WARN("ignoring mount point '%s'", mntent->mnt_dir);
-               goto out;
+               return ret;
        }
        offset = strlen(rootfs->path);
 
@@ -1897,58 +1921,17 @@ skipabs:
                 aux + offset);
        if (r < 0 || r >= MAXPATHLEN) {
                WARN("pathnme too long for '%s'", mntent->mnt_dir);
-               ret = -1;
-               goto out;
-       }
-
-       if (hasmntopt(mntent, "create=dir")) {
-               if (mkdir_p(path, 0755) < 0) {
-                       WARN("Failed to create mount target '%s'", path);
-                       ret = -1;
-               }
-       }
-
-       if (hasmntopt(mntent, "create=file") && access(path, F_OK)) {
-               pathdirname = strdup(path);
-               pathdirname = dirname(pathdirname);
-               if (mkdir_p(pathdirname, 0755) < 0) {
-                       WARN("Failed to create target directory");
-               }
-               pathfile = fopen(path, "wb");
-               if (!pathfile) {
-                       WARN("Failed to create mount target '%s'", path);
-                       ret = -1;
-               }
-               else
-                       fclose(pathfile);
-       }
-       cull_mntent_opt(mntent);
-
-       if (parse_mntopts(mntent->mnt_opts, &mntflags, &mntdata) < 0) {
-               free(mntdata);
                return -1;
        }
 
-       ret = mount_entry(mntent->mnt_fsname, path, mntent->mnt_type,
-                         mntflags, mntdata, optional);
-
-       free(mntdata);
-
-out:
-       free(pathdirname);
-       return ret;
+       return mount_entry_on_generic(mntent, path, rootfs->mount);
 }
 
 static int mount_entry_on_relative_rootfs(struct mntent *mntent,
                                          const char *rootfs)
 {
        char path[MAXPATHLEN];
-       unsigned long mntflags;
-       char *mntdata;
        int ret;
-       FILE *pathfile = NULL;
-       char *pathdirname = NULL;
-       bool optional = hasmntopt(mntent, "optional") != NULL;
 
        /* relative to root mount point */
        ret = snprintf(path, sizeof(path), "%s/%s", rootfs, mntent->mnt_dir);
@@ -1957,41 +1940,7 @@ static int mount_entry_on_relative_rootfs(struct mntent *mntent,
                return -1;
        }
 
-       if (hasmntopt(mntent, "create=dir")) {
-               if (mkdir_p(path, 0755) < 0) {
-                       WARN("Failed to create mount target '%s'", path);
-                       ret = -1;
-               }
-       }
-
-       if (hasmntopt(mntent, "create=file") && access(path, F_OK)) {
-               pathdirname = strdup(path);
-               pathdirname = dirname(pathdirname);
-               if (mkdir_p(pathdirname, 0755) < 0) {
-                       WARN("Failed to create target directory");
-               }
-               pathfile = fopen(path, "wb");
-               if (!pathfile) {
-                       WARN("Failed to create mount target '%s'", path);
-                       ret = -1;
-               }
-               else
-                       fclose(pathfile);
-       }
-       cull_mntent_opt(mntent);
-
-       if (parse_mntopts(mntent->mnt_opts, &mntflags, &mntdata) < 0) {
-               free(mntdata);
-               return -1;
-       }
-
-       ret = mount_entry(mntent->mnt_fsname, path, mntent->mnt_type,
-                         mntflags, mntdata, optional);
-
-       free(pathdirname);
-       free(mntdata);
-
-       return ret;
+       return mount_entry_on_generic(mntent, path, rootfs);
 }
 
 static int mount_file_entries(const struct lxc_rootfs *rootfs, FILE *file,
@@ -3549,17 +3498,12 @@ int tmp_proc_mount(struct lxc_conf *lxc_conf)
 {
        int mounted;
 
-       if (lxc_conf->rootfs.path == NULL || strlen(lxc_conf->rootfs.path) == 0) {
-               if (mount("proc", "/proc", "proc", 0, NULL)) {
-                       SYSERROR("Failed mounting /proc, proceeding");
-                       mounted = 0;
-               } else
-                       mounted = 1;
-       } else
-               mounted = mount_proc_if_needed(lxc_conf->rootfs.mount);
+       mounted = mount_proc_if_needed(lxc_conf->rootfs.path ? lxc_conf->rootfs.mount : "");
        if (mounted == -1) {
                SYSERROR("failed to mount /proc in the container.");
-               return -1;
+               /* continue only if there is no rootfs */
+               if (lxc_conf->rootfs.path)
+                       return -1;
        } else if (mounted == 1) {
                lxc_conf->tmp_umount_proc = 1;
        }
@@ -3646,7 +3590,7 @@ void lxc_execute_bind_init(struct lxc_conf *conf)
                fclose(pathfile);
        }
 
-       ret = mount(path, destpath, "none", MS_BIND, NULL);
+       ret = safe_mount(path, destpath, "none", MS_BIND, NULL, conf->rootfs.mount);
        if (ret < 0)
                SYSERROR("Failed to bind lxc.init.static into container");
        INFO("lxc.init.static bound into container at %s", path);
@@ -3697,12 +3641,12 @@ static bool verify_start_hooks(struct lxc_conf *conf)
                int ret;
 
                ret = snprintf(path, MAXPATHLEN, "%s%s",
-                       conf->rootfs.mount, hookname);
+                       conf->rootfs.path ? conf->rootfs.mount : "", hookname);
                if (ret < 0 || ret >= MAXPATHLEN)
                        return false;
                ret = stat(path, &st);
                if (ret) {
-                       SYSERROR("Start hook %s not found in container rootfs",
+                       SYSERROR("Start hook %s not found in container",
                                        hookname);
                        return false;
                }
@@ -3778,7 +3722,7 @@ int lxc_setup(struct lxc_handler *handler)
        }
 
        if (lxc_conf->autodev > 0) {
-               if (mount_autodev(name, lxc_conf->rootfs.mount, lxcpath)) {
+               if (mount_autodev(name, &lxc_conf->rootfs, lxcpath)) {
                        ERROR("failed to mount /dev in the container");
                        return -1;
                }
@@ -3802,7 +3746,7 @@ int lxc_setup(struct lxc_handler *handler)
                return -1;
        }
 
-       /* Make sure any start hooks are in the rootfs */
+       /* Make sure any start hooks are in the container */
        if (!verify_start_hooks(lxc_conf))
                return -1;
 
@@ -3828,7 +3772,7 @@ int lxc_setup(struct lxc_handler *handler)
                        ERROR("failed to run autodev hooks for container '%s'.", name);
                        return -1;
                }
-               if (fill_autodev(lxc_conf->rootfs.mount)) {
+               if (fill_autodev(&lxc_conf->rootfs)) {
                        ERROR("failed to populate /dev in the container");
                        return -1;
                }
@@ -4560,7 +4504,7 @@ struct lxc_list *sort_cgroup_settings(struct lxc_list* cgroup_settings)
                        /* Store the memsw_limit location */
                        memsw_limit = item;
                } else if (strcmp(cg->subsystem, "memory.limit_in_bytes") == 0 && memsw_limit != NULL) {
-                       /* lxc.cgroup.memory.memsw.limit_in_bytes is found before 
+                       /* lxc.cgroup.memory.memsw.limit_in_bytes is found before
                         * lxc.cgroup.memory.limit_in_bytes, swap these two items */
                        item->elem = memsw_limit->elem;
                        memsw_limit->elem = it->elem;
index dcfeac9..4f124af 100644 (file)
@@ -67,6 +67,8 @@ static int config_idmap(const char *, const char *, struct lxc_conf *);
 static int config_loglevel(const char *, const char *, struct lxc_conf *);
 static int config_logfile(const char *, const char *, struct lxc_conf *);
 static int config_mount(const char *, const char *, struct lxc_conf *);
+static int config_mount_auto(const char *, const char *, struct lxc_conf *);
+static int config_fstab(const char *, const char *, struct lxc_conf *);
 static int config_rootfs(const char *, const char *, struct lxc_conf *);
 static int config_rootfs_mount(const char *, const char *, struct lxc_conf *);
 static int config_rootfs_options(const char *, const char *, struct lxc_conf *);
@@ -118,7 +120,9 @@ static struct lxc_config_t config[] = {
        { "lxc.id_map",               config_idmap                },
        { "lxc.loglevel",             config_loglevel             },
        { "lxc.logfile",              config_logfile              },
-       { "lxc.mount",                config_mount                },
+       { "lxc.mount.entry",          config_mount                },
+       { "lxc.mount.auto",           config_mount_auto           },
+       { "lxc.mount",                config_fstab                },
        { "lxc.rootfs.mount",         config_rootfs_mount         },
        { "lxc.rootfs.options",       config_rootfs_options       },
        { "lxc.rootfs",               config_rootfs               },
@@ -1123,10 +1127,10 @@ static int config_group(const char *key, const char *value,
        /* in case several groups are specified in a single line
         * split these groups in a single element for the list */
        for (groupptr = groups;;groupptr = NULL) {
-                token = strtok_r(groupptr, " \t", &sptr);
-                if (!token) {
+               token = strtok_r(groupptr, " \t", &sptr);
+               if (!token) {
                        ret = 0;
-                        break;
+                       break;
                }
 
                grouplist = malloc(sizeof(*grouplist));
@@ -1143,7 +1147,7 @@ static int config_group(const char *key, const char *value,
                }
 
                lxc_list_add_tail(&lxc_conf->groups, grouplist);
-        }
+       }
 
        free(groups);
 
@@ -1485,7 +1489,7 @@ static int config_mount_auto(const char *key, const char *value,
                { "cgroup-full:mixed",  LXC_AUTO_CGROUP_MASK,    LXC_AUTO_CGROUP_FULL_MIXED  },
                { "cgroup-full:ro",     LXC_AUTO_CGROUP_MASK,    LXC_AUTO_CGROUP_FULL_RO     },
                { "cgroup-full:rw",     LXC_AUTO_CGROUP_MASK,    LXC_AUTO_CGROUP_FULL_RW     },
-               /* NB: For adding anything that ist just a single on/off, but has
+               /* NB: For adding anything that is just a single on/off, but has
                 *     no options: keep mask and flag identical and just define the
                 *     enum value as an unused bit so far
                 */
@@ -1506,10 +1510,10 @@ static int config_mount_auto(const char *key, const char *value,
        }
 
        for (autoptr = autos; ; autoptr = NULL) {
-                token = strtok_r(autoptr, " \t", &sptr);
-                if (!token) {
+               token = strtok_r(autoptr, " \t", &sptr);
+               if (!token) {
                        ret = 0;
-                        break;
+                       break;
                }
 
                for (i = 0; allowed_auto_mounts[i].token; i++) {
@@ -1524,47 +1528,19 @@ static int config_mount_auto(const char *key, const char *value,
 
                lxc_conf->auto_mounts &= ~allowed_auto_mounts[i].mask;
                lxc_conf->auto_mounts |= allowed_auto_mounts[i].flag;
-        }
+       }
 
        free(autos);
 
        return ret;
 }
 
-/*
- * TODO
- * This fn is handling lxc.mount, lxc.mount.entry, and lxc.mount.auto.
- * It should probably be split into 3 separate functions indexed by
- * the config[] entries at top.
- */
 static int config_mount(const char *key, const char *value,
                        struct lxc_conf *lxc_conf)
 {
-       char *fstab_token = "lxc.mount";
-       char *token = "lxc.mount.entry";
-       char *auto_token = "lxc.mount.auto";
-       char *subkey;
        char *mntelem;
        struct lxc_list *mntlist;
 
-       subkey = strstr(key, token);
-
-       if (!subkey) {
-               subkey = strstr(key, auto_token);
-
-               if (!subkey) {
-                       subkey = strstr(key, fstab_token);
-
-                       if (!subkey)
-                               return -1;
-
-                       return config_fstab(key, value, lxc_conf);
-               }
-
-               return config_mount_auto(key, value, lxc_conf);
-       }
-
-       /* At this point we definitely have key = lxc.mount.entry */
        if (!value || strlen(value) == 0)
                return lxc_clear_mount_entries(lxc_conf);
 
@@ -1603,10 +1579,10 @@ static int config_cap_keep(const char *key, const char *value,
        /* in case several capability keep is specified in a single line
         * split these caps in a single element for the list */
        for (keepptr = keepcaps;;keepptr = NULL) {
-                token = strtok_r(keepptr, " \t", &sptr);
-                if (!token) {
+               token = strtok_r(keepptr, " \t", &sptr);
+               if (!token) {
                        ret = 0;
-                        break;
+                       break;
                }
 
                if (!strcmp(token, "none"))
@@ -1626,7 +1602,7 @@ static int config_cap_keep(const char *key, const char *value,
                }
 
                lxc_list_add_tail(&lxc_conf->keepcaps, keeplist);
-        }
+       }
 
        free(keepcaps);
 
@@ -1652,10 +1628,10 @@ static int config_cap_drop(const char *key, const char *value,
        /* in case several capability drop is specified in a single line
         * split these caps in a single element for the list */
        for (dropptr = dropcaps;;dropptr = NULL) {
-                token = strtok_r(dropptr, " \t", &sptr);
-                if (!token) {
+               token = strtok_r(dropptr, " \t", &sptr);
+               if (!token) {
                        ret = 0;
-                        break;
+                       break;
                }
 
                droplist = malloc(sizeof(*droplist));
@@ -1672,7 +1648,7 @@ static int config_cap_drop(const char *key, const char *value,
                }
 
                lxc_list_add_tail(&lxc_conf->caps, droplist);
-        }
+       }
 
        free(dropcaps);
 
@@ -2029,7 +2005,7 @@ int lxc_fill_elevated_privileges(char *flaglist, int *flags)
                /* for the sake of backward compatibility, drop all privileges
                   if none is specified */
                for (i = 0; all_privs[i].token; i++) {
-                       *flags |= all_privs[i].flag;
+                       *flags |= all_privs[i].flag;
                }
                return 0;
        }
index 6417764..b5a582e 100644 (file)
@@ -53,10 +53,10 @@ static int genetlink_resolve_family(const char *family)
 
        request->nlmsghdr.nlmsg_len = NLMSG_LENGTH(GENL_HDRLEN);
        request->nlmsghdr.nlmsg_flags = NLM_F_REQUEST | NLM_F_ACK;
-        request->nlmsghdr.nlmsg_type = GENL_ID_CTRL;
+       request->nlmsghdr.nlmsg_type = GENL_ID_CTRL;
 
        genlmsghdr = NLMSG_DATA(&request->nlmsghdr);
-        genlmsghdr->cmd = CTRL_CMD_GETFAMILY;
+       genlmsghdr->cmd = CTRL_CMD_GETFAMILY;
 
        ret = netlink_open(&handler, NETLINK_GENERIC);
        if (ret)
index 3080618..a83b7a7 100644 (file)
@@ -59,7 +59,7 @@ struct genlmsg {
 
 static inline int genetlink_len(const struct genlmsg *genlmsg)
 {
-        return ((genlmsg->nlmsghdr.nlmsg_len) - GENL_HDRLEN - NLMSG_HDRLEN);
+       return ((genlmsg->nlmsghdr.nlmsg_len) - GENL_HDRLEN - NLMSG_HDRLEN);
 }
 
 /*
index f16af54..2d8a2a8 100644 (file)
@@ -72,10 +72,10 @@ static inline void __lxc_list_add(struct lxc_list *new,
                                  struct lxc_list *prev,
                                  struct lxc_list *next)
 {
-        next->prev = new;
-        new->next = next;
-        new->prev = prev;
-        prev->next = new;
+       next->prev = new;
+       new->next = next;
+       new->prev = prev;
+       prev->next = new;
 }
 
 static inline void lxc_list_add(struct lxc_list *head, struct lxc_list *list)
index a4c3ecb..247b70f 100644 (file)
@@ -111,6 +111,25 @@ echo "--- Misc ---"
 echo -n "Veth pair device: " && is_enabled CONFIG_VETH
 echo -n "Macvlan: " && is_enabled CONFIG_MACVLAN
 echo -n "Vlan: " && is_enabled CONFIG_VLAN_8021Q
+echo -n "Bridges: " && is_enabled CONFIG_BRIDGE
+echo -n "Advanced netfilter: " && is_enabled CONFIG_NETFILTER_ADVANCED
+echo -n "CONFIG_NF_NAT_IPV4: " && is_enabled CONFIG_NF_NAT_IPV4
+echo -n "CONFIG_NF_NAT_IPV6: " && is_enabled CONFIG_NF_NAT_IPV6
+echo -n "CONFIG_IP_NF_TARGET_MASQUERADE: " && is_enabled CONFIG_IP_NF_TARGET_MASQUERADE
+echo -n "CONFIG_IP6_NF_TARGET_MASQUERADE: " && is_enabled CONFIG_IP6_NF_TARGET_MASQUERADE
+echo -n "CONFIG_NETFILTER_XT_TARGET_CHECKSUM: " && is_enabled CONFIG_NETFILTER_XT_TARGET_CHECKSUM
+
+echo
+echo "--- Checkpoint/Restore ---"
+echo -n "checkpoint restore: " && is_enabled CONFIG_CHECKPOINT_RESTORE
+echo -n "CONFIG_FHANDLE: " && is_enabled CONFIG_FHANDLE
+echo -n "CONFIG_EVENTFD: " && is_enabled CONFIG_EVENTFD
+echo -n "CONFIG_EPOLL: " && is_enabled CONFIG_EPOLL
+echo -n "CONFIG_UNIX_DIAG: " && is_enabled CONFIG_UNIX_DIAG
+echo -n "CONFIG_INET_DIAG: " && is_enabled CONFIG_INET_DIAG
+echo -n "CONFIG_PACKET_DIAG: " && is_enabled CONFIG_PACKET_DIAG
+echo -n "CONFIG_NETLINK_DIAG: " && is_enabled CONFIG_NETLINK_DIAG
+
 echo -n "File capabilities: " && \
     ( [ "${KVER_MAJOR}" = 2 ] && [ ${KVER_MINOR} -lt 33 ] && \
        is_enabled CONFIG_SECURITY_FILE_CAPABILITIES ) || \
index ed2dfd1..e649419 100644 (file)
@@ -29,7 +29,6 @@ import argparse
 import gettext
 import lxc
 import os
-import pwd
 import sys
 import subprocess
 import tempfile
@@ -356,12 +355,17 @@ if os.path.exists("/proc/self/ns/pid"):
             if args.user:
                 username = args.user
 
-            user = pwd.getpwnam(username)
-            os.setgid(user.pw_gid)
-            os.initgroups(user.pw_name, user.pw_gid)
-            os.setuid(user.pw_uid)
-            os.chdir(user.pw_dir)
-            os.environ['HOME'] = user.pw_dir
+            line = subprocess.check_output(
+                ["getent", "passwd", username],
+                universal_newlines=True).rstrip("\n")
+            _, _, pw_uid, pw_gid, _, pw_dir, _ = line.split(":", 6)
+            pw_uid = int(pw_uid)
+            pw_gid = int(pw_gid)
+            os.setgid(pw_gid)
+            os.initgroups(username, pw_gid)
+            os.setuid(pw_uid)
+            os.chdir(pw_dir)
+            os.environ['HOME'] = pw_dir
         except:
             print(_("Unable to switch to user: %s" % username))
             sys.exit(1)
index d28b22c..1c24349 100644 (file)
@@ -113,12 +113,12 @@ static int my_parser(struct lxc_arguments* args, int c, char* arg)
                /* -s implies -e */
                lxc_fill_elevated_privileges(NULL, &elevated_privileges);
                break;
-        case 500: /* clear-env */
-                env_policy = LXC_ATTACH_CLEAR_ENV;
-                break;
-        case 501: /* keep-env */
-                env_policy = LXC_ATTACH_KEEP_ENV;
-                break;
+       case 500: /* clear-env */
+               env_policy = LXC_ATTACH_CLEAR_ENV;
+               break;
+       case 501: /* keep-env */
+               env_policy = LXC_ATTACH_KEEP_ENV;
+               break;
        case 502: /* keep-var */
                ret = add_to_simple_array(&extra_keep, &extra_keep_size, arg);
                if (ret < 0) {
@@ -146,7 +146,7 @@ static struct lxc_arguments my_args = {
 Execute the specified COMMAND - enter the container NAME\n\
 \n\
 Options :\n\
-  -n, --name=NAME   NAME for name of the container\n\
+  -n, --name=NAME   NAME of the container\n\
   -e, --elevated-privileges=PRIVILEGES\n\
                     Use elevated privileges instead of those of the\n\
                     container. If you don't specify privileges to be\n\
index f150c43..dd60fd1 100644 (file)
@@ -56,7 +56,7 @@ Get or set the value of a state object (for example, 'cpuset.cpus')\n\
 in the container's cgroup for the corresponding subsystem.\n\
 \n\
 Options :\n\
-  -n, --name=NAME      container name",
+  -n, --name=NAME      NAME of the container",
        .options  = my_longopts,
        .parser   = NULL,
        .checker  = my_checker,
index 2e76c2e..3e5de4a 100644 (file)
@@ -105,7 +105,7 @@ lxc-checkpoint checkpoints and restores a container\n\
   its running state at a later time.\n\
 \n\
 Options :\n\
-  -n, --name=NAME           NAME for name of the container\n\
+  -n, --name=NAME           NAME of the container\n\
   -r, --restore             Restore container\n\
   -D, --checkpoint-dir=DIR  directory to save the checkpoint in\n\
   -v, --verbose             Enable verbose criu logs\n\
index b22322b..adbd7e0 100644 (file)
@@ -78,7 +78,7 @@ static struct lxc_arguments my_args = {
 lxc-console logs on the container with the identifier NAME\n\
 \n\
 Options :\n\
-  -n, --name=NAME      NAME for name of the container\n\
+  -n, --name=NAME      NAME of the container\n\
   -t, --tty=NUMBER     console tty number\n\
   -e, --escape=PREFIX  prefix for escape command\n",
        .options  = my_longopts,
index 8f46db9..f1094fb 100644 (file)
@@ -61,7 +61,7 @@ static uint64_t get_fssize(char *s)
        else if (*end == 't' || *end == 'T')
                ret *= 1024ULL * 1024ULL * 1024ULL * 1024ULL;
        else
-       {               
+       {
                fprintf(stderr, "Invalid blockdev unit size '%c' in '%s', using default size\n", *end, s);
                return 0;
        }
@@ -131,7 +131,7 @@ static struct lxc_arguments my_args = {
 lxc-create creates a container\n\
 \n\
 Options :\n\
-  -n, --name=NAME    NAME for name of the container\n\
+  -n, --name=NAME    NAME of the container\n\
   -f, --config=file  Initial configuration file\n\
   -t, --template=t   Template to use to setup container\n\
   -B, --bdev=BDEV    Backing store type to use\n\
index 6d715d3..0c9e066 100644 (file)
@@ -53,7 +53,7 @@ static struct lxc_arguments my_args = {
 lxc-device attach or detach DEV to or from container.\n\
 \n\
 Options :\n\
-  -n, --name=NAME      NAME for name of the container",
+  -n, --name=NAME      NAME of the container",
        .options  = my_longopts,
        .parser   = NULL,
        .checker  = NULL,
index 4f1e1f6..d2c1248 100644 (file)
@@ -79,7 +79,7 @@ lxc-execute creates a container with the identifier NAME\n\
 and execs COMMAND into this container.\n\
 \n\
 Options :\n\
-  -n, --name=NAME      NAME for name of the container\n\
+  -n, --name=NAME      NAME of the container\n\
   -f, --rcfile=FILE    Load configuration file FILE\n\
   -s, --define KEY=VAL Assign VAL to configuration variable KEY\n",
        .options  = my_longopts,
index 0744c82..ea8bd3e 100644 (file)
@@ -47,7 +47,7 @@ static struct lxc_arguments my_args = {
 lxc-freeze freezes a container with the identifier NAME\n\
 \n\
 Options :\n\
-  -n, --name=NAME      NAME for name of the container",
+  -n, --name=NAME      NAME of the container",
        .options  = my_longopts,
        .parser   = NULL,
        .checker  = NULL,
index b360aa8..58ff619 100644 (file)
@@ -53,7 +53,7 @@ static int my_parser(struct lxc_arguments* args, int c, char* arg)
        char **newk;
        switch (c) {
        case 'c':
-               newk = realloc(key, keys+1 * sizeof(key[0]));
+               newk = realloc(key, (keys + 1) * sizeof(key[0]));
                if (!newk)
                        return -1;
                key = newk;
@@ -87,7 +87,7 @@ static struct lxc_arguments my_args = {
 lxc-info display some information about a container with the identifier NAME\n\
 \n\
 Options :\n\
-  -n, --name=NAME       NAME for name of the container\n\
+  -n, --name=NAME       NAME of the container\n\
   -c, --config=KEY      show configuration variable KEY from running container\n\
   -i, --ips             shows the IP addresses\n\
   -p, --pid             shows the process id of the init container\n\
index 62ed4ad..5dd29af 100644 (file)
@@ -61,7 +61,7 @@ static void interrupt_handler(int sig)
 static void usage(void) {
        fprintf(stderr, "Usage: lxc-init [OPTION]...\n\n"
                "Common options :\n"
-               "  -n, --name=NAME          NAME for name of the container\n"
+               "  -n, --name=NAME          NAME of the container\n"
                "  -l, --logpriority=LEVEL  Set log priority to LEVEL\n"
                "  -q, --quiet              Don't produce any output\n"
                "  -P, --lxcpath=PATH       Use specified container path\n"
@@ -117,7 +117,7 @@ int main(int argc, char *argv[])
 
        aargv = &argv[optind];
 
-        /*
+       /*
         * mask all the signals so we are safe to install a
         * signal handler and to fork
         */
index ac34b0e..797ae8b 100644 (file)
@@ -61,7 +61,7 @@ static struct lxc_arguments my_args = {
 lxc-monitor monitors the state of the NAME container\n\
 \n\
 Options :\n\
-  -n, --name=NAME   NAME for name of the container\n\
+  -n, --name=NAME   NAME of the container\n\
                     NAME may be a regular expression\n\
   -Q, --quit        tell lxc-monitord to quit\n",
        .name     = ".*",
index b9d1add..6b942ac 100644 (file)
@@ -181,7 +181,7 @@ static struct lxc_arguments my_args = {
 lxc-start start COMMAND in specified container NAME\n\
 \n\
 Options :\n\
-  -n, --name=NAME        NAME for name of the container\n\
+  -n, --name=NAME        NAME of the container\n\
   -d, --daemon           Daemonize the container (default)\n\
   -F, --foreground       Start with the current tty attached to /dev/console\n\
   -p, --pidfile=FILE     Create a file with the process id\n\
@@ -190,7 +190,7 @@ Options :\n\
   -L, --console-log=FILE Log container console output to FILE\n\
   -C, --close-all-fds    If any fds are inherited, close them\n\
                          If not specified, exit with failure instead\n\
-                        Note: --daemon implies --close-all-fds\n\
+                         Note: --daemon implies --close-all-fds\n\
   -s, --define KEY=VAL   Assign VAL to configuration variable KEY\n\
       --share-[net|ipc|uts]=NAME Share a namespace with another container or pid\n\
 ",
index 7054532..10ddce6 100644 (file)
@@ -69,7 +69,7 @@ static struct lxc_arguments my_args = {
 lxc-stop stops a container with the identifier NAME\n\
 \n\
 Options :\n\
-  -n, --name=NAME   NAME for name of the container\n\
+  -n, --name=NAME   NAME of the container\n\
   -r, --reboot      reboot the container\n\
   -W, --nowait      don't wait for shutdown or reboot to complete\n\
   -t, --timeout=T   wait T seconds before hard-stopping\n\
index 6a40ed7..3a13d37 100644 (file)
@@ -45,7 +45,7 @@ static struct lxc_arguments my_args = {
 lxc-unfreeze unfreezes a container with the identifier NAME\n\
 \n\
 Options :\n\
-  -n, --name=NAME   NAME for name of the container\n",
+  -n, --name=NAME   NAME of the container\n",
        .options  = my_longopts,
        .parser   = NULL,
        .checker  = NULL,
index 59a231e..e629525 100644 (file)
@@ -115,8 +115,8 @@ struct start_arg {
        int *flags;
        uid_t *uid;
        bool setuid;
-        int want_default_mounts;
-        const char *want_hostname;
+       int want_default_mounts;
+       const char *want_hostname;
 };
 
 static int do_start(void *arg)
index 897d0ea..712ba52 100644 (file)
@@ -68,7 +68,7 @@ static struct lxc_arguments my_args = {
 lxc-wait waits for NAME container state to reach STATE\n\
 \n\
 Options :\n\
-  -n, --name=NAME   NAME for name of the container\n\
+  -n, --name=NAME   NAME of the container\n\
   -s, --state=STATE ORed states to wait for\n\
                     STOPPED, STARTING, RUNNING, STOPPING,\n\
                     ABORTING, FREEZING, FROZEN, THAWED\n\
index 09ff063..20ec0b7 100644 (file)
@@ -1364,19 +1364,26 @@ static bool do_lxcapi_create(struct lxc_container *c, const char *t,
                goto free_tpath;
 
        /*
-        * either template or rootfs.path should be set.
         * if both template and rootfs.path are set, template is setup as rootfs.path.
         * container is already created if we have a config and rootfs.path is accessible
         */
-       if (!c->lxc_conf->rootfs.path && !tpath)
-               /* no template passed in and rootfs does not exist: error */
+       if (!c->lxc_conf->rootfs.path && !tpath) {
+               /* no template passed in and rootfs does not exist */
+               if (!c->save_config(c, NULL)) {
+                       ERROR("failed to save starting configuration for %s\n", c->name);
+                       goto out;
+               }
+               ret = true;
                goto out;
+       }
        if (c->lxc_conf->rootfs.path && access(c->lxc_conf->rootfs.path, F_OK) != 0)
                /* rootfs passed into configuration, but does not exist: error */
                goto out;
        if (do_lxcapi_is_defined(c) && c->lxc_conf->rootfs.path && !tpath) {
                /* Rootfs already existed, user just wanted to save the
                 * loaded configuration */
+               if (!c->save_config(c, NULL))
+                       ERROR("failed to save starting configuration for %s\n", c->name);
                ret = true;
                goto out;
        }
@@ -2112,48 +2119,25 @@ static bool has_snapshots(struct lxc_container *c)
        return count > 0;
 }
 
+static bool do_destroy_container(struct lxc_conf *conf) {
+       if (am_unpriv()) {
+               if (userns_exec_1(conf, bdev_destroy_wrapper, conf) < 0)
+                       return false;
+               return true;
+       }
+       return bdev_destroy(conf);
+}
+
 static int lxc_rmdir_onedev_wrapper(void *data)
 {
        char *arg = (char *) data;
        return lxc_rmdir_onedev(arg, "snaps");
 }
 
-static int do_bdev_destroy(struct lxc_conf *conf)
-{
-       struct bdev *r;
-       int ret = 0;
-
-       r = bdev_init(conf, conf->rootfs.path, conf->rootfs.mount, NULL);
-       if (!r)
-               return -1;
-
-       if (r->ops->destroy(r) < 0)
-               ret = -1;
-       bdev_put(r);
-       return ret;
-}
-
-static int bdev_destroy_wrapper(void *data)
-{
-       struct lxc_conf *conf = data;
-
-       if (setgid(0) < 0) {
-               ERROR("Failed to setgid to 0");
-               return -1;
-       }
-       if (setgroups(0, NULL) < 0)
-               WARN("Failed to clear groups");
-       if (setuid(0) < 0) {
-               ERROR("Failed to setuid to 0");
-               return -1;
-       }
-       return do_bdev_destroy(conf);
-}
-
 static bool container_destroy(struct lxc_container *c)
 {
        bool bret = false;
-       int ret;
+       int ret = 0;
 
        if (!c || !do_lxcapi_is_defined(c))
                return false;
@@ -2176,14 +2160,11 @@ static bool container_destroy(struct lxc_container *c)
        }
 
        if (c->lxc_conf && c->lxc_conf->rootfs.path && c->lxc_conf->rootfs.mount) {
-               if (am_unpriv())
-                       ret = userns_exec_1(c->lxc_conf, bdev_destroy_wrapper, c->lxc_conf);
-               else
-                       ret = do_bdev_destroy(c->lxc_conf);
-               if (ret < 0) {
+               if (!do_destroy_container(c->lxc_conf)) {
                        ERROR("Error destroying rootfs for %s", c->name);
                        goto out;
                }
+               INFO("Destroyed rootfs for %s", c->name);
        }
 
        mod_all_rdeps(c, false);
@@ -2199,6 +2180,8 @@ static bool container_destroy(struct lxc_container *c)
                ERROR("Error destroying container directory for %s", c->name);
                goto out;
        }
+       INFO("Destroyed directory for %s", c->name);
+
        bret = true;
 
 out:
@@ -2710,19 +2693,19 @@ static int clone_update_rootfs(struct clone_update_data *data)
 
        if (!lxc_list_empty(&conf->hooks[LXCHOOK_CLONE])) {
                /* Start of environment variable setup for hooks */
-               if (setenv("LXC_SRC_NAME", c0->name, 1)) {
+               if (c0->name && setenv("LXC_SRC_NAME", c0->name, 1)) {
                        SYSERROR("failed to set environment variable for source container name");
                }
-               if (setenv("LXC_NAME", c->name, 1)) {
+               if (c->name && setenv("LXC_NAME", c->name, 1)) {
                        SYSERROR("failed to set environment variable for container name");
                }
-               if (setenv("LXC_CONFIG_FILE", conf->rcfile, 1)) {
+               if (conf->rcfile && setenv("LXC_CONFIG_FILE", conf->rcfile, 1)) {
                        SYSERROR("failed to set environment variable for config path");
                }
-               if (setenv("LXC_ROOTFS_MOUNT", bdev->dest, 1)) {
+               if (bdev->dest && setenv("LXC_ROOTFS_MOUNT", bdev->dest, 1)) {
                        SYSERROR("failed to set environment variable for rootfs mount");
                }
-               if (setenv("LXC_ROOTFS_PATH", conf->rootfs.path, 1)) {
+               if (conf->rootfs.path && setenv("LXC_ROOTFS_PATH", conf->rootfs.path, 1)) {
                        SYSERROR("failed to set environment variable for rootfs mount");
                }
 
@@ -2784,7 +2767,7 @@ static int create_file_dirname(char *path, struct lxc_conf *conf)
        if (!p)
                return -1;
        *p = '\0';
-        ret = do_create_container_dir(path, conf);
+       ret = do_create_container_dir(path, conf);
        *p = '/';
        return ret;
 }
@@ -2873,12 +2856,15 @@ static struct lxc_container *do_lxcapi_clone(struct lxc_container *c, const char
        if (ret < 0)
                goto out;
 
-       clear_unexp_config_line(c2->lxc_conf, "lxc.utsname", false);
 
        // update utsname
-       if (!set_config_item_locked(c2, "lxc.utsname", newname)) {
-               ERROR("Error setting new hostname");
-               goto out;
+       if (!(flags & LXC_CLONE_KEEPNAME)) {
+               clear_unexp_config_line(c2->lxc_conf, "lxc.utsname", false);
+
+               if (!set_config_item_locked(c2, "lxc.utsname", newname)) {
+                       ERROR("Error setting new hostname");
+                       goto out;
+               }
        }
 
        // copy hooks
index d60e19a..d8b20ec 100644 (file)
@@ -831,17 +831,17 @@ struct lxc_snapshot {
  * \brief Specifications for how to create a new backing store
  */
 struct bdev_specs {
-    char *fstype; /*!< Filesystem type */
-    uint64_t fssize;  /*!< Filesystem size in bytes */
-    struct {
-        char *zfsroot; /*!< ZFS root path */
-    } zfs;
-    struct {
-        char *vg; /*!< LVM Volume Group name */
-        char *lv; /*!< LVM Logical Volume name */
-        char *thinpool; /*!< LVM thin pool to use, if any */
-    } lvm;
-    char *dir; /*!< Directory path */
+       char *fstype; /*!< Filesystem type */
+       uint64_t fssize;  /*!< Filesystem size in bytes */
+       struct {
+               char *zfsroot; /*!< ZFS root path */
+       } zfs;
+       struct {
+               char *vg; /*!< LVM Volume Group name */
+               char *lv; /*!< LVM Logical Volume name */
+               char *thinpool; /*!< LVM thin pool to use, if any */
+       } lvm;
+       char *dir; /*!< Directory path */
 };
 
 /*!
index dd044f0..cfa5cdf 100644 (file)
@@ -74,7 +74,7 @@ extern int nla_put_buffer(struct nlmsg *nlmsg, int attr,
 
 extern int nla_put_string(struct nlmsg *nlmsg, int attr, const char *string)
 {
-        return nla_put(nlmsg, attr, string, strlen(string) + 1);
+       return nla_put(nlmsg, attr, string, strlen(string) + 1);
 }
 
 extern int nla_put_u32(struct nlmsg *nlmsg, int attr, int value)
@@ -173,23 +173,23 @@ extern void nlmsg_free(struct nlmsg *nlmsg)
 extern int netlink_rcv(struct nl_handler *handler, struct nlmsg *answer)
 {
        int ret;
-        struct sockaddr_nl nladdr;
-        struct iovec iov = {
-                .iov_base = answer->nlmsghdr,
-                .iov_len = answer->nlmsghdr->nlmsg_len,
-        };
+       struct sockaddr_nl nladdr;
+       struct iovec iov = {
+               .iov_base = answer->nlmsghdr,
+               .iov_len = answer->nlmsghdr->nlmsg_len,
+       };
        
        struct msghdr msg = {
-                .msg_name = &nladdr,
-                .msg_namelen = sizeof(nladdr),
-                .msg_iov = &iov,
-                .msg_iovlen = 1,
-        };
+               .msg_name = &nladdr,
+               .msg_namelen = sizeof(nladdr),
+               .msg_iov = &iov,
+               .msg_iovlen = 1,
+       };
        
-        memset(&nladdr, 0, sizeof(nladdr));
-        nladdr.nl_family = AF_NETLINK;
-        nladdr.nl_pid = 0;
-        nladdr.nl_groups = 0;
+       memset(&nladdr, 0, sizeof(nladdr));
+       nladdr.nl_family = AF_NETLINK;
+       nladdr.nl_pid = 0;
+       nladdr.nl_groups = 0;
 
 again:
        ret = recvmsg(handler->fd, &msg, 0);
@@ -211,23 +211,23 @@ again:
 
 extern int netlink_send(struct nl_handler *handler, struct nlmsg *nlmsg)
 {
-        struct sockaddr_nl nladdr;
-        struct iovec iov = {
-                .iov_base = nlmsg->nlmsghdr,
-                .iov_len = nlmsg->nlmsghdr->nlmsg_len,
-        };
+       struct sockaddr_nl nladdr;
+       struct iovec iov = {
+               .iov_base = nlmsg->nlmsghdr,
+               .iov_len = nlmsg->nlmsghdr->nlmsg_len,
+       };
        struct msghdr msg = {
-                .msg_name = &nladdr,
-                .msg_namelen = sizeof(nladdr),
-                .msg_iov = &iov,
-                .msg_iovlen = 1,
-        };
+               .msg_name = &nladdr,
+               .msg_namelen = sizeof(nladdr),
+               .msg_iov = &iov,
+               .msg_iovlen = 1,
+       };
        int ret;
        
-        memset(&nladdr, 0, sizeof(nladdr));
-        nladdr.nl_family = AF_NETLINK;
-        nladdr.nl_pid = 0;
-        nladdr.nl_groups = 0;
+       memset(&nladdr, 0, sizeof(nladdr));
+       nladdr.nl_family = AF_NETLINK;
+       nladdr.nl_pid = 0;
+       nladdr.nl_groups = 0;
 
        ret = sendmsg(handler->fd, &msg, 0);
        if (ret < 0)
@@ -263,45 +263,45 @@ extern int netlink_transaction(struct nl_handler *handler,
 extern int netlink_open(struct nl_handler *handler, int protocol)
 {
        socklen_t socklen;
-        int sndbuf = 32768;
-        int rcvbuf = 32768;
+       int sndbuf = 32768;
+       int rcvbuf = 32768;
 
-        memset(handler, 0, sizeof(*handler));
+       memset(handler, 0, sizeof(*handler));
 
-        handler->fd = socket(AF_NETLINK, SOCK_RAW, protocol);
-        if (handler->fd < 0)
-                return -errno;
+       handler->fd = socket(AF_NETLINK, SOCK_RAW, protocol);
+       if (handler->fd < 0)
+               return -errno;
 
-        if (setsockopt(handler->fd, SOL_SOCKET, SO_SNDBUF,
+       if (setsockopt(handler->fd, SOL_SOCKET, SO_SNDBUF,
                       &sndbuf, sizeof(sndbuf)) < 0)
-                return -errno;
+               return -errno;
 
-        if (setsockopt(handler->fd, SOL_SOCKET, SO_RCVBUF,
+       if (setsockopt(handler->fd, SOL_SOCKET, SO_RCVBUF,
                       &rcvbuf,sizeof(rcvbuf)) < 0)
-                return -errno;
+               return -errno;
 
-        memset(&handler->local, 0, sizeof(handler->local));
-        handler->local.nl_family = AF_NETLINK;
-        handler->local.nl_groups = 0;
+       memset(&handler->local, 0, sizeof(handler->local));
+       handler->local.nl_family = AF_NETLINK;
+       handler->local.nl_groups = 0;
 
-        if (bind(handler->fd, (struct sockaddr*)&handler->local,
+       if (bind(handler->fd, (struct sockaddr*)&handler->local,
                 sizeof(handler->local)) < 0)
-                return -errno;
+               return -errno;
 
-        socklen = sizeof(handler->local);
-        if (getsockname(handler->fd, (struct sockaddr*)&handler->local,
+       socklen = sizeof(handler->local);
+       if (getsockname(handler->fd, (struct sockaddr*)&handler->local,
                        &socklen) < 0)
-                return -errno;
+               return -errno;
 
-        if (socklen != sizeof(handler->local))
-                return -EINVAL;
+       if (socklen != sizeof(handler->local))
+               return -EINVAL;
 
-        if (handler->local.nl_family != AF_NETLINK)
-                return -EINVAL;
+       if (handler->local.nl_family != AF_NETLINK)
+               return -EINVAL;
 
        handler->seq = time(NULL);
 
-        return 0;
+       return 0;
 }
 
 extern int netlink_close(struct nl_handler *handler)
index f6f2fd0..d347835 100644 (file)
  * @peer: the peer address
  */
 struct nl_handler {
-        int fd;
+       int fd;
        int seq;
-        struct sockaddr_nl local;
-        struct sockaddr_nl peer;
+       struct sockaddr_nl local;
+       struct sockaddr_nl peer;
 };
 
 /*
index 07dfbc6..0208646 100644 (file)
@@ -121,6 +121,7 @@ enum lxc_hostarch_t {
        lxc_seccomp_arch_i386,
        lxc_seccomp_arch_amd64,
        lxc_seccomp_arch_arm,
+       lxc_seccomp_arch_arm64,
        lxc_seccomp_arch_ppc64,
        lxc_seccomp_arch_ppc64le,
        lxc_seccomp_arch_ppc,
@@ -140,6 +141,8 @@ int get_hostarch(void)
                return lxc_seccomp_arch_amd64;
        else if (strncmp(uts.machine, "armv7", 5) == 0)
                return lxc_seccomp_arch_arm;
+       else if (strncmp(uts.machine, "aarch64", 7) == 0)
+               return lxc_seccomp_arch_arm64;
        else if (strncmp(uts.machine, "ppc64le", 7) == 0)
                return lxc_seccomp_arch_ppc64le;
        else if (strncmp(uts.machine, "ppc64", 5) == 0)
@@ -159,6 +162,9 @@ scmp_filter_ctx get_new_ctx(enum lxc_hostarch_t n_arch, uint32_t default_policy_
        case lxc_seccomp_arch_i386: arch = SCMP_ARCH_X86; break;
        case lxc_seccomp_arch_amd64: arch = SCMP_ARCH_X86_64; break;
        case lxc_seccomp_arch_arm: arch = SCMP_ARCH_ARM; break;
+#ifdef SCMP_ARCH_AARCH64
+       case lxc_seccomp_arch_arm64: arch = SCMP_ARCH_AARCH64; break;
+#endif
 #ifdef SCMP_ARCH_PPC64LE
        case lxc_seccomp_arch_ppc64le: arch = SCMP_ARCH_PPC64LE; break;
 #endif
@@ -347,6 +353,16 @@ static int parse_config_v2(FILE *f, char *line, struct lxc_conf *conf)
                                cur_rule_arch = lxc_seccomp_arch_arm;
                        }
 #endif
+#ifdef SCMP_ARCH_AARCH64
+                       else if (strcmp(line, "[arm64]") == 0 ||
+                                       strcmp(line, "[ARM64]") == 0) {
+                               if (native_arch != lxc_seccomp_arch_arm64) {
+                                       cur_rule_arch = lxc_seccomp_arch_unknown;
+                                       continue;
+                               }
+                               cur_rule_arch = lxc_seccomp_arch_arm64;
+                       }
+#endif
 #ifdef SCMP_ARCH_PPC64LE
                        else if (strcmp(line, "[ppc64le]") == 0 ||
                                        strcmp(line, "[PPC64LE]") == 0) {
index 2fc026e..4a1df4d 100644 (file)
@@ -406,16 +406,16 @@ struct lxc_handler *lxc_init(const char *name, struct lxc_conf *conf, const char
        }
 
        /* Start of environment variable setup for hooks */
-       if (setenv("LXC_NAME", name, 1)) {
+       if (name && setenv("LXC_NAME", name, 1)) {
                SYSERROR("failed to set environment variable for container name");
        }
-       if (setenv("LXC_CONFIG_FILE", conf->rcfile, 1)) {
+       if (conf->rcfile && setenv("LXC_CONFIG_FILE", conf->rcfile, 1)) {
                SYSERROR("failed to set environment variable for config path");
        }
-       if (setenv("LXC_ROOTFS_MOUNT", conf->rootfs.mount, 1)) {
+       if (conf->rootfs.mount && setenv("LXC_ROOTFS_MOUNT", conf->rootfs.mount, 1)) {
                SYSERROR("failed to set environment variable for rootfs mount");
        }
-       if (setenv("LXC_ROOTFS_PATH", conf->rootfs.path, 1)) {
+       if (conf->rootfs.path && setenv("LXC_ROOTFS_PATH", conf->rootfs.path, 1)) {
                SYSERROR("failed to set environment variable for rootfs mount");
        }
        if (conf->console.path && setenv("LXC_CONSOLE", conf->console.path, 1)) {
@@ -519,10 +519,10 @@ void lxc_abort(const char *name, struct lxc_handler *handler)
  */
 static int container_reboot_supported(void *arg)
 {
-        int *cmd = arg;
+       int *cmd = arg;
        int ret;
 
-        ret = reboot(*cmd);
+       ret = reboot(*cmd);
        if (ret == -1 && errno == EINVAL)
                return 1;
        return 0;
@@ -532,10 +532,10 @@ static int must_drop_cap_sys_boot(struct lxc_conf *conf)
 {
        FILE *f;
        int ret, cmd, v, flags;
-        long stack_size = 4096;
-        void *stack = alloca(stack_size);
-        int status;
-        pid_t pid;
+       long stack_size = 4096;
+       void *stack = alloca(stack_size);
+       int status;
+       pid_t pid;
 
        f = fopen("/proc/sys/kernel/ctrl-alt-del", "r");
        if (!f) {
@@ -635,7 +635,7 @@ static int do_start(void *data)
                return -1;
        }
 
-        /* This prctl must be before the synchro, so if the parent
+       /* This prctl must be before the synchro, so if the parent
         * dies before we set the parent death signal, we will detect
         * its death with the synchro right after, otherwise we have
         * a window where the parent can exit before we set the pdeath
@@ -1194,7 +1194,7 @@ int __lxc_start(const char *name, struct lxc_conf *conf,
         * lxc-execute which simply exited.  In any case, treat
         * it as a 'halt'
         */
-        if (WIFSIGNALED(status)) {
+       if (WIFSIGNALED(status)) {
                switch(WTERMSIG(status)) {
                case SIGINT: /* halt */
                        DEBUG("Container halting");
@@ -1210,9 +1210,14 @@ int __lxc_start(const char *name, struct lxc_conf *conf,
                        DEBUG("unknown exit status for init: %d", WTERMSIG(status));
                        break;
                }
-        }
+       }
 
+       DEBUG("Pushing physical nics back to host namespace");
        lxc_rename_phys_nics_on_shutdown(netnsfd, handler->conf);
+
+       DEBUG("Tearing down virtual network devices used by container");
+       lxc_delete_network(handler);
+
        if (netnsfd >= 0)
                close(netnsfd);
 
index 7ced314..01774c0 100644 (file)
 #define PR_SET_MM_ENV_END 11
 #endif
 
+#ifndef O_PATH
+#define O_PATH      010000000
+#endif
+
+#ifndef O_NOFOLLOW
+#define O_NOFOLLOW  00400000
+#endif
+
 lxc_log_define(lxc_utils, lxc);
 
 /*
@@ -197,6 +205,8 @@ extern int lxc_rmdir_onedev(char *path, const char *exclude)
        }
 
        if (lstat(path, &mystat) < 0) {
+               if (errno == ENOENT)
+                       return 0;
                ERROR("%s: failed to stat %s", __func__, path);
                return -1;
        }
@@ -1403,6 +1413,239 @@ int setproctitle(char *title)
 }
 
 /*
+ * @path:    a pathname where / replaced with '\0'.
+ * @offsetp: pointer to int showing which path segment was last seen.
+ *           Updated on return to reflect the next segment.
+ * @fulllen: full original path length.
+ * Returns a pointer to the next path segment, or NULL if done.
+ */
+static char *get_nextpath(char *path, int *offsetp, int fulllen)
+{
+       int offset = *offsetp;
+
+       if (offset >= fulllen)
+               return NULL;
+
+       while (path[offset] != '\0' && offset < fulllen)
+               offset++;
+       while (path[offset] == '\0' && offset < fulllen)
+               offset++;
+
+       *offsetp = offset;
+       return (offset < fulllen) ? &path[offset] : NULL;
+}
+
+/*
+ * Check that @subdir is a subdir of @dir.  @len is the length of
+ * @dir (to avoid having to recalculate it).
+ */
+static bool is_subdir(const char *subdir, const char *dir, size_t len)
+{
+       size_t subdirlen = strlen(subdir);
+
+       if (subdirlen < len)
+               return false;
+       if (strncmp(subdir, dir, len) != 0)
+               return false;
+       if (dir[len-1] == '/')
+               return true;
+       if (subdir[len] == '/' || subdirlen == len)
+               return true;
+       return false;
+}
+
+/*
+ * Check if the open fd is a symlink.  Return -ELOOP if it is.  Return
+ * -ENOENT if we couldn't fstat.  Return 0 if the fd is ok.
+ */
+static int check_symlink(int fd)
+{
+       struct stat sb;
+       int ret = fstat(fd, &sb);
+       if (ret < 0)
+               return -ENOENT;
+       if (S_ISLNK(sb.st_mode))
+               return -ELOOP;
+       return 0;
+}
+
+/*
+ * Open a file or directory, provided that it contains no symlinks.
+ *
+ * CAVEAT: This function must not be used for other purposes than container
+ * setup before executing the container's init
+ */
+static int open_if_safe(int dirfd, const char *nextpath)
+{
+       int newfd = openat(dirfd, nextpath, O_RDONLY | O_NOFOLLOW);
+       if (newfd >= 0) // was not a symlink, all good
+               return newfd;
+
+       if (errno == ELOOP)
+               return newfd;
+
+       if (errno == EPERM || errno == EACCES) {
+               /* we're not root (cause we got EPERM) so
+                  try opening with O_PATH */
+               newfd = openat(dirfd, nextpath, O_PATH | O_NOFOLLOW);
+               if (newfd >= 0) {
+                       /* O_PATH will return an fd for symlinks.  We know
+                        * nextpath wasn't a symlink at last openat, so if fd
+                        * is now a link, then something * fishy is going on
+                        */
+                       int ret = check_symlink(newfd);
+                       if (ret < 0) {
+                               close(newfd);
+                               newfd = ret;
+                       }
+               }
+       }
+
+       return newfd;
+}
+
+/*
+ * Open a path intending for mounting, ensuring that the final path
+ * is inside the container's rootfs.
+ *
+ * CAVEAT: This function must not be used for other purposes than container
+ * setup before executing the container's init
+ *
+ * @target: path to be opened
+ * @prefix_skip: a part of @target in which to ignore symbolic links.  This
+ * would be the container's rootfs.
+ *
+ * Return an open fd for the path, or <0 on error.
+ */
+static int open_without_symlink(const char *target, const char *prefix_skip)
+{
+       int curlen = 0, dirfd, fulllen, i;
+       char *dup = NULL;
+
+       fulllen = strlen(target);
+
+       /* make sure prefix-skip makes sense */
+       if (prefix_skip) {
+               curlen = strlen(prefix_skip);
+               if (!is_subdir(target, prefix_skip, curlen)) {
+                       ERROR("WHOA there - target '%s' didn't start with prefix '%s'",
+                               target, prefix_skip);
+                       return -EINVAL;
+               }
+               /*
+                * get_nextpath() expects the curlen argument to be
+                * on a  (turned into \0) / or before it, so decrement
+                * curlen to make sure that happens
+                */
+               if (curlen)
+                       curlen--;
+       } else {
+               prefix_skip = "/";
+               curlen = 0;
+       }
+
+       /* Make a copy of target which we can hack up, and tokenize it */
+       if ((dup = strdup(target)) == NULL) {
+               SYSERROR("Out of memory checking for symbolic link");
+               return -ENOMEM;
+       }
+       for (i = 0; i < fulllen; i++) {
+               if (dup[i] == '/')
+                       dup[i] = '\0';
+       }
+
+       dirfd = open(prefix_skip, O_RDONLY);
+       if (dirfd < 0)
+               goto out;
+       while (1) {
+               int newfd, saved_errno;
+               char *nextpath;
+
+               if ((nextpath = get_nextpath(dup, &curlen, fulllen)) == NULL)
+                       goto out;
+               newfd = open_if_safe(dirfd, nextpath);
+               saved_errno = errno;
+               close(dirfd);
+               dirfd = newfd;
+               if (newfd < 0) {
+                       errno = saved_errno;
+                       if (errno == ELOOP)
+                               SYSERROR("%s in %s was a symbolic link!", nextpath, target);
+                       else
+                               SYSERROR("Error examining %s in %s", nextpath, target);
+                       goto out;
+               }
+       }
+
+out:
+       free(dup);
+       return dirfd;
+}
+
+/*
+ * Safely mount a path into a container, ensuring that the mount target
+ * is under the container's @rootfs.  (If @rootfs is NULL, then the container
+ * uses the host's /)
+ *
+ * CAVEAT: This function must not be used for other purposes than container
+ * setup before executing the container's init
+ */
+int safe_mount(const char *src, const char *dest, const char *fstype,
+               unsigned long flags, const void *data, const char *rootfs)
+{
+       int srcfd = -1, destfd, ret, saved_errno;
+       char srcbuf[50], destbuf[50]; // only needs enough for /proc/self/fd/<fd>
+       const char *mntsrc = src;
+
+       if (!rootfs)
+               rootfs = "";
+
+       /* todo - allow symlinks for relative paths if 'allowsymlinks' option is passed */
+       if (flags & MS_BIND && src && src[0] != '/') {
+               INFO("this is a relative bind mount");
+               srcfd = open_without_symlink(src, NULL);
+               if (srcfd < 0)
+                       return srcfd;
+               ret = snprintf(srcbuf, 50, "/proc/self/fd/%d", srcfd);
+               if (ret < 0 || ret > 50) {
+                       close(srcfd);
+                       ERROR("Out of memory");
+                       return -EINVAL;
+               }
+               mntsrc = srcbuf;
+       }
+
+       destfd = open_without_symlink(dest, rootfs);
+       if (destfd < 0) {
+               if (srcfd != -1)
+                       close(srcfd);
+               return destfd;
+       }
+
+       ret = snprintf(destbuf, 50, "/proc/self/fd/%d", destfd);
+       if (ret < 0 || ret > 50) {
+               if (srcfd != -1)
+                       close(srcfd);
+               close(destfd);
+               ERROR("Out of memory");
+               return -EINVAL;
+       }
+
+       ret = mount(mntsrc, destbuf, fstype, flags, data);
+       saved_errno = errno;
+       if (srcfd != -1)
+               close(srcfd);
+       close(destfd);
+       if (ret < 0) {
+               errno = saved_errno;
+               SYSERROR("Failed to mount %s onto %s", src, dest);
+               return ret;
+       }
+
+       return 0;
+}
+
+/*
  * Mount a proc under @rootfs if proc self points to a pid other than
  * my own.  This is needed to have a known-good proc mount for setting
  * up LSMs both at container startup and attach.
@@ -1429,6 +1672,10 @@ int mount_proc_if_needed(const char *rootfs)
        mypid = (int)getpid();
        INFO("I am %d, /proc/self points to '%s'", mypid, link);
        ret = snprintf(path, MAXPATHLEN, "%s/proc", rootfs);
+       if (ret < 0 || ret >= MAXPATHLEN) {
+               SYSERROR("proc path name too long");
+               return -1;
+       }
        if (linklen < 0) /* /proc not mounted */
                goto domount;
        if (atoi(link) != mypid) {
@@ -1440,7 +1687,7 @@ int mount_proc_if_needed(const char *rootfs)
        return 0;
 
 domount:
-       if (mount("proc", path, "proc", 0, NULL))
+       if (safe_mount("proc", path, "proc", 0, NULL, rootfs) < 0)
                return -1;
        INFO("Mounted /proc in container for security transition");
        return 1;
index ee12dde..059026f 100644 (file)
@@ -279,6 +279,8 @@ bool switch_to_ns(pid_t pid, const char *ns);
 int is_dir(const char *path);
 char *get_template_path(const char *t);
 int setproctitle(char *title);
+int safe_mount(const char *src, const char *dest, const char *fstype,
+               unsigned long flags, const void *data, const char *rootfs);
 int mount_proc_if_needed(const char *rootfs);
 int null_stdfds(void);
 #endif /* __LXC_UTILS_H */
index cfe9e90..5632a44 100644 (file)
@@ -25,7 +25,7 @@
 
 #define LXC_VERSION_MAJOR 1
 #define LXC_VERSION_MINOR 1
-#define LXC_VERSION_MICRO 3
-#define LXC_VERSION "1.1.3"
+#define LXC_VERSION_MICRO 4
+#define LXC_VERSION "1.1.4"
 
 #endif
index 69b7fd1..28be133 100644 (file)
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 
 @SET_MAKE@
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -78,13 +88,12 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = src/python-lxc
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-       $(srcdir)/setup.py.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \
        $(top_srcdir)/config/tls.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/src/config.h
 CONFIG_CLEAN_FILES = setup.py
@@ -109,6 +118,7 @@ am__can_run_installinfo = \
     *) (install-info --version) >/dev/null 2>&1;; \
   esac
 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/setup.py.in
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
@@ -297,7 +307,6 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/python-lxc/Makefile'; \
        $(am__cd) $(top_srcdir) && \
          $(AUTOMAKE) --gnu src/python-lxc/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
          *config.status*) \
@@ -468,6 +477,8 @@ uninstall-am:
        maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
        pdf-am ps ps-am tags-am uninstall uninstall-am
 
+.PRECIOUS: Makefile
+
 
 @ENABLE_PYTHON_TRUE@all:
 @ENABLE_PYTHON_TRUE@   $(PYTHON) setup.py build
index a552d81..77d9690 100644 (file)
@@ -542,8 +542,7 @@ Container_attach_interface(Container *self, PyObject *args, PyObject *kwds)
         assert(dst_name != NULL);
     }
 
-    if (self->container->attach_interface(self->container, src_name,
-                                       dst_name)) {
+    if (self->container->attach_interface(self->container, src_name, dst_name)) {
         Py_XDECREF(py_src_name);
         Py_XDECREF(py_dst_name);
         Py_RETURN_TRUE;
index 461d869..8af9baa 100644 (file)
@@ -54,6 +54,7 @@ if DISTRO_UBUNTU
 bin_SCRIPTS += \
        lxc-test-apparmor-mount \
        lxc-test-checkpoint-restore \
+       lxc-test-symlink \
        lxc-test-ubuntu \
        lxc-test-unpriv \
        lxc-test-usernic
@@ -80,6 +81,7 @@ EXTRA_DIST = \
        lxc-test-checkpoint-restore \
        lxc-test-cloneconfig \
        lxc-test-createconfig \
+       lxc-test-symlink \
        lxc-test-ubuntu \
        lxc-test-unpriv \
        may_control.c \
index dd26e9f..95fbc14 100644 (file)
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -105,18 +115,18 @@ host_triplet = @host@
 @DISTRO_UBUNTU_TRUE@@ENABLE_TESTS_TRUE@am__append_3 = \
 @DISTRO_UBUNTU_TRUE@@ENABLE_TESTS_TRUE@        lxc-test-apparmor-mount \
 @DISTRO_UBUNTU_TRUE@@ENABLE_TESTS_TRUE@        lxc-test-checkpoint-restore \
+@DISTRO_UBUNTU_TRUE@@ENABLE_TESTS_TRUE@        lxc-test-symlink \
 @DISTRO_UBUNTU_TRUE@@ENABLE_TESTS_TRUE@        lxc-test-ubuntu \
 @DISTRO_UBUNTU_TRUE@@ENABLE_TESTS_TRUE@        lxc-test-unpriv \
 @DISTRO_UBUNTU_TRUE@@ENABLE_TESTS_TRUE@        lxc-test-usernic
 
 subdir = src/tests
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-       $(srcdir)/lxc-test-usernic.in $(top_srcdir)/config/depcomp
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \
        $(top_srcdir)/config/tls.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/src/config.h
 CONFIG_CLEAN_FILES = lxc-test-usernic
@@ -361,6 +371,8 @@ am__define_uniq_tagged_files = \
   done | $(am__uniquify_input)`
 ETAGS = etags
 CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/lxc-test-usernic.in \
+       $(top_srcdir)/config/depcomp
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
@@ -577,6 +589,7 @@ EXTRA_DIST = \
        lxc-test-checkpoint-restore \
        lxc-test-cloneconfig \
        lxc-test-createconfig \
+       lxc-test-symlink \
        lxc-test-ubuntu \
        lxc-test-unpriv \
        may_control.c \
@@ -601,7 +614,6 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/tests/Makefile'; \
        $(am__cd) $(top_srcdir) && \
          $(AUTOMAKE) --gnu src/tests/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
          *config.status*) \
@@ -1031,6 +1043,8 @@ uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS
        mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \
        uninstall-am uninstall-binPROGRAMS uninstall-binSCRIPTS
 
+.PRECIOUS: Makefile
+
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
index f32411a..e6899ad 100644 (file)
@@ -85,8 +85,8 @@ static void do_function(void *arguments)
     }
 
     if (debug) {
-       c->set_config_item(c, "lxc.loglevel", "DEBUG");
-       c->set_config_item(c, "lxc.logfile", name);
+        c->set_config_item(c, "lxc.loglevel", "DEBUG");
+        c->set_config_item(c, "lxc.logfile", name);
     }
 
     if (strcmp(args->mode, "create") == 0) {
@@ -132,7 +132,7 @@ static void do_function(void *arguments)
 out:
     lxc_container_put(c);
     if (debug)
-       lxc_log_close();
+        lxc_log_close();
 }
 
 static void *concurrent(void *arguments)
@@ -171,9 +171,9 @@ int main(int argc, char *argv[]) {
         case 'q':
             quiet = 1;
             break;
-       case 'D':
-           debug = 1;
-           break;
+        case 'D':
+            debug = 1;
+            break;
         case 'm': {
             char *mode_tok, *tok, *saveptr = NULL;
 
@@ -187,10 +187,10 @@ int main(int argc, char *argv[]) {
                     exit(EXIT_FAILURE);
                 }
                 modes[i] = tok;
-           }
+            }
             modes[i] = NULL;
             break;
-       }
+        }
         default: /* '?' */
             usage();
             exit(EXIT_FAILURE);
diff --git a/src/tests/lxc-test-symlink b/src/tests/lxc-test-symlink
new file mode 100755 (executable)
index 0000000..7bf6c1c
--- /dev/null
@@ -0,0 +1,89 @@
+#!/bin/bash
+
+set -ex
+
+# lxc: linux Container library
+
+# Authors:
+# Serge Hallyn <serge.hallyn@ubuntu.com>
+#
+# This is a regression test for symbolic links
+
+dirname=`mktemp -d`
+fname=`mktemp`
+fname2=`mktemp`
+
+lxcpath=/var/lib/lxcsym1
+
+cleanup() {
+       lxc-destroy -P $lxcpath -f -n symtest1 || true
+       rm -f $lxcpath
+       rmdir $dirname || true
+       rm -f $fname || true
+       rm -f $fname2 || true
+}
+
+trap cleanup EXIT SIGHUP SIGINT SIGTERM
+
+testrun() {
+       expected=$1
+       run=$2
+       pass="pass"
+       lxc-start -P $lxcpath -n symtest1 -l trace -o $lxcpath/log || pass="fail"
+       [ $pass = "pass" ] && lxc-wait -P $lxcpath -n symtest1 -t 10 -s RUNNING || pass="fail"
+       if [ "$pass" != "$expected" ]; then
+               echo "Test $run: expected $expected but container did not.  Start log:"
+               cat $lxcpath/log
+               echo "FAIL: Test $run: expected $expected but container did not."
+               false
+       fi
+       lxc-stop -P $lxcpath -n symtest1 -k || true
+}
+
+# make lxcpath a symlink - this should NOT cause failure
+ln -s /var/lib/lxc $lxcpath
+
+lxc-destroy -P $lxcpath -f -n symtest1 || true
+lxc-create -P $lxcpath -t busybox -n symtest1
+
+cat >> /var/lib/lxc/symtest1/config << EOF
+lxc.mount.entry = $dirname opt/xxx/dir none bind,create=dir
+lxc.mount.entry = $fname opt/xxx/file none bind,create=file
+lxc.mount.entry = $fname2 opt/xxx/file2 none bind
+lxc.mount.entry = $dirname /var/lib/lxc/symtest1/rootfs/opt/xxx/dir2 none bind,create=dir
+EOF
+
+# Regular - should succeed
+mkdir -p /var/lib/lxc/symtest1/rootfs/opt/xxx
+touch /var/lib/lxc/symtest1/rootfs/opt/xxx/file2
+testrun pass 1
+
+# symlink - should fail
+rm -rf /var/lib/lxc/symtest1/rootfs/opt/xxx
+mkdir -p /var/lib/lxc/symtest1/rootfs/opt/xxx2
+ln -s /var/lib/lxc/symtest1/rootfs/opt/xxx2 /var/lib/lxc/symtest1/rootfs/opt/xxx
+touch /var/lib/lxc/symtest1/rootfs/opt/xxx/file2
+testrun fail 2
+
+# final final symlink - should fail
+rm -rf $lxcpath/symtest1/rootfs/opt/xxx
+mkdir -p $lxcpath/symtest1/rootfs/opt/xxx
+mkdir -p $lxcpath/symtest1/rootfs/opt/xxx/dir
+touch $lxcpath/symtest1/rootfs/opt/xxx/file
+touch $lxcpath/symtest1/rootfs/opt/xxx/file2src
+ln -s $lxcpath/symtest1/rootfs/opt/xxx/file2src $lxcpath/symtest1/rootfs/opt/xxx/file2
+testrun fail 3
+
+# Ideally we'd also try a loop device, but that won't work in nested containers
+# anyway - TODO
+
+# what about /proc itself
+
+rm -rf $lxcpath/symtest1/rootfs/opt/xxx
+mkdir -p $lxcpath/symtest1/rootfs/opt/xxx
+touch $lxcpath/symtest1/rootfs/opt/xxx/file2
+mv $lxcpath/symtest1/rootfs/proc $lxcpath/symtest1/rootfs/proc1
+ln -s $lxcpath/symtest1/rootfs/proc1 $lxcpath/symtest1/rootfs/proc
+testrun fail 4
+
+echo "all tests passed"
index 5583332..754984e 100644 (file)
@@ -35,43 +35,43 @@ int clone(int (*fn)(void *), void *child_stack, int flags, void *arg, ...);
 
 static int do_reboot(void *arg)
 {
-        int *cmd = arg;
+       int *cmd = arg;
 
-        if (reboot(*cmd))
-                printf("failed to reboot(%d): %m\n", *cmd);
+       if (reboot(*cmd))
+               printf("failed to reboot(%d): %m\n", *cmd);
        return 0;
 }
 
 static int test_reboot(int cmd, int sig)
 {
-        long stack_size = 4096;
-        void *stack = alloca(stack_size) + stack_size;
-        int status;
-        pid_t ret;
-
-        ret = clone(do_reboot, stack, CLONE_NEWPID | SIGCHLD, &cmd);
-        if (ret < 0) {
-                printf("failed to clone: %m\n");
-                return -1;
-        }
-
-        if (wait(&status) < 0) {
-                printf("unexpected wait error: %m\n");
-                return -1;
-        }
-
-        if (!WIFSIGNALED(status)) {
+       long stack_size = 4096;
+       void *stack = alloca(stack_size) + stack_size;
+       int status;
+       pid_t ret;
+
+       ret = clone(do_reboot, stack, CLONE_NEWPID | SIGCHLD, &cmd);
+       if (ret < 0) {
+               printf("failed to clone: %m\n");
+               return -1;
+       }
+
+       if (wait(&status) < 0) {
+               printf("unexpected wait error: %m\n");
+               return -1;
+       }
+
+       if (!WIFSIGNALED(status)) {
                if (sig != -1)
                        printf("child process exited but was not signaled\n");
-                return -1;
-        }
+               return -1;
+       }
 
-        if (WTERMSIG(status) != sig) {
-                printf("signal termination is not the one expected\n");
-                return -1;
-        }
+       if (WTERMSIG(status) != sig) {
+               printf("signal termination is not the one expected\n");
+               return -1;
+       }
 
-        return 0;
+       return 0;
 }
 
 static int have_reboot_patch(void)
@@ -95,46 +95,46 @@ static int have_reboot_patch(void)
 
 int main(int argc, char *argv[])
 {
-        int status;
+       int status;
 
        if (getuid() != 0) {
-                printf("Must run as root.\n");
-                return 1;
+               printf("Must run as root.\n");
+               return 1;
        }
 
        status = have_reboot_patch();
        if (status != 0) {
-                printf("Your kernel does not have the container reboot patch\n");
-                return 1;
+               printf("Your kernel does not have the container reboot patch\n");
+               return 1;
        }
 
-        status = test_reboot(LINUX_REBOOT_CMD_CAD_ON, -1);
-        if (status >= 0) {
-                printf("reboot(LINUX_REBOOT_CMD_CAD_ON) should have failed\n");
-                return 1;
-        }
-        printf("reboot(LINUX_REBOOT_CMD_CAD_ON) has failed as expected\n");
-
-        status = test_reboot(LINUX_REBOOT_CMD_RESTART, SIGHUP);
-        if (status < 0)
-                return 1;
-        printf("reboot(LINUX_REBOOT_CMD_RESTART) succeed\n");
-
-        status = test_reboot(LINUX_REBOOT_CMD_RESTART2, SIGHUP);
-        if (status < 0)
-                return 1;
-        printf("reboot(LINUX_REBOOT_CMD_RESTART2) succeed\n");
-
-        status = test_reboot(LINUX_REBOOT_CMD_HALT, SIGINT);
-        if (status < 0)
-                return 1;
-        printf("reboot(LINUX_REBOOT_CMD_HALT) succeed\n");
-
-        status = test_reboot(LINUX_REBOOT_CMD_POWER_OFF, SIGINT);
-        if (status < 0)
-                return 1;
-        printf("reboot(LINUX_REBOOT_CMD_POWERR_OFF) succeed\n");
-
-        printf("All tests passed\n");
-        return 0;
+       status = test_reboot(LINUX_REBOOT_CMD_CAD_ON, -1);
+       if (status >= 0) {
+               printf("reboot(LINUX_REBOOT_CMD_CAD_ON) should have failed\n");
+               return 1;
+       }
+       printf("reboot(LINUX_REBOOT_CMD_CAD_ON) has failed as expected\n");
+
+       status = test_reboot(LINUX_REBOOT_CMD_RESTART, SIGHUP);
+       if (status < 0)
+               return 1;
+       printf("reboot(LINUX_REBOOT_CMD_RESTART) succeed\n");
+
+       status = test_reboot(LINUX_REBOOT_CMD_RESTART2, SIGHUP);
+       if (status < 0)
+               return 1;
+       printf("reboot(LINUX_REBOOT_CMD_RESTART2) succeed\n");
+
+       status = test_reboot(LINUX_REBOOT_CMD_HALT, SIGINT);
+       if (status < 0)
+               return 1;
+       printf("reboot(LINUX_REBOOT_CMD_HALT) succeed\n");
+
+       status = test_reboot(LINUX_REBOOT_CMD_POWER_OFF, SIGINT);
+       if (status < 0)
+               return 1;
+       printf("reboot(LINUX_REBOOT_CMD_POWERR_OFF) succeed\n");
+
+       printf("All tests passed\n");
+       return 0;
 }
index 4bb5918..368902b 100644 (file)
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 @SET_MAKE@
 
 VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
 am__make_running_with_option = \
   case $${target_option-} in \
       ?) ;; \
@@ -79,21 +89,12 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 subdir = templates
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
-       $(srcdir)/lxc-alpine.in $(srcdir)/lxc-altlinux.in \
-       $(srcdir)/lxc-archlinux.in $(srcdir)/lxc-busybox.in \
-       $(srcdir)/lxc-centos.in $(srcdir)/lxc-cirros.in \
-       $(srcdir)/lxc-debian.in $(srcdir)/lxc-download.in \
-       $(srcdir)/lxc-fedora.in $(srcdir)/lxc-gentoo.in \
-       $(srcdir)/lxc-openmandriva.in $(srcdir)/lxc-opensuse.in \
-       $(srcdir)/lxc-oracle.in $(srcdir)/lxc-plamo.in \
-       $(srcdir)/lxc-sshd.in $(srcdir)/lxc-ubuntu.in \
-       $(srcdir)/lxc-ubuntu-cloud.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/config/acinclude.m4 \
        $(top_srcdir)/config/tls.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/src/config.h
 CONFIG_CLEAN_FILES = lxc-alpine lxc-altlinux lxc-archlinux lxc-busybox \
@@ -150,6 +151,15 @@ am__can_run_installinfo = \
     *) (install-info --version) >/dev/null 2>&1;; \
   esac
 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/lxc-alpine.in \
+       $(srcdir)/lxc-altlinux.in $(srcdir)/lxc-archlinux.in \
+       $(srcdir)/lxc-busybox.in $(srcdir)/lxc-centos.in \
+       $(srcdir)/lxc-cirros.in $(srcdir)/lxc-debian.in \
+       $(srcdir)/lxc-download.in $(srcdir)/lxc-fedora.in \
+       $(srcdir)/lxc-gentoo.in $(srcdir)/lxc-openmandriva.in \
+       $(srcdir)/lxc-opensuse.in $(srcdir)/lxc-oracle.in \
+       $(srcdir)/lxc-plamo.in $(srcdir)/lxc-sshd.in \
+       $(srcdir)/lxc-ubuntu-cloud.in $(srcdir)/lxc-ubuntu.in
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
@@ -349,7 +359,6 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu templates/Makefile'; \
        $(am__cd) $(top_srcdir) && \
          $(AUTOMAKE) --gnu templates/Makefile
-.PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
          *config.status*) \
@@ -590,6 +599,8 @@ uninstall-am: uninstall-templatesSCRIPTS
        mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags-am \
        uninstall uninstall-am uninstall-templatesSCRIPTS
 
+.PRECIOUS: Makefile
+
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
index 6dcc51b..29c7b7c 100644 (file)
@@ -109,7 +109,7 @@ install_alpine() {
     else
         cp /etc/apk/repositories "$rootfs"/etc/apk/repositories || return 1
         if [ -n "$release" ]; then
-            sed -i -e "s:/[^/]\+/\([^/]\+\)$:/$release/\1:" \
+            sed -E -i "s:/[^/]+/([^/]+)$:/$release/\\1:" \
                 "$rootfs"/etc/apk/repositories
         fi
     fi
@@ -277,12 +277,6 @@ usage_err() {
     exit 1
 }
 
-optarg_check() {
-    if [ -z "$2" ]; then
-        usage_err "option '$1' requires an argument"
-    fi
-}
-
 default_path=@LXCPATH@
 release=
 arch=$(uname -m)
@@ -293,58 +287,39 @@ if [ $(id -u) -ne 0 ]; then
    exit 1
 fi
 
+options=$(getopt -o hn:p:r:R:a: -l help,name:,rootfs:,path:,repository:,release:,arch: -- "$@")
+[ $? -eq 0 ] || usage_err
+eval set -- "$options"
+
 while [ $# -gt 0 ]; do
-    opt="$1"
-    shift
-    case "$opt" in
+    case "$1" in
     -h|--help)
         usage
         exit 0
         ;;
     -n|--name)
-        optarg_check $opt "$1"
-        name=$1
-        shift
+        name=$2
         ;;
     --rootfs)
-        optarg_check $opt "$1"
-        rootfs=$1
-        shift
+        rootfs=$2
         ;;
     -p|--path)
-        optarg_check $opt "$1"
-        path=$1
-        shift
+        path=$2
         ;;
     -r|--repository)
-        optarg_check $opt "$1"
-        repository=$1
-        shift
+        repository=$2
        ;;
     -R|--release)
-        optarg_check $opt "$1"
-        release=$1
-        shift
+        release=$2
         ;;
     -a|--arch)
-        optarg_check $opt "$1"
-        arch=$1
-        shift
+        arch=$2
         ;;
     --)
+       shift
         break;;
-    --*=*)
-        # split --myopt=foo=bar into --myopt foo=bar
-        set -- ${opt%=*} ${opt#*=} "$@"
-        ;;
-    -?)
-        usage_err "unknown option '$opt'"
-        ;;
-    -*)
-        # split opts -abc into -a -b -c
-        set -- $(echo "${opt#-}" | sed 's/\(.\)/ -\1/g') "$@"
-        ;;
     esac
+    shift 2
 done
 
 
index b57e526..54393ca 100644 (file)
@@ -157,13 +157,19 @@ write_sourceslist()
         prefix="deb [arch=${arch}]"
     fi
 
+    if [ "$mainonly" = 1 ]; then
+      non_main=''
+    else
+      non_main=' contrib non-free'
+    fi
+
     cat >> "${rootfs}/etc/apt/sources.list" << EOF
-${prefix} $MIRROR          ${release}         main contrib non-free
+${prefix} $MIRROR          ${release}         main${non_main}
 EOF
 
     if [ "$release" != "unstable" -a "$release" != "sid" ]; then
       cat >> "${rootfs}/etc/apt/sources.list" << EOF
-${prefix} $SECURITY_MIRROR ${release}/updates main contrib non-free
+${prefix} $SECURITY_MIRROR ${release}/updates main${non_main}
 EOF
     fi
 }
@@ -377,8 +383,10 @@ EOF
 
     # If the container isn't running a native architecture, setup multiarch
     if [ "${arch}" != "${hostarch}" ]; then
-        mkdir -p ${rootfs}/etc/dpkg/dpkg.cfg.d
-        echo "foreign-architecture ${hostarch}" > ${rootfs}/etc/dpkg/dpkg.cfg.d/lxc-multiarch
+        # Test if dpkg supports multiarch
+        if ! chroot $rootfs dpkg --print-foreign-architecture 2>&1; then
+            chroot $rootfs dpkg --add-architecture ${hostarch}
+        fi
     fi
 
     # Write a new sources.list containing both native and multiarch entries
@@ -469,6 +477,7 @@ Options :
   --packages=PACKAGE_NAME1,PACKAGE_NAME2,...
                          List of additional packages to install. Comma separated, without space.
   -c, --clean            only clean up the cache and terminate
+  --main-only            include only Debian's main repository (i.e. no contrib and non-free).
 
 Environment variables:
 
@@ -481,24 +490,20 @@ EOF
     return 0
 }
 
-options=$(getopt -o hp:n:a:r:c -l arch:,clean,help,mirror:,name:,packages:,path:,release:,rootfs:,security-mirror: -- "$@")
+options=$(getopt -o hp:n:a:r:c -l arch:,clean,help,main-only,mirror:,name:,packages:,path:,release:,rootfs:,security-mirror: -- "$@")
 if [ $? -ne 0 ]; then
         usage $(basename $0)
         exit 1
 fi
 eval set -- "$options"
 
-if which dpkg > /dev/null 2>&1 ; then
-    arch=$(dpkg --print-architecture)
-else
-    arch=$(uname -m)
-    if [ "$arch" = "i686" ]; then
-        arch="i386"
-    elif [ "$arch" = "x86_64" ]; then
-        arch="amd64"
-    elif [ "$arch" = "armv7l" ]; then
-        arch="armhf"
-    fi
+arch=$(uname -m)
+if [ "$arch" = "i686" ]; then
+    arch="i386"
+elif [ "$arch" = "x86_64" ]; then
+    arch="amd64"
+elif [ "$arch" = "armv7l" ]; then
+    arch="armhf"
 fi
 hostarch=$arch
 
@@ -510,6 +515,7 @@ do
 
         -a|--arch)            arch=$2; shift 2;;
         -c|--clean)           clean=1; shift 1;;
+           --main-only)       mainonly=1; shift 1;;
            --mirror)          MIRROR=$2; shift 2;;
         -n|--name)            name=$2; shift 2;;
            --packages)        packages=$2; shift 2;;
@@ -568,7 +574,7 @@ fi
 
 current_release=`wget ${MIRROR}/dists/stable/Release -O - 2> /dev/null | head |awk '/^Codename: (.*)$/ { print $2; }'`
 release=${release:-${current_release}}
-valid_releases=('squeeze' 'wheezy' 'jessie' 'sid')
+valid_releases=('squeeze' 'wheezy' 'jessie' 'stretch' 'sid')
 if [[ ! "${valid_releases[*]}" =~ (^|[^[:alpha:]])$release([^[:alpha:]]|$) ]]; then
     echo "Invalid release ${release}, valid ones are: ${valid_releases[*]}"
     exit 1