summaryrefslogtreecommitdiffstats
path: root/crypto/heimdal/lib/kadm5/init_c.c
diff options
context:
space:
mode:
authornectar <nectar@FreeBSD.org>2002-02-19 15:46:56 +0000
committernectar <nectar@FreeBSD.org>2002-02-19 15:46:56 +0000
commit69a91bec14ec3ad49d1c8a82c40a796755f9e4a3 (patch)
tree85ecf91fd00875cec4b93111d3a8ed9eec9cddfe /crypto/heimdal/lib/kadm5/init_c.c
parent8db4cdb3da4228a5d93635e43825e2e8a2f66db7 (diff)
downloadFreeBSD-src-69a91bec14ec3ad49d1c8a82c40a796755f9e4a3.zip
FreeBSD-src-69a91bec14ec3ad49d1c8a82c40a796755f9e4a3.tar.gz
Import of Heimdal Kerberos from KTH repository circa 2002/02/17.
Diffstat (limited to 'crypto/heimdal/lib/kadm5/init_c.c')
-rw-r--r--crypto/heimdal/lib/kadm5/init_c.c21
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, &params);
+ 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, &params);
ret = krb5_write_priv_message(context, ctx->ac, &s, &params);
krb5_data_free(&params);
@@ -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;
OpenPOWER on IntegriCloud