summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2006-06-06 04:50:14 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:08:54 -0500
commite0bb0e9f951a3cf4bc4ad6a11e62dae6d4ddf3e1 (patch)
tree1145d2327d3c6fd9e0cad6618450bcaf0cd08b72 /source4
parent66f77c4ebfa66221abcf611b4d222fc424987f12 (diff)
downloadsamba-e0bb0e9f951a3cf4bc4ad6a11e62dae6d4ddf3e1.tar.gz
samba-e0bb0e9f951a3cf4bc4ad6a11e62dae6d4ddf3e1.tar.bz2
samba-e0bb0e9f951a3cf4bc4ad6a11e62dae6d4ddf3e1.zip
r16056: Fix errors found by trying to use our kpasswd server and the Apple client.
Andrew Bartlett (This used to be commit ae2913898c983dcba69b5d0b89c428e450e9bf5f)
Diffstat (limited to 'source4')
-rw-r--r--source4/auth/gensec/gensec_krb5.c2
-rw-r--r--source4/heimdal/lib/hdb/keytab.c2
-rw-r--r--source4/kdc/hdb-ldb.c5
3 files changed, 3 insertions, 6 deletions
diff --git a/source4/auth/gensec/gensec_krb5.c b/source4/auth/gensec/gensec_krb5.c
index 918950302e..a63d7c4b1b 100644
--- a/source4/auth/gensec/gensec_krb5.c
+++ b/source4/auth/gensec/gensec_krb5.c
@@ -151,7 +151,7 @@ static NTSTATUS gensec_krb5_start(struct gensec_security *gensec_security)
}
}
- peer_addr = gensec_get_my_addr(gensec_security);
+ peer_addr = gensec_get_peer_addr(gensec_security);
if (peer_addr && peer_addr->sockaddr) {
ret = krb5_sockaddr2address(gensec_krb5_state->smb_krb5_context->krb5_context,
peer_addr->sockaddr, &peer_krb5_addr);
diff --git a/source4/heimdal/lib/hdb/keytab.c b/source4/heimdal/lib/hdb/keytab.c
index b4fa5f84c9..c87b8eca2c 100644
--- a/source4/heimdal/lib/hdb/keytab.c
+++ b/source4/heimdal/lib/hdb/keytab.c
@@ -218,7 +218,7 @@ hdb_get_entry(krb5_context context,
(*db->hdb_destroy)(context, db);
return ret;
}
- ret = (*db->hdb_fetch)(context, db, principal, HDB_F_DECRYPT, &ent);
+ ret = (*db->hdb_fetch)(context, db, principal, HDB_F_DECRYPT|HDB_F_GET_CLIENT|HDB_F_GET_SERVER, &ent);
/* Shutdown the hdb on error */
diff --git a/source4/kdc/hdb-ldb.c b/source4/kdc/hdb-ldb.c
index 57e6d52a7c..860051c257 100644
--- a/source4/kdc/hdb-ldb.c
+++ b/source4/kdc/hdb-ldb.c
@@ -611,13 +611,10 @@ static krb5_error_code LDB_fetch_client(krb5_context context, HDB *db,
&msg, &realm_ref_msg);
free(principal_string);
if (NT_STATUS_EQUAL(nt_status, NT_STATUS_NO_SUCH_USER)) {
- talloc_free(mem_ctx);
return HDB_ERR_NOENTRY;
} else if (NT_STATUS_EQUAL(nt_status, NT_STATUS_NO_MEMORY)) {
- talloc_free(mem_ctx);
return ENOMEM;
} else if (!NT_STATUS_IS_OK(nt_status)) {
- talloc_free(mem_ctx);
return EINVAL;
}
@@ -788,7 +785,7 @@ static krb5_error_code LDB_fetch(krb5_context context, HDB *db,
unsigned flags,
hdb_entry_ex *entry_ex)
{
- krb5_error_code ret;
+ krb5_error_code ret = HDB_ERR_NOENTRY;
TALLOC_CTX *mem_ctx = talloc_named(db, 0, "LDB_fetch context");