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

Bug#138195: why not just use symlinks correctly?



On Thu, Aug 21, 2003 at 04:44:26AM -0400, Jeff King wrote:
> Advantages:
>  - won't break anything that relies on X being started from a particular
>    directory

You spent a lot of time in the bug logs of #138195 arguing that the
chdir() before the execv() would have exactly this advantage, didn't
you?

If so, how is this an advantage over the current implementation?

>  - less code

What you're eliminating is hardly subtle or confusing.

> Disadvantages:
>  - potentially root could have a race condition in which the symlink is
>    OK, but then between readlink() and execv() he changes it to cause an
>    infinite loop . This is so ridiculous as to be irrelevant, IMHO.

Maybe so, but people have had weeks now to comment on my fix, thanks to
the SVN commit messages being posted to debian-x.

I'd have more sympathy for nitpicky stylistic criticism if people would
earn the right to do so by paying attention to the Debian XFree86's
packages development process.

> As an aside, I also noticed a (probably harmless) buffer overflow. The
> readlink call needs to leave a byte free for the NUL-terminator, in case
> the link really *is* 1024 bytes long. Patch is below.

Thanks for pointing that out.

-- 
G. Branden Robinson                |     If God had intended for man to go
Debian GNU/Linux                   |     about naked, we would have been
branden@debian.org                 |     born that way.
http://people.debian.org/~branden/ |

Attachment: pgplHVjmYasCD.pgp
Description: PGP signature


Reply to: