mk-sbuild: Only grant access to the admin group when it exists

(Closes: #642824)
This commit is contained in:
Stefano Rivera 2011-09-25 16:09:28 +02:00
parent 7099f9d98d
commit 05b3f16f58
2 changed files with 17 additions and 9 deletions

7
debian/changelog vendored
View File

@ -1,3 +1,10 @@
ubuntu-dev-tools (0.133) UNRELEASED; urgency=low
* mk-sbuild: Only grant access to the admin group when it exists
(Closes: #642824)
-- Stefano Rivera <stefanor@debian.org> Sun, 25 Sep 2011 16:00:57 +0200
ubuntu-dev-tools (0.132) unstable; urgency=low
[ Benjamin Drung ]

View File

@ -555,18 +555,19 @@ if [ -r "${TYPED_TEMPLATE_SCHROOTCONF}" ]; then
elif [ -r "${TEMPLATE_SCHROOT}" ]; then
cat "$TEMPLATE_SCHROOTCONF" > "$TEMP_SCHROOTCONF"
else
# Please do not remove the blank line above [CHROOT_NAME]
# it helps keep the schroot stanzas separated in the main
# /etc/schroot/schroot.conf file.
cat > "$TEMP_SCHROOTCONF" <<EOM
ADMIN_GROUPS="sbuild,root"
if getent group admin > /dev/null; then
ADMIN_GROUPS+=",admin"
fi
cat > "$TEMP_SCHROOTCONF" <<EOM
[CHROOT_NAME]
description=CHROOT_NAME
groups=sbuild,root,admin
root-groups=root,sbuild,admin
# Uncomment these lines to allow "sbuild" and "admin" users to access
groups=$ADMIN_GROUPS
root-groups=$ADMIN_GROUPS
# Uncomment these lines to allow members of these groups to access
# the -source chroots directly (useful for automated updates, etc).
#source-root-users=root,sbuild,admin
#source-root-groups=root,sbuild,admin
#source-root-users=$ADMIN_GROUPS
#source-root-groups=$ADMIN_GROUPS
type=SCHROOT_TYPE
EOM
case "$SCHROOT_TYPE" in