]> andersk Git - moira.git/commitdiff
we no longer encrypt ID numbers in the database
authormar <mar>
Thu, 2 Jan 1992 14:29:23 +0000 (14:29 +0000)
committermar <mar>
Thu, 2 Jan 1992 14:29:23 +0000 (14:29 +0000)
reg_svr/reg_svr.c

index 1af4aa4a54673765145ade80b58defafb0c4832f..2dc21565f7b76a8d833a59bd50d8382a2675b12c 100644 (file)
@@ -134,6 +134,10 @@ int parse_encrypted(message,data)
    the ID sent accross in the packet.  The information in the packet
    was created in the following way:
 
+   The database used to contain encrypted IDs.  Now we don't encrypt
+   them in the database, although there are still some encrypted IDs
+   there.
+
    The plain text ID number was encrypted via EncryptID() resulting
    in the form that would appear in the Moira database.  This is
    concatinated to the plain text ID so that the ID string contains plain
@@ -142,7 +146,7 @@ int parse_encrypted(message,data)
    thing is then DES encrypted using the encrypted ID as the source of
    the key.
 
-   This routine tries each encrypted ID in the database that belongs
+   This routine tries each ID in the database that belongs
    to someone with this user's first and last name and tries to 
    decrypt the packet with this information.  If it succeeds, it returns 
    zero and initializes all the fields of the formatted packet structure
@@ -209,14 +213,10 @@ int parse_encrypted(message,data)
     /* Find out how much more room there is. */
     len = message->encrypted_len - (temp - decrypt);
     
-    /* Now compare encrypted ID's don't match. */
-    if (strcmp(hashid, data->mit_id)) status = FAILURE;
-    if (status == SUCCESS)
-    {
-       EncryptID(recrypt, idnumber, message->first, message->last);
-       /* Now compare encrypted plain text to ID from database. */
-       if (strcmp(recrypt, data->mit_id)) status = FAILURE;
-    }
+    /* Now compare encrypted ID and clear text ID for a match. */
+    if (strcmp(hashid, data->mit_id) &&
+       strcmp(idnumber, data->mit_id))
+      status = FAILURE;
     
     if (status == SUCCESS)
     {
This page took 0.139606 seconds and 5 git commands to generate.