aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunichi Uekawa <dancer@dancer64.netfort.gr.jp>2007-12-26 20:26:41 +0900
committerJunichi Uekawa <dancer@dancer64.netfort.gr.jp>2007-12-26 20:26:41 +0900
commit0285bd82fa5d08ff64d14229e1daf25638ac8c89 (patch)
treef66098ea87d0beea99475f1fe38fbcb8575d6c0a
parentd4a893eb3a93b5e5fdd1a10a605629c894ed757d (diff)
downloadpbuilder-0285bd82fa5d08ff64d14229e1daf25638ac8c89.tar
pbuilder-0285bd82fa5d08ff64d14229e1daf25638ac8c89.tar.gz
Fix devpts mount permissions (closes: #453862)
Use the same permission as /etc/init.d/mountdevsubfs.sh for mounting devpts. devpts mount points share the same system-wide permission for all mounts, which gets re-set every time pbuilder mounts it. Since the current gid/permission information is not exported from devpts, use the /etc/default/devpts value provided by glibc.
-rw-r--r--pbuilder-modules5
1 files changed, 4 insertions, 1 deletions
diff --git a/pbuilder-modules b/pbuilder-modules
index a16e307..c047fed 100644
--- a/pbuilder-modules
+++ b/pbuilder-modules
@@ -217,7 +217,10 @@ function mountproc () {
if [ "$USEDEVPTS" = "yes" ]; then
echo " -> mounting /dev/pts filesystem"
mkdir -p $BUILDPLACE/dev/pts || true
- mount -t devpts /dev/pts "$BUILDPLACE/dev/pts"
+ TTYGRP=5
+ TTYMODE=620
+ [ -f /etc/default/devpts ] && . /etc/default/devpts
+ mount -t devpts /dev/pts "$BUILDPLACE/dev/pts" -onoexec,nosuid,gid=$TTYGRP,mode=$TTYMODE
fi
if [ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled; then
echo " -> mounting selinux filesystem"