httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: Apache-Test/lib/Apache/TestRun.pm
Date Sat, 25 Oct 2003 08:19:33 GMT
Joe Ratterman wrote:
> Sorry about this rather informal email, but I was having an issue with a
> patch to mod-perl that appears to have been submitted/commited by you. 

But please post any question re: Apache-Test to the test-dev list. Thank you.

> It modified the file Apache-Test/lib/Apache/TestRun.pm to use 'su'
> instead of 'sudo'.
> 
> My version of 'su' (slackware 9.0 Linux) does not appear to like the
> '-m' flag for su, nor does the man page list any such flag.  The
> alteration works fine if the 'm' is removed (leaving the '-').
> 
> I am suggesting the change; if I am wrong or you need a different
> format, please let me know.

Sorry about that, Joe. I thought it was portable.

Anybody knows a portable way to su to a different user and check whether a 
given dir is rwx by that user? The only alternative solution I can think of is 
to traverse the whole path and check the perms on each directory. which 
involves checking of whether the user belongs to the group the dirs are 
permitted to rxw. Can that be made portable?

> % cvs diff ./Apache-Test/lib/Apache/TestRun.pm                      
> Index: ./Apache-Test/lib/Apache/TestRun.pm
> ===================================================================
> RCS file:
> /home/cvspublic/httpd-test/perl-framework/Apache-Test/lib/Apache/TestRun.pm,v
> retrieving revision 1.119
> diff -r1.119 TestRun.pm
> 803c803
> <     my $check = qq[su -m $user -c '$perl -e ] .
> ---
> 
>>    my $check = qq[su - $user -c '$perl -e ] .

I'm quite sure that it won't work on some other platform/distro :(

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


Mime
View raw message