public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Jiri Palecek <jpalecek@web.de>
To: Garrett Cooper <yanegomi@gmail.com>
Cc: "ltp-list@lists.sourceforge.net" <ltp-list@lists.sourceforge.net>
Subject: Re: [LTP] lchown test case
Date: Thu, 07 Jan 2010 02:33:54 +0100	[thread overview]
Message-ID: <4B453A02.90903@web.de> (raw)
In-Reply-To: <364299f41001051831r6a0f4930t6ba61e4273c797e3@mail.gmail.com>

Garrett Cooper napsal(a):
> On Tue, Jan 5, 2010 at 5:41 PM, Garrett Cooper<yanegomi@gmail.com>  wrote:
>> On Tue, Jan 5, 2010 at 5:27 PM, Jiri Palecek<jpalecek@web.de>  wrote:
>>> Michal Simek napsal(a):
>>>>
>>>> Hi,
>>>
>>> Hi,
>>>>
>>>> I have some problems with lchown02 test which is caused with this patch.
>>>> What is prep_create_link?
>>>>
>>>> Thanks,
>>>> Michal
>>>>
>>>>
>>>> http://git.kernel.org/?p=linux/kernel/git/galak/ltp.git;a=commitdiff;h=ee1a022fc76076d7fc1b6b1797c195244414c038
>>>>
>>>>
>>>>
>>>> diff --git a/runtest/syscalls b/runtest/syscalls
>>>> index fbe8641..34631ed 100644 (file)
>>>> --- a/runtest/syscalls
>>>> +++ b/runtest/syscalls
>>>> @@ -462,10 +462,10 @@ kill12 kill12
>>>>
>>>> lchown01 lchown01
>>>> lchown01_16 lchown01_16
>>>> -lchown02 cp -p $LTPROOT/testcases/bin/create_link $TMP; lchown02
>>>> -lchown02_16 cp -p $LTPROOT/testcases/bin/create_link $TMP; lchown02_16
>>>> +lchown02 prep_create_link; lchown02
>>>> +lchown02_16 prep_create_link; lchown02_16
>>>
>>> IMHO it should do the same as the line above. But I think the whole thing
>>> could be deleted without causing any grief:
>>>
>>> http://repo.or.cz/w/ltp-debian.git?a=commit;h=a5499edcf368fa88df924f94ffcbe63c22b46e82
>>
>> The test needs create_link in $TMP; that's why I scripted it as a
>> one-liner (but stupid me probably forgot to add the script to CVS
>> -_-).
>> Let me look and I'll get back to you shortly.
>
> Fixed. The executable needed CAP_CHOWN capability and that's part of
> the point behind that script...

Couldn't the executable just get CAP_CHOWN with cap_set_proc in case it is 
running under root with restricted capabilities?

I'm not sure it wouldn't fail even with the suid-root executable under such 
condition - are you really sure it doesn't (esp. in the face of lchown01, which 
would fail almost surely and doesn't have this hack)?

Regards
     Jiri Palecek

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

  parent reply	other threads:[~2010-01-07  2:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-04 15:10 [LTP] lchown test case Michal Simek
2010-01-06  1:27 ` Jiri Palecek
2010-01-06  1:41   ` Garrett Cooper
2010-01-06  2:31     ` Garrett Cooper
2010-01-06 12:13       ` Michal Simek
2010-01-06 19:24         ` Garrett Cooper
2010-01-07  1:33       ` Jiri Palecek [this message]
2010-01-07  5:57         ` Garrett Cooper
2010-01-07 14:02           ` Michal Simek
2010-01-08 15:40             ` Jiří Paleček

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B453A02.90903@web.de \
    --to=jpalecek@web.de \
    --cc=ltp-list@lists.sourceforge.net \
    --cc=yanegomi@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox