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

Re: [MiNT] an example of broken lib



On Wed, Jun 23, 1999 at 07:46:02PM +0200, Guido Flohr wrote:
> But in 99 % of the cases, using fchmod instead of chmod is just lazyness
> of the programmer (don't have to remember the path name).  And besides,
> the above trick would not work with primitive file systems and so MagiC
> compatibility is not really an issue here.

AFAIR, fchmod was created for security reasons, not for lazyness. Using
chmod and a separate open, you have a short time window between the two
calls, so you can't be sure that the file you open is the same that you
chmod. That's also the problem with emulating this in the library: it will
work, but it will not fix the security problem.

cu
Michael
-- 
Michael Schwingen, Ahornstrasse 36, 52074 Aachen

Attachment: pgpZJz9C7GFxh.pgp
Description: PGP signature