diff options
Diffstat (limited to 'crypto/heimdal/lib/kadm5/init_c.c')
-rw-r--r-- | crypto/heimdal/lib/kadm5/init_c.c | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/crypto/heimdal/lib/kadm5/init_c.c b/crypto/heimdal/lib/kadm5/init_c.c index e4df034..7873012 100644 --- a/crypto/heimdal/lib/kadm5/init_c.c +++ b/crypto/heimdal/lib/kadm5/init_c.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997 - 2000 Kungliga Tekniska Högskolan + * Copyright (c) 1997 - 2002 Kungliga Tekniska Högskolan * (Royal Institute of Technology, Stockholm, Sweden). * All rights reserved. * @@ -37,7 +37,7 @@ #include <netinet/in.h> #include <netdb.h> -RCSID("$Id: init_c.c,v 1.40 2000/12/31 08:00:23 assar Exp $"); +RCSID("$Id: init_c.c,v 1.42 2002/02/08 18:31:49 joda Exp $"); static void set_funcs(kadm5_client_context *c) @@ -145,6 +145,13 @@ get_new_cache(krb5_context context, krb5_ccache id; krb5_get_init_creds_opt_init (&opt); + + krb5_get_init_creds_opt_set_default_flags(context, "kadmin", + krb5_principal_get_realm(context, + client), + &opt); + + krb5_get_init_creds_opt_set_forwardable (&opt, FALSE); krb5_get_init_creds_opt_set_proxiable (&opt, FALSE); @@ -358,7 +365,13 @@ kadm_connect(kadm5_client_context *ctx) NULL, NULL, cc, NULL, NULL, NULL); if(ret == 0) { krb5_data params; - ret = _kadm5_marshal_params(context, ctx->realm_params, ¶ms); + kadm5_config_params p; + memset(&p, 0, sizeof(p)); + if(ctx->realm) { + p.mask |= KADM5_CONFIG_REALM; + p.realm = ctx->realm; + } + ret = _kadm5_marshal_params(context, &p, ¶ms); ret = krb5_write_priv_message(context, ctx->ac, &s, ¶ms); krb5_data_free(¶ms); @@ -455,7 +468,7 @@ kadm5_c_init_with_context(krb5_context context, ctx->prompter = prompter; ctx->keytab = keytab; ctx->ccache = ccache; - ctx->realm_params = realm_params; + /* maybe we should copy the params here */ ctx->sock = -1; *server_handle = ctx; |