]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
*-login: Check for missing username in lib-master code.
authorTimo Sirainen <tss@iki.fi>
Fri, 11 Dec 2009 21:00:14 +0000 (16:00 -0500)
committerTimo Sirainen <tss@iki.fi>
Fri, 11 Dec 2009 21:00:14 +0000 (16:00 -0500)
--HG--
branch : HEAD

src/imap/main.c
src/lib-master/master-login.c
src/pop3/main.c

index 5526ad3d26526716eac96ccc77030051694e9702..5350fd505d4621d3d43a4dc9fde321f793b6c128 100644 (file)
@@ -224,12 +224,6 @@ login_client_connected(const struct master_login_client *client,
        input.username = username;
        input.userdb_fields = extra_fields;
 
-       if (input.username == NULL) {
-               i_error("login client: Username missing from auth reply");
-               (void)close(client->fd);
-               return;
-       }
-
        buffer_create_const_data(&input_buf, client->data,
                                 client->auth_req.data_size);
        if (client_create_from_input(&input, client->fd, client->fd,
index 3f7eb276190a2b3f62981887443d0c590740fbf3..ea4a664015761d47811d2addacf4a9a818e9ec1c 100644 (file)
@@ -142,7 +142,9 @@ master_login_auth_callback(const char *const *auth_args, void *context)
        reply.mail_pid = getpid();
        o_stream_send(conn->output, &reply, sizeof(reply));
 
-       if (auth_args == NULL) {
+       if (auth_args == NULL || auth_args[0] == NULL) {
+               if (auth_args != NULL)
+                       i_error("login client: Username missing from auth reply");
                if (close(client->fd) < 0)
                        i_error("close(fd_read client) failed: %m");
                i_free(client);
index 41a32e753de80c23f01ba64d2936f6f0fd5f778a..d6930c84d22695f8ffca7f44d58de760f7a96055 100644 (file)
@@ -150,12 +150,6 @@ login_client_connected(const struct master_login_client *client,
        input.username = username;
        input.userdb_fields = extra_fields;
 
-       if (input.username == NULL) {
-               i_error("login client: Username missing from auth reply");
-               (void)close(client->fd);
-               return;
-       }
-
        buffer_create_const_data(&input_buf, client->data,
                                 client->auth_req.data_size);
        if (client_create_from_input(&input, client->fd, client->fd,