summaryrefslogtreecommitdiff
path: root/source4/heimdal/lib/hdb/keys.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2006-05-07 04:51:30 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:05:39 -0500
commit835926c87921a0f4186a9331b6e31b2e6f1c0d90 (patch)
tree1086d806019f4f7a86dc7b0073017a0fb876b6c2 /source4/heimdal/lib/hdb/keys.c
parent7a0b65efce3669643d21a2e209d4bf2626a5e948 (diff)
downloadsamba-835926c87921a0f4186a9331b6e31b2e6f1c0d90.tar.gz
samba-835926c87921a0f4186a9331b6e31b2e6f1c0d90.tar.bz2
samba-835926c87921a0f4186a9331b6e31b2e6f1c0d90.zip
r15481: Update heimdal/ to match current lorikeet-heimdal.
This includes many useful upstream changes, many of which should reduce warnings in our compile. It also includes a change to the HDB interface, which removes the need for Samba4/lorikeet-heimdal to deviate from upstream for hdb_fetch(). The new flags replace the old entry type enum. (This required the rework in hdb-ldb.c included in this commit) Andrew Bartlett (This used to be commit ef5604b87744c89e66e4d845f45b23563754ec05)
Diffstat (limited to 'source4/heimdal/lib/hdb/keys.c')
-rw-r--r--source4/heimdal/lib/hdb/keys.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/source4/heimdal/lib/hdb/keys.c b/source4/heimdal/lib/hdb/keys.c
index 0ca3846f9d..d7c2f2c89b 100644
--- a/source4/heimdal/lib/hdb/keys.c
+++ b/source4/heimdal/lib/hdb/keys.c
@@ -33,7 +33,7 @@
#include "hdb_locl.h"
-RCSID("$Id: keys.c,v 1.4 2006/04/02 00:45:48 lha Exp $");
+RCSID("$Id: keys.c,v 1.5 2006/04/25 08:09:38 lha Exp $");
/*
* free all the memory used by (len, keys)
@@ -112,23 +112,19 @@ parse_key_set(krb5_context context, const char *key,
if(strcmp(buf[i], "des") == 0) {
enctypes = all_etypes;
num_enctypes = 3;
- continue;
} else if(strcmp(buf[i], "des3") == 0) {
e = ETYPE_DES3_CBC_SHA1;
enctypes = &e;
num_enctypes = 1;
- continue;
} else {
ret = krb5_string_to_enctype(context, buf[i], &e);
if (ret == 0) {
enctypes = &e;
num_enctypes = 1;
- continue;
- }
+ } else
+ return ret;
}
- }
-
- if(salt->salttype == 0) {
+ } else if(salt->salttype == 0) {
/* interpret string as a salt specifier, if no etype
is set, this sets default values */
/* XXX should perhaps use string_to_salttype, but that
@@ -152,7 +148,7 @@ parse_key_set(krb5_context context, const char *key,
v4 compat, and a cell name for afs compat */
salt->saltvalue.data = strdup(buf[i]);
if (salt->saltvalue.data == NULL) {
- krb5_set_error_string(context, "malloc out of memory");
+ krb5_set_error_string(context, "out of memory");
return ENOMEM;
}
salt->saltvalue.length = strlen(buf[i]);
@@ -297,7 +293,7 @@ hdb_generate_key_set(krb5_context context, krb5_principal principal,
ret = parse_key_set(context, p,
&enctypes, &num_enctypes, &salt, principal);
if (ret) {
- krb5_warnx(context, "bad value for default_keys `%s'", *kp);
+ krb5_warn(context, ret, "bad value for default_keys `%s'", *kp);
ret = 0;
continue;
}