1. 25 5月, 2022 1 次提交
  2. 03 5月, 2022 1 次提交
    • M
      Remove hard links from `env::current_exe` security example · 9a1dc2a0
      Martin Geisler 提交于
      The security example shows that `env::current_exe` will return the
      path used when the program was started. This is not really surprising
      considering how hard links work: after `ln foo bar`, the two files are
      _equivalent_. It is _not_ the case that `bar` is a “link” to `foo`,
      nor is `foo` a link to `bar`. They are simply two names for the same
      underlying data.
      
      The security vulnerability linked to seems to be different: there an
      attacker would start a SUID binary from a directory under the control
      of the attacker. The binary would respawn itself by executing the
      program found at `/proc/self/exe` (which the attacker can control).
      This is a real problem. In my opinion, the example given here doesn’t
      really show the same problem, it just shows a misunderstanding of what
      hard links are.
      
      I looked through the history a bit and found that the example was
      introduced in #33526. That PR actually has two commits, and the
      first (8478d48d) explains the race
      condition at the root of the linked security vulnerability. The second
      commit proceeds to replace the explanation with the example we have
      today.
      
      This commit reverts most of the second commit from #33526.
      9a1dc2a0
  3. 14 4月, 2022 1 次提交
  4. 28 3月, 2022 1 次提交
  5. 10 3月, 2022 1 次提交
    • T
      Use implicit capture syntax in format_args · 72a25d05
      T-O-R-U-S 提交于
      This updates the standard library's documentation to use the new syntax. The
      documentation is worthwhile to update as it should be more idiomatic
      (particularly for features like this, which are nice for users to get acquainted
      with). The general codebase is likely more hassle than benefit to update: it'll
      hurt git blame, and generally updates can be done by folks updating the code if
      (and when) that makes things more readable with the new format.
      
      A few places in the compiler and library code are updated (mostly just due to
      already having been done when this commit was first authored).
      72a25d05
  6. 11 2月, 2022 1 次提交
  7. 31 10月, 2021 1 次提交
  8. 19 10月, 2021 1 次提交
  9. 17 9月, 2021 1 次提交
  10. 27 8月, 2021 1 次提交
  11. 17 8月, 2021 1 次提交
  12. 29 7月, 2021 1 次提交
  13. 24 7月, 2021 1 次提交
  14. 06 7月, 2021 3 次提交
  15. 24 6月, 2021 1 次提交
  16. 10 5月, 2021 1 次提交
  17. 30 4月, 2021 1 次提交
  18. 29 4月, 2021 1 次提交
  19. 28 4月, 2021 1 次提交
  20. 25 4月, 2021 2 次提交
  21. 22 4月, 2021 1 次提交
  22. 21 4月, 2021 1 次提交
  23. 21 1月, 2021 1 次提交
  24. 05 9月, 2020 1 次提交
  25. 31 8月, 2020 1 次提交
  26. 30 8月, 2020 2 次提交
  27. 17 8月, 2020 2 次提交
  28. 28 7月, 2020 1 次提交
  29. 15 7月, 2020 1 次提交
  30. 09 6月, 2020 2 次提交
  31. 02 5月, 2020 1 次提交
  32. 19 3月, 2020 1 次提交
  33. 01 1月, 2020 1 次提交
  34. 28 12月, 2019 1 次提交