Mercurial > dovecot > original-hg > dovecot-1.2
comparison src/master/login-process.c @ 2736:0f31778d3c34 HEAD
Changed dovecot-auth protocol to ASCII based. Should be easier now to write
replacement server if needed by someone. Also cleaned up/made more
consistent auth code. The new code could still use some cleaning though..
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Wed, 13 Oct 2004 19:38:32 +0300 |
parents | 46f879c46b45 |
children | 1fd55b4341b9 |
comparison
equal
deleted
inserted
replaced
2735:25113dcc9705 | 2736:0f31778d3c34 |
---|---|
69 static void login_group_destroy(struct login_group *group) | 69 static void login_group_destroy(struct login_group *group) |
70 { | 70 { |
71 i_free(group); | 71 i_free(group); |
72 } | 72 } |
73 | 73 |
74 void auth_master_callback(struct auth_master_reply *reply, | 74 void auth_master_callback(const char *user, const char *const *args, |
75 const unsigned char *data, void *context) | 75 void *context) |
76 { | 76 { |
77 struct login_auth_request *request = context; | 77 struct login_auth_request *request = context; |
78 struct master_login_reply master_reply; | 78 struct master_login_reply master_reply; |
79 ssize_t ret; | 79 ssize_t ret; |
80 | 80 |
81 if (reply == NULL || !reply->success) | 81 if (user == NULL) |
82 master_reply.success = FALSE; | 82 master_reply.success = FALSE; |
83 else { | 83 else { |
84 struct login_group *group = request->process->group; | 84 struct login_group *group = request->process->group; |
85 | 85 |
86 t_push(); | 86 t_push(); |
87 master_reply.success = | 87 master_reply.success = |
88 create_mail_process(group, request->fd, | 88 create_mail_process(group, request->fd, |
89 &request->local_ip, | 89 &request->local_ip, |
90 &request->remote_ip, | 90 &request->remote_ip, user, args); |
91 reply, (const char *) data); | |
92 t_pop(); | 91 t_pop(); |
93 } | 92 } |
94 | 93 |
95 /* reply to login */ | 94 /* reply to login */ |
96 master_reply.tag = request->login_tag; | 95 master_reply.tag = request->login_tag; |