]> andersk Git - moira.git/blobdiff - clients/moira/user.c
tcsh is dead. Long live bash.
[moira.git] / clients / moira / user.c
index b1f1ee382cae8ab4502775dc96de7dd7290b9a9d..0ed1762ec22f3a7ff710a5e87b3fd9fd7ed68fbe 100644 (file)
@@ -42,9 +42,9 @@ struct mqelem *GetUserBySponsor(char *type, char *name);
 #define ID 4
 
 #ifdef ATHENA
-#define DEFAULT_SHELL "/bin/athena/tcsh"
+#define DEFAULT_SHELL "/bin/athena/bash"
 #else
-#define DEFAULT_SHELL "/bin/csh"
+#define DEFAULT_SHELL "/bin/bash"
 #endif
 #define DEFAULT_CLASS "?"
 
@@ -107,7 +107,7 @@ static void PrintUserName(char **info)
 
 static void PrintUserInfo(char **info)
 {
-  char name[BUFSIZ], buf[BUFSIZ];
+  char name[BUFSIZ], buf[BUFSIZ], sponsor[BUFSIZ];
   int status;
 
   sprintf(name, "%s, %s %s", info[U_LAST], info[U_FIRST], info[U_MIDDLE]);
@@ -119,8 +119,8 @@ static void PrintUserInfo(char **info)
   sprintf(buf, "Class: %-25s Windows Console Shell: %-10s",
          info[U_CLASS], info[U_WINCONSOLESHELL]);
   Put_message(buf);
-  sprintf(buf, "Sponsor: %s %s", info[U_SPONSOR_TYPE],
-         info[U_SPONSOR_NAME]);
+  sprintf(sponsor, "%s %s", info[U_SPONSOR_TYPE], info[U_SPONSOR_NAME]);
+  sprintf(buf, "Sponsor: %-23s Expiration date: %s", sponsor,  info[U_EXPIRATION]);
   Put_message(buf);
   sprintf(buf, "Account is: %-20s MIT ID number: %s",
          UserState(atoi(info[U_STATE])), info[U_MITID]);
@@ -169,6 +169,7 @@ static char **SetUserDefaults(char **info)
   info[U_WINPROFILEDIR] = strdup(DEFAULT_WINPROFILEDIR);
   info[U_SPONSOR_TYPE] = strdup("NONE");
   info[U_SPONSOR_NAME] = strdup("NONE");
+  info[U_EXPIRATION] = strdup("");
   info[U_MODTIME] = info[U_MODBY] = info[U_MODWITH] = info[U_END] = NULL;
   info[U_CREATED] = info[U_CREATOR] = NULL;
   return info;
@@ -330,6 +331,9 @@ char **AskUserInfo(char **info, Bool name)
       GetValueFromUser("Sponsor's Name", &info[U_SPONSOR_NAME]) == SUB_ERROR)
     return NULL;
 
+  if (GetValueFromUser("Expiration date", &info[U_EXPIRATION]) == SUB_ERROR)
+    return NULL;
+
   state = atoi(info[U_STATE]);
   if (!name || state == 0 || state == 2)
     {
@@ -639,7 +643,7 @@ int RegisterUser(int argc, char **argv)
       FreeInfo(args);
       return DM_NORMAL;
     }
-  if (strcmp(potype, "POP") && strcmp(potype, "IMAP"))
+  if (strcmp(potype, "POP") && strcmp(potype, "IMAP") && strcmp(potype, "EXCHANGE"))
     {
       sprintf(temp_buf, "Unknown P.O. Box type.");
       Put_message(temp_buf);
@@ -1177,7 +1181,7 @@ int UserBySponsor(int argc, char **argv)
   struct mqelem *top;
 
   type = strdup("USER");
-  if (GetTypeFromUser("Type of owner", "ace_type", &type) == SUB_ERROR)
+  if (GetTypeFromUser("Type of sponsor", "search_ace_type", &type) == SUB_ERROR)
     return DM_NORMAL;
 
   sprintf(buf, "Name of %s", type);
This page took 0.03584 seconds and 4 git commands to generate.