]> andersk Git - moira.git/commitdiff
If we have a reserved username for a status 0 account, we need to
authorzacheiss <zacheiss>
Tue, 4 Sep 2001 18:56:34 +0000 (18:56 +0000)
committerzacheiss <zacheiss>
Tue, 4 Sep 2001 18:56:34 +0000 (18:56 +0000)
call register_user() in RIFO(), since LOGN() will never get called.

reg_svr/reg_svr.pc

index 6c6b8f3c709cf255a1ea3a9484ce4037f78c89a6..3927d4918e96b24cf94d5d9070dc23c45f5b7329 100644 (file)
@@ -420,7 +420,32 @@ void RIFO(reg_client *rc, int argc, char **argv)
   else if (!rc->username)
     reply(rc, FOUND, "GETL", "c", rc->suggestions, fullname, class);
   else
-    reply(rc, FORCED_USERNAME, "GETP", "c", NULL, rc->username);
+    {
+      if (status == US_NO_LOGIN_YET)
+       {
+         status = check_kerberos(login);
+         if (status == MR_SUCCESS)
+           status = register_user(rc->uid, login);
+         if (status == MR_IN_USE)
+           {
+             reply(rc, RESERVED_USERNAME_UNAVAILABLE, "INIT", "c", NULL, 
+                   rc->username);
+             return;
+           }
+         else if (status == MR_DOWN)
+           {
+             reply(rc, DATABASE_CLOSED, "INIT", "c", NULL);
+             return;
+           }
+         else if (status != MR_SUCCESS)
+           {
+             reply(rc, INTERNAL_ERROR, "INIT", "c", NULL, 
+                   error_message(status));
+             return;
+           }
+       }
+      reply(rc, FORCED_USERNAME, "GETP", "c", NULL, rc->username);
+    }
 }
 
 void SWRD(reg_client *rc, int argc, char **argv)
This page took 2.895009 seconds and 5 git commands to generate.