<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>10442</bug_id>
          
          <creation_ts>2016-10-17 08:13:14 +0000</creation_ts>
          <short_desc>avahi: deluser and delgroup in postrm script</short_desc>
          <delta_ts>2016-11-21 23:02:25 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>connectivity</component>
          <version>2.2</version>
          <rep_platform>All</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.3 M2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Markus Lehtonen">markus.lehtonen</reporter>
          <assigned_to name="Jussi Kukkonen">jku</assigned_to>
          <cc>jose.perez.carranza</cc>
    
    <cc>maxin.john</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
          
          <qa_contact name="Juan Ramos">juan.fernandox.ramos.frayle</qa_contact>
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>67284</commentid>
    <comment_count>0</comment_count>
    <who name="Markus Lehtonen">markus.lehtonen</who>
    <bug_when>2016-10-17 08:13:14 +0000</bug_when>
    <thetext>This bug stemmed from the discussion in bug 10299.

I think that packages shouldn&apos;t remove users or groups in postrm scriptlets. Otherwise the system may be left with files with non-existent owner. It may even cause security issues if somebody, at a later time, adds a new user or group with the used-to-be-avahi UID or GID. In this case the new user has full access to the leftover files, e.g. configuration or log files.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67286</commentid>
    <comment_count>1</comment_count>
    <who name="Jussi Kukkonen">jku</who>
    <bug_when>2016-10-17 08:34:43 +0000</bug_when>
    <thetext>This seems reasonable: if we wanted to remove users it should be part of USERADD machinery anyway, not up to individual postrm functions.

distcc has the same issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67289</commentid>
    <comment_count>2</comment_count>
    <who name="Maxin B. John">maxin.john</who>
    <bug_when>2016-10-17 12:23:52 +0000</bug_when>
    <thetext>In #9262, we had a similar discussion and &quot;unofficially&quot; agreed that we won&apos;t delete the existing users/groups from the rootfs.

https://bugzilla.yoctoproject.org/show_bug.cgi?id=9262#c2</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68018</commentid>
    <comment_count>3</comment_count>
    <who name="Jussi Kukkonen">jku</who>
    <bug_when>2016-11-07 08:41:23 +0000</bug_when>
    <thetext>Fixed in poky:

commit 5354a4a315550f71686af17b42818cb1976a7f19
Author: Jussi Kukkonen &lt;jussi.kukkonen@intel.com&gt;
Date:   Mon Oct 31 15:40:18 2016 +0200

    distcc: Don&apos;t remove users/groups in postrm
    
    There&apos;s no way to ensure that files owned by the users aren&apos;t left
    on the system at postrm time: Removing the user would mean those
    files are now owned by a non-existing user, and later may be owned
    by a completely unrelated new user.
    
    (From OE-Core rev: 776370efb9fa48b82ac991e3d001accd122d611b)
    
    Signed-off-by: Jussi Kukkonen &lt;jussi.kukkonen@intel.com&gt;
    Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;

commit b1e1c12a3f4d6a06aaf2ed18b1f2a9a7de5f0198
Author: Jussi Kukkonen &lt;jussi.kukkonen@intel.com&gt;
Date:   Mon Oct 31 15:40:17 2016 +0200

    avahi: Don&apos;t remove users/groups in postrm
    
    There&apos;s no way to ensure that files owned by the users aren&apos;t left
    on the system at postrm time: Removing the user would mean those
    files are now owned by a non-existing user, and later may be owned
    by a completely unrelated new user.
    
    [YOCTO #10442]
    
    (From OE-Core rev: c1be2196e7ffb23b7b243ecd8aca1827cbdfa443)
    
    Signed-off-by: Jussi Kukkonen &lt;jussi.kukkonen@intel.com&gt;
    Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>