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

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

    <bug>
          <bug_id>11886</bug_id>
          
          <creation_ts>2007-05-24 21:00:57 +0400</creation_ts>
          <short_desc>[FR] add properly secured /var/run/upssched/ out-of-box</short_desc>
          <delta_ts>2021-12-05 19:02:47 +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>nut</component>
          <version>unstable</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Shigorin">mike</reporter>
          <assigned_to name="Michael Shigorin">mike</assigned_to>
          <cc>alexsid</cc>
    
    <cc>amike</cc>
    
    <cc>ded</cc>
    
    <cc>ldv</cc>
    
    <cc>mike</cc>
    
    <cc>rider</cc>
    
    <cc>vvk</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>50670</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Shigorin">mike</who>
    <bug_when>2007-05-24 21:00:57 +0400</bug_when>
    <thetext>To run upssched (e.g. for early shutdowns or otherwise peculiar logic), it&apos;s
recommended/required to create separate protected directory for a pipe and a
lock; would be nice to have it in the package.

upssched.conf hints that %dir(700,upsmon,upsmon) %_var/run/upssched/ seems proper:

# ============================================================================
#
# PIPEFN &lt;filename&gt;
#
# This sets the file name of the FIFO that will pass communications between
# processes to start and stop timers.  This should be set to some path where
# normal users can&apos;t create the file, due to the possibility of symlinking
# and other evil.
#
# Note: if you are running Solaris or similar, the permissions that 
# upssched sets on this file *are not enough* to keep you safe.  If
# your OS ignores the permissions on a FIFO, then you MUST put this in
# a protected directory!
#
# Note 2: by default, upsmon will run upssched as whatever user you have
# defined with RUN_AS_USER in upsmon.conf.  Make sure that user can
# create files and write to files in the path you use for PIPEFN and
# LOCKFN.
#
# My recommendation: create a special directory for upssched, make it
# owned by your upsmon user, then use it for both.
#
# This is commented out by default to make you visit this file and think
# about how your system works before potentially opening a hole.
#
# PIPEFN /var/run/upssched/upssched.pipe

# ============================================================================
#
# LOCKFN &lt;filename&gt;
#
# REQUIRED.  This was added after version 1.2.1.
#
# upssched needs to be able to create this filename in order to avoid
# a race condition when two events are dispatched from upsmon at nearly
# the same time.  This file will only exist briefly.  It must not be
# created by any other process.
#
# You should put this in the same directory as PIPEFN.
#
# LOCKFN /var/run/upssched/upssched.lock</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>99334</commentid>
    <comment_count>1</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2009-09-18 01:06:41 +0400</bug_when>
    <thetext>Пакет nut ищет мейнтейнера.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>99428</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Shigorin">mike</who>
    <bug_when>2009-09-18 23:58:01 +0400</bug_when>
    <thetext>2 alexsid: берёмся?  У меня сейчас бесперебойник не под рукой и как буду дома -- будет скорее всего не до патчей, но проверить твои можно попробовать.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>99466</commentid>
    <comment_count>3</comment_count>
    <who name="Alexey Sidorov">alexsid</who>
    <bug_when>2009-09-19 09:46:34 +0400</bug_when>
    <thetext>У меня сейчас совсем нет времени.....
И когда появится - неизвестно</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>116760</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Shigorin">mike</who>
    <bug_when>2010-12-29 13:18:10 +0300</bug_when>
    <thetext>Пакет сборки amike@ залил в сизиф всё-таки я.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>205730</commentid>
    <comment_count>5</comment_count>
    <who name="Anton Farygin">rider</who>
    <bug_when>2021-12-05 19:02:47 +0300</bug_when>
    <thetext>В текущем пакете upssched вообще никакой не упакован, видимо в надежде что администратор сделает всё хорошо сам.

Это, конечно, не очень хорошо.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>