int mr_krb5_auth(char *prog)
{
- int status;
mr_params params, reply;
char host[BUFSIZ], *p;
char *args[2];
int argl[2];
krb5_ccache ccache = NULL;
krb5_data auth;
- krb5_error_code problem;
+ krb5_error_code problem = 0;
CHECK_CONNECTED;
memset(&auth, 0, sizeof(auth));
- if ((status = mr_host(host, sizeof(host) - 1)))
- return status;
+ if ((problem = mr_host(host, sizeof(host) - 1)))
+ return problem;
for (p = host; *p && *p != '.'; p++)
{
*p = '\0';
if (!context)
- problem = krb5_init_context(&context);
- if (problem)
- goto out;
+ {
+ problem = krb5_init_context(&context);
+ if (problem)
+ goto out;
+ }
problem = krb5_auth_con_init(context, &auth_con);
if (problem)
params.mr_argv[1] = prog;
params.mr_argl[1] = strlen(prog) + 1;
- if ((status = mr_do_call(¶ms, &reply)) == MR_SUCCESS)
- status = reply.u.mr_status;
+ if ((problem = mr_do_call(¶ms, &reply)) == MR_SUCCESS)
+ problem = reply.u.mr_status;
mr_destroy_reply(reply);
krb5_auth_con_free(context, auth_con);
auth_con = NULL;
- return status;
+ return problem;
}