about summary refs log tree commit diff stats
path: root/WWW/Library/Implementation/HTAuth.c
diff options
context:
space:
mode:
authorThomas E. Dickey <dickey@invisible-island.net>1998-11-06 16:18:09 -0500
committerThomas E. Dickey <dickey@invisible-island.net>1998-11-06 16:18:09 -0500
commit18024037b515bfff83e0230b35151babe6005e18 (patch)
treeb8c80055282a00883284722a3dd6bb25234e07f0 /WWW/Library/Implementation/HTAuth.c
parent3d8ecbe48af249fa0d77ce4d273e32ce4b7e6e18 (diff)
downloadlynx-snapshots-18024037b515bfff83e0230b35151babe6005e18.tar.gz
snapshot of project "lynx", label v2-8-1dev_4
Diffstat (limited to 'WWW/Library/Implementation/HTAuth.c')
-rw-r--r--WWW/Library/Implementation/HTAuth.c24
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;