#include <stdio.h>
#include <string.h>
+#ifdef HAVE_KRB4
#include <krb.h>
+#endif
#include <krb5.h>
krb5_context context = NULL;
int mr_auth(char *prog)
{
+#ifdef HAVE_KRB4
int status;
mr_params params, reply;
char *args[2];
mr_destroy_reply(reply);
return status;
+#else
+ return MR_NO_KRB4;
+#endif
}
int mr_proxy(char *principal, char *orig_authtype)
mr_params params, reply;
char *args[2];
+ CHECK_CONNECTED;
+
params.u.mr_procno = MR_PROXY;
params.mr_argc = 2;
params.mr_argv = args;
if ((problem = mr_host(host, sizeof(host) - 1)))
return problem;
- for (p = host; *p && *p != '.'; p++)
- {
- if (isupper(*p))
- *p = tolower(*p);
- }
- *p = '\0';
-
if (!context)
{
problem = krb5_init_context(&context);
if (problem)
goto out;
- problem = krb5_mk_req(context, &auth_con, NULL, MOIRA_SNAME, host, NULL,
+ problem = krb5_mk_req(context, &auth_con, 0, MOIRA_SNAME, host, NULL,
ccache, &auth);
if (problem)
goto out;