Received: from biscayne-one-station.mit.edu (BISCAYNE-ONE-STATION.MIT.EDU [18.7.7.80]) by krbdev.mit.edu (8.12.9) with ESMTP id m6I5dFo4001562; Fri, 18 Jul 2008 01:39:15 -0400 (EDT) Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) by biscayne-one-station.mit.edu (8.13.6/8.9.2) with ESMTP id m6I5d8at016035; Fri, 18 Jul 2008 01:39:09 -0400 (EDT) Received: from squish.raeburn.org (c-65-96-169-35.hsd1.ma.comcast.net [65.96.169.35]) (authenticated bits=0) (User authenticated as raeburn@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id m6I5d8XY024024 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Fri, 18 Jul 2008 01:39:08 -0400 (EDT) Message-ID: <6A52881A-6CE1-4F9F-800C-954F24C6B8E8@mit.edu> From: Ken Raeburn To: rt-comment@krbdev.mit.edu In-Reply-To: Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Subject: Re: [krbdev.mit.edu #6002] krb5_rc_io_creat should use mkstemp MIME-Version: 1.0 (Apple Message framework v928.1) Date: Fri, 18 Jul 2008 01:39:07 -0400 References: X-Mailer: Apple Mail (2.928.1) X-Scanned-BY: MIMEDefang 2.42 X-Spam-Flag: NO X-Spam-Score: 0.00 RT-Send-Cc: X-RT-Original-Encoding: us-ascii Content-Length: 531 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