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

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

    <bug>
          <bug_id>54267</bug_id>
          
          <creation_ts>2025-05-14 21:13:56 +0300</creation_ts>
          <short_desc>integrity-notifier.service failed, если also пользователь не залогинен</short_desc>
          <delta_ts>2025-05-21 23:12:13 +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>integrity-notifier</component>
          <version>unstable</version>
          <rep_platform>x86</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></keywords>
          <priority>P5</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Владимир Шумилов">vshumilov</reporter>
          <assigned_to name="manowar@altlinux.org">manowar</assigned_to>
          <cc>alimektor</cc>
    
    <cc>manowar</cc>
    
    <cc>nbr</cc>
    
    <cc>vshumilov</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>264766</commentid>
    <comment_count>0</comment_count>
    <who name="Владимир Шумилов">vshumilov</who>
    <bug_when>2025-05-14 21:13:56 +0300</bug_when>
    <thetext>При попытке запуска неподписанной программы пользовательем-1 integrity-notifier.service завершается с ошибкой и не рестартует, если указанный в /etc/integrity/also какой-либо пользователь незалогинен.


[vs@host-191 ~]$ systemctl status integrity-notifier.service
× integrity-notifier.service - Integrity notifier service
     Loaded: loaded (/lib/systemd/system/integrity-notifier.service; enabled; vendor preset: disabled)
     Active: failed (Result: exit-code) since Wed 2025-05-14 21:10:46 MSK; 34s ago
    Process: 2268 ExecStart=/usr/sbin/integrity-notifier (code=exited, status=1/FAILURE)
   Main PID: 2268 (code=exited, status=1/FAILURE)
        CPU: 25ms

мая 14 21:06:22 host-191 systemd[1]: Started Integrity notifier service.
мая 14 21:06:22 host-191 integrity-notifier[2285]: tail: &apos;/var/log/integrityd//current&apos; стал недоступен: Нет такого файла или ката&gt;
мая 14 21:06:22 host-191 integrity-notifier[2285]: tail: &apos;/var/log/integrityd//current&apos; появился; новый файл
мая 14 21:10:46 host-191 integrity-notifier[3121]: write: vvs is not logged in
мая 14 21:10:46 host-191 systemd[1]: integrity-notifier.service: Main process exited, code=exited, status=1/FAILURE
мая 14 21:10:46 host-191 systemd[1]: integrity-notifier.service: Failed with result &apos;exit-code&apos;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>264767</commentid>
    <comment_count>1</comment_count>
    <who name="Владимир Шумилов">vshumilov</who>
    <bug_when>2025-05-14 21:18:34 +0300</bug_when>
    <thetext>Всё это происходит из-за того, что в скрипте /usr/sbin/integrity-notifier используется команда write для отправки сообщений. Собственно, это и вызывает ошибку и падение сервиса.

Этого можно избежать, если использовать команду logger -p emerg &quot;message&quot;
В данном случае сообщения будут отправлены широковещательные сообщения и сделана запись в журнал</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>264791</commentid>
    <comment_count>2</comment_count>
    <who name="Владимир Шумилов">vshumilov</who>
    <bug_when>2025-05-15 07:25:37 +0300</bug_when>
    <thetext>Либо необходимо проверять список пользователей, кто залогинен, кто нет</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>264799</commentid>
    <comment_count>3</comment_count>
    <who name="Владимир Шумилов">vshumilov</who>
    <bug_when>2025-05-15 09:00:11 +0300</bug_when>
    <thetext>Либо необходимо проверять список пользователей, кто залогинен, кто нет</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>265146</commentid>
    <comment_count>4</comment_count>
    <who name="Evgeny Shesteperov">alimektor</who>
    <bug_when>2025-05-19 17:03:37 +0300</bug_when>
    <thetext>Версия

-   integrity-notifier-0.7.1-alt1

Шаги воспроизведения

    # useradd checkuser
    # passwd checkuser
    # apt-get install integrity-notifier ima-evm-integrity-check updater -y
    # echo checkuser &gt;&gt; /etc/integrity/also
    # systemctl enable --now integrity-notifier; systemctl status integrity-notifier --no-pager -l
    # echo &quot;@$(echo -n &quot;40000000&quot; &amp;&amp; head -c 8 /dev/urandom | xxd -p | tr -d &apos;\n&apos;) $(date +&apos;%d %B %H:%M:%S&apos;) $(hostname) audit[3000]: INTEGRITY_DATA pid=3000 uid=$(id -u checkuser) auid=0 ses=1 op=appraise_data cause=invalid-signature comm=\&quot;bash\&quot; name=\&quot;/usr/bin/mc\&quot; dev=\&quot;sda1\&quot; ino=681023 res=0 errno=0&quot; &gt;&gt; /var/log/integrityd/current
    # systemctl status integrity-notifier --no-pager -l

Ожидаемый результат: сервис в статусе running

Фактический результат: сервис в статусе failed</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>265297</commentid>
    <comment_count>5</comment_count>
    <who name="Repository Robot">repository-robot</who>
    <bug_when>2025-05-21 23:12:13 +0300</bug_when>
    <thetext>integrity-notifier-0.7.2-alt1 -&gt; sisyphus:

 Wed May 21 2025 Paul Wolneykien &lt;manowar@altlinux&gt; 0.7.2-alt1
 - Restart both services on failure.
 - Fix: Don&apos;t exit on write failure (closes: 54267).</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>