[SCM] Samba Shared Repository - branch master updated
Günther Deschner
gd at samba.org
Thu Sep 2 14:48:37 MDT 2010
The branch, master has been updated
via 804aaad s3-kerberos: use krb5 compat macros in fill_keytab_from_password()
via d9c63fb Revert "s3-kerberos: use krb5 compat macros in fill_keytab_from_password()."
from ac317eb s3: Remove unused nss_info_adex_init()
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 804aaad526419e2be9101190bbccf95152f1d4b4
Author: Simo Sorce <idra at samba.org>
Date: Thu Sep 2 16:09:19 2010 -0400
s3-kerberos: use krb5 compat macros in fill_keytab_from_password()
This one uses the compat macro in the right way, without actually
breaking the code.
Signed-off-by: Günther Deschner <gd at samba.org>
commit d9c63fbe9275c0abfc0351cac3669fb52c1c99da
Author: Simo Sorce <idra at samba.org>
Date: Thu Sep 2 16:07:00 2010 -0400
Revert "s3-kerberos: use krb5 compat macros in fill_keytab_from_password()."
This reverts commit 9986d25ed195ee77bd73c96f057c527b4c3a8f03.
This patch was causing us to free unallocated memory.
Signed-off-by: Günther Deschner <gd at samba.org>
-----------------------------------------------------------------------
Summary of changes:
source3/librpc/rpc/dcerpc_krb5.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/librpc/rpc/dcerpc_krb5.c b/source3/librpc/rpc/dcerpc_krb5.c
index 2d39a45..22443b6 100644
--- a/source3/librpc/rpc/dcerpc_krb5.c
+++ b/source3/librpc/rpc/dcerpc_krb5.c
@@ -128,7 +128,10 @@ static krb5_error_code fill_keytab_from_password(krb5_context krbctx,
for (i = 0; enctypes[i]; i++) {
krb5_keyblock *key = NULL;
- key = KRB5_KT_KEY(&kt_entry);
+ if (!(key = SMB_MALLOC_P(krb5_keyblock))) {
+ ret = ENOMEM;
+ goto out;
+ }
if (create_kerberos_key_from_string(krbctx, princ,
password, key,
@@ -136,11 +139,13 @@ static krb5_error_code fill_keytab_from_password(krb5_context krbctx,
DEBUG(10, ("Failed to create key for enctype %d "
"(error: %s)\n",
enctypes[i], error_message(ret)));
+ SAFE_FREE(key);
continue;
}
kt_entry.principal = princ;
kt_entry.vno = vno;
+ *(KRB5_KT_KEY(&kt_entry)) = *key;
ret = krb5_kt_add_entry(krbctx, keytab, &kt_entry);
if (ret) {
--
Samba Shared Repository
More information about the samba-cvs
mailing list