if keyfile is set, pass in to libkadm5
bug pointed out by Elrond <elrond@samba-tng.org> git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@13922 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
		| @@ -267,14 +267,6 @@ main(int argc, char **argv) | |||||||
|     if(ret)  |     if(ret)  | ||||||
| 	krb5_err(context, 1, ret, "reading configuration files"); | 	krb5_err(context, 1, ret, "reading configuration files"); | ||||||
|      |      | ||||||
|     { |  | ||||||
| 	const char *p = krb5_config_get_string (context, NULL,  |  | ||||||
| 						"kdc", "key-file", NULL); |  | ||||||
| 	if (p) |  | ||||||
| 	    keyfile = strdup(p); |  | ||||||
|     } |  | ||||||
|     krb5_clear_error_string (context); |  | ||||||
|  |  | ||||||
|     memset(&conf, 0, sizeof(conf)); |     memset(&conf, 0, sizeof(conf)); | ||||||
|     if(realm) { |     if(realm) { | ||||||
| 	krb5_set_default_realm(context, realm); /* XXX should be fixed | 	krb5_set_default_realm(context, realm); /* XXX should be fixed | ||||||
| @@ -293,6 +285,11 @@ main(int argc, char **argv) | |||||||
| 	conf.mask |= KADM5_CONFIG_KADMIND_PORT; | 	conf.mask |= KADM5_CONFIG_KADMIND_PORT; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |     if (keyfile) { | ||||||
|  | 	conf.stash_file = keyfile; | ||||||
|  | 	conf.mask |= KADM5_CONFIG_STASH_FILE; | ||||||
|  |     } | ||||||
|  |  | ||||||
|     if(local_flag){ |     if(local_flag){ | ||||||
| 	ret = kadm5_s_init_with_password_ctx(context,  | 	ret = kadm5_s_init_with_password_ctx(context,  | ||||||
| 					     KADM5_ADMIN_SERVICE, | 					     KADM5_ADMIN_SERVICE, | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Love Hörnquist Åstrand
					Love Hörnquist Åstrand