Folks,
When using pop to read your mail under 6.7, it doesn't prompt for your
passwd and, instead, tries to use your username as your passwd. Besides
the fact that using a username as a password is stupid, it didn't work
here! :)
So, here's a patch to mh-6.7/uip/inc.c that prompts for a password and
uses it to try to authenticate with the pop server. of course, it's sent
in the clear, so it's terrible insecure. If someone wants to change it
so that it's encrypted and then change the pop server code and update the
rfc so that the encrypted password negotiation takes place... :)
/*****************************************************************************/
/* Jon `Iain` Boone Network Systems Administrator
boone(_at_)psc(_dot_)edu */
/* iain+(_at_)cmu(_dot_)edu Pittsburgh Supercomputing Center (412)
268-6959 */
/* I don't speak for anyone other than myself, unless otherwise stated!!!!!! */
/*****************************************************************************/
--------- patch follows --- cut here ---- patch follows ----------
18a19
#include <sys/ioctl.h>
107a109,112
#ifdef POP
#define PASSWD_SIZE 8
#endif
172a178,181
#ifdef POP
struct sgttyb sold, snew;
long ldisc;
#endif POP
342,343c351,369
< pass = getusr ();
< }
---
/* changes made by jab 10/08/92 16:45:15 */
/* this is really stupid! prompt for the passwd! */
/* pass = getusr (); */
pass = (char *) malloc(sizeof(char) * PASSWD_SIZE); /* allocate
space for the password */
if (isatty(0)) { /* check for standard input as tty */
ioctl(0,TIOCGETP,&sold); /* get old settings */
ioctl(0,TIOCGETP,&snew); /* fill in new structure */
snew.sg_flags &= ~ECHO; /* turn off echo --> we're getting a
passwd */
ioctl(0,TIOCSETP,&snew); /* set new flags */
printf("please enter your passwd -=> ");
scanf("%s",pass);
printf("\n");
ioctl(0,TIOCSETP,&sold); /* restore old settings */
}
/* end changes */
}