Subject: Re: kern/36225: pkgsrc/security/uvscan does not work anymore since CHECK_ALT_xxx() removal
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: David Laight <david@l8s.co.uk>
List: netbsd-bugs
Date: 04/26/2007 20:05:05
The following reply was made to PR kern/36225; it has been noted by GNATS.
From: David Laight <david@l8s.co.uk>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: kern/36225: pkgsrc/security/uvscan does not work anymore since CHECK_ALT_xxx() removal
Date: Thu, 26 Apr 2007 21:08:19 +0100
On Thu, Apr 26, 2007 at 05:55:00PM +0000, njoly@pasteur.fr wrote:
> >Number: 36225
> >Category: kern
> >Synopsis: pkgsrc/security/uvscan does not work anymore since CHECK_ALT_xxx() removal
> 240 1 uvscan CALL open(0xbfbfdef0,0,0xbbbf8f61)
> 240 1 uvscan NAMI "/emul/linux/usr/local/lib/liblnxfv.so.4"
> 240 1 uvscan NAMI "/usr/local/lib/liblnxfv.so.4"
> 240 1 uvscan RET open -1 errno -2 No such file or directory
>
> The needed file exists, and looks good to me :
>
> njoly@cixy [~]> ls -l /emul/linux/usr/local/lib/liblnxfv.so.4
> lrwxr-xr-x 1 root wheel 43 Apr 26 18:57 /emul/linux/usr/local/lib/liblnxfv.so.4 -> ../../../../../libexec/uvscan/liblnxfv.so.4
> njoly@cixy [~]> ls -lL /emul/linux/usr/local/lib/liblnxfv.so.4
> -r-xr-xr-x 1 root wheel 2909612 Apr 26 18:57 /emul/linux/usr/local/lib/liblnxfv.so.4
I guess the missing datapoint is:
$ ls -l /emul/linux
lrwxr-xr-x 1 root wheel 19 Apr 23 21:21 /emul/linux -> /usr/pkg/emul/linux
So the actual path with symlinks expanded is:
/usr/pkg/emul/linux/usr/local/lib/../../../../../libexec/uvscan/liblnxfv.so.4
Which is expected to contract to:
/usr/pkg/libexec/uvscan/liblnxfv.so.4
Unfortunately I coded namei() so that ".." at the emulation root always
goes to the real root, so it ends up being:
/libexec/uvscan/liblnxfv.so.4
Which won't exist!
Of course, expecting to find a linux binary in /usr/pkg/libexec is rather
stupid - as another emulation (eg the linux32 one on an amd64 system)
would also look in the same directory and open the same file.
The package probably ought to be using /emul/linux/libexec.
I'll look at changing namei() though.
David
--
David Laight: david@l8s.co.uk