git://git.exim.org
/
users
/
jgh
/
exim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
214 spelling fixes
[users/jgh/exim.git]
/
src
/
src
/
lookups
/
ldap.c
diff --git
a/src/src/lookups/ldap.c
b/src/src/lookups/ldap.c
index fe67e7f0a6f4bc665cc298d79f99970ff5951b77..b52ef2221ee1293c1254f9fd990788cdb5007f99 100644
(file)
--- a/
src/src/lookups/ldap.c
+++ b/
src/src/lookups/ldap.c
@@
-2,11
+2,11
@@
* Exim - an Internet mail transport agent *
*************************************************/
* Exim - an Internet mail transport agent *
*************************************************/
-/* Copyright (c) University of Cambridge 1995 - 201
5
*/
+/* Copyright (c) University of Cambridge 1995 - 201
6
*/
/* See the file NOTICE for conditions of use and distribution. */
/* Many thanks to Stuart Lynne for contributing the original code for this
/* See the file NOTICE for conditions of use and distribution. */
/* Many thanks to Stuart Lynne for contributing the original code for this
-driver. Further contibutions from Michael Haardt, Brian Candler, Barry
+driver. Further cont
r
ibutions from Michael Haardt, Brian Candler, Barry
Pederson, Peter Savitch and Christian Kellner. Particular thanks to Brian for
researching how to handle the different kinds of error. */
Pederson, Peter Savitch and Christian Kellner. Particular thanks to Brian for
researching how to handle the different kinds of error. */
@@
-580,7
+580,7
@@
if (!lcp->bound ||
{
DEBUG(D_lookup) debug_printf("%sbinding with user=%s password=%s\n",
(lcp->bound)? "re-" : "", user, password);
{
DEBUG(D_lookup) debug_printf("%sbinding with user=%s password=%s\n",
(lcp->bound)? "re-" : "", user, password);
- if (eldap_start_tls && !lcp->is_start_tls_called)
+ if (eldap_start_tls && !lcp->is_start_tls_called
&& !ldapi
)
{
#if defined(LDAP_OPT_X_TLS) && !defined(LDAP_LIB_SOLARIS)
/* The Oracle LDAP libraries (LDAP_LIB_TYPE=SOLARIS) don't support this.
{
#if defined(LDAP_OPT_X_TLS) && !defined(LDAP_LIB_SOLARIS)
/* The Oracle LDAP libraries (LDAP_LIB_TYPE=SOLARIS) don't support this.
@@
-734,7
+734,7
@@
while ((rc = ldap_result(lcp->ld, msgid, 0, timeoutptr, &result)) ==
/* Results for multiple entries values are separated by newlines. */
/* Results for multiple entries values are separated by newlines. */
- if (data != NULL) data = string_cat(data, &size, &ptr, US"\n", 1);
+ if (data != NULL) data = string_cat
n
(data, &size, &ptr, US"\n", 1);
/* Get the DN from the last result. */
/* Get the DN from the last result. */
@@
-762,7
+762,7
@@
while ((rc = ldap_result(lcp->ld, msgid, 0, timeoutptr, &result)) ==
{ /* condition, because of the else */
if (new_dn != NULL) /* below, that's for the first only */
{
{ /* condition, because of the else */
if (new_dn != NULL) /* below, that's for the first only */
{
- data = string_cat(data, &size, &ptr, new_dn
, Ustrlen(new_dn)
);
+ data = string_cat(data, &size, &ptr, new_dn);
data[ptr] = 0;
attribute_found = TRUE;
}
data[ptr] = 0;
attribute_found = TRUE;
}
@@
-796,11
+796,11
@@
while ((rc = ldap_result(lcp->ld, msgid, 0, timeoutptr, &result)) ==
if (attrs_requested != 1)
{
if (insert_space)
if (attrs_requested != 1)
{
if (insert_space)
- data = string_cat(data, &size, &ptr, US" ", 1);
+ data = string_cat
n
(data, &size, &ptr, US" ", 1);
else
insert_space = TRUE;
else
insert_space = TRUE;
- data = string_cat(data, &size, &ptr, attr
, Ustrlen(attr)
);
- data = string_cat(data, &size, &ptr, US"=\"", 2);
+ data = string_cat(data, &size, &ptr, attr);
+ data = string_cat
n
(data, &size, &ptr, US"=\"", 2);
}
while (*values != NULL)
}
while (*values != NULL)
@@
-818,7
+818,7
@@
while ((rc = ldap_result(lcp->ld, msgid, 0, timeoutptr, &result)) ==
attribute and append only every non first value. */
if (data && valuecount > 1)
attribute and append only every non first value. */
if (data && valuecount > 1)
- data = string_cat(data, &size, &ptr, US",", 1);
+ data = string_cat
n
(data, &size, &ptr, US",", 1);
/* For multiple attributes, the data is in quotes. We must escape
internal quotes, backslashes, newlines, and must double commas. */
/* For multiple attributes, the data is in quotes. We must escape
internal quotes, backslashes, newlines, and must double commas. */
@@
-829,14
+829,14
@@
while ((rc = ldap_result(lcp->ld, msgid, 0, timeoutptr, &result)) ==
for (j = 0; j < len; j++)
{
if (value[j] == '\n')
for (j = 0; j < len; j++)
{
if (value[j] == '\n')
- data = string_cat(data, &size, &ptr, US"\\n", 2);
+ data = string_cat
n
(data, &size, &ptr, US"\\n", 2);
else if (value[j] == ',')
else if (value[j] == ',')
- data = string_cat(data, &size, &ptr, US",,", 2);
+ data = string_cat
n
(data, &size, &ptr, US",,", 2);
else
{
if (value[j] == '\"' || value[j] == '\\')
else
{
if (value[j] == '\"' || value[j] == '\\')
- data = string_cat(data, &size, &ptr, US"\\", 1);
- data = string_cat(data, &size, &ptr, value+j, 1);
+ data = string_cat
n
(data, &size, &ptr, US"\\", 1);
+ data = string_cat
n
(data, &size, &ptr, value+j, 1);
}
}
}
}
}
}
@@
-847,12
+847,10
@@
while ((rc = ldap_result(lcp->ld, msgid, 0, timeoutptr, &result)) ==
{
int j;
for (j = 0; j < len; j++)
{
int j;
for (j = 0; j < len; j++)
- {
if (value[j] == ',')
if (value[j] == ',')
- data = string_cat(data, &size, &ptr, US",,", 2);
+ data = string_cat
n
(data, &size, &ptr, US",,", 2);
else
else
- data = string_cat(data, &size, &ptr, value+j, 1);
- }
+ data = string_catn(data, &size, &ptr, value+j, 1);
}
}
@@
-865,7
+863,7
@@
while ((rc = ldap_result(lcp->ld, msgid, 0, timeoutptr, &result)) ==
/* Closing quote at the end of the data for a named attribute. */
if (attrs_requested != 1)
/* Closing quote at the end of the data for a named attribute. */
if (attrs_requested != 1)
- data = string_cat(data, &size, &ptr, US"\"", 1);
+ data = string_cat
n
(data, &size, &ptr, US"\"", 1);
/* Free the values */
/* Free the values */