Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Re: $< and setuid: quite different animals?

by almut (Canon)
on Apr 10, 2010 at 06:52 UTC ( #833957=note: print w/replies, xml ) Need Help??

in reply to $< and setuid: quite different animals?

Try it the other way round (first effective, then real):

$> = $uid; $< = $uid; ...
$ sudo strace ./ 2>&1 | grep '^setr' setresuid(-1, 65534, -1) = 0 setreuid(65534, 4294967295) = 0 setresuid(-1, 0, -1) = -1 EPERM (Operation not perm +itted) setreuid(0, 4294967295) = -1 EPERM (Operation not perm +itted)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://833957]
[Lady_Aleena]: What?! Can't stat ~/Music: No such file or directory? The ~/ doesn't expand?
[Lady_Aleena]: And the env variable $HOME doesn't work either. !@#$
[shmem]: no, that's a shell feature. Use $ENV{HOME}
[marioroy]: my $ans = qx{ find \$HOME -name "*.pl" -exec ls -l {} \\; };
[marioroy]: must backslash $ inside qx
[Lady_Aleena]: I haven't written perl for a while, I've been trying to do things at the command line. I'm having to relearn a lot.
[marioroy]: LA can you post the qx find again
[Lady_Aleena]: Things I would have written a script for while I was on Windows, I can run simply on the command line.
[Lady_Aleena]: marioroy, my @music_times = qx(find ~/Music/Albums/ -type f -iname '*.mp3' -exec mp3info -p "%S\n" {} \;); #unfixed

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (13)
As of 2017-04-23 21:05 GMT
Find Nodes?
    Voting Booth?
    I'm a fool:

    Results (432 votes). Check out past polls.