]> andersk Git - moira.git/commitdiff
remove encrypted ID support: if we do load in someone who already has
authordanw <danw>
Thu, 13 Aug 1998 18:20:51 +0000 (18:20 +0000)
committerdanw <danw>
Thu, 13 Aug 1998 18:20:51 +0000 (18:20 +0000)
an account with an encrypted ID field, encrypting their current MIT ID
and comparing against it will fail anyway, since the encrypted ID
would be their SSN or old MIT ID. So the code is useless.

regtape/Makefile.in
regtape/employee.pc
regtape/students.pc

index 3313a0c3f9ff332046ad7c0455fde79fca8111ef..530c2456536f8b26f9253f795eabb97869209e32 100644 (file)
@@ -16,7 +16,6 @@ PRO_C_FLAGS=$(PRO_C_OPTS) $(PRO_C_DEFS) $(PRO_C_INCLUDES)
 LDFLAGS=@LDFLAGS@
 SQL_LIBS=@SQL_LIBS@
 GDSS_LIBS=@GDSS_LIBS@
-CRYPT_LIBS=@CRYPT_LIBS@
 LIBS=@LIBS@
 INSTALL=@INSTALL@
 INSTALL_PROGRAM=@INSTALL_PROGRAM@
@@ -57,10 +56,10 @@ install: all
        @for p in $(TARGET); do $(INSTALL_PROGRAM) $$p $(mrbindir); done
 
 students: $(STUDENTS_OBJS)
-       $(CC) -o $@ $(LDFLAGS) $(STUDENTS_OBJS) $(SQL_LIBS) $(LIBS) $(CRYPT_LIBS)
+       $(CC) -o $@ $(LDFLAGS) $(STUDENTS_OBJS) $(SQL_LIBS) $(LIBS)
 
 employee: $(EMPLOYEE_OBJS)
-       $(CC) -o $@ $(LDFLAGS) $(EMPLOYEE_OBJS) $(SQL_LIBS) $(LIBS) $(CRYPT_LIBS)
+       $(CC) -o $@ $(LDFLAGS) $(EMPLOYEE_OBJS) $(SQL_LIBS) $(LIBS)
 
 vote: $(VOTE_OBJS)
        $(CC) -o $@ $(LDFLAGS) $(VOTE_OBJS) $(SQL_LIBS) $(LIBS)
index 3e4b159eff07cecafaa4026b2044ac66215e1121..e989afcff13eddaddfb62a06cd13c5cc7a165ccf 100644 (file)
@@ -70,7 +70,6 @@ struct entry {
   char *title;
   char *class;
   char *id;
-  char *eid;
   char *dept;
   char *address;
   char *phone;
@@ -163,7 +162,7 @@ int main(int argc, char **argv)
 struct entry *get_next_entry(FILE *in)
 {
   static struct entry e;
-  static char buf[BUFSIZ], eid[16];
+  static char buf[BUFSIZ];
   static char name[LEN_NAME + 1], sname[LEN_NAME + 1], id[LEN_ID + 1];
   static char office[LEN_OFFICE + 1], phone[LEN_PHONE + 1];
   static char phone2[LEN_PHONE2 + 1], dept[LEN_DEPT + 1], title[LEN_TITLE + 1];
@@ -234,8 +233,6 @@ struct entry *get_next_entry(FILE *in)
   FixCase(e.middle);
 
   e.id = id;
-  e.eid = eid;
-  EncryptID(e.eid, e.id, e.first, e.last);
 
   e.address = strtrim(office);
   e.phone = strtrim(phone);
@@ -258,10 +255,10 @@ struct entry *get_next_entry(FILE *in)
 
 void process_entry(struct entry *e)
 {
-  int changed, nochange, encrypted;
+  int changed, nochange;
   char buf[MAX_FIELD_WIDTH], *from, *to;
   EXEC SQL BEGIN DECLARE SECTION;
-  char *first, *last, *middle, *eid, *sid, *name, *rdept;
+  char *first, *last, *middle, *sid, *name, *rdept;
   char *rtitle, *raddr, *rhphone, *rophone, *prog;
   char class[USERS_TYPE_SIZE], oaddr[USERS_OFFICE_ADDR_SIZE];
   char ophone[USERS_OFFICE_PHONE_SIZE], dept[USERS_DEPARTMENT_SIZE];
@@ -281,10 +278,8 @@ void process_entry(struct entry *e)
   middle = e->middle;
   if (strlen(middle) > USERS_MIDDLE_SIZE - 1)
     middle[USERS_MIDDLE_SIZE - 1] = '\0';
-  eid = e->eid;
   sid = e->id;
   id = 0;
-  encrypted = 0;
 
   /* Get user info */
   EXEC SQL SELECT users_id, first, last, middle, type, office_addr,
@@ -306,20 +301,8 @@ void process_entry(struct entry *e)
     }
   if (id == 0)
     {
-      EXEC SQL SELECT users_id, first, last, middle, type, office_addr,
-       office_phone, department, status
-       INTO :id, :dfirst, :dlast, :dmiddle, :class, :oaddr,
-       :ophone, :dept, :status
-       FROM users
-       WHERE last = :last and first = :first and clearid = :eid;
-      if (sqlfail() && sqlca.sqlcode != SQL_DUPLICATE)
-       sqlexit();
-      encrypted++;
-      if (id == 0)
-       {
-         newuser(e);
-         return;
-       }
+      newuser(e);
+      return;
     }
 
   /* Update class/state if necessary.  (Exclude several spacial cases.) */
@@ -364,8 +347,6 @@ void process_entry(struct entry *e)
     }
 
   changed = nochange = 0;
-  if (encrypted)
-    changed++;
   strcpy(buf, e->address);
   while ((to = strchr(buf, ',')))
     *to = ';';
index 19b7fc8e8f44e4d044c967ebf678d546aa73812c..defa428ebc76ea9cc0996e4a53c67e3cfa91d321 100644 (file)
@@ -74,7 +74,6 @@ struct entry {
   char *middle;
   char *title;
   char *id;
-  char *eid;
   char *course;
   char *year;
   char *address;
@@ -171,7 +170,7 @@ int main(int argc, char **argv)
 struct entry *get_next_entry(FILE *in)
 {
   static struct entry e;
-  static char buf[BUFSIZ], eid[16], classbuf[10];
+  static char buf[BUFSIZ], classbuf[10];
   static char name[LEN_NAME + 1], id[LEN_ID + 1], course[LEN_COURSE + 1];
   static char year[LEN_YEAR + 1], address[LEN_ADDRESS + 1];
   static char dorm_room[LEN_DORM_ROOM + 1], city[LEN_CITY + 1];
@@ -259,8 +258,6 @@ struct entry *get_next_entry(FILE *in)
 
   e.id = id;
   e.id[LEN_ID] = '\0';
-  e.eid = eid;
-  EncryptID(e.eid, e.id, e.first, e.last);
 
   e.year = strtrim(year);
   e.title = title;
@@ -289,10 +286,10 @@ struct entry *get_next_entry(FILE *in)
 
 void process_entry(struct entry *e)
 {
-  int changed, nochange, encrypted;
+  int changed, nochange;
   char buf[MAX_FIELD_WIDTH], *from, *to;
   EXEC SQL BEGIN DECLARE SECTION;
-  char *first, *last, *middle, *eid, *sid, *name, *rdept;
+  char *first, *last, *middle, *sid, *name, *rdept;
   char *rtitle, *rophone, *rhphone, *prog;
   char class[USERS_TYPE_SIZE], haddr[USERS_HOME_ADDR_SIZE];
   char hphone[USERS_HOME_PHONE_SIZE], ophone[USERS_OFFICE_PHONE_SIZE];
@@ -313,10 +310,8 @@ void process_entry(struct entry *e)
   middle = e->middle;
   if (strlen(middle) > USERS_MIDDLE_SIZE - 1)
     middle[USERS_MIDDLE_SIZE - 1] = '\0';
-  eid = e->eid;
   sid = e->id;
   id = 0;
-  encrypted = 0;
 
   /* Get user info */
   EXEC SQL SELECT users_id, first, last, middle, type, home_addr, home_phone,
@@ -338,20 +333,8 @@ void process_entry(struct entry *e)
     }
   if (id == 0)
     {
-      EXEC SQL SELECT users_id, first, last, middle, type, home_addr,
-       home_phone, office_phone, status, department
-       INTO :id, :dfirst, :dlast, :dmiddle, :class, :haddr,
-       :hphone, :ophone, :status, :dept
-       FROM users
-       WHERE last = :last and first = :first and clearid = :eid;
-      if (sqlfail())
-       sqlexit();
-      encrypted++;
-      if (id == 0)
-       {
-         newuser(e);
-         return;
-       }
+      newuser(e);
+      return;
     }
 
   /* See if class changed: if it's different, and the value in the database
@@ -401,8 +384,6 @@ void process_entry(struct entry *e)
 
   /* Deal with updating the finger info if necessary */
   changed = nochange = 0;
-  if (encrypted)
-    changed++;
   strcpy(buf, e->address);
   if (*e->dorm)
     {
This page took 0.050457 seconds and 5 git commands to generate.