[1431] in Moira
moira client patch for default IMAP
daemon@ATHENA.MIT.EDU (Garry Zacheiss)
Mon Mar 13 21:14:46 2000
Message-Id: <200003140214.VAA31761@alice-whacker.mit.edu>
To: moiradev@MIT.EDU
Date: Mon, 13 Mar 2000 21:14:42 -0500
From: Garry Zacheiss <zacheiss@MIT.EDU>
This supercedes the previous similar patch I submitted, and
makes the default for register_user be IMAP in a more aggressive manner.
Index: pobox.c
===================================================================
RCS file: /afs/athena.mit.edu/astaff/project/moiradev/repository//moira/clients/moira/pobox.c,v
retrieving revision 1.33
diff -c -r1.33 pobox.c
*** pobox.c 2000/02/18 17:07:58 1.33
--- pobox.c 2000/03/14 02:07:19
***************
*** 444,450 ****
}
/* Fall through from MR_MACHINE case. */
case FALSE:
! type = strdup("POP");
if (GetValueFromUser("Kind of Local PO Box?", &type) == SUB_ERROR)
{
free(type);
--- 444,450 ----
}
/* Fall through from MR_MACHINE case. */
case FALSE:
! type = strdup("IMAP");
if (GetValueFromUser("Kind of Local PO Box?", &type) == SUB_ERROR)
{
free(type);
Index: user.c
===================================================================
RCS file: /afs/athena.mit.edu/astaff/project/moiradev/repository//moira/clients/moira/user.c,v
retrieving revision 1.56
diff -c -r1.56 user.c
*** user.c 2000/03/09 19:59:54 1.56
--- user.c 2000/03/14 02:07:40
***************
*** 556,562 ****
int RegisterUser(int argc, char **argv)
{
char *args[MAX_ARGS_SIZE];
! char *login, *fstype = NULL;
char temp_buf[BUFSIZ];
int status;
--- 556,562 ----
int RegisterUser(int argc, char **argv)
{
char *args[MAX_ARGS_SIZE];
! char *login, *potype = NULL;
char temp_buf[BUFSIZ];
int status;
***************
*** 579,586 ****
sprintf(temp_buf, "u%s", args[0]);
login = strdup(temp_buf);
! if ((GetValueFromUser("Login name for this user? ", &login) == SUB_ERROR) ||
! (GetFSTypes(&fstype, FALSE) == SUB_ERROR))
{
args[1] = login;
FreeInfo(args); /* This work because the NULL temination is ok. */
--- 579,585 ----
sprintf(temp_buf, "u%s", args[0]);
login = strdup(temp_buf);
! if (GetValueFromUser("Login name for this user? ", &login) == SUB_ERROR)
{
args[1] = login;
FreeInfo(args); /* This work because the NULL temination is ok. */
***************
*** 588,594 ****
}
Put_message("KERBEROS code not added, did not reserve name with kerberos.");
args[1] = login;
! args[2] = fstype;
args[3] = NULL;
switch ((status = do_mr_query("register_user", CountArgs(args),
--- 587,602 ----
}
Put_message("KERBEROS code not added, did not reserve name with kerberos.");
args[1] = login;
!
! Prompt_input("What type of P.O. Box for this user? ", temp_buf, BUFSIZ);
! potype = strdup(temp_buf);
! if (strcmp(potype, "POP") && strcmp(potype, "IMAP"))
! {
! sprintf(temp_buf, "Unknown P.O. type. Assuming IMAP.");
! Put_message(temp_buf);
! potype = strdup("IMAP");
! }
! args[2] = potype;
args[3] = NULL;
switch ((status = do_mr_query("register_user", CountArgs(args),