Commit a946ab0a a946ab0a40525d966e8447f4e2c64badd3e5197e by Alain Magloire

minor nits in POP corrected.

1 parent c02f8c0e
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
39 int 39 int
40 main(int argc, char **argv) 40 main(int argc, char **argv)
41 { 41 {
42 mailbox_t mbox; 42 mailbox_t mbox = NULL;
43 size_t i; 43 size_t i;
44 size_t count = 0; 44 size_t count = 0;
45 char *mailbox_name = NULL; 45 char *mailbox_name = NULL;
......
...@@ -104,6 +104,8 @@ mailbox_create (mailbox_t *pmbox, const char *name, int id) ...@@ -104,6 +104,8 @@ mailbox_create (mailbox_t *pmbox, const char *name, int id)
104 else 104 else
105 *pmbox = mbox; 105 *pmbox = mbox;
106 } 106 }
107 else
108 status = ENOENT;
107 109
108 return status; 110 return status;
109 } 111 }
......
...@@ -364,11 +364,11 @@ pop_user (authority_t auth) ...@@ -364,11 +364,11 @@ pop_user (authority_t auth)
364 CHECK_ERROR_CLOSE (mbox, mpd, EACCES); 364 CHECK_ERROR_CLOSE (mbox, mpd, EACCES);
365 } 365 }
366 status = pop_writeline (mpd, "PASS %s\r\n", mpd->passwd); 366 status = pop_writeline (mpd, "PASS %s\r\n", mpd->passwd);
367 CHECK_ERROR_CLOSE (mbox, mpd, status);
368 /* We have to nuke the passwd. */ 367 /* We have to nuke the passwd. */
369 memset (mpd->passwd, 0, strlen (mpd->passwd)); 368 memset (mpd->passwd, 0, strlen (mpd->passwd));
370 free (mpd->passwd); 369 free (mpd->passwd);
371 mpd->passwd = NULL; 370 mpd->passwd = NULL;
371 CHECK_ERROR_CLOSE (mbox, mpd, status);
372 MAILBOX_DEBUG0 (mbox, MU_DEBUG_PROT, "PASS *\n"); 372 MAILBOX_DEBUG0 (mbox, MU_DEBUG_PROT, "PASS *\n");
373 mpd->state = POP_AUTH_PASS; 373 mpd->state = POP_AUTH_PASS;
374 374
...@@ -497,9 +497,12 @@ pop_open (mailbox_t mbox, int flags) ...@@ -497,9 +497,12 @@ pop_open (mailbox_t mbox, int flags)
497 } 497 }
498 498
499 case POP_AUTH: 499 case POP_AUTH:
500 case POP_AUTH_USER:
501 case POP_AUTH_USER_ACK:
502 case POP_AUTH_PASS:
503 case POP_AUTH_PASS_ACK:
500 status = authority_authenticate (mbox->authority); 504 status = authority_authenticate (mbox->authority);
501 if (status != 0) 505 CHECK_EAGAIN (mpd, status);
502 return status;
503 506
504 case POP_AUTH_DONE: 507 case POP_AUTH_DONE:
505 break; 508 break;
......
...@@ -98,7 +98,6 @@ main (int argc, char **argv) ...@@ -98,7 +98,6 @@ main (int argc, char **argv)
98 registrar_get_list (&bookie); 98 registrar_get_list (&bookie);
99 list_append (bookie, mbox_record); 99 list_append (bookie, mbox_record);
100 list_append (bookie, path_record); 100 list_append (bookie, path_record);
101 list_append (bookie, pop_record);
102 } 101 }
103 102
104 /* Set the signal handlers */ 103 /* Set the signal handlers */
......