]> andersk Git - moira.git/blobdiff - reg_svr/reg_svr.pc
Changes from dtanner for password processing for w2k KDC, and some code
[moira.git] / reg_svr / reg_svr.pc
index b53aef17f5cbfc1f369536a0b65cc8d122f989af..6c6b8f3c709cf255a1ea3a9484ce4037f78c89a6 100644 (file)
@@ -160,12 +160,12 @@ int main(int argc, char **argv)
     {
       if (state == RS_RUNNING && stat(MOIRA_MOTD_FILE, &st) == 0)
        {
-         state == RS_SLEEPING;
+         state = RS_SLEEPING;
          com_err(whoami, 0, "found motd. reg_svr is sleeping");
        }
       else if (state == RS_SLEEPING && stat(MOIRA_MOTD_FILE, &st) == -1)
        {
-         state == RS_RUNNING;
+         state = RS_RUNNING;
          com_err(whoami, 0, "motd gone. reg_svr is running");
        }
 
@@ -595,7 +595,12 @@ void PSWD(reg_client *rc, int argc, char **argv)
     }
 
   status = register_kerberos(rc->username, password);
-  if (status == MR_IN_USE)
+  if (status == MR_QUALITY)
+    {
+      reply(rc, PASSWORD_SIMPLE, "GETP", "c", NULL);
+      return;
+    }
+  else if (status == MR_IN_USE)
     {
       reply(rc, RESERVED_USERNAME_UNAVAILABLE, "INIT", "c", NULL,
            rc->username);
@@ -651,7 +656,7 @@ int register_user(int uid, char *username)
   sprintf(uidbuf, "%d", uid);
   qargv[0] = uidbuf;
   qargv[1] = username;
-  qargv[2] = "0";
+  qargv[2] = "IMAP";
   status = mr_query("register_user", 3, qargv, NULL, NULL);
   mr_disconnect();
   return status;
This page took 0.062791 seconds and 4 git commands to generate.