/[smeserver]/rpms/openldap/sme9/openldap-nss-ignore-certdb-type-prefix.patch
ViewVC logotype

Contents of /rpms/openldap/sme9/openldap-nss-ignore-certdb-type-prefix.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Tue Nov 11 00:46:15 2014 UTC (9 years, 6 months ago) by vip-ire
Branch: MAIN
CVS Tags: openldap-2_4_39-8_el6_sme, HEAD
Import openldap

1 fix: MozNSS certificate database in SQL format cannot be used
2
3 If the certdb is specified including the database type prefix (e.g.
4 sql:, dbm:), the prefix has to be ignored when checking the
5 certificate directory existence.
6
7 Author: Jan Vcelak <jvcelak@redhat.com>
8 Upstream ITS: #7388
9 Resolves: #857390
10
11 diff --git a/libraries/libldap/tls_m.c b/libraries/libldap/tls_m.c
12 index 49a3f8f..5ee21a2 100644
13 --- a/libraries/libldap/tls_m.c
14 +++ b/libraries/libldap/tls_m.c
15 @@ -1633,6 +1633,7 @@ tlsm_get_certdb_prefix( const char *certdir, char **realcertdir, char **prefix )
16 {
17 char sep = PR_GetDirectorySeparator();
18 char *ptr = NULL;
19 + char *chkpath = NULL;
20 struct PRFileInfo prfi;
21 PRStatus prc;
22
23 @@ -1643,8 +1644,16 @@ tlsm_get_certdb_prefix( const char *certdir, char **realcertdir, char **prefix )
24 return;
25 }
26
27 - prc = PR_GetFileInfo( certdir, &prfi );
28 + /* ignore database type prefix (e.g. sql:, dbm:) if provided */
29 + chkpath = strchr( certdir, ':' );
30 + if ( chkpath != NULL ) {
31 + chkpath += 1;
32 + } else {
33 + chkpath = certdir;
34 + }
35 +
36 /* if certdir exists (file or directory) then it cannot specify a prefix */
37 + prc = PR_GetFileInfo( chkpath, &prfi );
38 if ( prc == PR_SUCCESS ) {
39 return;
40 }
41 --
42 1.7.11.4
43

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed