Fix protocol probe. Will detect ADC and TLS handshake - any other request

will simply cause the hub to close the connection.
Fix problems with write events not being processed due to a read event taking presendence.
Fix bug #86: Windows does not have "getrlimit()".
This commit is contained in:
Jan Vidar Krey
2009-10-07 17:37:31 +02:00
parent 11e5683a79
commit 2910c571b0
16 changed files with 267 additions and 106 deletions

View File

@@ -434,9 +434,10 @@ const char* acl_password_generate_challenge(struct acl_handle* acl, struct hub_u
char buf[32];
uint64_t tiger_res[3];
static char tiger_buf[MAX_CID_LEN+1];
snprintf(buf, 32, "%d%d%d", (int) user->tm_connected, (int) user->id.sid, (int) user->connection->sd);
// FIXME: Generate a better nonce scheme.
snprintf(buf, 32, "%p%d%d", user, (int) user->id.sid, (int) user->connection->sd);
tiger((uint64_t*) buf, strlen(buf), (uint64_t*) tiger_res);
base32_encode((unsigned char*) tiger_res, TIGERSIZE, tiger_buf);
tiger_buf[MAX_CID_LEN] = 0;