All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Lezcano <dlezcano-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org>
To: "Serge E. Hallyn" <serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
Cc: Linux Containers <containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org>
Subject: Re: liblxc: lxc-debian
Date: Tue, 09 Dec 2008 17:43:34 +0100	[thread overview]
Message-ID: <493EA036.40501@fr.ibm.com> (raw)
In-Reply-To: <20081209163209.GE9487-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>

Serge E. Hallyn wrote:
> Quoting Daniel Lezcano (dlezcano-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org):
>> Serge E. Hallyn wrote:
>>> Quoting Matt Helsley (matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org):
>>>>         #
>>>>         # Write some reasonable default device whitelist rules
>>>>         #
>>>>         cat - >> $CONFFILE <<-"EOF"
>>>>         lxc.cgroup.devices.deny = a
>>>>         # /dev/null and zero
>>>>         lxc.cgroup.devices.allow = c 1:3 rwm
>>>>         lxc.cgroup.devices.allow = c 1:5 rwm
>>>>         # consoles
>>>>         lxc.cgroup.devices.allow = c 5:1 rwm
>>>>         lxc.cgroup.devices.allow = c 5:0 rwm
>>>>         lxc.cgroup.devices.allow = c 4:0 rwm
>>>>         lxc.cgroup.devices.allow = c 4:1 rwm
>>>>         # /dev/{,u}random
>>>>         lxc.cgroup.devices.allow = c 1:9 rwm
>>>>         lxc.cgroup.devices.allow = c 1:8 rwm
>>>>         # /dev/pts/* - pts namespaces are "coming soon"
>>>>         lxc.cgroup.devices.allow = c 136:* rwm
>>>>         # rtc         lxc.cgroup.devices.allow = c 254:0 rwm
>>>>         EOF
>>>>
>>>> The quotes around EOF prevent bash from doing any substitution on the
>>>> file contents.
>> I added these devices to the debian configuration file and fixed the  
>> cgroup list order, "lxc.cgroup.devices.deny = a" was the last entry :/
> 
> Weird.  It's the first now I hope :)

I meant it was a bug of liblxc to store the cgroup in the wrong order :)

>> By default the debian has no root password, so the ssh connection will  
>> always fail until a password is set for root. I will look on how to  
>> change the root password to 'root' after debootstraping ...
>>
>> I added "lxc.cgroup.devices.allow = c 5:2 rwm"
>> in order to use /dev/ptmx for the tty's ssh connection.
>>
>> The container is no longer able to create /dev/initctl, so the poweroff  
>> command will fail. Serge do you know what is the syntax for the  
>> devices.allow for initctl ?
> 
> initctl isn't a device, it's a fifo.  At least on my laptop.

Yes, right.
"devices.deny = a" prohibits the creation of this fifo in /dev.

After doing "lxc-cgroup -n debian devices.allow a",
mknod -m 600 /dev/initctl p ,
succeed in the debian container.

(rm /dev/initctl)

But after doing "lxc-cgroup -n debian devices.deny a",
mknod -m 600 /dev/initctl p
mknod: `/dev/initctl': Operation not permitted

Is is a way to specify this fifo for devices.allow ?

      parent reply	other threads:[~2008-12-09 16:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-04  2:39 liblxc: lxc-debian Serge E. Hallyn
     [not found] ` <20081204023936.GA31830-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2008-12-05 22:48   ` Daniel Lezcano
     [not found]     ` <4939AFA7.1060903-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org>
2008-12-06  0:11       ` Serge E. Hallyn
     [not found]         ` <20081206001110.GA32712-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2008-12-08 21:44           ` Matt Helsley
2008-12-08 23:43             ` Serge E. Hallyn
     [not found]               ` <20081208234348.GA7935-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2008-12-09 10:36                 ` Daniel Lezcano
     [not found]                   ` <493E4A48.5020200-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org>
2008-12-09 16:32                     ` Serge E. Hallyn
     [not found]                       ` <20081209163209.GE9487-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2008-12-09 16:43                         ` Daniel Lezcano [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=493EA036.40501@fr.ibm.com \
    --to=dlezcano-nmtc/0zbporqt0dzr+alfa@public.gmane.org \
    --cc=containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org \
    --cc=serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.