summaryrefslogtreecommitdiff
path: root/src/timedate
diff options
context:
space:
mode:
authorChris Down <chris@chrisdown.name>2020-08-26 18:49:27 +0100
committerChris Down <chris@chrisdown.name>2020-08-27 00:52:20 +0100
commit33e1a5d8d3f792e1d98377fe439e123231032ec7 (patch)
treebb8544e1f88500a816c7337e8ef266600245261e /src/timedate
parentbb2aee7d114841d1c095121f0ac6b3e9bc0342dc (diff)
downloadsystemd-33e1a5d8d3f792e1d98377fe439e123231032ec7.tar.gz
path: Improve $PATH search directory case
Previously: 1. last_error wouldn't be updated with errors from is_dir; 2. We'd always issue a stat(), even for binaries without execute; 3. We used stat() instead of access(), which is cheaper. This change avoids all of those, by only checking inside X_OK-positive case whether access() works on the path with an extra slash appended. Thanks to Lennart for the suggestion.
Diffstat (limited to 'src/timedate')
0 files changed, 0 insertions, 0 deletions