init_ureg_err_tbl();
init_krb_err_tbl();
init_kadm_err_tbl();
+ initialize_gdss_error_table();
/* Use com_err or output to stderr for all log messages. */
#ifdef DEBUG
}
q_argv[U_NAME+1] = login;
q_argv[U_STATE+1] = "7";
+ q_argv[U_SIGNATURE+1] = "";
status = mr_query("update_user_account", U_MODTIME+1, q_argv,
null_callproc, NULL);
switch (status)
status = SUCCESS;
break;
case MR_IN_USE:
+ case MR_NOT_UNIQUE:
status = UREG_LOGIN_USED;
break;
case MR_DEADLOCK:
com_err(whoami, status, " while getting user info");
return(status);
}
- if (atoi(argv[U_SECURE]))
+ if (atoi(argv[U_SECURE + 1]))
return UREG_ALREADY_REGISTERED;
return SUCCESS;
}
#endif
if (strcmp(id, argv[U_MITID + 1])) {
- status = UREG_USER_NOT_FOUND;
- com_err(whoami, status, "IDs mismatch: %s, %s", id, argv[U_MITID + 1]);
- return status;
+ char buf[32];
+
+ EncryptID(buf, id, argv[U_FIRST+1], argv[U_LAST+1]);
+ if (strcmp(buf, argv[U_MITID + 1])) {
+ status = UREG_USER_NOT_FOUND;
+ com_err(whoami, status, "IDs mismatch: %s (%s), %s", id, buf,
+ argv[U_MITID + 1]);
+ return status;
+ }
}
/* now do actual password setting stuff */
kv.key_low = htonl(lkey[0]);
kv.key_high = htonl(lkey[1]);
strcpy(kv.name, message->first);
- strcpy(kv.instance, "secure");
+ strcpy(kv.instance, "extra");
if ((status = kadm_add(&kv)) != KADM_SUCCESS) {
com_err(whoami, status, " while creating kerberos principal");