KTemporaryFile::createLocalFile()

Oswald Buddenhagen ossi at kde.org
Fri Jul 6 16:40:20 BST 2007


On Thu, Jul 05, 2007 at 04:38:42PM +0100, Thiago Macieira wrote:
> Oswald Buddenhagen wrote:
> >now you exposed you ignorance about posix semantics. :-P
> >assume temp files in /tmp. this dir is sticky. no user (except root, but
> >root being trustable is a premise anyway) can rename or delete (and thus
> >replace) another user's files. => we are safe.
> 
> The best protection we have is a private temporary directory, one which no 
> other user can access.
> 
which would not help if its parent directory is not sticky. unless it
resides in a private directory already, but then this discussion is
pointless.

> The sticky bit doesn't solve the problem related to creating a file, 
> deleting, then recreating it with the same name (which is what Dominik 
> wanted).
> 
it does.

another point why this "must keep using one fd to be secure" argument
just doesn't cut it, at least on unix: it simply does not work in
scripts. don't you think the problem was most probably solved
adequately?

-- 
Hi! I'm a .signature virus! Copy me into your ~/.signature, please!
--
Chaos, panic, and disorder - my work here is done.




More information about the kde-core-devel mailing list