diff options
author | Tom Yu <tlyu@mit.edu> | 1996-11-13 03:36:33 +0000 |
---|---|---|
committer | Tom Yu <tlyu@mit.edu> | 1996-11-13 03:36:33 +0000 |
commit | 2a0e709559aa286a984713e0138a8499a74f49fe (patch) | |
tree | 80d3ec0395fed156d6c79d710ff66c79e9d7d9c4 /src/kadmin | |
parent | 83721dc828e9b018f532ddba3ef240c39b65741f (diff) | |
download | krb5-2a0e709559aa286a984713e0138a8499a74f49fe.tar.gz krb5-2a0e709559aa286a984713e0138a8499a74f49fe.tar.xz krb5-2a0e709559aa286a984713e0138a8499a74f49fe.zip |
* ovsec_kadmd.c (main): Use krb5_kt_set_default_name() rather than
mucking about with global variables.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@9395 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/kadmin')
-rw-r--r-- | src/kadmin/server/ChangeLog | 5 | ||||
-rw-r--r-- | src/kadmin/server/ovsec_kadmd.c | 22 |
2 files changed, 19 insertions, 8 deletions
diff --git a/src/kadmin/server/ChangeLog b/src/kadmin/server/ChangeLog index 69e26450cc..308b2f2dfe 100644 --- a/src/kadmin/server/ChangeLog +++ b/src/kadmin/server/ChangeLog @@ -1,3 +1,8 @@ +Tue Nov 12 22:07:05 1996 Tom Yu <tlyu@mit.edu> + + * ovsec_kadmd.c (main): Use krb5_kt_set_default_name() rather than + mucking about with global variables. + Fri Sep 27 16:37:47 1996 Barry Jaspan <bjaspan@mit.edu> * ovsec_kadmd.c (main): krb5_klog_syslog doesn't understand %m diff --git a/src/kadmin/server/ovsec_kadmd.c b/src/kadmin/server/ovsec_kadmd.c index 532038b1c3..67aa77525b 100644 --- a/src/kadmin/server/ovsec_kadmd.c +++ b/src/kadmin/server/ovsec_kadmd.c @@ -58,13 +58,6 @@ void *global_server_handle; #define OVSEC_KADM_ADMIN_SERVICE "ovsec_adm/admin" #define OVSEC_KADM_CHANGEPW_SERVICE "ovsec_adm/changepw" -/* - * This enables us to set the keytab that gss_acquire_cred uses, but - * it also restricts us to linking against the Kv5 GSS-API library. - * Since this is *k*admind, that shouldn't be a problem. - */ -extern char *krb5_defkeyname; - char *build_princ_name(char *name, char *realm); void log_badauth(OM_uint32 major, OM_uint32 minor, struct sockaddr_in *addr, char *data); @@ -316,7 +309,20 @@ int main(int argc, char *argv[]) exit(1); } - krb5_defkeyname = params.admin_keytab; + /* + * This enables us to set the keytab that gss_acquire_cred uses, but + * it also restricts us to linking against the Kv5 GSS-API library. + * Since this is *k*admind, that shouldn't be a problem. + */ + if ((ret = krb5_kt_set_default_name(context, params.admin_keytab))) { + krb5_klog_syslog(LOG_ERR, "Cannot change default keytab name: %s", + error_message(ret)); + fprintf(stderr, "%s: Cannot change default keytab name.\n", + whoami); + kadm5_destroy(global_server_handle); + krb5_klog_close(); + exit(1); + } /* * Try to acquire creds for the old OV services as well as the |