From eaa57c2f668035cc25f2cb1b563b3954e284b2f7 Mon Sep 17 00:00:00 2001 From: brian Date: Tue, 5 Jul 2005 18:56:54 +0000 Subject: [PATCH] Optionally use RUNAS_GID to runas command to set group to setregid() to. This is needed to prevent errors such as: mds blocked setgid attempt (1000/1000 -> 100) --- lustre/tests/replay-sanity.sh | 6 +++++- lustre/tests/sanity.sh | 6 +++++- lustre/tests/sanityN.sh | 6 +++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/lustre/tests/replay-sanity.sh b/lustre/tests/replay-sanity.sh index 73d228f..5350438 100755 --- a/lustre/tests/replay-sanity.sh +++ b/lustre/tests/replay-sanity.sh @@ -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 diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 48f9c8a..a1447f7 100644 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -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 diff --git a/lustre/tests/sanityN.sh b/lustre/tests/sanityN.sh index 576712b..fcd0ee6 100644 --- a/lustre/tests/sanityN.sh +++ b/lustre/tests/sanityN.sh @@ -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 -- 1.8.3.1