summaryrefslogtreecommitdiff
path: root/kerberosIV/kadmin
diff options
context:
space:
mode:
authorThorsten Lockert <tholo@cvs.openbsd.org>1997-02-19 09:03:43 +0000
committerThorsten Lockert <tholo@cvs.openbsd.org>1997-02-19 09:03:43 +0000
commitad160478eb946845fc3e78c79616f7863ed53439 (patch)
tree3741cb701c508e7d415bfe550d9b3af8b66cc038 /kerberosIV/kadmin
parent46130b940a86e7aa2f32da00435cfc78e343b8ac (diff)
Use standard instance names for kadmin communication
Diffstat (limited to 'kerberosIV/kadmin')
-rw-r--r--kerberosIV/kadmin/kadmin.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/kerberosIV/kadmin/kadmin.c b/kerberosIV/kadmin/kadmin.c
index 12f62f24b80..09e52f8e3f7 100644
--- a/kerberosIV/kadmin/kadmin.c
+++ b/kerberosIV/kadmin/kadmin.c
@@ -1,4 +1,4 @@
-/* $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
@@ -287,7 +287,6 @@ static int inited = 0;
static void
do_init(int argc, char **argv)
{
- char *dot, admin[MAXHOSTNAMELEN];
struct passwd *pw;
int c;
#define OPTION_STRING "u:r:m"
@@ -304,16 +303,11 @@ do_init(int argc, char **argv)
"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);
@@ -379,7 +373,6 @@ main(int argc, char **argv)
static int
setvals(Kadm_vals *vals, char *string)
{
- char *dot, admin[MAXHOSTNAMELEN];
char realm[REALM_SZ];
int status = KADM_SUCCESS;
@@ -395,12 +388,8 @@ setvals(Kadm_vals *vals, char *string)
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));