Bug 34527 - Wrong order in PATH env variable
Summary: Wrong order in PATH env variable
Status: CLOSED FIXED
Alias: None
Product: Sisyphus
Classification: Development
Component: systemd (show other bugs)
Version: unstable
Hardware: all Linux
: P3 critical
Assignee: Alexey Shabalin
QA Contact: qa-sisyphus
URL:
Keywords: relnote, security, systemd
Depends on:
Blocks:
 
Reported: 2018-02-11 15:57 MSK by Alexey Gladkov
Modified: 2018-02-13 18:45 MSK (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Gladkov 2018-02-11 15:57:05 MSK
Я заметил, что systemd выставляет довольно странный PATH для запускаемых сервисов:

# cat /proc/$(pidof -s systemd-udevd)/environ |tr '\0' '\n' |grep PATH=
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

# cat /proc/$(pidof -s systemd-journald)/environ |tr '\0' '\n' |grep PATH=
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

# cat /proc/$(pidof -s consolelocker)/environ |tr '\0' '\n' |grep PATH=
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

выходит, что содержимое /usr/local/bin перебивает /usr/sbin и /sbin.

Для примера, у рута по умолчанию:

PATH=/sbin:/usr/sbin:/usr/local/sbin:/bin:/usr/bin:/usr/local/bin
Comment 1 Repository Robot 2018-02-13 17:53:12 MSK
systemd-1:237-alt2 -> sisyphus:

Tue Feb 13 2018 Alexey Shabalin <shaba@altlinux.ru> 1:237-alt2
- merge with v237-stable branch
- include additional directories in ProtectSystem
- let graphical-session-pre.target be manually started
- fix order in PATH (ALT #34527)
- add conflicts to ConsoleKit2 for logind