Re: [PATCH] Add more suid/sgid related cases to perms group

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



On Tue, Oct 18, 2022 at 06:25:18AM +0000, xuyang2018.jy@xxxxxxxxxxx wrote:
> Hi Zorro
> 
> > On Tue, Oct 18, 2022 at 12:12:10PM +0800, Yang Xu wrote:
> >> Just use the following ways to look for these cases
> >> 1) grep -nsr suid or grep -nsr sgid
> >> 2) grep -nsr chmod | grep "+s"
> >> 3) grep -nsr ISUID/ISGID then search execute program ie(vfstest/idmapped_mounts)
> >>
> >> Signed-off-by: Yang Xu <xuyang2018.jy@xxxxxxxxxxx>
> >> ---
> >>   tests/generic/193 | 2 +-
> >>   tests/generic/355 | 2 +-
> >>   tests/generic/673 | 2 +-
> >>   tests/generic/674 | 2 +-
> >>   tests/generic/683 | 2 +-
> >>   tests/generic/684 | 2 +-
> >>   tests/generic/685 | 2 +-
> >>   tests/generic/686 | 2 +-
> >>   tests/generic/687 | 2 +-
> >>   tests/overlay/015 | 2 +-
> >>   10 files changed, 10 insertions(+), 10 deletions(-)
> > 
> > According to the definition of "perms" group:
> >    perms                   access control and permission checking
> > 
> > It's not only about suid/sgid. I try to check more (roughly), find below
> > cases[1] might be related with "perms", please double check and add more proper
> > cases into perms group (if there're more).
> 
> Ok, will do. Can you share which simple way you used to find these cases?

No special way, just "grep -rsni xxx" some key words then look into the case
source code to double check. The key words include permission, acl, chown,
chmod, suid, sgid, etc.

Thanks,
Zorro

> 
> Best Regards
> Yang Xu
> > 
> > Thanks,
> > Zorro
> > 
> > [1]
> > generic/099, generic/105, generic/128, generic/237, generic/314, generic/318,
> > generic/319, generic/362, generic/363, generic/364, generic/365, generic/366,
> > generic/367, generic/368, generic/369, generic/370, generic/375, generic/444,
> > generic/698, generic/699, overlay/004, overlay/008, overlay/023
> > 
> >>
> >> diff --git a/tests/generic/193 b/tests/generic/193
> >> index ddaff69b..e2710b07 100755
> >> --- a/tests/generic/193
> >> +++ b/tests/generic/193
> >> @@ -7,7 +7,7 @@
> >>   # Test permission checks in ->setattr
> >>   #
> >>   . ./common/preamble
> >> -_begin_fstest metadata auto quick
> >> +_begin_fstest metadata auto quick perms
> >>   
> >>   _register_cleanup "_cleanup_files"
> >>   tag="added by qa $seq"
> >> diff --git a/tests/generic/355 b/tests/generic/355
> >> index 4bc69eeb..7c108d1b 100755
> >> --- a/tests/generic/355
> >> +++ b/tests/generic/355
> >> @@ -7,7 +7,7 @@
> >>   # Test clear of suid/sgid on direct write.
> >>   #
> >>   . ./common/preamble
> >> -_begin_fstest auto quick
> >> +_begin_fstest auto quick perms
> >>   
> >>   # Import common functions.
> >>   . ./common/filter
> >> diff --git a/tests/generic/673 b/tests/generic/673
> >> index 4d8dc07e..6d1f49ea 100755
> >> --- a/tests/generic/673
> >> +++ b/tests/generic/673
> >> @@ -7,7 +7,7 @@
> >>   # Functional test for dropping suid and sgid bits as part of a reflink.
> >>   #
> >>   . ./common/preamble
> >> -_begin_fstest auto clone quick
> >> +_begin_fstest auto clone quick perms
> >>   
> >>   # Import common functions.
> >>   . ./common/filter
> >> diff --git a/tests/generic/674 b/tests/generic/674
> >> index a3130249..c3ff1b7b 100755
> >> --- a/tests/generic/674
> >> +++ b/tests/generic/674
> >> @@ -7,7 +7,7 @@
> >>   # Functional test for dropping suid and sgid bits as part of a deduplication.
> >>   #
> >>   . ./common/preamble
> >> -_begin_fstest auto clone quick
> >> +_begin_fstest auto clone quick perms
> >>   
> >>   # Import common functions.
> >>   . ./common/filter
> >> diff --git a/tests/generic/683 b/tests/generic/683
> >> index 4c93346d..302f8bb2 100755
> >> --- a/tests/generic/683
> >> +++ b/tests/generic/683
> >> @@ -7,7 +7,7 @@
> >>   # Functional test for dropping suid and sgid bits as part of a fallocate.
> >>   #
> >>   . ./common/preamble
> >> -_begin_fstest auto clone quick
> >> +_begin_fstest auto clone quick perms
> >>   
> >>   # Override the default cleanup function.
> >>   _cleanup()
> >> diff --git a/tests/generic/684 b/tests/generic/684
> >> index 03481e69..19ccb228 100755
> >> --- a/tests/generic/684
> >> +++ b/tests/generic/684
> >> @@ -7,7 +7,7 @@
> >>   # Functional test for dropping suid and sgid bits as part of a fpunch.
> >>   #
> >>   . ./common/preamble
> >> -_begin_fstest auto clone quick
> >> +_begin_fstest auto clone quick perms
> >>   
> >>   # Override the default cleanup function.
> >>   _cleanup()
> >> diff --git a/tests/generic/685 b/tests/generic/685
> >> index 6a108842..a58eccda 100755
> >> --- a/tests/generic/685
> >> +++ b/tests/generic/685
> >> @@ -7,7 +7,7 @@
> >>   # Functional test for dropping suid and sgid bits as part of a fzero.
> >>   #
> >>   . ./common/preamble
> >> -_begin_fstest auto clone quick
> >> +_begin_fstest auto clone quick perms
> >>   
> >>   # Override the default cleanup function.
> >>   _cleanup()
> >> diff --git a/tests/generic/686 b/tests/generic/686
> >> index 4279f76b..ef9ea47a 100755
> >> --- a/tests/generic/686
> >> +++ b/tests/generic/686
> >> @@ -7,7 +7,7 @@
> >>   # Functional test for dropping suid and sgid bits as part of a finsert.
> >>   #
> >>   . ./common/preamble
> >> -_begin_fstest auto clone quick
> >> +_begin_fstest auto clone quick perms
> >>   
> >>   # Override the default cleanup function.
> >>   _cleanup()
> >> diff --git a/tests/generic/687 b/tests/generic/687
> >> index 78cb6202..f4a1c1bb 100755
> >> --- a/tests/generic/687
> >> +++ b/tests/generic/687
> >> @@ -7,7 +7,7 @@
> >>   # Functional test for dropping suid and sgid bits as part of a fcollapse.
> >>   #
> >>   . ./common/preamble
> >> -_begin_fstest auto clone quick
> >> +_begin_fstest auto clone quick perms
> >>   
> >>   # Override the default cleanup function.
> >>   _cleanup()
> >> diff --git a/tests/overlay/015 b/tests/overlay/015
> >> index fd23e373..f0c05579 100755
> >> --- a/tests/overlay/015
> >> +++ b/tests/overlay/015
> >> @@ -7,7 +7,7 @@
> >>   # SGID bit inheritance over whiteout.
> >>   #
> >>   . ./common/preamble
> >> -_begin_fstest auto quick whiteout
> >> +_begin_fstest auto quick whiteout perms
> >>   
> >>   # Import common functions.
> >>   . ./common/filter
> >> -- 
> >> 2.27.0
> >>
> > 




[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux