p9auth: fix a bug in the p9auth setup script
PATCH 1/1 p9auth: fix a bug in the p9auth setup script
If by chance /dev/caphash existed but /dev/capuse did not, then the checkp9auth.sh script would use $maj without setting it.
--- testcases/kernel/security/p9auth/checkp9auth.sh | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-)
testcases/kernel/security/p9auth/checkp9auth.sh +1 -3
@@ -47,7 +47,6 @@ if [ $? -ne 0 ]; then fi majfile=/sys/module/p9auth/parameters/cap_major -minfile=/sys/module/p9auth/parameters/cap_minor if [ ! -f "$majfile" ]; then if [ $yesno -eq 1 ]; then echo echo "no"
@@ -56,16 +55,15 @@ if [ ! -f "$majfile" ]; then fi exit 1 fi +maj=`cat $majfile` if [ ! -c "/dev/caphash" ]; then rm -f /dev/caphash - maj=`cat $majfile` mknod /dev/caphash c $maj 0 fi if [ ! -c "/dev/capuse" ]; then rm -f /dev/capuse - min=`cat $minfile` mknod /dev/capuse c $maj 1 fi chmod ugo+w /dev/capuse
Signature · 13 lines
1.6.3.3 ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
Quoted 4 lines · Serge E. Hallyn
If by chance
/dev/caphashexisted but/dev/capusedid not, then thecheckp9auth.shscript would use $maj without setting it.Signed-off-by Serge Hallyn <[email protected]>
Garrettś recent changes deleted this file:
http://ltp.cvs.sourceforge.net/viewvc/ltp/ltp/testcases/kernel/security/p9auth/checkp9auth.sh?hideattic=0&view=log,
|diff --git a/testcases/kernel/security/p9auth/checkp9auth.sh b/testcases/kernel/security/p9auth/checkp9auth.sh
|index 4365427..4a5a7d4 100755 |--- a/testcases/kernel/security/p9auth/checkp9auth.sh |+++ b/testcases/kernel/security/p9auth/checkp9auth.sh
--------------------------
File to patch:
Skip this patch? [y]
Skipping patch.
2 out of 2 hunks ignored
Regards--
Subrata
Quoted 24 lines
--- testcases/kernel/security/p9auth/checkp9auth.sh | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-)testcases/kernel/security/p9auth/checkp9auth.sh +1
-1@@ -47,7 +47,6 @@ if [ $? -ne 0 ]; then fi majfile=/sys/module/p9auth/parameters/cap_major -minfile=/sys/module/p9auth/parameters/cap_minor if [ ! -f "$majfile" ]; then if [ $yesno -eq 1 ]; then echo echo "no"@@ -56,16 +55,15 @@ if [ ! -f "$majfile" ]; then fi exit 1 fi +maj=`cat $majfile` if [ ! -c "/dev/caphash" ]; then rm -f /dev/caphash
testcases/kernel/security/p9auth/checkp9auth.sh if [ ! -f "$majfile" ]; then · line 69
Quoted 10 lines
testcases/kernel/security/p9auth/checkp9auth.sh +0
-2- maj=`cat $majfile` mknod /dev/caphash c $maj 0 fi if [ ! -c "/dev/capuse" ]; then rm -f /dev/capuse - min=`cat $minfile` mknod /dev/capuse c $maj 1 fi chmod ugo+w /dev/capuse
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Quoted 51 lines · Subrata Modak
Quoted 4 lines · Serge E. Hallyn
If by chance
/dev/caphashexisted but/dev/capusedid not, then thecheckp9auth.shscript would use $maj without setting it.Signed-off-by Serge Hallyn <[email protected]>Garrettś recent changes deleted this file:
http://ltp.cvs.sourceforge.net/viewvc/ltp/ltp/testcases/kernel/security/p9auth/checkp9auth.sh?hideattic=0&view=log,|diff --git
a/testcases/kernel/security/p9auth/checkp9auth.shb/testcases/kernel/security/p9auth/checkp9auth.sh|index 4365427..4a5a7d4 100755 |--- a/testcases/kernel/security/p9auth/checkp9auth.sh |+++ b/testcases/kernel/security/p9auth/checkp9auth.sh--------------------------
File to patch:
Skip this patch? [y]
Skipping patch.
2 out of 2 hunks ignoredRegards--
SubrataQuoted 28 lines
---
testcases/kernel/security/p9auth/checkp9auth.sh | 4 +---1 files changed, 1 insertions(+), 3 deletions(-)testcases/kernel/security/p9auth/checkp9auth.sh +0
-0@@ -47,7 +47,6 @@ if [ $? -ne 0 ]; thenfi
majfile=/sys/module/p9auth/parameters/cap_major
-minfile=/sys/module/p9auth/parameters/cap_minor
if [ ! -f "$majfile" ]; then
if [ $yesno -eq 1 ]; then echo
echo "no"testcases/kernel/security/p9auth/checkp9auth.sh +0
-0@@ -56,16 +55,15 @@ if [ ! -f "$majfile" ]; thenfi
exit 1
fi
+maj=cat $majfileif [ ! -c "
/dev/caphash" ]; then
rm -f/dev/caphash
- maj=cat $majfile
mknod/dev/caphashc $maj 0
fi
Quoted 6 lines
Quoted 6 lines
if [ ! -c "
/dev/capuse" ]; then
rm -f/dev/capuse
- min=cat $minfile
mknod/dev/capusec $maj 1
fi
chmod ugo+w/dev/capuse
Ok... I didn't add in a replacement for this item ><. Basically it
was being used at build time, incorrectly, and thus would possibly give false positives or false negatives when cross-compiling. Some of these routines need to be added to the calling script.
What is required and what isn't required for execution?
Thanks,
-Garrett
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list