From: zacheiss Date: Tue, 4 Sep 2001 18:56:34 +0000 (+0000) Subject: If we have a reserved username for a status 0 account, we need to X-Git-Url: http://andersk.mit.edu/gitweb/moira.git/commitdiff_plain/78b14dbc587dc6d470a28cc908f7357ae9dd4468 If we have a reserved username for a status 0 account, we need to call register_user() in RIFO(), since LOGN() will never get called. --- diff --git a/reg_svr/reg_svr.pc b/reg_svr/reg_svr.pc index 6c6b8f3c..3927d491 100644 --- a/reg_svr/reg_svr.pc +++ b/reg_svr/reg_svr.pc @@ -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)