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

Re: Why does utime() exist?


   Date: 	Sat, 19 Aug 2000 11:22:10 +0200
   From: Julien Oster <joster _at_ soft-research.de>

   Why the heck does utime() exist? I could understand it, if it would only
   have a filename as argument and issuing it would change the access and/or
   modification time to the current time - also known as "touch"ing files.

Because you want to be able to restore the access and modification times
when (a) unpacking a tar file, (b) using rsync -t, or (c) mirroring an
FTP directory.  This is in turn necessary because various programs like
make depend on the modification time being correct.

   Is it safe to disable it? It makes life a little harder for system
   administrators concerned about security...

You'll violate posix and confuse various programs depend on the
modification times being correct.

Any programs which depend on modification or access times for security
purposes are broken.  You can use the inode change (ctime) field for
various security purposes --- various games like rogue have used this to
try to keep people from cheating by saving and restoring save files ---
but in general even that's not such a hot idea.

						- Ted

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo _at_ vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

この情報があなたの探していたものかどうか選択してください。
yes/まさにこれだ!   no/違うなぁ   part/一部見つかった   try/これで試してみる

あなたが探していた情報はどのようなことか、ご自由に記入下さい。特に「まさにこれだ!」と言う場合は記入をお願いします。
例:「複数のマシンからCATV経由でipmasqueradeを利用してWebを参照したい場合の設定について」
Follow-Ups: