<?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>3805</bug_id>
          
          <creation_ts>2013-01-29 11:20:08 +0000</creation_ts>
          <short_desc>PAM support: missing pam_systemd.so</short_desc>
          <delta_ts>2013-09-25 12:40:47 +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>core</component>
          <version>1.4</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</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>1.5</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Yi Zhao">yi.zhao</reporter>
          <assigned_to name="Ross Burton">ross.burton</assigned_to>
          <cc>alexandrux.palalau</cc>
    
    <cc>hongxu.jia</cc>
    
    <cc>liang.li2</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>Qi.Chen</cc>
    
    <cc>ross.burton</cc>
    
    <cc>sgw</cc>
    
    <cc>yi.zhao</cc>
          
          
          <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>29288</commentid>
    <comment_count>0</comment_count>
    <who name="Yi Zhao">yi.zhao</who>
    <bug_when>2013-01-29 11:20:08 +0000</bug_when>
    <thetext>Tree/Branch: poky/master
Git Rev: 8d6e55bf2192524bda84138b5356a2791adbbe61

When build an image with pam support, there is a error message with missing pam_systemd.so

Steps:
##############
1. Add DISTRO_FEATURES_append = &quot; pam&quot; to conf/local.conf and build the image.
2. Boot up the image and check the /var/log/message
##############


#############
Jan 29 11:13:41 qemuppc authpriv.err login[438]: PAM unable to dlopen(/lib/security/pam_systemd.so): /lib/security/pam_systemd.so: cannot open shared object file: No such file or di    rectory
231 Jan 29 11:13:41 qemuppc authpriv.err login[438]: PAM adding faulty module: /lib/security/pam_systemd.so
#############</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>29344</commentid>
    <comment_count>1</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2013-01-30 12:03:09 +0000</bug_when>
    <thetext>Hm, I thought pam would silently handle that.

Clearly that change needs to be conditional on the systemd distro feature.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>29386</commentid>
    <comment_count>2</comment_count>
    <who name="Radu Moisan">radu.moisan</who>
    <bug_when>2013-01-31 09:46:56 +0000</bug_when>
    <thetext>I checked and indeed the library is missing, however I could not reproduce the same way, with my current setup (pulled master yesterday) it breaks gconf complaining about the same thing.

I also tried my systemd branch, which has the systemd.bbclass and it works, so I&apos;m chasing that lead now.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>29387</commentid>
    <comment_count>3</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2013-01-31 10:07:23 +0000</bug_when>
    <thetext>The problem is that pam_systemd only exists in systemd distros, but the pam configuration always refers to it.  I was under the impression that pam would silently handle optional pam modules without error, but that doesn&apos;t appear to be the case.

The systemd reference in the pam configuration needs to be conditional on the systemd feature, or truly optional.

Actually, pam.conf says:

&quot;If the type value from the list above is prepended with a - character the PAM library will not log to the system log if it is not possible to load the module because it is missing in the system. This can be useful especially for modules which are not always installed on the system and are not required for correct authentication and authorization of the login session.&quot;

Sounds ideal.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>29388</commentid>
    <comment_count>4</comment_count>
    <who name="Radu Moisan">radu.moisan</who>
    <bug_when>2013-01-31 10:12:26 +0000</bug_when>
    <thetext>ok, missed the part where systemd was disabled.
Looking into pam then.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>29443</commentid>
    <comment_count>5</comment_count>
    <who name="Radu Moisan">radu.moisan</who>
    <bug_when>2013-02-01 09:42:19 +0000</bug_when>
    <thetext>I could initially reproduce this, but could not anymore after Thursday morning pull.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>29564</commentid>
    <comment_count>6</comment_count>
    <who name="Yi Zhao">yi.zhao</who>
    <bug_when>2013-02-06 09:50:37 +0000</bug_when>
    <thetext>I can reproduce it with latest master branch:
git rev: ee1f126ad5cb2c6af66815e55720257a1efc5a49

Steps:
##############
1. Add DISTRO_FEATURES_append = &quot; pam&quot; to conf/local.conf and build the image.
2. Boot up the image and check the /var/log/message
##############

Check the message log, I can see the following error:
###############
Feb  6 09:03:29 qemux86 authpriv.err passwd[822]: PAM unable to dlopen(/lib/security/pam_systemd.so): /lib/security/pam_systemd.so: cannot open shared object file: No such file or directory
Feb  6 09:03:29 qemux86 authpriv.err passwd[822]: PAM adding faulty module: /lib/security/pam_systemd.so
###############</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>29762</commentid>
    <comment_count>7</comment_count>
    <who name="Radu Moisan">radu.moisan</who>
    <bug_when>2013-02-13 13:18:35 +0000</bug_when>
    <thetext>(In reply to comment #6)
&gt; I can reproduce it with latest master branch:
&gt; git rev: ee1f126ad5cb2c6af66815e55720257a1efc5a49
&gt; 
&gt; Steps:
&gt; ##############
&gt; 1. Add DISTRO_FEATURES_append = &quot; pam&quot; to conf/local.conf and build the
&gt; image.
&gt; 2. Boot up the image and check the /var/log/message
&gt; ##############
&gt; 
&gt; Check the message log, I can see the following error:
&gt; ###############
&gt; Feb  6 09:03:29 qemux86 authpriv.err passwd[822]: PAM unable to
&gt; dlopen(/lib/security/pam_systemd.so): /lib/security/pam_systemd.so: cannot
&gt; open shared object file: No such file or directory
&gt; Feb  6 09:03:29 qemux86 authpriv.err passwd[822]: PAM adding faulty module:
&gt; /lib/security/pam_systemd.so
&gt; ###############

please dump here the output for &quot;systemctl --version&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>29783</commentid>
    <comment_count>8</comment_count>
    <who name="Radu Moisan">radu.moisan</who>
    <bug_when>2013-02-14 09:33:38 +0000</bug_when>
    <thetext>I can&apos;t reproduce.
I checked that systemd is compiled with pam support and it is. The pam_systemd.so is in it&apos;s place and in consequence there is not error message trying to load the library.

Please confirm.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>29940</commentid>
    <comment_count>9</comment_count>
    <who name="Yi Zhao">yi.zhao</who>
    <bug_when>2013-02-19 03:10:22 +0000</bug_when>
    <thetext>(In reply to comment #8)
&gt; I can&apos;t reproduce.
&gt; I checked that systemd is compiled with pam support and it is. The
&gt; pam_systemd.so is in it&apos;s place and in consequence there is not error
&gt; message trying to load the library.
&gt; 
&gt; Please confirm.

Hi Radu,

I made a mistake. I didn&apos;t set the init manager to systemd in local.conf. After added the line DISTRO_FEATURES_INITMAN ?= &quot;systemd&quot; in local.conf, the error message disappeared. But if we don&apos;t use systemd, the pam still want to load pam_systemd.so, is this a bug ? Do we need to fix it ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>29946</commentid>
    <comment_count>10</comment_count>
    <who name="Radu Moisan">radu.moisan</who>
    <bug_when>2013-02-19 08:14:29 +0000</bug_when>
    <thetext>Ok, then I&apos;ll give a shot to what Ross was suggesting.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>29982</commentid>
    <comment_count>11</comment_count>
    <who name="Radu Moisan">radu.moisan</who>
    <bug_when>2013-02-20 09:59:28 +0000</bug_when>
    <thetext>(In reply to comment #9)

&gt; Hi Radu,
&gt; 
&gt; I made a mistake. I didn&apos;t set the init manager to systemd in local.conf.
&gt; After added the line DISTRO_FEATURES_INITMAN ?= &quot;systemd&quot; in local.conf, the
&gt; error message disappeared. But if we don&apos;t use systemd, the pam still want
&gt; to load pam_systemd.so, is this a bug ? Do we need to fix it ?

I&apos;ve tried this morning a clean build on master with sysvinit enabled (and pam). I could not find any warning/error message in logs with regard to pam_systemd.so or anything related to systemd for that matter.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>30036</commentid>
    <comment_count>12</comment_count>
    <who name="Radu Moisan">radu.moisan</who>
    <bug_when>2013-02-22 12:37:13 +0000</bug_when>
    <thetext>same on my side.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>30113</commentid>
    <comment_count>13</comment_count>
    <who name="Yi Zhao">yi.zhao</who>
    <bug_when>2013-02-26 12:04:12 +0000</bug_when>
    <thetext>(In reply to comment #11)
&gt; (In reply to comment #9)
&gt; 
&gt; &gt; Hi Radu,
&gt; &gt; 
&gt; &gt; I made a mistake. I didn&apos;t set the init manager to systemd in local.conf.
&gt; &gt; After added the line DISTRO_FEATURES_INITMAN ?= &quot;systemd&quot; in local.conf, the
&gt; &gt; error message disappeared. But if we don&apos;t use systemd, the pam still want
&gt; &gt; to load pam_systemd.so, is this a bug ? Do we need to fix it ?
&gt; 
&gt; I&apos;ve tried this morning a clean build on master with sysvinit enabled (and
&gt; pam). I could not find any warning/error message in logs with regard to
&gt; pam_systemd.so or anything related to systemd for that matter.

Which image type do you test ? The issue happens on sato and sato-sdk image.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>30114</commentid>
    <comment_count>14</comment_count>
    <who name="Radu Moisan">radu.moisan</who>
    <bug_when>2013-02-26 12:08:42 +0000</bug_when>
    <thetext>tried sato.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>30117</commentid>
    <comment_count>15</comment_count>
    <who name="Yi Zhao">yi.zhao</who>
    <bug_when>2013-02-26 12:23:20 +0000</bug_when>
    <thetext>DISTRO_FEATURES_append = &quot; pam&quot;

There must be a space between &quot; and pam

I tried qemuarm, still have this issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>31154</commentid>
    <comment_count>16</comment_count>
    <who name="Yi Zhao">yi.zhao</who>
    <bug_when>2013-03-26 06:07:25 +0000</bug_when>
    <thetext>This issue still happens on master: 9ffee9add2d0380f4025e7a678a166f25a7d659e

Reopen it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>31291</commentid>
    <comment_count>17</comment_count>
    <who name="Radu Moisan">radu.moisan</who>
    <bug_when>2013-03-29 11:09:04 +0000</bug_when>
    <thetext>asked QA to take a look over</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>31344</commentid>
    <comment_count>18</comment_count>
    <who name="Radu Moisan">radu.moisan</who>
    <bug_when>2013-04-02 09:10:15 +0000</bug_when>
    <thetext>gave another try today, sato and sato-sdk

Build Configuration:
BB_VERSION        = &quot;1.17.1&quot;
BUILD_SYS         = &quot;x86_64-linux&quot;
NATIVELSBSTRING   = &quot;Ubuntu-12.04&quot;
TARGET_SYS        = &quot;i586-poky-linux&quot;
MACHINE           = &quot;qemux86&quot;
DISTRO            = &quot;poky&quot;
DISTRO_VERSION    = &quot;1.3+snapshot-20130402&quot;
TUNE_FEATURES     = &quot;m32 i586&quot;
TARGET_FPU        = &quot;&quot;
meta              
meta-yocto        
meta-yocto-bsp    = &quot;master:92aeb31341b28b193d616ab5cf38af1b9673e37d&quot;

run both images in quemu and grep&apos;d for systemd in /var/log/messages, nothing came up.

@Yi Zhao: Please don&apos;t reopen this, let QA team to give it a try, and if they can&apos;t please work with them until they do, assuming this is a valid bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>31439</commentid>
    <comment_count>19</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2013-04-03 11:57:50 +0000</bug_when>
    <thetext>I can replicate.  The key is that this only happens on sysvinit images.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>31458</commentid>
    <comment_count>20</comment_count>
    <who name="Radu Moisan">radu.moisan</who>
    <bug_when>2013-04-03 16:19:34 +0000</bug_when>
    <thetext>(In reply to comment #19)
&gt; I can replicate.  The key is that this only happens on sysvinit images.

so a clean build with systemd disabled should do it, right?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>31460</commentid>
    <comment_count>21</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2013-04-03 16:24:31 +0000</bug_when>
    <thetext>Yep, or an autobuilt image.  Annoying prefixing the pam line with - doesn&apos;t seem to work, this machine I just tried it on won&apos;t start X anymore.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>31929</commentid>
    <comment_count>22</comment_count>
    <who name="Alexandru Palalau">alexandrux.palalau</who>
    <bug_when>2013-04-11 12:18:56 +0000</bug_when>
    <thetext>Could not reproduce on master branch, commit ID: fe336b149552b1f4f24d979c40302653298b98cc</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>33067</commentid>
    <comment_count>23</comment_count>
    <who name="Radu Moisan">radu.moisan</who>
    <bug_when>2013-05-13 13:19:11 +0000</bug_when>
    <thetext>tried again following builds (core-image-sato) (clean builds)

Build Configuration:
BB_VERSION        = &quot;1.19.0&quot;
BUILD_SYS         = &quot;x86_64-linux&quot;
NATIVELSBSTRING   = &quot;Ubuntu-12.04&quot;
TARGET_SYS        = &quot;i586-poky-linux&quot;
MACHINE           = &quot;qemux86&quot;
DISTRO            = &quot;poky&quot;
DISTRO_VERSION    = &quot;1.3+snapshot-20130513&quot;
TUNE_FEATURES     = &quot;m32 i586&quot;
TARGET_FPU        = &quot;&quot;
meta              
meta-yocto        
meta-yocto-bsp    = &quot;master:f7afeeb75993b159bb8959e0309bc5eb3978a8fb&quot;

Build Configuration:
BB_VERSION        = &quot;1.19.0&quot;
BUILD_SYS         = &quot;x86_64-linux&quot;
NATIVELSBSTRING   = &quot;Ubuntu-12.04&quot;
TARGET_SYS        = &quot;powerpc-poky-linux&quot;
MACHINE           = &quot;qemuppc&quot;
DISTRO            = &quot;poky&quot;
DISTRO_VERSION    = &quot;1.3+snapshot-20130513&quot;
TUNE_FEATURES     = &quot;m32 fpu-hard ppc603e&quot;
TARGET_FPU        = &quot;&quot;
meta              
meta-yocto        
meta-yocto-bsp    = &quot;master:f7afeeb75993b159bb8959e0309bc5eb3978a8fb&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36937</commentid>
    <comment_count>24</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2013-09-19 10:43:12 +0000</bug_when>
    <thetext>Still happening:

Sep 19 11:31:54 genericx86 login[1329]: PAM unable to dlopen(/lib/security/pam_systemd.so): /lib/security/pam_systemd.so: cannot open shared object file: No such file or directory

Will investigate.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36983</commentid>
    <comment_count>25</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2013-09-19 15:03:32 +0000</bug_when>
    <thetext>Patch sent to oe-core.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>37130</commentid>
    <comment_count>26</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2013-09-24 15:18:52 +0000</bug_when>
    <thetext>Merged in oe-core 3ccb0855a7a6b147e5025855c6376747ba72986a.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>37198</commentid>
    <comment_count>27</comment_count>
    <who name="Alexandru Palalau">alexandrux.palalau</who>
    <bug_when>2013-09-25 12:40:47 +0000</bug_when>
    <thetext>Verified in master branch.
Commit ID: 4d8ab87d25ea6e59dc88375813ef88ee0ac813d0
No errors in /var/log/messages.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>