[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH] Fix group/mode for /dev/pts inside LXC container



On 02/22/2011 07:07 AM, Daniel P. Berrange wrote:
> Normal practice for /dev/pts is to have it mode=620,gid=5
> but LXC was leaving mode=000,gid=0 preventing unprivilegd
> users in the guest use of PTYs
> 
> * src/lxc/lxc_controller.c: Fix /dev/pts setup
> ---
>  src/lxc/lxc_controller.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c
> index b742a33..d047f60 100644
> --- a/src/lxc/lxc_controller.c
> +++ b/src/lxc/lxc_controller.c
> @@ -629,7 +629,7 @@ lxcControllerRun(virDomainDefPtr def,
>          }
>  
>          VIR_DEBUG("Mouting 'devpts' on %s", devpts);
> -        if (mount("devpts", devpts, "devpts", 0, "newinstance,ptmxmode=0666") < 0) {
> +        if (mount("devpts", devpts, "devpts", 0, "newinstance,ptmxmode=0666,mode=0620,gid=5") < 0) {

ACK, but can you wrap that line to fit in 80 columns?

-- 
Eric Blake   eblake redhat com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]