Jump to content

Talk:Time-of-check to time-of-use

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

I think this is most known as toctou not tocttou

compare with google

http://download.oracle.com/javase/tutorial/essential/io/check.html mentions it as TOCTTOU --173.25.223.151 (talk) 02:55, 29 January 2011 (UTC)[reply]

linux

[edit]

someone should mention that you can prevent tocttou under linux via the following sysctl settings: fs.protected_hardlinks = 1 and fs.protected_symlinks = 1 79.230.118.243 (talk) —Preceding undated comment added 14:14, 18 June 2013 (UTC)[reply]

Other examples and solutions

[edit]

File systems aren't the only place TOCTOU shows up. Here are some other familiar examples that might be worth working into the article.

TOCTOU vs. TOCTTOU

[edit]

We list the TOCTTOU acronym first, and use it preferentially. I think that's backwards. I tried some searches:

Engine TOCTOU TOCTTOU
Google 68,700 24,500
Google Scholar 719 603
Bing 30,000 13,600
ACM Digital Library 0 8
IEEE Explore Digital Library 10 2
Github 8 3

There's a clear preference for TOCTOU in actual usage in both the general purpose and technical corpora. I can only assume that the ACM outlier is due to a house style preference, which the IEEE doesn't share. Surprisingly, kernel.org's bugzilla comes up with "Zarro Boogs" for either term. Unclear what to make of that.

I think we should go with the most common usage.

[edit]

Hello fellow Wikipedians,

I have just modified 2 external links on Time of check to time of use. Please take a moment to review my edit. If you have any questions, or need the bot to ignore the links, or the page altogether, please visit this simple FaQ for additional information. I made the following changes:

When you have finished reviewing my changes, you may follow the instructions on the template below to fix any issues with the URLs.

This message was posted before February 2018. After February 2018, "External links modified" talk page sections are no longer generated or monitored by InternetArchiveBot. No special action is required regarding these talk page notices, other than regular verification using the archive tool instructions below. Editors have permission to delete these "External links modified" talk page sections if they want to de-clutter talk pages, but see the RfC before doing mass systematic removals. This message is updated dynamically through the template {{source check}} (last update: 5 June 2024).

  • If you have discovered URLs which were erroneously considered dead by the bot, you can report them with this tool.
  • If you found an error with any archives or the URLs themselves, you can fix them with this tool.

Cheers.—InternetArchiveBot (Report bug) 18:07, 9 January 2018 (UTC)[reply]

This needs a plainer-English summary for non-technical folks

[edit]

I know "people with no technology background interested in TOCTOU" is probably a very small group, but it would be great to have a really plain English, non-technical summary of what this is. 50.72.32.79 (talk) 00:47, 8 April 2023 (UTC)[reply]

Suppose you call up your neighborhood Widget store and ask, "Do you have any sprockets?" And they say, "We have one left." And you say "Great!", and hang up, and race to the store, and say, "I want a sprocket". But they say, "We're all out", and you say, "But you just told me you had one!", and they say, "Well, yeah, but in the meantime someone else came in and bought it."
In other words, something significant happened between the time you called and checked ("TOC") and the time you tried to buy ("TOU"), and this affected your ability to successfully complete your task.
If, instead, you had gone to the store first, you could have — maybe — found the sprocket on the shelf, and walked up to the counter with it in your hand, and said "I want to buy this sprocket". That way, no one else could have taken it away from you. (Well, at least not without a fight.)
Going to the store and then trying to buy the item doesn't guarantee you'll get one — it's possible that when you get there you'll discover they don't have any — but it does guarantee that you won't have the extra-disappointing surprise of getting your hopes up, thinking you had access to your item, but then not getting it after all.
Another solution is that when you called in advance to ask if they had one, and they told you they did, you could have asked, "Can you hold it for me?". That's the real-life analogy to "adopting transactions in the file system or the OS kernel" as mentioned in the article. —scs (talk) 22:04, 21 August 2023 (UTC)[reply]