Whamcloud - gitweb
land lustre part of b_hd_sec on HEAD.
[fs/lustre-release.git] / lustre / tests / sanity-lmv.sh
index a7d79cc..8e0a86e 100644 (file)
@@ -18,6 +18,7 @@ ALWAYS_EXCEPT=${ALWAYS_EXCEPT:-""}
 
 SRCDIR=`dirname $0`
 export PATH=$PWD/$SRCDIR:$SRCDIR:$SRCDIR/../utils:$PATH
+export SECURITY=${SECURITY:-"null"}
 
 TMP=${TMP:-/tmp}
 FSTYPE=${FSTYPE:-ext3}
@@ -41,6 +42,8 @@ IOPENTEST1=${IOPENTEST1:-iopentest1}
 IOPENTEST2=${IOPENTEST2:-iopentest2}
 PTLDEBUG=${PTLDEBUG:-0}
 
+. krb5_env.sh
+
 if [ $UID -ne 0 ]; then
        RUNAS_ID="$UID"
        RUNAS=""
@@ -49,6 +52,13 @@ else
        RUNAS=${RUNAS:-"runas -u $RUNAS_ID"}
 fi
 
+if [ `using_krb5_sec $SECURITY` == 'y' ] ; then
+    start_krb5_kdc || exit 1
+    if [ $RUNAS_ID -ne $UID ]; then
+        $RUNAS ./krb5_refresh_cache.sh || exit 2
+    fi
+fi
+
 export NAME=${NAME:-lmv}
 
 SAVE_PWD=$PWD