Blame SOURCES/pam_pkcs11-0.6.2-coverity-fixes.patch
|
|
ac2449 |
diff -up ./src/mappers/ldap_mapper.c.coverity ./src/mappers/ldap_mapper.c
|
|
|
ac2449 |
--- ./src/mappers/ldap_mapper.c.coverity 2014-01-21 09:54:34.498832920 -0800
|
|
|
ac2449 |
+++ ./src/mappers/ldap_mapper.c 2014-01-21 10:05:07.899436555 -0800
|
|
|
ac2449 |
@@ -104,7 +104,11 @@ static const char *attribute="userCertif
|
|
|
ac2449 |
static const char *filter="(&(objectClass=posixAccount)(uid=%s)";
|
|
|
ac2449 |
static int searchtimeout=20;
|
|
|
ac2449 |
static int ignorecase=0;
|
|
|
ac2449 |
+#ifdef HAVE_NSS
|
|
|
ac2449 |
+static X509 **ldap_x509;
|
|
|
ac2449 |
+#else
|
|
|
ac2449 |
static const X509 **ldap_x509;
|
|
|
ac2449 |
+#endif
|
|
|
ac2449 |
static int certcnt=0;
|
|
|
ac2449 |
|
|
|
ac2449 |
static ldap_ssl_options_t ssl_on = SSL_OFF;
|
|
|
ac2449 |
@@ -598,7 +602,9 @@ static int ldap_get_certificate(const ch
|
|
|
ac2449 |
char filter_str[100];
|
|
|
ac2449 |
char *attrs[2];
|
|
|
ac2449 |
int rv;
|
|
|
ac2449 |
+#ifndef HAVE_NSS
|
|
|
ac2449 |
void *bv_val;
|
|
|
ac2449 |
+#endif
|
|
|
ac2449 |
|
|
|
ac2449 |
char uri[4096];
|
|
|
ac2449 |
char uribuf[4096];
|
|
|
ac2449 |
@@ -630,7 +636,7 @@ static int ldap_get_certificate(const ch
|
|
|
ac2449 |
/* Add a space separated list of URIs */
|
|
|
ac2449 |
/* TODO: no spaces in one URI allowed => URL-encoding? */
|
|
|
ac2449 |
if(strncmp(ldapURI,"",1))
|
|
|
ac2449 |
- for (p = uri; p != NULL; )
|
|
|
ac2449 |
+ for (p = uri, rv=0; p != NULL; )
|
|
|
ac2449 |
{
|
|
|
ac2449 |
char *q = strchr (p, ' ');
|
|
|
ac2449 |
if (q != NULL)
|