Fake root dir with Perl

P

Phil Jacobson

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
 
B

Ben Morrow

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
 
P

pkent

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top