<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>34527</bug_id>
          
          <creation_ts>2018-02-11 15:57:05 +0300</creation_ts>
          <short_desc>Wrong order in PATH env variable</short_desc>
          <delta_ts>2018-02-13 18:45:57 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>systemd</component>
          <version>unstable</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>relnote, security, systemd</keywords>
          <priority>P3</priority>
          <bug_severity>critical</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Alexey Gladkov">legion</reporter>
          <assigned_to name="Alexey Shabalin">shaba</assigned_to>
          <cc>arseny</cc>
    
    <cc>ldv</cc>
    
    <cc>mike</cc>
    
    <cc>shaba</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>168919</commentid>
    <comment_count>0</comment_count>
    <who name="Alexey Gladkov">legion</who>
    <bug_when>2018-02-11 15:57:05 +0300</bug_when>
    <thetext>Я заметил, что systemd выставляет довольно странный PATH для запускаемых сервисов:

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

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

# cat /proc/$(pidof -s consolelocker)/environ |tr &apos;\0&apos; &apos;\n&apos; |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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>168967</commentid>
    <comment_count>1</comment_count>
    <who name="Repository Robot">repository-robot</who>
    <bug_when>2018-02-13 17:53:12 +0300</bug_when>
    <thetext>systemd-1:237-alt2 -&gt; sisyphus:

Tue Feb 13 2018 Alexey Shabalin &lt;shaba@altlinux.ru&gt; 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</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>