]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
lxc-start-ephemeral: Allow unprivileged run
authorStéphane Graber <stgraber@ubuntu.com>
Wed, 12 Feb 2014 16:58:15 +0000 (11:58 -0500)
committerStéphane Graber <stgraber@ubuntu.com>
Wed, 12 Feb 2014 20:06:24 +0000 (15:06 -0500)
This allows running lxc-start-ephemeral using overlayfs. aufs remains
blocked as it hasn't been looked at and patched to work in the kernel at
this point (not sure if it ever wil).

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
src/lxc/lxc-start-ephemeral.in

index 62a6194e884e7e4fd595c523631d5a70ca43cbe7..33c713ad66d647c2956171b70e74464690776fe5 100644 (file)
@@ -105,8 +105,9 @@ args = parser.parse_args()
 
 # Basic requirements check
 ## We only support privileged containers for now
-if os.geteuid() != 0:
-    parser.error(_("Unprivileged containers aren't supported at this time."))
+if os.geteuid() != 0 and args.union_type != "overlayfs":
+    parser.error(_("Unprivileged containers may only use "
+                   "overlayfs at this time."))
 
 ## Check that -d and CMD aren't used at the same time
 if args.command and args.daemon: