diff options
author | Chris Down <chris@chrisdown.name> | 2020-08-26 18:49:27 +0100 |
---|---|---|
committer | Chris Down <chris@chrisdown.name> | 2020-08-27 00:52:20 +0100 |
commit | 33e1a5d8d3f792e1d98377fe439e123231032ec7 (patch) | |
tree | bb8544e1f88500a816c7337e8ef266600245261e /src/timedate | |
parent | bb2aee7d114841d1c095121f0ac6b3e9bc0342dc (diff) | |
download | systemd-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