else
ok = 0;
/* this is in a separate function because it accesses the database */
- set_krb_mapping(cl->clname, ad.pname, ok,
- &cl->client_id, &cl->users_id);
+ status = set_krb_mapping(cl->clname, ad.pname, ok,
+ &cl->client_id, &cl->users_id);
if (cl->args->mr_version_no == MR_VERSION_2) {
bcopy(cl->args->mr_argv[1], cl->entity, 8);
if (log_flags & LOG_RES)
com_err(whoami, 0, "Auth to %s using %s, uid %d cid %d",
cl->clname, cl->entity, cl->users_id, cl->client_id);
- if (cl->users_id == 0)
+ if (status != MR_SUCCESS)
+ cl->reply.mr_status = status;
+ else if (cl->users_id == 0)
cl->reply.mr_status = MR_USER_AUTH;
}