systemd-stable v246.3
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEXCUbX8VOsvgPQHqqxUyjNs/rVX4FAl9GV4YACgkQxUyjNs/r
VX74qg//R1Csv/OSWh0+F4tDu432COzvSn9gCrTXNITillx/IQTbAH9Qufib2eMa
XtWprS8N1GNLHacEVgEHnlTJDSqaW+nbeILKraSEM4k+EGVb1224G2aMf0hz28gc
sm8CQIJCEm5vVW7I6pJj3OfHVvkeeNFKVyhJc4Mt8+f6II7zbYajWUkFpMElf1Pd
GFlU1sSJZsUqvemN2vzMDPjRwlEhx9jApbCTHQ5sVBaQQwTTIquuxsLE3nXrPpDN
lcly2p1u9do75i9CLDF/1uis3c3dmpvTn6rY9yeh0a92H05jx1ZrcCTrrIYM81Mj
IdHLHLVnPkPkdeEnT6JBbijy+7ufewZ0tcxz9whD5Q/9zddzClaT+osSLYkj2lgD
poQlAwO1EcMNZJkU/KAfvuNj9CYff40RElGC+qlzlzCk/C60ihkWt696easkd8V+
LvuxJANiko+7lmz6jJlywrzYhV7/EzX8xRT4mfkaBIoG7jSU5a+5mYhFHhgnEwBO
84j5nAAtNZh0/MvjCexfQuqrQT1lEScP6P5HLqR4r/ZPjtn2DKHg3Dl/+gAQ81u5
rPvN7HmkLyrfgP2P9n+X9B+1NXrFdyjjsyjhqQp/gv7mTroSP5odtM/mif5bVdaz
cEN0VFbt2dROZfI2Z5glm/EtTrxZRTa/hJRAGYkaPDP10cnixAk=
=JouJ
-----END PGP SIGNATURE-----
path: Skip directories when finalising $PATH search

Imagine $PATH /a:/b. There is an echo command at /b/echo. Under this
configuration, this works fine:

    % systemd-run --user --scope echo .
    Running scope as unit: run-rfe98e0574b424d63a641644af511ff30.scope
    .

However, if I do `mkdir /a/echo`, this happens:

    % systemd-run --user --scope echo .
    Running scope as unit: run-rcbe9369537ed47f282ee12ce9f692046.scope
    Failed to execute: Permission denied

We check whether the resulting file is executable for the performing
user, but of course, most directories are anyway, since that's needed to
list within it. As such, another is_dir() check is needed prior to
considering the search result final.

Another approach might be to check S_ISREG, but there may be more gnarly
edge cases there than just eliminating this obviously pathological
example, so let's just do this for now.

(cherry picked from commit 8b5cb69bc8b70d1dcc39ed2165907723099bd9d8)
1 file changed
tree: 631c80a63144b59a9ed5dff80dddfbd9c75cd55e
  1. .clang-format
  2. .ctags
  3. .dir-locals.el
  4. .editorconfig
  5. .gitattributes
  6. .github/
  7. .gitignore
  8. .lgtm.yml
  9. .lgtm/cpp-queries/
  10. .mailmap
  11. .mkosi/
  12. .travis.yml
  13. .vimrc
  14. .ycm_extra_conf.py
  15. LICENSE.GPL2
  16. LICENSE.LGPL2.1
  17. Makefile
  18. NEWS
  19. README
  20. README.md
  21. TODO
  22. azure-pipelines.yml
  23. catalog/
  24. coccinelle/
  25. configure
  26. docs/
  27. factory/etc/
  28. hwdb.d/
  29. man/
  30. meson.build
  31. meson_options.txt
  32. mkosi.build
  33. modprobe.d/
  34. network/
  35. po/
  36. presets/
  37. rules.d/
  38. semaphoreci/
  39. shell-completion/
  40. src/
  41. sysctl.d/
  42. sysusers.d/
  43. test/
  44. tmpfiles.d/
  45. tools/
  46. travis-ci/
  47. units/
  48. xorg/
  49. zanata.xml
README.md

Systemd

System and Service Manager

Semaphore CI Build Status
Coverity Scan Status
OSS-Fuzz Status
CIFuzz
CII Best Practices
Travis CI Build Status
Language Grade: C/C++
CentOS CI Build Status
Build Status
Fossies codespell report Packaging status

Details

Most documentation is available on systemd's web site.

Assorted, older, general information about systemd can be found in the systemd Wiki.

Information about build requirements is provided in the README file.

Consult our NEWS file for information about what's new in the most recent systemd versions.

Please see the Hacking guide for information on how to hack on systemd and test your modifications.

Please see our Contribution Guidelines for more information about filing GitHub Issues and posting GitHub Pull Requests.

When preparing patches for systemd, please follow our Coding Style Guidelines.

If you are looking for support, please contact our mailing list or join our IRC channel.

Stable branches with backported patches are available in the stable repo.