diff options
author | Thorsten Lockert <tholo@cvs.openbsd.org> | 1997-02-19 09:03:43 +0000 |
---|---|---|
committer | Thorsten Lockert <tholo@cvs.openbsd.org> | 1997-02-19 09:03:43 +0000 |
commit | ad160478eb946845fc3e78c79616f7863ed53439 (patch) | |
tree | 3741cb701c508e7d415bfe550d9b3af8b66cc038 /kerberosIV | |
parent | 46130b940a86e7aa2f32da00435cfc78e343b8ac (diff) |
Use standard instance names for kadmin communication
Diffstat (limited to 'kerberosIV')
-rw-r--r-- | kerberosIV/kadmin/kadmin.c | 17 | ||||
-rw-r--r-- | kerberosIV/kadmind/kadm_ser_wrap.c | 10 |
2 files changed, 6 insertions, 21 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)); diff --git a/kerberosIV/kadmind/kadm_ser_wrap.c b/kerberosIV/kadmind/kadm_ser_wrap.c index 511e963bc28..2f3f35e810d 100644 --- a/kerberosIV/kadmind/kadm_ser_wrap.c +++ b/kerberosIV/kadmind/kadm_ser_wrap.c @@ -1,4 +1,4 @@ -/* $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 @@ -46,7 +46,7 @@ kadm_ser_init(int inter, char *realm) { 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(); @@ -54,11 +54,7 @@ kadm_ser_init(int inter, char *realm) 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; |