5c50a33200
- Disable the nssdb write-access-on-read-only-dir tests when user is root (#646045)
35 lines
1.2 KiB
Diff
35 lines
1.2 KiB
Diff
diff -up ./mozilla/security/nss/tests/dbtests/dbtests.sh.noroot ./mozilla/security/nss/tests/dbtests/dbtests.sh
|
|
--- ./mozilla/security/nss/tests/dbtests/dbtests.sh.noroot 2011-04-06 09:56:07.207701000 -0700
|
|
+++ ./mozilla/security/nss/tests/dbtests/dbtests.sh 2011-04-06 10:19:54.159552000 -0700
|
|
@@ -201,6 +201,9 @@ dbtest_main()
|
|
cat $RONLY_DIR/* > /dev/null
|
|
fi
|
|
|
|
+ # skipping the next two tests when user is root,
|
|
+ # otherwise they would fail due to rooty powers
|
|
+ if [[ $EUID -ne 0 ]] then
|
|
${BINDIR}/dbtest -d $RONLY_DIR
|
|
ret=$?
|
|
if [ $ret -ne 46 ]; then
|
|
@@ -208,6 +211,10 @@ dbtest_main()
|
|
else
|
|
html_passed "Dbtest r/w didn't work in an readonly dir $ret"
|
|
fi
|
|
+ else
|
|
+ html_passed "Skipping Dbtest r/w in a readonly dir because user is root"
|
|
+ fi
|
|
+ if [[ $EUID -ne 0 ]] then
|
|
${BINDIR}/certutil -D -n "TestUser" -d .
|
|
ret=$?
|
|
if [ $ret -ne 255 ]; then
|
|
@@ -215,6 +222,9 @@ dbtest_main()
|
|
else
|
|
html_passed "Certutil didn't work in an readonly dir $ret"
|
|
fi
|
|
+ else
|
|
+ html_passed "Skipping Certutil delete cert in an readonly directory test because user is root"
|
|
+ fi
|
|
|
|
Echo "test opening the database ronly in a readonly directory"
|
|
|