richm(a)stanfordalumni.org wrote:
> The NSS_STRICT_NOFORK environment variable is documented here:
> https://developer.mozilla.org/en/NSS_reference/NSS_environment_variables
>
> Note that if a user really wants the strict pkcs11 behavior, the user
> can set the variable to "1" or some other non-empty value (other than
> "DISABLED").
>
> If you think further documentation is required, I would be happy to
> update the Admin Guide, FAQ-o-matic, man pages, etc.
That looks fine. Most of our docs were written specifically to OpenSSL but
we've added one or two references to GnuTLS since then. I would start by
adding to the FAQ-o-Matic:
http://www.openldap.org/faq/data/cache/196.html
I guess we could update this to mention the availability of GnuTLS and MozNSS
support and perhaps a discussion of their pros and cons. (Though in all
honesty I cannot think of any pros for using GnuTLS. I would use PolarSSL
instead but that's not what the Debian folks asked for...)
Hm, this entire FAQ page is far out of date. If you want to add some MozNSS
info here go ahead, I'll take a pass at the rest of the page later.
--
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/
The NSS_STRICT_NOFORK environment variable is documented here:
https://developer.mozilla.org/en/NSS_reference/NSS_environment_variables
Note that if a user really wants the strict pkcs11 behavior, the user
can set the variable to "1" or some other non-empty value (other than
"DISABLED").
If you think further documentation is required, I would be happy to
update the Admin Guide, FAQ-o-matic, man pages, etc.
moenoel(a)informatik.uni-bremen.de wrote:
>> 1) it should simply be comparing the AttributeDescription pointers
>> 2) since the "memberof" attribute is actually configurable in the memberof
>> overlay, there's no guarantee that this is the correct attribute to be looking
>> for. It should also be configurable in your patch.
>>
>> You're using strcasecmp, but your inputs are already normalized values. You
>> should just use ber_bvcmp.
>>
>
> Since I am also interested in this, I took some time to make a new
> patch. I took Norberts original patch, applied it to a current checkout
> from HEAD and tried to fix the issues mentioned by Howard. My initial
> tests are looking good.
>
> My C skills are rather mediocre, though, so I hope I didn't slaughter
> the thing :-)
>
> http://www.informatik.uni-bremen.de/~moenoel/ldap/christian-manal-autogroup…
This patch looks pretty good. There are only one or two minor issues with it,
which I will clean up. (E.g., config actions require no mutexes; slapd is
always single-threaded when processing config changes.)
--
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/
anderson(a)vailsys.com wrote:
> Full_Name: Nathanael Anderson
> Version: 2.4.19
> OS: RHEL 6 (Linux)
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (74.63.156.11)
>
>
> #00_die.ldif
>
> dn: cn=die,ou=groups,dc=domain,dc=com
> objectclass: groupofnames
> cn: Operations
> description: People in Operations
>
> ldapadd -x -D "cn=admin,dc=domain,dc=com" -W -f 00_die.ldif
>
> This will crash the openldap server every time with a Bus error message
>
> conn=0 op=1 ADD dn="cn=die,ou=groups,dc=domain,dc=com"
> Entry (cn=die,ou=groups,dc=domain,dc=com): object class 'groupOfNames' requires
> attribute 'member'
> conn=0 op=1 RESULT tag=105 err=65 text=object class 'groupOfNames' requires
> attribute 'member'
> Bus error (core dumped)
>
As always, when you get a core dump, post the gdb backtrace of the dump. Use
the most recent release version, and make sure you use a non-optimized debug
build with all debug symbols intact. All of these instructions are written on
the page where you submit new Issues.
--
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/
richm(a)stanfordalumni.org wrote:
> On Sat, Jan 29, 2011 at 3:26 AM,<hyc(a)symas.com> wrote:
>> rmeggins(a)redhat.com wrote:
>>> Full_Name: Rich Megginson
>>> Version: 2.4.23 (current CVS HEAD)
>>> OS: RHEL6
>>> URL: ftp://ftp.openldap.org/incoming/openldap-2.4.23-moznss-disable-nofo=
> rk-20110127.patch
>>> Submission from: (NULL) (76.113.111.209)
>>>
>>>
>>> There are some applications that acquire a crypto context in the parent =
> process
>>> and expect that crypto context to work after a fork(). =A0This does not =
> work
>>> with MozNSS using strict PKCS11 compliance mode. =A0We set the environme=
> nt
>>> variable NSS_STRICT_NOFORK=3DDISABLED in tlsm_init() to tell the softwar=
> e
>>> encryption module/token to allow crypto contexts to persist across a for=
> k().
>>> However, if you are using some other module or encryption device that su=
> pports
>>> and expects full PKCS11 semantics, the only recourse is to modify the
>>> application to use atfork() handlers to save the crypto context in the p=
> arent
>>> and restore (and SECMOD_RestartModules) the context in the child.
>>
>> Sounds like this is a followon to #6802. Is this really critical at this
>> point? We really need to close the window on RE24 patches so we can actua=
> lly
>> cut a release. But if ITS#6802 is actually incomplete, I guess we should =
> roll
>> this in.
>
> Yes, it is a followon to 6802 - as it turns out, the patch to 6802 was
> incomplete. We have discovered some important applications such as
> sshd/su/others that open an LDAP* connection in the parent process,
> fork(), and attempt to use the same LDAP* handle in the child. Some
> of the other Fedora/Red Hat developers and I had a discussion with one
> of the MozNSS developers about this issue, as ldap is not the only
> affected area. It was decided that the best thing is to simply
> disable the fork() checking in the MozNSS software token pkcs11 crypto
> module. This will give us parity with openssl with respect to fork()
> behavior. It is a critical issue for Fedora/Red Hat. I understand
> that this is coming in late in the game and you may not be able to get
> this into RE24. If not, Fedora/Red Hat will carry a patch for this.
Is this env var and atfork() workaround already documented in the NSS
documentation? Just wondering if we need to say anything about it in our Admin
Guide, FAQ-o-Matic, or manpages.
--
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/
On Sat, Jan 29, 2011 at 3:26 AM, <hyc(a)symas.com> wrote:
> rmeggins(a)redhat.com wrote:
>> Full_Name: Rich Megginson
>> Version: 2.4.23 (current CVS HEAD)
>> OS: RHEL6
>> URL: ftp://ftp.openldap.org/incoming/openldap-2.4.23-moznss-disable-nofo=
rk-20110127.patch
>> Submission from: (NULL) (76.113.111.209)
>>
>>
>> There are some applications that acquire a crypto context in the parent =
process
>> and expect that crypto context to work after a fork(). =A0This does not =
work
>> with MozNSS using strict PKCS11 compliance mode. =A0We set the environme=
nt
>> variable NSS_STRICT_NOFORK=3DDISABLED in tlsm_init() to tell the softwar=
e
>> encryption module/token to allow crypto contexts to persist across a for=
k().
>> However, if you are using some other module or encryption device that su=
pports
>> and expects full PKCS11 semantics, the only recourse is to modify the
>> application to use atfork() handlers to save the crypto context in the p=
arent
>> and restore (and SECMOD_RestartModules) the context in the child.
>
> Sounds like this is a followon to #6802. Is this really critical at this
> point? We really need to close the window on RE24 patches so we can actua=
lly
> cut a release. But if ITS#6802 is actually incomplete, I guess we should =
roll
> this in.
Yes, it is a followon to 6802 - as it turns out, the patch to 6802 was
incomplete. We have discovered some important applications such as
sshd/su/others that open an LDAP* connection in the parent process,
fork(), and attempt to use the same LDAP* handle in the child. Some
of the other Fedora/Red Hat developers and I had a discussion with one
of the MozNSS developers about this issue, as ldap is not the only
affected area. It was decided that the best thing is to simply
disable the fork() checking in the MozNSS software token pkcs11 crypto
module. This will give us parity with openssl with respect to fork()
behavior. It is a critical issue for Fedora/Red Hat. I understand
that this is coming in late in the game and you may not be able to get
this into RE24. If not, Fedora/Red Hat will carry a patch for this.
>
>> These patch files are derived from OpenLDAP Software. All of the
>> modifications to OpenLDAP Software represented in the following
>> patch(es) were developed by Red Hat. Red Hat has not assigned rights
>> and/or interest in this work to any party. I, Rich Megginson am
>> authorized by Red Hat, my employer, to release this work under the
>> following terms.
>>
>> Red Hat hereby place the following modifications to OpenLDAP Software
>> (and only these modifications) into the public domain. Hence, these
>> modifications may be freely used and/or redistributed for any purpose
>> with or without attribution and/or other notice.
>>
>
>
> --
> =A0 -- Howard Chu
> =A0 CTO, Symas Corp. =A0 =A0 =A0 =A0 =A0 http://www.symas.com
> =A0 Director, Highland Sun =A0 =A0 http://highlandsun.com/hyc/
> =A0 Chief Architect, OpenLDAP =A0http://www.openldap.org/project/
>
>
>
rmeggins(a)redhat.com wrote:
> Full_Name: Rich Megginson
> Version: 2.4.23 (current CVS HEAD)
> OS: RHEL6
> URL: ftp://ftp.openldap.org/incoming/openldap-2.4.23-moznss-disable-nofork-20110…
> Submission from: (NULL) (76.113.111.209)
>
>
> There are some applications that acquire a crypto context in the parent process
> and expect that crypto context to work after a fork(). This does not work
> with MozNSS using strict PKCS11 compliance mode. We set the environment
> variable NSS_STRICT_NOFORK=DISABLED in tlsm_init() to tell the software
> encryption module/token to allow crypto contexts to persist across a fork().
> However, if you are using some other module or encryption device that supports
> and expects full PKCS11 semantics, the only recourse is to modify the
> application to use atfork() handlers to save the crypto context in the parent
> and restore (and SECMOD_RestartModules) the context in the child.
Sounds like this is a followon to #6802. Is this really critical at this
point? We really need to close the window on RE24 patches so we can actually
cut a release. But if ITS#6802 is actually incomplete, I guess we should roll
this in.
> These patch files are derived from OpenLDAP Software. All of the
> modifications to OpenLDAP Software represented in the following
> patch(es) were developed by Red Hat. Red Hat has not assigned rights
> and/or interest in this work to any party. I, Rich Megginson am
> authorized by Red Hat, my employer, to release this work under the
> following terms.
>
> Red Hat hereby place the following modifications to OpenLDAP Software
> (and only these modifications) into the public domain. Hence, these
> modifications may be freely used and/or redistributed for any purpose
> with or without attribution and/or other notice.
>
--
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/
Full_Name: Ian Puleston
Version: 2.4.23
OS: VxWorks
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (67.115.118.5)
In function ldap_connect_to_host are two calls to ldap_int_connect_cbs. The
first for "#if defined( HAVE_GETADDRINFO ) && defined( HAVE_INET_NTOP )" looks
OK, but the 2nd for the #else case of that is this:
i = ldap_int_connect_cbs( ld, sb, &s, srv, (struct sockaddr *)&sin );
if ( i )
rc = i;
else
break;
But this is inside a for loop that uses i as a counter for the loop control.
ldap_int_connect_cbs returns an error code so, unless I'm missing something,
setting i to that will break the loop control.
h.b.furuseth(a)usit.uio.no wrote:
> Full_Name: Hallvard B Furuseth
> Version: HEAD
> OS:
> URL:
> Submission from: (NULL) (129.240.6.233)
> Submitted by: hallvard
>
>
> syncprov_state_ctrl(), syncprov_done_ctrl(), syncprov_sendinfo() and
> thus findpres_cb() can return either an LDAP result code, or a negative
> number on BER error. I see no code which expects both classes of error
> codes. The first functions's callers set rs->sr_err = return value.
> At best I guess it'll be ignored or interpreted as LDAP_SERVER_DOWN.
I've fixed the return codes. They still get ignored in a few places.
--
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/