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

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

    <bug>
          <bug_id>17719</bug_id>
          
          <creation_ts>2008-10-29 01:14:10 +0300</creation_ts>
          <short_desc>a mechanism for maintaining consistent intended relations between /etc/passwd and /etc/group</short_desc>
          <delta_ts>2021-12-12 20:01:33 +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>rpm</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>enhancement</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>17718</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Ivan Zakharyaschev">imz</reporter>
          <assigned_to name="placeholder@altlinux.org">placeholder</assigned_to>
          <cc>at</cc>
    
    <cc>glebfm</cc>
    
    <cc>imz</cc>
    
    <cc>lav</cc>
    
    <cc>ldv</cc>
    
    <cc>mike</cc>
    
    <cc>n3npq</cc>
    
    <cc>placeholder</cc>
    
    <cc>vt</cc>
          
          <qa_contact name="qa-4.1@altlinux.org">qa-4.1</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>80393</commentid>
    <comment_count>0</comment_count>
    <who name="Ivan Zakharyaschev">imz</who>
    <bug_when>2008-10-29 01:14:10 +0300</bug_when>
    <thetext>https://bugzilla.altlinux.org/show_bug.cgi?id=17718 suggests that the intended configuration of permissions for klogd be checked in a working system. The &quot;configuration&quot; is the relation between the dedicated user &quot;klogd&quot;, his primary group (stored in /etc/passwd), the group named &quot;klogd&quot; (stored in /etc/groups) and the permissions on the working directory (/var/lib/klogd/...).

The situation reported in https://bugzilla.altlinux.org/show_bug.cgi?id=17250 was caused by a typo in /etc/passwd which had lead to an inconsistency between /etc/passwd and /etc/group.

This inconsistency could have been formally discovered. 

This feature request suggests there could be a general mechanism for this in the system (and it could be employed, say, on every startup of a service, or after the administrator edited something).

Now the intended configuration is expressed in an imperative way by the commands in the RPM preinstall script:

# rpm -q klogd --scripts 
preinstall scriptlet (through /bin/sh):
/usr/sbin/groupadd -r -f klogd
/usr/sbin/useradd -r -g klogd -d /dev/null -s /dev/null -n klogd &gt;/dev/null 2&gt;&amp;1 ||:

but this intention could be installed as a declarative policy (&quot;the primary gid of user klogd is the group with name klogd&quot;). Then this policy could be checked any time.

(And such a check would discover my typo.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80395</commentid>
    <comment_count>1</comment_count>
    <who name="Ivan Zakharyaschev">imz</who>
    <bug_when>2008-10-29 01:35:05 +0300</bug_when>
    <thetext>A simplified approximation to such checks (on package upgrades): https://bugzilla.altlinux.org/show_bug.cgi?id=17720 .</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>128035</commentid>
    <comment_count>2</comment_count>
    <who name="Jeff Johnson">n3npq</who>
    <bug_when>2012-01-02 19:52:24 +0400</bug_when>
    <thetext>tracked at https://bugs.launchpad.net/rpm/+bug/910889</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>