[1813] in Moira Commits

home help back first fref pref prev next nref lref last post

/svn/moira r3960 - trunk/moira/reg_svr

daemon@ATHENA.MIT.EDU (Garry Zacheiss)
Wed Jan 6 01:20:54 2010

Date: Wed, 6 Jan 2010 01:20:48 -0500
From: Garry Zacheiss <zacheiss@MIT.EDU>
Message-Id: <201001060620.o066KmVG014631@drugstore.mit.edu>
To: moira-commits@mit.edu
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Author: zacheiss
Date: 2010-01-06 01:20:48 -0500 (Wed, 06 Jan 2010)
New Revision: 3960

Modified:
   trunk/moira/reg_svr/reg_svr.pc
Log:
Exchange poboxes for all.

Modified: trunk/moira/reg_svr/reg_svr.pc
===================================================================
--- trunk/moira/reg_svr/reg_svr.pc	2010-01-06 05:03:16 UTC (rev 3959)
+++ trunk/moira/reg_svr/reg_svr.pc	2010-01-06 06:20:48 UTC (rev 3960)
@@ -717,7 +717,6 @@
   char *password = argv[0], *p;
   EXEC SQL BEGIN DECLARE SECTION;
   char *login = rc->username;
-  char potype[USERS_POTYPE_SIZE];
   EXEC SQL END DECLARE SECTION;
 
   if (!rc->username || rc->id || argc != 1)
@@ -788,11 +787,7 @@
       return;
     }
 
-  EXEC SQL SELECT potype INTO :potype FROM users WHERE login = :login;
-  if (!strcmp(potype, "EXCHANGE"))
-    reply(rc, DONE, "INIT", "c", NULL, rc->username, "http://owa.mit.edu");
-  else
-    reply(rc, DONE, "INIT", "c", NULL, rc->username, "http://webmail.mit.edu");
+  reply(rc, DONE, "INIT", "c", NULL, rc->username, "http://owa.mit.edu");
 }
 
 void QUIT(reg_client *rc, int argc, char **argv)
@@ -836,9 +831,6 @@
 /* Register a user in Moira */
 int register_user(int uid, char *username)
 {
-  EXEC SQL BEGIN DECLARE SECTION;
-  char class[USERS_TYPE_SIZE];
-  EXEC SQL END DECLARE SECTION;
   char uidbuf[10], *qargv[3], *motd = NULL;
   long status;
 
@@ -861,28 +853,11 @@
       return MR_INTERNAL;
     }
 
-  EXEC SQL SELECT type INTO :class FROM users WHERE unix_uid = :uid;
-
   sprintf(uidbuf, "%d", uid);
   qargv[0] = uidbuf;
   qargv[1] = username;
+  qargv[2] = "EXCHANGE";
 
-  /* Incoming students should be given Exchange poboxes.
-   * Doesn't work for undergrads in the class of 2100 or higher.
-   */ 
-  if (!strcmp(strtrim(class), "G") || !strncmp(class, "FALL", 4) ||
-      !strncmp(class, "SPRING", 5) || !strncmp(class, "SUMMER", 6) ||
-      !strncmp(class, "20", 2))
-    {
-      com_err(whoami, 0, "assigning EXCHANGE pobox to user %s, class %s", username, class);
-      qargv[2] = "EXCHANGE";
-    }
-  else 
-    {
-      com_err(whoami, 0, "assigning IMAP pobox to user %s, class %s", username, class);
-      qargv[2] = "IMAP";
-    }
-
   status = mr_query("register_user", 3, qargv, NULL, NULL);
   mr_disconnect();
   return status;


home help back first fref pref prev next nref lref last post