<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>122357</bug_id>
          
          <creation_ts>2006-02-10 04:58 0000</creation_ts>
          <short_desc>sys-auth/pam_pkcs11 - handle fork correctly</short_desc>
          <delta_ts>2006-09-19 14:19:52 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Ebuilds</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>121078</blocked>
          
          <everconfirmed>1</everconfirmed>
          <reporter>alonbl@gentoo.org</reporter>
          <assigned_to>crypto@gentoo.org</assigned_to>
          

      

      
          <long_desc isprivate="0">
            <who>alonbl@gentoo.org</who>
            <bug_when>2006-02-10 04:58:47 0000</bug_when>
            <thetext>Hello,

Congratulations for adding this ebuild!!! I posted an ebuild a long time ago (bug#95962).

Reported this issue to upstream long ago...

Please consider to add attached patch:
After fork, PKCS#11 should be reinitialized, this is stated explicitly in PKCS#11 standard.

Best Regards,
Alon Bar-Lev.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>alonbl@gentoo.org</who>
            <bug_when>2006-02-10 05:04:13 0000</bug_when>
            <thetext>Created an attachment (id=79421)
pam_pkcs11-0.5.3-daemon-init.patch

patch</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>alonbl@gentoo.org</who>
            <bug_when>2006-02-10 05:06:06 0000</bug_when>
            <thetext>Created an attachment (id=79422)
pam_pkcs11-0.5.3.ebuild.diff

Modified ebuild</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>alonbl@gentoo.org</who>
            <bug_when>2006-02-10 06:01:26 0000</bug_when>
            <thetext>One last comment...
I believe that pam_pkcs11 should be placed in a different branch, since it is not a development tool.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>flameeyes@gentoo.org</who>
            <bug_when>2006-04-21 04:52:11 0000</bug_when>
            <thetext>The move is now done, it was already requested actually.
Removing pam-bugs from CC as this package is under crypto herd and the change doesn&apos;t seem to relate to PAM itself.
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>dsd@gentoo.org</who>
            <bug_when>2006-09-11 19:42:39 0000</bug_when>
            <thetext>Alon, whenever you post a patch you should identify it&apos;s origin. Who wrote it, where did it come from? They should be credited in the changelog entry that goes along with the commit, so the information needs to be available on the bug.

Ideally the patch should already be included in the upstream development tree - whenever it is the case then the ebuild maintainer doesn&apos;t really have to think twice about including it in Gentoo - its quality is confirmed. So, if this patch has come from upstream, say so.

If it hasn&apos;t, have you sent it there? It&apos;s usually best to send it upstream before getting it included in Gentoo, or maybe doing both at the same time. Personally I always wait for patches to be accepted upstream before adding them, but that&apos;s just me. If you send it to a public mailing list, it&apos;s also a good idea to post the URL to the thread.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>alonbl@gentoo.org</who>
            <bug_when>2006-09-11 23:34:25 0000</bug_when>
            <thetext>(In reply to comment #5)
&gt; Alon, whenever you post a patch you should identify it&apos;s origin. Who wrote it,

Me.

&gt; where did it come from? 

My mind :)

&gt; They should be credited in the changelog entry that
&gt; goes along with the commit, so the information needs to be available on the
&gt; bug.

OK.

&gt; Ideally the patch should already be included in the upstream development tree -
&gt; whenever it is the case then the ebuild maintainer doesn&apos;t really have to think
&gt; twice about including it in Gentoo - its quality is confirmed. So, if this
&gt; patch has come from upstream, say so.

No.
Upstream is not receptive.

In the past pam_pkcs11 was a separate component, I&apos;ve mailed the developered this patch, but no reply.
Then pam_pkcs11 became hosted on opensc project. I thought someone will take it over.
Then they redo the site and added ticket system, so I&apos;ve open a ticket.
http://www.opensc-project.org/pam_pkcs11/ticket/14

And nothing.

&gt; If it hasn&apos;t, have you sent it there? It&apos;s usually best to send it upstream
&gt; before getting it included in Gentoo, or maybe doing both at the same time.
&gt; Personally I always wait for patches to be accepted upstream before adding
&gt; them, but that&apos;s just me. If you send it to a public mailing list, it&apos;s also a
&gt; good idea to post the URL to the thread.

I agree...
This is what I am doing.
But if upstream is not receptive, I think major issues like this one should be fixed.
There is no question that what they are doing violates PKCS#11 standard.

They have some more major problems in the slotevent component... But people can live with it.
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>dragonheart@gentoo.org</who>
            <bug_when>2006-09-19 14:19:52 0000</bug_when>
            <thetext>fixed. Thanks for being persistent.</thetext>
          </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>79421</attachid>
            <date>2006-02-10 05:04 0000</date>
            <desc>pam_pkcs11-0.5.3-daemon-init.patch</desc>
            <filename>pam_pkcs11-0.5.3-daemon-init.patch</filename>
            <type>text/plain</type>
            <data encoding="base64">ZGlmZiAtdXJOcCBwYW1fcGtjczExLTAuNS4zL3NyYy9jb21tb24vcGtjczExLmMgcGFtX3BrY3Mx
MS0wLjUuMy5uZXcvc3JjL2NvbW1vbi9wa2NzMTEuYwotLS0gcGFtX3BrY3MxMS0wLjUuMy9zcmMv
Y29tbW9uL3BrY3MxMS5jCTIwMDUtMDktMTIgMDk6MTI6NTUuMDAwMDAwMDAwICswMDAwCisrKyBw
YW1fcGtjczExLTAuNS4zLm5ldy9zcmMvY29tbW9uL3BrY3MxMS5jCTIwMDUtMTAtMDUgMDM6MDc6
MzAuMDAwMDAwMDAwICswMDAwCkBAIC04Miw3ICs4Miw5IEBAIGludCBpbml0X3BrY3MxMV9tb2R1
bGUocGtjczExX2hhbmRsZV90ICoKIAogICAvKiBpbml0aWFsaXNlIHRoZSBtb2R1bGUgKi8KICAg
cnYgPSBoLT5mbC0+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CWNvbnRpbnVlOwog
CSAgIH0KIAkgICBpZiAob2xkX3N0YXRlID09IG5ld19zdGF0ZSApIHsgLyogc3RhdGUgdW5jaGFu
Z2VkICovCiAJCS8qIG9uIGNhcmQgbm90IHByZXNlbnQsIGluY3JlYXNlIGFuZCBjaGVjayBleHBp
cmUgdGltZSAqLwo=
</data>        

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>79422</attachid>
            <date>2006-02-10 05:06 0000</date>
            <desc>pam_pkcs11-0.5.3.ebuild.diff</desc>
            <filename>pam_pkcs11-0.5.3.ebuild.diff</filename>
            <type>text/plain</type>
            <data encoding="base64">LS0tIHBhbV9wa2NzMTEtMC41LjMuZWJ1aWxkCTIwMDYtMDItMTAgMDM6MzU6NDYuMDAwMDAwMDAw
ICswMjAwCisrKyBwYW1fcGtjczExLTAuNS4zLmVidWlsZAkyMDA2LTAyLTEwIDE0OjM3OjM3LjAw
MDAwMDAwMCArMDIwMApAQCAtMiw2ICsyLDggQEAKICMgRGlzdHJpYnV0ZWQgdW5kZXIgdGhlIHRl
cm1zIG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSB2MgogIyAkSGVhZGVyOiAvdmFy
L2N2c3Jvb3QvZ2VudG9vLXg4Ni9kZXYtbGlicy9wYW1fcGtjczExL3BhbV9wa2NzMTEtMC41LjMu
ZWJ1aWxkLHYgMS4xIDIwMDYvMDIvMTAgMDE6MzU6NDYgdmFucXVpcml1cyBFeHAgJAogCitpbmhl
cml0IGV1dGlscworCiBERVNDUklQVElPTj0iUEtDUzExIFBhbSBsaWJyYXJ5IgogSE9NRVBBR0U9
Imh0dHA6Ly93d3cub3BlbnNjLXByb2plY3Qub3JnL3BhbV9wa2NzMTEiCiBTUkNfVVJJPSJodHRw
Oi8vd3d3Lm9wZW5zYy1wcm9qZWN0Lm9yZy9maWxlcy9wYW1fcGtjczExLyR7UH0udGFyLmd6IgpA
QCAtMTgsNiArMjAsMTEgQEAKIAlwY3NjLWxpdGU/ICggc3lzLWFwcHMvcGNzYy1saXRlICkKIAlk
ZXYtbGlicy9vcGVuc3NsIgogCitzcmNfdW5wYWNrKCkgeworCXVucGFjayAke0F9CisJZXBhdGNo
ICIke0ZJTEVTRElSfS8ke1B9LWRhZW1vbi1pbml0LnBhdGNoIgorfQorCiBzcmNfY29tcGlsZSgp
IHsKIAkJZWNvbmYgXAogCQkJJCh1c2Vfd2l0aCBjdXJsKSBcCg==
</data>        

          </attachment>
    </bug>

</bugzilla>