Mercurial > hgrepos > hgweb.cgi > imapext
comparison src/imapd/imapd.c @ 4:d741b3ecc917 draft
imapext-2007f
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Thu, 30 Oct 2014 00:03:05 +0900 |
parents | 2366b362676d |
children |
comparison
equal
deleted
inserted
replaced
3:2366b362676d | 4:d741b3ecc917 |
---|---|
551 } | 551 } |
552 } | 552 } |
553 | 553 |
554 /* plaintext login with password */ | 554 /* plaintext login with password */ |
555 else if (!strcmp (cmd,"LOGIN")) { | 555 else if (!strcmp (cmd,"LOGIN")) { |
556 #ifdef QMAIL | |
557 extern char* conv_virtualdomain(char*); | |
558 #endif | |
556 if (user) fs_give ((void **) &user); | 559 if (user) fs_give ((void **) &user); |
557 if (pass) fs_give ((void **) &pass); | 560 if (pass) fs_give ((void **) &pass); |
558 /* two arguments */ | 561 /* two arguments */ |
559 if (!((user = cpystr (snarf (&arg))) && | 562 if (!((user = cpystr (snarf (&arg))) && |
560 (pass = cpystr (snarf (&arg))))) response = misarg; | 563 (pass = cpystr (snarf (&arg))))) response = misarg; |
571 tcp_clienthost ()); | 574 tcp_clienthost ()); |
572 } | 575 } |
573 else { /* delimit user from possible admin */ | 576 else { /* delimit user from possible admin */ |
574 if (s = strchr (user,'*')) *s++ ='\0'; | 577 if (s = strchr (user,'*')) *s++ ='\0'; |
575 /* see if username and password are OK */ | 578 /* see if username and password are OK */ |
579 #ifdef QMAIL | |
580 if (server_login (conv_virtualdomain(user),pass,s,argc,argv)) { | |
581 #else | |
576 if (server_login (user,pass,s,argc,argv)) { | 582 if (server_login (user,pass,s,argc,argv)) { |
583 #endif | |
577 state = SELECT; /* make select */ | 584 state = SELECT; /* make select */ |
578 alerttime = 0; /* force alert */ | 585 alerttime = 0; /* force alert */ |
579 response = logwin;/* return logged-in capabilities */ | 586 response = logwin;/* return logged-in capabilities */ |
580 syslog (LOG_INFO,"Login user=%.80s host=%.80s",user, | 587 syslog (LOG_INFO,"Login user=%.80s host=%.80s",user, |
581 tcp_clienthost ()); | 588 tcp_clienthost ()); |