summaryrefslogtreecommitdiffstats
path: root/proxy.c
diff options
context:
space:
mode:
authorSimon Rettberg2018-03-12 15:28:33 +0100
committerSimon Rettberg2018-03-12 15:28:33 +0100
commite53dfcbdbed04cad690823ce5def521fea7b5483 (patch)
tree4a5d31e53515ad6a505d2cc4948abaa54a392b8c /proxy.c
parentAdd version information and --version (diff)
downloadldadp-e53dfcbdbed04cad690823ce5def521fea7b5483.tar.gz
ldadp-e53dfcbdbed04cad690823ce5def521fea7b5483.tar.xz
ldadp-e53dfcbdbed04cad690823ce5def521fea7b5483.zip
4s timeout when connecting to server; send error to client on failure
Diffstat (limited to 'proxy.c')
-rw-r--r--proxy.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/proxy.c b/proxy.c
index 36f7cac..afb1bd8 100644
--- a/proxy.c
+++ b/proxy.c
@@ -809,7 +809,6 @@ static void response_replaceAttribute(server_t *server, const struct string * co
*/
static BOOL response_filterHomeDir(struct PartialAttributeList *pal)
{
- helper_printpal(pal);
for (struct AttributeDescriptionList *adl = pal->values; adl != NULL; adl = pal->values /* sic */) {
if (adl->a.s != NULL) {
if (adl->a.l > 0 && adl->a.s[0] == '\\') {
@@ -904,6 +903,7 @@ static BOOL proxy_clientSearchRequest(epoll_client_t *client, const unsigned lon
if (pending == NULL) {
plog(DEBUG_WARNING, "Cannot handle incoming client request; too many pending requests on the wire.");
free_ldapsearchrequest(&req);
+ client_searchResultError(client, messageId, busy, "I'm busy!");
return FALSE;
}
// In case of anonymous bind: Narrow down list of what the user can see to protect private data
@@ -935,7 +935,7 @@ static BOOL proxy_clientSearchRequest(epoll_client_t *client, const unsigned lon
pending->serverMessageId = server_searchRequestOnConnection(client->fixedServer, &req);
}
if (pending->serverMessageId == 0) {
- // Failed to forward.. TODO: Fail client
+ client_searchResultError(client, messageId, unavailable, "Cannot contact upstream server.");
plog(DEBUG_WARNING, "Failed to forward a search request to server.");
pending->client = NULL;
}