Whamcloud - gitweb
Optionally use RUNAS_GID to runas command to set group to setregid() to.
authorbrian <brian>
Tue, 5 Jul 2005 18:56:54 +0000 (18:56 +0000)
committerbrian <brian>
Tue, 5 Jul 2005 18:56:54 +0000 (18:56 +0000)
This is needed to prevent errors such as:
  mds blocked setgid attempt (1000/1000 -> 100)

lustre/tests/replay-sanity.sh
lustre/tests/sanity.sh
lustre/tests/sanityN.sh

index 73d228f..5350438 100755 (executable)
@@ -102,7 +102,11 @@ if [ $UID -ne 0 ]; then
         RUNAS=""
 else
         RUNAS_ID=${RUNAS_ID:-500}
-        RUNAS=${RUNAS:-"runas -u $RUNAS_ID"}
+        if [ -z "$RUNAS_GID" ]; then
+           RUNAS=${RUNAS:-"runas -u $RUNAS_ID"}
+        else
+           RUNAS=${RUNAS:-"runas -u $RUNAS_ID -g $RUNAS_GID"}
+        fi
 fi
 
 OLDTMPDIR=$TMPDIR
index 48f9c8a..a1447f7 100644 (file)
@@ -58,7 +58,11 @@ if [ $UID -ne 0 ]; then
        RUNAS=""
 else
        RUNAS_ID=${RUNAS_ID:-500}
-       RUNAS=${RUNAS:-"runas -u $RUNAS_ID"}
+        if [ -z "$RUNAS_GID" ]; then
+           RUNAS=${RUNAS:-"runas -u $RUNAS_ID"}
+        else
+           RUNAS=${RUNAS:-"runas -u $RUNAS_ID -g $RUNAS_GID"}
+        fi
 fi
 
 if [ `using_krb5_sec $SECURITY` == 'y' ] ; then
index 576712b..fcd0ee6 100644 (file)
@@ -31,7 +31,11 @@ if [ $UID -ne 0 ]; then
        RUNAS=""
 else
        RUNAS_ID=${RUNAS_ID:-500}
-       RUNAS=${RUNAS:-"runas -u $RUNAS_ID"}
+        if [ -z "$RUNAS_GID" ]; then
+           RUNAS=${RUNAS:-"runas -u $RUNAS_ID"}
+        else
+           RUNAS=${RUNAS:-"runas -u $RUNAS_ID -g $RUNAS_GID"}
+        fi
 fi
 
 if [ `using_krb5_sec $SECURITY` == 'y' ] ; then