diff options
Diffstat (limited to 'daemon/simple.c')
-rw-r--r-- | daemon/simple.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/daemon/simple.c b/daemon/simple.c index 1c37c23..1e3cc64 100644 --- a/daemon/simple.c +++ b/daemon/simple.c @@ -28,9 +28,11 @@ #include "hash.h" #include "bd.h" #include "md5.h" +#include "stringx.h" #include <stdio.h> #include <fcntl.h> +#include <unistd.h> #define SIMPLE_MAXLINE 256 @@ -49,8 +51,8 @@ typedef struct simple_context simple_context_t; /* Forward declarations for callbacks */ -static int validate_digest(ha_request_t* rq, const char* user, digest_context_t* dg); -static int validate_basic(ha_request_t* rq, const char* user, const char* password); +static int validate_digest(ha_request_t* rq, const char* user, digest_context_t* dg, char ***groups); +static int validate_basic(ha_request_t* rq, const char* user, const char* password, char ***groups); /* The defaults for the context */ static const simple_context_t simple_defaults = @@ -63,7 +65,8 @@ static const simple_context_t simple_defaults = * Internal Functions */ -static int validate_digest(ha_request_t* rq, const char* user, digest_context_t* dg) +static int validate_digest(ha_request_t* rq, const char* user, + digest_context_t* dg, char ***groups) { simple_context_t* ctx = (simple_context_t*)rq->context->ctx_data; FILE* f; @@ -142,7 +145,7 @@ static int validate_digest(ha_request_t* rq, const char* user, digest_context_t* } ha_messagex(rq, LOG_DEBUG, "found ha1 for user: %s", user); - memcpy(dg->ha1, t, MD5_LEN); + memcpy(dg->server_ha1, t, MD5_LEN); foundgood = 1; /* Try to do the validation */ @@ -168,7 +171,8 @@ static int validate_digest(ha_request_t* rq, const char* user, digest_context_t* return ret; } -static int validate_basic(ha_request_t* rq, const char* user, const char* password) +static int validate_basic(ha_request_t* rq, const char* user, + const char* password, char ***groups) { simple_context_t* ctx = (simple_context_t*)rq->context->ctx_data; FILE* f; |