>hfaxd(1M) has no problems to open "etc/hosts" (while current
>dir is "/var/spool/fax") but has problems with files after
>using the chroot(2) sys-call and the names are now like "/etc/hosts".
>
>You could test this by writing a short pgm in C as and run it
>as root under strace(1):
>main()
>{
> chdir("/var/spool/fax");
> chroot(".");
> chdir("/");
> open("/etc/hosts", 0);
>}
>to verify this; this should produce the same problem. It's difficult
>for me (I'm not using Linux) and from here to find out the problem in
>your file system tree; maybe you've a symbolic link like
>/var/spool/fax/ ----> /usr/spool/fax
>or
>/var/spool/ ----> /usr/spool
>and they are not working after a chroot(2) sys-call on Linux(?).
>
>The problems opening some message files are unrelated to this
>problem.
>
> matthias
This did produce the same problems. The /var/spool/fax/etc directory
entry is a symbolic link to the /etc/hylafax directory. After the chroot is
executed, the new root directory is /var/spool/fax - making it impossible
for the sybolic link to /etc/hylafax to be a valid link because the real
/etc no longer exists in the current context. The symbolic link is now a
circular reference which creates the OS error of Too many symbolic links
encountered. Can I just remove the symbolic link and copy the /etc/hylafax
directory to the /var/spool/fax/etc directory, or does hylafax access some
of the files through the true path /etc/hylafax? BTW, thank you very much. I
would never have found this on my own..
Youn Gonzales
youn@clascomputers.com
Matthias Apitz / guru@softcon.de ; (07:34:58 AM 01/27/97)