1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-06 00:58:29 +03:00
Tobias Klauser 6b90a13789 profile.d: don't bail if $SHELL_* variables are unset
If - for whatever reason - a script uses set -u (nounset) and includes
/etc/profile.d/70-systemd-shell-extra.sh (e.g. transitively via
/etc/profile) the script would fail with:

    /etc/profile.d/70-systemd-shell-extra.sh: line 15: SHELL_PROMPT_PREFIX: unbound variable

For example:

    $ cat > foo.sh <<EOF
    #!/bin/sh
    set -u

    source /etc/profile
    EOF
    $ chmod 700 foo.sh
    $ ./foo.sh
    /etc/profile.d/70-systemd-shell-extra.sh: line 15: SHELL_PROMPT_PREFIX: unbound variable

Fix this by using shell parameter substitution[^1] (which is a POSIX
shell concept) to set the $SHELL_* variables to the empty string if
undefined.

[^1]: https://pubs.opengroup.org/onlinepubs/9699919799.2018edition/utilities/V3_chap02.html

(cherry picked from commit 12e33d332b3f8754f4d5d0d21d5d3f0de8adc54c)
2024-12-12 16:33:57 +00:00
2022-04-26 09:13:57 +00:00
2024-10-07 19:40:58 +01:00
2024-04-18 17:39:34 +02:00
2024-12-10 19:39:23 +00:00
2024-12-10 15:18:39 +00:00
2024-08-05 15:00:24 +02:00
2024-12-06 18:26:40 +09:00
2023-10-31 13:07:49 +01:00
2024-12-05 03:59:32 +09:00
2024-09-22 15:23:08 +02:00
2024-12-10 19:23:45 +00:00
2024-04-11 12:58:53 +02:00
2024-11-27 13:06:18 +01:00

Systemd

System and Service Manager

Semaphore CI 2.0 Build Status
Coverity Scan Status
OSS-Fuzz Status
CIFuzz
CII Best Practices
CentOS CI - CentOS 9
CentOS CI - Arch
CentOS CI - Arch (sanitizers)
Fossies codespell report
Weblate
Coverage Status
Packaging status
OpenSSF Scorecard

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 Code Map for information about this repository's layout and content.

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, join our IRC channel #systemd on libera.chat or Matrix channel

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

We have a security bug bounty program sponsored by the Sovereign Tech Fund hosted on YesWeHack

Description
The systemd System and Service Manager
Readme 561 MiB
Languages
C 89.2%
Python 5.3%
Shell 4.1%
Meson 1.2%