]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
lxc-start-ephemeral: require root
authorStéphane Graber <stgraber@ubuntu.com>
Thu, 23 Jan 2014 01:33:21 +0000 (20:33 -0500)
committerStéphane Graber <stgraber@ubuntu.com>
Thu, 23 Jan 2014 03:15:20 +0000 (22:15 -0500)
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 609cef0bcb789aa07ea42f7e7ba4146ba6e89d05..d40ce4eaafe7b4bf03205e2e9cc04c844797f100 100644 (file)
@@ -104,6 +104,10 @@ parser.add_argument("command", metavar='CMD', type=str, nargs="*",
 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."))
+
 ## Check that -d and CMD aren't used at the same time
 if args.command and args.daemon:
     parser.error(_("You can't use -d and a command at the same time."))