public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH 1/1] p9auth: fix a bug in the p9auth setup script
@ 2009-10-08 16:59 Serge E. Hallyn
  2009-10-13 14:43 ` Subrata Modak
  0 siblings, 1 reply; 3+ messages in thread
From: Serge E. Hallyn @ 2009-10-08 16:59 UTC (permalink / raw)
  To: Subrata Modak1; +Cc: LTP list

If by chance /dev/caphash existed but /dev/capuse did not, then
the checkp9auth.sh script would use $maj without setting it.

Signed-off-by: Serge Hallyn <serue@us.ibm.com>
---
 testcases/kernel/security/p9auth/checkp9auth.sh |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

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
@@ -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
-- 
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
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [LTP] [PATCH 1/1] p9auth: fix a bug in the p9auth setup script
  2009-10-08 16:59 [LTP] [PATCH 1/1] p9auth: fix a bug in the p9auth setup script Serge E. Hallyn
@ 2009-10-13 14:43 ` Subrata Modak
  2009-10-13 19:18   ` Garrett Cooper
  0 siblings, 1 reply; 3+ messages in thread
From: Subrata Modak @ 2009-10-13 14:43 UTC (permalink / raw)
  To: Serge E. Hallyn, Garrett Cooper; +Cc: LTP list

On Thu, 2009-10-08 at 11:59 -0500, Serge E. Hallyn wrote: 
> If by chance /dev/caphash existed but /dev/capuse did not, then
> the checkp9auth.sh script would use $maj without setting it.
> 
> Signed-off-by: Serge Hallyn <serue@us.ibm.com>

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

> ---
>  testcases/kernel/security/p9auth/checkp9auth.sh |    4 +---
>  1 files changed, 1 insertions(+), 3 deletions(-)
> 
> 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
> @@ -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


------------------------------------------------------------------------------
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
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [LTP] [PATCH 1/1] p9auth: fix a bug in the p9auth setup script
  2009-10-13 14:43 ` Subrata Modak
@ 2009-10-13 19:18   ` Garrett Cooper
  0 siblings, 0 replies; 3+ messages in thread
From: Garrett Cooper @ 2009-10-13 19:18 UTC (permalink / raw)
  To: subrata; +Cc: LTP list

On Tue, Oct 13, 2009 at 7:43 AM, Subrata Modak
<subrata@linux.vnet.ibm.com> wrote:
> On Thu, 2009-10-08 at 11:59 -0500, Serge E. Hallyn wrote:
>> If by chance /dev/caphash existed but /dev/capuse did not, then
>> the checkp9auth.sh script would use $maj without setting it.
>>
>> Signed-off-by: Serge Hallyn <serue@us.ibm.com>
>
> 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
>
>> ---
>>  testcases/kernel/security/p9auth/checkp9auth.sh |    4 +---
>>  1 files changed, 1 insertions(+), 3 deletions(-)
>>
>> 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
>> @@ -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

    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
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-10-13 19:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-08 16:59 [LTP] [PATCH 1/1] p9auth: fix a bug in the p9auth setup script Serge E. Hallyn
2009-10-13 14:43 ` Subrata Modak
2009-10-13 19:18   ` Garrett Cooper

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox