dovecot-2.0: *-login: Check for missing username in lib-master c...
dovecot at dovecot.org
dovecot at dovecot.org
Fri Dec 11 23:00:29 EET 2009
details: http://hg.dovecot.org/dovecot-2.0/rev/6c9d97878efe
changeset: 10455:6c9d97878efe
user: Timo Sirainen <tss at iki.fi>
date: Fri Dec 11 16:00:14 2009 -0500
description:
*-login: Check for missing username in lib-master code.
diffstat:
3 files changed, 3 insertions(+), 13 deletions(-)
src/imap/main.c | 6 ------
src/lib-master/master-login.c | 4 +++-
src/pop3/main.c | 6 ------
diffs (46 lines):
diff -r 802b9ebe79e6 -r 6c9d97878efe src/imap/main.c
--- a/src/imap/main.c Fri Dec 11 14:33:58 2009 -0500
+++ b/src/imap/main.c Fri Dec 11 16:00:14 2009 -0500
@@ -224,12 +224,6 @@ login_client_connected(const struct mast
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,
diff -r 802b9ebe79e6 -r 6c9d97878efe src/lib-master/master-login.c
--- a/src/lib-master/master-login.c Fri Dec 11 14:33:58 2009 -0500
+++ b/src/lib-master/master-login.c Fri Dec 11 16:00:14 2009 -0500
@@ -142,7 +142,9 @@ master_login_auth_callback(const char *c
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);
diff -r 802b9ebe79e6 -r 6c9d97878efe src/pop3/main.c
--- a/src/pop3/main.c Fri Dec 11 14:33:58 2009 -0500
+++ b/src/pop3/main.c Fri Dec 11 16:00:14 2009 -0500
@@ -150,12 +150,6 @@ login_client_connected(const struct mast
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,
More information about the dovecot-cvs
mailing list