-/* $Id: kadmin.c,v 1.4 1997/01/15 23:40:50 millert Exp $ */
+/* $Id: kadmin.c,v 1.5 1997/02/19 09:03:40 tholo Exp $ */
/*
* Copyright (C) 1989 by the Massachusetts Institute of Technology
static void
do_init(int argc, char **argv)
{
- char *dot, admin[MAXHOSTNAMELEN];
struct passwd *pw;
int c;
#define OPTION_STRING "u:r:m"
"Could not determine local realm name.\n");
}
- c = krb_get_admhst(admin, default_realm, 1);
- if (c == KSUCCESS && (dot = strchr(admin, '.')) != NULL)
- *dot = '\0';
-
/*
* If we can reach the local realm, initialize to it. Otherwise,
* don't initialize.
*/
- if (c == KSUCCESS &&
- kadm_init_link(PWSERV_NAME, admin, default_realm) != KADM_SUCCESS)
+ if (kadm_init_link(PWSERV_NAME, KADM_SINST, default_realm) != KADM_SUCCESS)
bzero(krbrlm, sizeof(krbrlm));
else
strcpy(krbrlm, default_realm);
static int
setvals(Kadm_vals *vals, char *string)
{
- char *dot, admin[MAXHOSTNAMELEN];
char realm[REALM_SZ];
int status = KADM_SUCCESS;
if (!realm[0])
strcpy(realm, default_realm);
if (strcmp(realm, krbrlm)) {
- if ((status = krb_get_admhst(admin, realm, 1)) != KSUCCESS)
- return(status);
- if (status == KSUCCESS && (dot = strchr(admin, '.')) != NULL)
- *dot = '\0';
strcpy(krbrlm, realm);
- if ((status = kadm_init_link(PWSERV_NAME, admin, krbrlm))
+ if ((status = kadm_init_link(PWSERV_NAME, KADM_SINST, krbrlm))
!= KADM_SUCCESS)
printf("kadm error for realm %s: %s\n",
krbrlm, error_message(status));
-/* $Id: kadm_ser_wrap.c,v 1.3 1997/02/19 06:08:37 tholo Exp $ */
+/* $Id: kadm_ser_wrap.c,v 1.4 1997/02/19 09:03:42 tholo Exp $ */
/*-
* Copyright (C) 1989 by the Massachusetts Institute of Technology
{
struct servent *sep;
struct hostent *hp;
- char *dot, admin[MAXHOSTNAMELEN], hostname[MAXHOSTNAMELEN];
+ char hostname[MAXHOSTNAMELEN];
(void) init_kadm_err_tbl();
(void) init_krb_err_tbl();
return KADM_NO_HOSTNAME;
(void) strcpy(server_parm.sname, PWSERV_NAME);
- if (krb_get_admhst(admin, realm, 1) != KSUCCESS)
- return KADM_NO_MAST;
- if ((dot = strchr(admin, '.')) != NULL)
- *dot = '\0';
- (void) strcpy(server_parm.sinst, admin);
+ (void) strcpy(server_parm.sinst, KADM_SINST);
(void) strcpy(server_parm.krbrlm, realm);
server_parm.admin_fd = -1;