When using mtest with the "/authuser=" option, mtest displays a password
prompt for the regular user instead of the authentication user:
$ ./mtest
MTest -- C client test program
Debug protocol (y/n)?n
Mailbox ('?' for help): {imaphost/imap/authuser="asterisk"}voicemail
[Trying IP address [xx.xx.xx.xx]]
[imaphost Cyrus IMAP4 (Murder) v2.3.10 server ready]
{imaphost/imap/user="selsky"} password:
This is a bit misleading. Instead the prompt should be:
{imaphost/imap/authuser="asterisk"} password:
The attached patch fixes this.
Cheers,
--
Matt
diff -ur imap-2006k.DEV.SNAP-0710261815.orig/src/mtest/mtest.c
imap-2006k.DEV.SNAP-0710261815/src/mtest/mtest.c
--- imap-2006k.DEV.SNAP-0710261815.orig/src/mtest/mtest.c 2007-06-05
16:32:31.000000000 -0400
+++ imap-2006k.DEV.SNAP-0710261815/src/mtest/mtest.c 2007-10-31
18:37:36.875368295 -0400
@@ -699,7 +699,11 @@
if (curhst) fs_give ((void **) &curhst);
curhst = (char *) fs_get (1+strlen (mb->host));
strcpy (curhst,mb->host);
- if (*mb->user) {
+ if (*mb->authuser) {
+ strcpy (user,mb->authuser);
+ sprintf (tmp,"{%s/%s/authuser=\"%s\"} password:
",mb->host,mb->service,mb->authuser);
+ }
+ else if (*mb->user) {
strcpy (user,mb->user);
sprintf (tmp,"{%s/%s/user=\"%s\"} password:
",mb->host,mb->service,mb->user);
}
_______________________________________________
Imap-uw mailing list
[email protected]
https://mailman1.u.washington.edu/mailman/listinfo/imap-uw