f57139
diff -up nss/tests/dbtests/dbtests.sh.646045 nss/tests/dbtests/dbtests.sh
f57139
--- nss/tests/dbtests/dbtests.sh.646045	2013-04-04 13:31:55.000000000 -0700
f57139
+++ nss/tests/dbtests/dbtests.sh	2013-04-04 15:57:46.298127149 -0700
f57139
@@ -168,6 +168,9 @@ dbtest_main()
f57139
         cat $RONLY_DIR/* > /dev/null
f57139
     fi
f57139
 
f57139
+    # skipping the next two tests when user is root,
f57139
+    # otherwise they would fail due to rooty powers
f57139
+    if [[ $EUID -ne 0 ]] then
f57139
     ${BINDIR}/dbtest -d $RONLY_DIR
f57139
     ret=$?
f57139
     if [ $ret -ne 46 ]; then
f57139
@@ -175,6 +178,10 @@ dbtest_main()
f57139
     else
f57139
       html_passed "Dbtest r/w didn't work in an readonly dir $ret" 
f57139
     fi
f57139
+    else
f57139
+      html_passed "Skipping Dbtest r/w in a readonly dir because user is root" 
f57139
+    fi
f57139
+    if [[ $EUID -ne 0 ]] then
f57139
     ${BINDIR}/certutil -D -n "TestUser" -d .
f57139
     ret=$?
f57139
     if [ $ret -ne 255 ]; then
f57139
@@ -182,6 +189,9 @@ dbtest_main()
f57139
     else
f57139
         html_passed "Certutil didn't work in an readonly dir $ret"
f57139
     fi
f57139
+    else
f57139
+      html_passed "Skipping Certutil delete cert in an readonly directory test because user is root" 
f57139
+    fi
f57139
     
f57139
     Echo "test opening the database ronly in a readonly directory"
f57139