Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Fake root dir with Perl

Reply
Thread Tools

Fake root dir with Perl

 
 
Phil Jacobson
Guest
Posts: n/a
 
      01-27-2004
Hi. I'm seeing if anyone can shed light on whether Perl can do what
I'm trying to accomplish and possibly reference a good starting point
or existing module.

I'm running Windows XP-SP1 and ActiveState Perl 5.8.0 build 806. Can
Perl monitor a given directory and force any executables in that
directory to believe that it's actually in the root directory?

I hope this example make sense. Assume we have directory
"c:\perl\temp" and in that directory there is an executable "test.exe"
which when launched will create a directory "..\newdir"

Under normal circumstances, if you ran "test.exe" it would create
directory "c:\perl\newdir" but what I'd like to do is run a perl
script and tell it to monitor "c:\perl\temp" so that the directory and
any files in it will believe they are in the root directory. Then when
"test.exe" is ran it will actually create "c:\perl\temp\newdir"
instead.

Thank you for your time,
Phil Jacobson
 
Reply With Quote
 
 
 
 
Ben Morrow
Guest
Posts: n/a
 
      01-27-2004

http://www.velocityreviews.com/forums/(E-Mail Removed) (Phil Jacobson) wrote:
> I'm running Windows XP-SP1 and ActiveState Perl 5.8.0 build 806. Can
> Perl monitor a given directory and force any executables in that
> directory to believe that it's actually in the root directory?


No. Sorry.

Ben

--
Every twenty-four hours about 34k children die from the effects of poverty.
Meanwhile, the latest estimate is that 2800 people died on 9/11, so it's like
that image, that ghastly, grey-billowing, double-barrelled fall, repeated
twelve times every day. Full of children. [Iain Banks] (E-Mail Removed)
 
Reply With Quote
 
 
 
 
pkent
Guest
Posts: n/a
 
      01-27-2004
In article <(E-Mail Removed)> ,
(E-Mail Removed) (Phil Jacobson) wrote:

> Hi. I'm seeing if anyone can shed light on whether Perl can do what
> I'm trying to accomplish and possibly reference a good starting point
> or existing module.
>
> I'm running Windows XP-SP1 and ActiveState Perl 5.8.0 build 806. Can
> Perl monitor a given directory and force any executables in that
> directory to believe that it's actually in the root directory?



It sounds like the thing you want is what is called a 'chroot' in Unix,
or in a more sophisticated guise a 'jail' in BSD. Search the web and see
if you can get those on Windows. A userspace program (even perl) just
isn't the right tool, it needs OS-level stuff.

P

--
pkent 77 at yahoo dot, er... what's the last bit, oh yes, com
Remove the tea to reply
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
dir() vs print(dir()) in the embedded mode Nick Gnedin Python 2 03-30-2013 05:52 AM
External prog get file from main dir, want file in diff dir Kga Agk Ruby 2 06-29-2009 02:09 PM
Behaviour of Dir.glob("**/b") and Dir.glob("*/b") for symlinks Matthew Denner Ruby 1 08-04-2006 03:42 PM
Sub Dir, Virtual dir, what do I use? =?Utf-8?B?UnVkeQ==?= ASP .Net 0 06-12-2005 08:25 PM



Advertisments