use the new 'secure-mount' CLI
authorEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Wed, 25 Aug 2004 00:11:50 +0000 (00:11 +0000)
committerEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Wed, 25 Aug 2004 00:11:50 +0000 (00:11 +0000)
git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@1679 94cd875c-1c1d-0410-91d2-eb244daf1a30

util-vserver/scripts/functions
util-vserver/scripts/pkgmgmt
util-vserver/scripts/vserver.functions
util-vserver/vserver-start/mount.c

index 8808372..3779584 100644 (file)
@@ -291,11 +291,15 @@ function _pkgMountRPM
     _pkgMountBindDir "$RPMETCDIR" /etc/rpm
     test "$RPMLIBDIR" = "/" || _pkgMountBindDir "$RPMLIBDIR" /usr/lib/rpm
 
-    "$_SECURE_MOUNT" --chroot "$VDIR" -n --secure --bind "$RPMSTATEDIR" "$_rpmdb_mntpoint"
+    pushd "$VDIR" >/dev/null
+
+    "$_SECURE_MOUNT" --chroot -n --bind "$RPMSTATEDIR" "$_rpmdb_mntpoint"
     test -z "$WORKAROUND_106057" || mount -n --bind "$RPMSTATEDIR" "$_rpmdb_mntpoint"
 
     test -e "$VDIR"/proc/self/status || \
-       "$_SECURE_MOUNT" --chroot "$VDIR" -n --secure -t proc none /proc
+       "$_SECURE_MOUNT" --chroot -n -t proc none /proc
+
+    popd >/dev/null
 }
 
 function _pkgSetEnvBase
index dc58391..fd14ec8 100755 (executable)
@@ -126,8 +126,10 @@ function _mountFilesystemsInternal()
     local fstab="$1"
     test -e "$fstab" || return 0
     shift
-    
-    "$@" $_SECURE_MOUNT -n -a --chroot "$vdir" --fstab "$fstab"
+
+    pushd "$vdir" >/dev/null
+    "$@" $_SECURE_MOUNT -n -a --chroot --fstab "$fstab"
+    popd >/dev/null
 }
 
 function _mountFilesystems()
index 2316ee2..7525c07 100644 (file)
@@ -623,8 +623,10 @@ function _mountVserverInternal
     local fstab="$1"
     test -e "$fstab" || return 0
     shift
-    
-    "$@" $_SECURE_MOUNT -a --chroot "$vdir" --fstab "$fstab"
+
+    pushd "$vdir" >/dev/null
+    "$@" $_SECURE_MOUNT -a --chroot --fstab "$fstab"
+    popd >/dev/null
 }
 
 function mountVserver
index 43f3223..fc76a6c 100644 (file)
@@ -144,7 +144,7 @@ mountVserverInternal(struct Configuration const *cfg,
     char const *       argv[] = {
       PROG_SECURE_MOUNT,
       "-a",
-      "--chroot", ".",
+      "--chroot",
       "--fstab", path->d,
       0
     };