[lxc-devel] [PATCH] lxc-start-ephemeral: require root

Serge Hallyn serge.hallyn at ubuntu.com
Thu Jan 23 03:13:02 UTC 2014


Quoting Stéphane Graber (stgraber at ubuntu.com):
> Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>

Acked-by: Serge E. Hallyn <serge.hallyn at ubuntu.com>

Though this patch just reminds me that lxc-start-ephemeral really should
be re-written using the python api :)

> ---
>  src/lxc/lxc-start-ephemeral.in | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/src/lxc/lxc-start-ephemeral.in b/src/lxc/lxc-start-ephemeral.in
> index 609cef0..d40ce4e 100644
> --- a/src/lxc/lxc-start-ephemeral.in
> +++ b/src/lxc/lxc-start-ephemeral.in
> @@ -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."))
> -- 
> 1.8.5.3
> 
> _______________________________________________
> lxc-devel mailing list
> lxc-devel at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-devel


More information about the lxc-devel mailing list