On Tue, 2008-08-19 at 15:41 +0200, Renaud Lottiaux wrote: > Hi Subrata, > > I agree with your comments. You can make the modifications and commit > the tests I sent you. > > Regards. > > Signed-Off-By: Renaud Lottiaux <[EMAIL PROTECTED]>
Thanks. The modified Patch is merged. Regards-- Subrata > > R. > > Le lundi 18 août 2008, Subrata Modak a écrit : > > Hi Renaud, > > > > On Thu, 2008-08-14 at 16:37 +0200, Renaud Lottiaux wrote: > > > Hi ! > > > > > > I propose this new test for the setresuid syscall. > > > > Thanks for proposing this new test case along with the other 3 test > > cases. I tested them and following are the results: > > > > $ testcases/kernel/syscalls/setfsuid/setfsuid04 > > setfsuid04 1 BROK : Test must be run as root > > $ echo $? > > 2 > > $ testcases/kernel/syscalls/setresuid/setresuid04 > > setresuid04 1 BROK : Test must be run as root > > $ echo $? > > 2 > > $ testcases/kernel/syscalls/setreuid/setreuid07 > > setreuid07 1 BROK : Test must be run as root > > $ echo $? > > 2 > > $ testcases/kernel/syscalls/setuid/setuid04 > > setuid04 1 BROK : Test must be run as root > > $ echo $? > > 2 > > > > $ su root > > Password: > > [EMAIL PROTECTED] ltp-full-20080731]# > > testcases/kernel/syscalls/setfsuid/setfsuid04 > > setfsuid04 1 PASS : open returned errno EACCES > > setfsuid04 2 PASS : open returned errno EACCES > > setfsuid04 3 PASS : open call succeeded > > [EMAIL PROTECTED] ltp-full-20080731]# echo $? > > 0 > > [EMAIL PROTECTED] ltp-full-20080731]# > > testcases/kernel/syscalls/setresuid/setresuid04 > > setresuid04 1 PASS : open returned errno EACCES > > setresuid04 2 PASS : open returned errno EACCES > > setresuid04 3 PASS : open call succeeded > > [EMAIL PROTECTED] ltp-full-20080731]# echo $? > > 0 > > [EMAIL PROTECTED] ltp-full-20080731]# > > testcases/kernel/syscalls/setreuid/setreuid07 > > setreuid07 1 PASS : open returned errno EACCES > > setreuid07 2 PASS : open returned errno EACCES > > setreuid07 3 PASS : open call succeeded > > [EMAIL PROTECTED] ltp-full-20080731]# echo $? > > 0 > > [EMAIL PROTECTED] ltp-full-20080731]# > > testcases/kernel/syscalls/setuid/setuid04 > > setuid04 1 PASS : open returned errno EACCES > > setuid04 2 PASS : open returned errno EACCES > > [EMAIL PROTECTED] ltp-full-20080731]# echo $? > > 0 > > > > However there 2 issues that needs to be solved: > > 1) None of your test cases contains the GPLv2 declaration, without which > > contribution(s) cannot be made to LTP. The following declaration should > > be part of your all test cases: > > > > /* This program is free software; you can redistribute it and/or modify > > */ > > /* it under the terms of the GNU General Public License as published by > > */ /* the Free Software Foundation; either version 2 of the License, or > > */ /* (at your option) any later version. > > */ /* > > */ /* This program is distributed in the hope that it will > > be useful, */ /* but WITHOUT ANY WARRANTY; without even the > > implied warranty of */ /* MERCHANTABILITY or FITNESS FOR A > > PARTICULAR PURPOSE. See */ /* the GNU General Public > > License for more details. */ /* > > */ /* You should > > have received a copy of the GNU General Public License */ /* along > > with this program; if not, write to the Free Software */ /* > > Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > > */ > > > > You can also refer to the following template of what needs to be included: > > http://ltp.sourceforge.net/documentation/how-to/ltp.php, > > > > 2) Though the test cases are added, there is no patch which actually > > integrates them to get finally executed by runltp. You probabably will > > require an additional patch below: > > > > --- ltp-full-20080731/runtest/ltplite.orig 2008-08-18 17:36:57.000000000 > > +0530 +++ ltp-full-20080731/runtest/ltplite 2008-08-18 17:38:53.000000000 > > +0530 @@ -714,6 +714,7 @@ setfsgid03 setfsgid03 > > setfsuid01 setfsuid01 > > setfsuid02 setfsuid02 > > setfsuid03 setfsuid03 > > +setfsuid04 setfsuid04 > > > > setgid01 setgid01 > > setgid02 setgid02 > > @@ -759,6 +760,7 @@ setresgid03 setresgid03 > > setresuid01 setresuid01 > > setresuid02 setresuid02 > > setresuid03 setresuid03 > > +setresuid04 setresuid04 > > > > setreuid01 setreuid01 > > setreuid02 setreuid02 > > @@ -766,6 +768,7 @@ setreuid03 setreuid03 > > setreuid04 setreuid04 > > setreuid05 setreuid05 > > setreuid06 setreuid06 > > +setreuid07 setreuid07 > > > > setrlimit01 setrlimit01 > > setrlimit02 setrlimit02 > > @@ -781,6 +784,7 @@ settimeofday02 settimeofday02 > > setuid01 setuid01 > > setuid02 setuid02 > > setuid03 setuid03 > > +setuid04 setuid04 > > > > shmat01 shmat01 > > shmat02 shmat02 > > --- ltp-full-20080731/runtest/stress.part3.orig 2008-08-18 > > 17:37:09.000000000 +0530 +++ > > ltp-full-20080731/runtest/stress.part3 2008-08-18 17:40:26.000000000 > > +0530 > > @@ -668,6 +668,7 @@ setresgid03 setresgid03 > > setresuid01 setresuid01 > > setresuid02 setresuid02 > > setresuid03 setresuid03 > > +setresuid04 setresuid04 > > > > setreuid01 setreuid01 > > setreuid02 setreuid02 > > @@ -675,6 +676,7 @@ setreuid03 setreuid03 > > setreuid04 setreuid04 > > setreuid05 setreuid05 > > setreuid06 setreuid06 > > +setreuid07 setreuid07 > > > > setrlimit01 setrlimit01 > > setrlimit02 setrlimit02 > > @@ -690,6 +692,7 @@ settimeofday02 settimeofday02 > > setuid01 setuid01 > > setuid02 setuid02 > > setuid03 setuid03 > > +setuid04 setuid04 > > > > shmat01 shmat01 > > shmat02 shmat02 > > --- ltp-full-20080731/runtest/syscalls.orig 2008-08-18 17:37:17.000000000 > > +0530 +++ ltp-full-20080731/runtest/syscalls 2008-08-18 > > 17:41:39.000000000 > > +0530 @@ -751,6 +751,7 @@ setfsgid03 setfsgid03 > > setfsuid01 setfsuid01 > > setfsuid02 setfsuid02 > > setfsuid03 setfsuid03 > > +setfsuid04 setfsuid04 > > > > setgid01 setgid01 > > setgid01_16 setgid01_16 > > @@ -799,6 +800,7 @@ setresgid03 setresgid03 > > setresuid01 setresuid01 > > setresuid02 setresuid02 > > setresuid03 setresuid03 > > +setresuid04 setresuid04 > > > > setreuid01 setreuid01 > > setreuid02 setreuid02 > > @@ -806,6 +808,7 @@ setreuid03 setreuid03 > > setreuid04 setreuid04 > > setreuid05 setreuid05 > > setreuid06 setreuid06 > > +setreuid07 setreuid07 > > > > setrlimit01 setrlimit01 > > setrlimit02 setrlimit02 > > @@ -823,6 +826,7 @@ settimeofday02 settimeofday02 > > setuid01 setuid01 > > setuid02 setuid02 > > setuid03 setuid03 > > +setuid04 setuid04 > > > > shmat01 shmat01 > > shmat02 shmat02 > > > > I hope you will resend me those 4 test cases in a combined patch after > > incorporating the above 2 comments from my side. Thanks for contributing to > > LTP. > > > > Regards-- > > Subrata > > > > > The goal if this test is to check the fsuid is correctly handled by the > > > setresuid syscall. To do so, the test creates a testfile as root with > > > permission 0644, then do a setresuid and try to open the file RDWR. > > > This last open must fail since the process with new UID is not allowed > > > to open the file on write. > > > > > > In a second step, the test does a fork to check the fsuid is correctly > > > passed to a son and the son behaves correctly regarding files, i.e. > > > it cannot open on write the test file. > > > > > > Finally, the test falls back to the initial UID and try to open the file > > > on write. This open must succed. > > > > > > Regards. > > > > > > R. > > > > > > ------------------------------------------------------------------------- > > > This SF.Net email is sponsored by the Moblin Your Move Developer's > > > challenge Build the coolest Linux based applications with Moblin SDK & > > > win great prizes Grand prize is a trip for two to an Open Source event > > > anywhere in the world > > > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > > > _______________________________________________ Ltp-list mailing list > > > [email protected] > > > https://lists.sourceforge.net/lists/listinfo/ltp-list > > > ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
