From: zacheiss Date: Sun, 21 Oct 2001 23:34:05 +0000 (+0000) Subject: Quick and dirty fix: Don't call register_user() for LINCOLN users with X-Git-Url: http://andersk.mit.edu/gitweb/moira.git/commitdiff_plain/6531b2d6b89ddbc0d2ac293d500d988bb481a280 Quick and dirty fix: Don't call register_user() for LINCOLN users with 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. --- diff --git a/reg_svr/reg_svr.pc b/reg_svr/reg_svr.pc index 3927d491..fb2c0838 100644 --- a/reg_svr/reg_svr.pc +++ b/reg_svr/reg_svr.pc @@ -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,