#include "reg_svr.h"
#include "admin_server.h"
#include "admin_err.h"
+#include "krb_et.h"
-extern int krb_err_base;
extern char admin_errmsg[];
static char krbhst[BUFSIZ]; /* kerberos server name */
init_ureg_err_tbl();
/* Connect to the SMS server */
- if ((status = sms_connect()) != SMS_SUCCESS)
+ if ((status = sms_connect(SMS_SERVER)) != SMS_SUCCESS)
{
com_err(whoami, status, " on connect");
exit(1);
}
if (status = get_krbrlm(krbrealm, 1)) {
- status += krb_err_base;
+ status += ERROR_TABLE_BASE_krb;
com_err(whoami, status, " fetching kerberos realm");
exit(1);
}
if (status = get_krbhst(krbhst, krbrealm, 1)) {
- status += krb_err_base;
+ status += ERROR_TABLE_BASE_krb;
com_err(whoami, status, " fetching kerberos hostname");
exit(1);
} else {
/* principal, instance, realm, service, service instance, life, file */
if (status = get_svc_in_tkt("register", "sms", krbrealm, "changepw",
krbhst, 1, KEYFILE))
- status += krb_err_base;
+ status += ERROR_TABLE_BASE_krb;
#ifdef DEBUG
if (status == SUCCESS)
status = UREG_LOGIN_USED;
break;
default:
- status = UREG_MISC_ERROR;
critical_alert(FAIL_INST,"%s returned from register_user.",
error_message(status));
+ status = UREG_MISC_ERROR;
break;
}
}
return status;
}
-
-/*
- * Local Variables:
- * mode: c
- * c-argdecl-indent: 2
- * c-brace-offset: -4
- * c-continued-statement-offset: 4
- * c-indent-level: 4
- * c-label-offset: -2
- * End:
- */