[krbdev.mit.edu #6002] krb5_rc_io_creat should use mkstemp

Ken Raeburn via RT rt-comment at krbdev.mit.edu
Fri Jul 18 01:39:20 EDT 2008


On Jul 17, 2008, at 23:53, Tom Yu via RT wrote:
> It looks like recent BSD-derived implementations of mkstemp() use mode
> 0600, but POSIX does not guarantee this.  We could call mkstemp() and
> then fstat() to make sure we got the modes we expect, and if we get
> modes we do not expect, fall back on something more irritating.  (Or
> do autoconf run-time tests to see if mkstemp() is sane, but I'd rather
> not do run-time tests.)

If we need to have the fallback code anyways, what's the benefit in  
trying mkstemp+fstat?

Ken




More information about the krb5-bugs mailing list