tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Breaking out of the emulation dir
On Mon, May 21, 2012 at 11:01:19PM +0200, Edgar Fu? wrote:
> > This is not supposed to have changed recently, although I did rework
> > the code and it's not impossible that some corner cases changed.
> So what am I doing wrong here? Maybe it's something stupid and I just
> don't notice:
>
> $ ls -l /usr/pkg/etc/tsm/dsm.opt
> -rw-r--r-- 1 root wheel 70 May 9 15:22 /usr/pkg/etc/tsm/dsm.opt
> $ /emul/linux32/bin/sh -c 'ls -l /usr/pkg/etc/tsm/dsm.opt'
> -rw-r--r-- 1 root wheel 70 May 9 15:22 /usr/pkg/etc/tsm/dsm.opt
> $ ls -l /emul/linux32/opt/tivoli/tsm/client/ba/bin/dsm.opt
> lrwxr-xr-x 1 root wheel 24 May 21 22:48
> /emul/linux32/opt/tivoli/tsm/client/ba/bin/dsm.opt ->
> /usr/pkg/etc/tsm/dsm.opt
> $ /emul/linux32/bin/sh -c 'ls -l /opt/tivoli/tsm/client/ba/bin/dsm.opt'
> lrwxr-xr-x 1 root wheel 24 May 21 22:48
> /opt/tivoli/tsm/client/ba/bin/dsm.opt -> /usr/pkg/etc/tsm/dsm.opt
> $ ls -lL /emul/linux32/opt/tivoli/tsm/client/ba/bin/dsm.opt
> -rw-r--r-- 1 root wheel 70 May 9 15:22
> /emul/linux32/opt/tivoli/tsm/client/ba/bin/dsm.opt
> $ /emul/linux32/bin/sh -c 'ls -lL /opt/tivoli/tsm/client/ba/bin/dsm.opt'
> ls: /opt/tivoli/tsm/client/ba/bin/dsm.opt: No such file or directory
>
> Everything is as expected, except for the last command. Are symlinks
> inside the emulation tree restricted to stay inside the emulation tree?
No. The problem is that thesymlink needs to point to
/../usr/pkg/etc/tsm/dsm.opt rather than /usr/pkg/etc/tsm/dsm.opt.
The "/../" is magic and leads to the real root. Just "/" leads to the
emulation root.
--
David A. Holland
dholland%netbsd.org@localhost
Home |
Main Index |
Thread Index |
Old Index