lmi-commits
[Top][All Lists]
Advanced

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

[lmi-commits] [lmi] master 79d1e73 3/3: Work around an apparent 'schroot


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 79d1e73 3/3: Work around an apparent 'schroot' anomaly
Date: Thu, 10 Oct 2019 19:40:10 -0400 (EDT)

branch: master
commit 79d1e7377f823b9c1dfeabff12bfda3d011c690c
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Work around an apparent 'schroot' anomaly
    
    If the values of both 'users' and 'groups' are double-quoted in
      /etc/schroot/chroot.d/*.conf
    e.g.
      users="greg"
      groups="greg"
    then the specified normal user cannot enter the chroot:
    
    $schroot --chroot=centos7lmi --user=greg
    E: Access not authorised
    I: You do not have permission to access the schroot service.
    I: This failure will be reported.
    
    Prefixing that failing command with 'sudo' makes it work as expected.
    
    This might look like a problem with
     (1) the setuid bit on /usr/bin/schroot, or
     (2) permissions on the chroot's root directory (0700, e.g.),
    but the same user can enter other chroots, which rules out (1), and
    (2) is ruled out by inspection:
      $ls -ld /srv/chroot/centos7lmi
      drwxr-xr-x 17 root root 12288 Oct  9 15:56 /srv/chroot/centos7lmi
---
 install_centos.sh | 8 ++++----
 install_redhat.sh | 4 ++--
 lmi_setup_11.sh   | 4 ++--
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/install_centos.sh b/install_centos.sh
index 48233fd..3d5dacb 100755
--- a/install_centos.sh
+++ b/install_centos.sh
@@ -37,8 +37,8 @@ cat >/etc/schroot/chroot.d/centos7lmi.conf <<EOF
 [centos7lmi]
 description=centos-7.7
 directory=/srv/chroot/centos7lmi
-users="${NORMAL_USER}"
-groups="${NORMAL_GROUP}"
+users=${NORMAL_USER}
+groups=${NORMAL_GROUP}
 root-groups=root
 type=plain
 EOF
@@ -131,8 +131,8 @@ cat 
>/srv/chroot/centos7lmi/etc/schroot/chroot.d/"${CHRTNAME}".conf <<EOF
 aliases=lmi
 description=debian ${CODENAME} cross build ${CHRTVER}
 directory=/srv/chroot/${CHRTNAME}
-users="${NORMAL_USER}"
-groups="${NORMAL_GROUP}"
+users=${NORMAL_USER}
+groups=${NORMAL_GROUP}
 root-groups=root
 type=plain
 EOF
diff --git a/install_redhat.sh b/install_redhat.sh
index a720a3a..d0d183e 100755
--- a/install_redhat.sh
+++ b/install_redhat.sh
@@ -72,8 +72,8 @@ cat >/etc/schroot/chroot.d/"${CHRTNAME}".conf <<EOF
 aliases=lmi
 description=debian ${CODENAME} cross build ${CHRTVER}
 directory=/srv/chroot/${CHRTNAME}
-users="${NORMAL_USER}"
-groups="${NORMAL_GROUP}"
+users=${NORMAL_USER}
+groups=${NORMAL_GROUP}
 root-groups=root
 type=plain
 EOF
diff --git a/lmi_setup_11.sh b/lmi_setup_11.sh
index 95178f2..f4dcc0e 100755
--- a/lmi_setup_11.sh
+++ b/lmi_setup_11.sh
@@ -41,8 +41,8 @@ cat >/etc/schroot/chroot.d/"${CHRTNAME}".conf <<EOF
 aliases=lmi
 description=debian ${CODENAME} cross build ${CHRTVER}
 directory=/srv/chroot/${CHRTNAME}
-users="${NORMAL_USER}"
-groups="${NORMAL_GROUP}"
+users=${NORMAL_USER}
+groups=${NORMAL_GROUP}
 root-groups=root
 type=plain
 EOF



reply via email to

[Prev in Thread] Current Thread [Next in Thread]