#include "util.h"
typedef struct _request_data {
+ int channelId;
char *user;
char *realm;
char *password;
requestData->parsed = 0;
if ((p = strchr(buf, '\n')) != NULL)
*p = '\0'; /* strip \n */
+
+ p = NULL;
+ requestData->channelId = strtoll(buf, &p, 10);
+ if (*p != ' ') // not a channel-ID
+ requestData->channelId = -1;
+ else
+ buf = ++p;
+
if ((requestData->user = strtok(buf, "\"")) == NULL)
return;
if ((requestData->realm = strtok(NULL, "\"")) == NULL)
{
requestData->error = 0;
GetHHA1(requestData);
+ if (requestData->channelId >= 0)
+ printf("%u ", requestData->channelId);
if (requestData->error) {
SEND_ERR("message=\"No such user\"");
return;
RequestData requestData;
ParseBuffer(buf, &requestData);
if (!requestData.parsed) {
+ if (requestData.channelId >= 0)
+ printf("%u ", requestData.channelId);
SEND_BH("message=\"Invalid line received\"");
return;
}
#include "util.h"
typedef struct _request_data {
+ int channelId;
char *user;
char *realm;
char *password;
requestData->parsed = 0;
if ((p = strchr(buf, '\n')) != NULL)
*p = '\0'; /* strip \n */
+
+ p = NULL;
+ requestData->channelId = strtoll(buf, &p, 10);
+ if (*p != ' ') // not a channel-ID
+ requestData->channelId = -1;
+ else
+ buf = ++p;
+
if ((requestData->user = strtok(buf, "\"")) == NULL)
return;
if ((requestData->realm = strtok(NULL, "\"")) == NULL)
{
requestData->error = 0;
GetHHA1(requestData);
+ if (requestData->channelId >= 0)
+ printf("%u ", requestData->channelId);
if (requestData->error) {
SEND_ERR("message=\"No such user\"");
return;
RequestData requestData;
ParseBuffer(buf, &requestData);
if (!requestData.parsed) {
+ if (requestData.channelId >= 0)
+ printf("%u ", requestData.channelId);
SEND_BH("message=\"Invalid line received\"");
return;
}
#endif
typedef struct _request_data {
+ int channelId;
char *user;
char *realm;
char *password;
.if !'po4a'hide' \-
File based digest authentication helper for Squid.
.PP
-Version 1.0
+Version 1.1
.
.SH SYNOPSIS
.if !'po4a'hide' .B digest_file_auth
is an installed binary authentication program for Squid. It handles digest
authentication protocol and authenticates against a text file backend.
.
+This program will automatically detect the existence of a concurrecy channel-ID and adjust appropriately.
+It may be used with any value 0 or above for the auth_param children concurrency= parameter.
+.
.SH OPTIONS
.if !'po4a'hide' .TP 12
.if !'po4a'hide' .B \-c
requestData->parsed = 0;
if ((p = strchr(buf, '\n')) != NULL)
*p = '\0'; /* strip \n */
+
+ p = NULL;
+ requestData->channelId = strtoll(buf, &p, 10);
+ if (*p != ' ') // not a channel-ID
+ requestData->channelId = -1;
+ else
+ buf = ++p;
+
if ((requestData->user = strtok(buf, "\"")) == NULL)
return;
if ((requestData->realm = strtok(NULL, "\"")) == NULL)
{
requestData->error = 0;
GetHHA1(requestData);
+ if (requestData->channelId >= 0)
+ printf("%u ", requestData->channelId);
if (requestData->error) {
SEND_ERR("message=\"No such user\"");
return;
RequestData requestData;
ParseBuffer(buf, &requestData);
if (!requestData.parsed) {
+ if (requestData.channelId >= 0)
+ printf("%u ", requestData.channelId);
SEND_BH("message=\"Invalid line received\"");
return;
}