From: brian Date: Tue, 5 Jul 2005 18:56:54 +0000 (+0000) Subject: Optionally use RUNAS_GID to runas command to set group to setregid() to. X-Git-Tag: v1_7_100~1116 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=eaa57c2f668035cc25f2cb1b563b3954e284b2f7 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) --- 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