summaryrefslogtreecommitdiff
path: root/apache1x
diff options
context:
space:
mode:
Diffstat (limited to 'apache1x')
-rw-r--r--apache1x/mod_httpauth.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/apache1x/mod_httpauth.c b/apache1x/mod_httpauth.c
index b399c5d..4443c81 100644
--- a/apache1x/mod_httpauth.c
+++ b/apache1x/mod_httpauth.c
@@ -611,18 +611,22 @@ finally:
int write_request(httpauth_context_t* ctx, request_rec* r)
{
+ char pidid[40];
+ char connid[40];
int i, c = 0;
const char* t;
const array_header* hdrs_arr;
const table_entry* elts;
- /*
- * TODO: We need to use a valid connection id for
- * NTLM connections to work properly.
- */
+ /* A unique per connection id */
+ snprintf(connid, sizeof(connid), "0x%X", (unsigned int)r->connection);
+ connid[sizeof(connid) - 1] = 0;
+ snprintf(pidid, sizeof(pidid), "%d", (unsigned int)getpid());
+ pidid[sizeof(pidid) - 1] = 0;
+ t = ap_pstrcat(r->pool, pidid, ":", connid, NULL);
/* Send the request header to httpauthd */
- t = ap_pstrcat(r->pool, "AUTH XXX ", r->method,
+ t = ap_pstrcat(r->pool, "AUTH ", t, " ", r->method,
" ", r->unparsed_uri, "\n", NULL);
if(write_data(ctx, r->server, t) == -1)