info wrote:

is there anyone can give me some hints how to resolve all absolute
and relative paths versus a chroot (jail) directory with VFS ?


Currently VFS do not provide a "chroot" functionallity.

The only thing you can do is setting a "baseFile" on the FileSystemManager.

       StandardFileSystemManager sm = new StandardFileSystemManager();
       sm.init();
       sm.setBaseFile(new File("/home/im"));
       FileObject fo = sm.resolveFile("projects");
       System.err.println(fo.getName().getURI());

Now the resolveFile resolves by taking the baseFile into account, but the user can break out of the jail.

--
Mario


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to