command.c: simplify handle_connect()
authorAndre <maan@meins.(none)>
Thu, 11 Jan 2007 22:15:31 +0000 (23:15 +0100)
committerAndre <maan@meins.(none)>
Thu, 11 Jan 2007 22:15:31 +0000 (23:15 +0100)
lookup_user() never returns zero, so kill the corresponding check for
zero return value.

command.c

index ebc0a5f..474e1bb 100644 (file)
--- a/command.c
+++ b/command.c
@@ -1065,11 +1065,6 @@ int handle_connect(int fd, struct sockaddr_in *addr)
                use_rc4? "rc4" : "auth", u.name);
        if ((ret = lookup_user(&u)) < 0)
                goto err_out;
-       if (!ret) { /* user not found */
-               PARA_WARNING_LOG("auth request for unknown user %s\n", u.name);
-               ret = -E_BAD_USER;
-               goto err_out;
-       }
        ret = para_encrypt_challenge(u.rsa, challenge_nr, crypt_buf);
        if (ret <= 0)
                goto err_out;