]> andersk Git - moira.git/commitdiff
Quick and dirty fix: Don't call register_user() for LINCOLN users with
authorzacheiss <zacheiss>
Sun, 21 Oct 2001 23:34:05 +0000 (23:34 +0000)
committerzacheiss <zacheiss>
Sun, 21 Oct 2001 23:34:05 +0000 (23:34 +0000)
prechosen usernames; we don't want them to have PO boxes.

This is temporary.  To implement this functionality for real, we should
add a "Kerberos only" user status.

reg_svr/reg_svr.pc

index 3927d4918e96b24cf94d5d9070dc23c45f5b7329..fb2c08381567a3650f450743e66991e19efdf482 100644 (file)
@@ -301,7 +301,7 @@ void RIFO(reg_client *rc, int argc, char **argv)
   char middle[USERS_MIDDLE_SIZE], last[USERS_LAST_SIZE];
   char fullname[USERS_FIRST_SIZE + USERS_MIDDLE_SIZE + USERS_LAST_SIZE];
   char class[USERS_TYPE_SIZE];
-  int uid, status, secure, sqlstatus;
+  int uid, status, secure, sqlstatus, string_id;
   EXEC SQL END DECLARE SECTION;
 
   if (rc->uid || argc != 4)
@@ -425,7 +425,15 @@ void RIFO(reg_client *rc, int argc, char **argv)
        {
          status = check_kerberos(login);
          if (status == MR_SUCCESS)
-           status = register_user(rc->uid, login);
+           if (!strcmp(class, "LINCOLN"))
+             {
+               EXEC SQL SELECT string_id INTO :string_id FROM strings
+                 WHERE string = 'LINCOLN: no pobox or filesys';
+               EXEC SQL UPDATE users SET comments = :string_id 
+                 WHERE login = :login;
+             }
+           else
+             status = register_user(rc->uid, login);
          if (status == MR_IN_USE)
            {
              reply(rc, RESERVED_USERNAME_UNAVAILABLE, "INIT", "c", NULL, 
This page took 3.597784 seconds and 5 git commands to generate.