32 lines
969 B
Diff
32 lines
969 B
Diff
MozNSS: ignore certdb 'sql:' prefix when testing existence of the directory
|
|
|
|
If the certdb uses newer SQL format, the certificate directory name starts with 'sql:'. This prefix has to be ignored
|
|
when testing certificate directory existence.
|
|
|
|
Author: Jan Vcelak <jvcelak@redhat.com>
|
|
Upstream ITS: #7388
|
|
Resolves: #857373
|
|
|
|
diff --git a/libraries/libldap/tls_m.c b/libraries/libldap/tls_m.c
|
|
index 61d71d4..80fa4f1 100644
|
|
--- a/libraries/libldap/tls_m.c
|
|
+++ b/libraries/libldap/tls_m.c
|
|
@@ -1643,7 +1643,13 @@ tlsm_get_certdb_prefix( const char *certdir, char **realcertdir, char **prefix )
|
|
return;
|
|
}
|
|
|
|
- prc = PR_GetFileInfo( certdir, &prfi );
|
|
+ /* ignore sql: prefix if provided */
|
|
+ if ( strncmp( "sql:", certdir, 4 ) == 0 ) {
|
|
+ prc = PR_GetFileInfo( certdir + 4, &prfi );
|
|
+ } else {
|
|
+ prc = PR_GetFileInfo( certdir, &prfi );
|
|
+ }
|
|
+
|
|
/* if certdir exists (file or directory) then it cannot specify a prefix */
|
|
if ( prc == PR_SUCCESS ) {
|
|
return;
|
|
--
|
|
1.7.11.4
|
|
|