diff options
| author | Franklin Wei <git@fwei.tk> | 2016-01-16 20:05:58 -0500 |
|---|---|---|
| committer | Franklin Wei <git@fwei.tk> | 2016-01-16 20:05:58 -0500 |
| commit | 98896de83ffa7380404e41b6ed80cfc6ba3bf8f0 (patch) | |
| tree | 427f48b92d647c6278df083f86d33a7545710a6c /src/auth.c | |
| parent | 056220075ca575c17899abea7b3a2fb55e64b561 (diff) | |
| download | netcosm-98896de83ffa7380404e41b6ed80cfc6ba3bf8f0.zip netcosm-98896de83ffa7380404e41b6ed80cfc6ba3bf8f0.tar.gz netcosm-98896de83ffa7380404e41b6ed80cfc6ba3bf8f0.tar.bz2 netcosm-98896de83ffa7380404e41b6ed80cfc6ba3bf8f0.tar.xz | |
packetized requests
Diffstat (limited to 'src/auth.c')
| -rw-r--r-- | src/auth.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -58,6 +58,8 @@ static char *hash_pass_hex(const char *pass, const char *salt) char *ptr = hex; for(unsigned int i = 0; i < hash_len; ++i, ptr += 2) snprintf(ptr, 3, "%02x", hash[i]); + hex[hash_len * 2] = '\0'; + sig_debugf("hash is %s\n", hex); gcry_free(hash); @@ -194,6 +196,7 @@ struct userdata_t *auth_check(const char *name2, const char *pass2) if(data) { + sig_debugf("auth module: user %s found\n", name2); char *new_hash_hex = hash_pass_hex(pass, salt); memset(pass, 0, strlen(pass)); @@ -208,6 +211,8 @@ struct userdata_t *auth_check(const char *name2, const char *pass2) return data; } + sig_debugf("auth failure: username not found\n"); + /* failure */ sleep(2); return NULL; |