[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#230857: Preinst should rename old devpts.sh to mountkernfs



On Mon, 15 Mar 2004 23:35:36, Thomas Hood wrote:
> On Mon, 2004-03-15 at 22:43, Thomas Hood wrote:
> > The readlink program doesn't use the C Library realpath().
> > Check it out -- it uses its own xreadlink() and readlink() 
> > functions.
> 
> On checking the code myself I see that it actually uses
> canonicalize_file_name().  This function is defined in
> coreutils-5.0.91/lib/canonicalize.c but /bin/readlink as
> built in Debian actually uses the libc function of the same
> name.  So you were right.
> 
> 
> > realpath() is also described as tolerating a missing final component.
> > We should test it to see if it works.
> 
> I just tested it and it doesn't work.  Specifically,
> realpath("/tmp/foo",NULL) returns NULL if /tmp/foo is a symlink
> to /tmp/bar.  So there is indeed a bug either in the implementation
> or the documenation of realpath().

sysvinit_2.85-10 contains a conforming readlink program in
debian/readlink.c which is installed in /lib/init/readlink.
It's not optimized for speed (too many strcpy's etc - yes, I check
for buffer overflows) but I'm reasonably sure it is correct.

Mike.



Reply to: