diff options
author | tradke <tradke@1faa4e14-9dd3-4be0-9f0e-ffe519881164> | 2001-04-03 11:52:30 +0000 |
---|---|---|
committer | tradke <tradke@1faa4e14-9dd3-4be0-9f0e-ffe519881164> | 2001-04-03 11:52:30 +0000 |
commit | 9440c6b2556d012a91c44eee00c56790819b722f (patch) | |
tree | 570ff51e6484286a8aef911fd7e1e3670b4f989b /src/Authorisation.c | |
parent | f205b15ff648ff94aa3c3ab40a66a2cc9404f864 (diff) |
Fixed most of the compiler warnings.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusConnect/HTTPD/trunk@120 1faa4e14-9dd3-4be0-9f0e-ffe519881164
Diffstat (limited to 'src/Authorisation.c')
-rw-r--r-- | src/Authorisation.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/Authorisation.c b/src/Authorisation.c index 5b10df7..3f40ebe 100644 --- a/src/Authorisation.c +++ b/src/Authorisation.c @@ -96,6 +96,9 @@ int HTTP_AuthAddUser(const char *database, int retcode; uHash *this_database; + retcode = -1; + this_database = NULL; + /* Create the master database if necessary */ if(!AuthDatabase) { @@ -165,16 +168,15 @@ int HTTP_AuthenticateBasic(httpRequest *request, int length) { int retval; - char message[1024]; const char *value; char *auth_string; char *token; int decoded_size; - unsigned char decoded[DECODED_SIZE+1]; + char decoded[DECODED_SIZE+1]; - unsigned char *password; + char *password; int authorised; @@ -202,7 +204,8 @@ int HTTP_AuthenticateBasic(httpRequest *request, if(CCTK_Equals(token, "Basic")) { token = strtok(NULL, " ,\t"); - decoded_size = HTTP_b64_pton(token, decoded, DECODED_SIZE); + decoded_size = HTTP_b64_pton(token, (unsigned char *) decoded, + DECODED_SIZE); /* Null terminate string */ decoded[decoded_size] = 0; @@ -215,7 +218,7 @@ int HTTP_AuthenticateBasic(httpRequest *request, password++; authorised = VerifyPassword(database, decoded, password); - if(user && strlen(user) < decoded_size) + if(user && (int) strlen(user) < decoded_size) { sprintf(user,"%s", decoded); } |