diff options
Diffstat (limited to 'WWW/Library/Implementation/HTAuth.c')
-rw-r--r-- | WWW/Library/Implementation/HTAuth.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/WWW/Library/Implementation/HTAuth.c b/WWW/Library/Implementation/HTAuth.c index f1e7efd5..b8b4d010 100644 --- a/WWW/Library/Implementation/HTAuth.c +++ b/WWW/Library/Implementation/HTAuth.c @@ -14,6 +14,7 @@ */ #include <HTUtils.h> +#include <string.h> #include <HTPasswd.h> /* Password file routines */ #include <HTAssoc.h> #include <HTAuth.h> /* Implemented here */ @@ -98,7 +99,8 @@ PRIVATE HTAAUser *decompose_auth_string ARGS2(char *, authstring, */ username = cleartext; if (!(password = strchr(cleartext, ':'))) { - CTRACE(tfp, "%s %s\n", + if (TRACE) + fprintf(stderr, "%s %s\n", "decompose_auth_string: password field", "missing in authentication string.\n"); return NULL; @@ -114,9 +116,9 @@ PRIVATE HTAAUser *decompose_auth_string ARGS2(char *, authstring, (*(timestamp++) ='\0'), !(browsers_key=strchr(timestamp,':')) || (*(browsers_key++)='\0')) { - CTRACE(tfp, "%s %s\n", - "decompose_auth_string: Pubkey scheme", - "fields missing in authentication string"); + if (TRACE) fprintf(stderr, "%s %s\n", + "decompose_auth_string: Pubkey scheme", + "fields missing in authentication string"); return NULL; } } @@ -130,12 +132,13 @@ PRIVATE HTAAUser *decompose_auth_string ARGS2(char *, authstring, user->timestamp = timestamp; user->secret_key = browsers_key; - if (scheme == HTAA_BASIC) { - CTRACE(tfp, "decompose_auth_string: %s (%s,%s)\n", + if (TRACE) { + if (scheme==HTAA_BASIC) + fprintf(stderr, "decompose_auth_string: %s (%s,%s)\n", "Basic scheme authentication string:", username, password); - } else { - CTRACE(tfp, "decompose_auth_string: %s (%s,%s,%s,%s,%s)\n", + else + fprintf(stderr, "decompose_auth_string: %s (%s,%s,%s,%s,%s)\n", "Pubkey scheme authentication string:", username, password, i_net_adr, timestamp, browsers_key); } @@ -145,13 +148,13 @@ PRIVATE HTAAUser *decompose_auth_string ARGS2(char *, authstring, -PRIVATE BOOL HTAA_checkTimeStamp ARGS1(CONST char *, timestamp GCC_UNUSED) +PRIVATE BOOL HTAA_checkTimeStamp ARGS1(CONST char *, timestamp) { return NO; /* This is just a stub */ } -PRIVATE BOOL HTAA_checkInetAddress ARGS1(CONST char *, i_net_adr GCC_UNUSED) +PRIVATE BOOL HTAA_checkInetAddress ARGS1(CONST char *, i_net_adr) { return NO; /* This is just a stub */ } @@ -198,6 +201,7 @@ PUBLIC HTAAUser *HTAA_authenticate ARGS3(HTAAScheme, scheme, else return NULL; } + break; default: /* Other authentication routines go here */ return NULL; |