[SCM] Samba Shared Repository - branch master updated
Richard Sharpe
sharpe at samba.org
Tue Jul 5 22:41:04 UTC 2016
The branch, master has been updated
via 77f3730 auth: fix a memory leak in gssapi_get_session_key()
via a646d9e s3-libads: fix a memory leak in ads_sasl_spnego_bind()
from c9d61db ctdb-build: Exit if requested feature cannot be built
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 77f3730295735dc9465c8e3d07fc761c83761b6e
Author: Uri Simchoni <uri at samba.org>
Date: Sun Jul 3 22:50:22 2016 +0300
auth: fix a memory leak in gssapi_get_session_key()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12006
Signed-off-by: Uri Simchoni <uri at samba.org>
Signed-off-by: Richard Sharpe <rsharpe at samba.org>
Signed-off-by: Andreas Schneider <asn at samba.org>
Autobuild-User(master): Richard Sharpe <sharpe at samba.org>
Autobuild-Date(master): Wed Jul 6 00:40:15 CEST 2016 on sn-devel-144
commit a646d9e796902dcb5246eb585433d4859796be2f
Author: Uri Simchoni <uri at samba.org>
Date: Sun Jul 3 22:51:56 2016 +0300
s3-libads: fix a memory leak in ads_sasl_spnego_bind()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12006
Signed-off-by: Uri Simchoni <uri at samba.org>
Signed-off-by: Richard Sharpe <rsharpe at samba.org>
Signed-off-by: Andreas Schneider <asn at samba.org>
-----------------------------------------------------------------------
Summary of changes:
auth/kerberos/gssapi_pac.c | 7 +------
source3/libads/sasl.c | 5 ++++-
2 files changed, 5 insertions(+), 7 deletions(-)
Changeset truncated at 500 lines:
diff --git a/auth/kerberos/gssapi_pac.c b/auth/kerberos/gssapi_pac.c
index 685d0ec..74c199a 100644
--- a/auth/kerberos/gssapi_pac.c
+++ b/auth/kerberos/gssapi_pac.c
@@ -246,6 +246,7 @@ NTSTATUS gssapi_get_session_key(TALLOC_CTX *mem_ctx,
int diflen, i;
const uint8_t *p;
+ *keytype = 0;
if (set->count < 2) {
#ifdef HAVE_GSSKRB5_GET_SUBKEY
@@ -256,10 +257,6 @@ NTSTATUS gssapi_get_session_key(TALLOC_CTX *mem_ctx,
if (gss_maj == 0) {
*keytype = KRB5_KEY_TYPE(subkey);
krb5_free_keyblock(NULL /* should be krb5_context */, subkey);
- } else
-#else
- {
- *keytype = 0;
}
#endif
gss_maj = gss_release_buffer_set(&gss_min, &set);
@@ -270,7 +267,6 @@ NTSTATUS gssapi_get_session_key(TALLOC_CTX *mem_ctx,
gse_sesskeytype_oid.elements,
gse_sesskeytype_oid.length) != 0) {
/* Perhaps a non-krb5 session key */
- *keytype = 0;
gss_maj = gss_release_buffer_set(&gss_min, &set);
return NT_STATUS_OK;
}
@@ -280,7 +276,6 @@ NTSTATUS gssapi_get_session_key(TALLOC_CTX *mem_ctx,
gss_maj = gss_release_buffer_set(&gss_min, &set);
return NT_STATUS_INVALID_PARAMETER;
}
- *keytype = 0;
for (i = 0; i < diflen; i++) {
*keytype = (*keytype << 7) | (p[i] & 0x7f);
if (i + 1 != diflen && (p[i] & 0x80) == 0) {
diff --git a/source3/libads/sasl.c b/source3/libads/sasl.c
index 10f63e8..d76d872 100644
--- a/source3/libads/sasl.c
+++ b/source3/libads/sasl.c
@@ -696,7 +696,7 @@ static ADS_STATUS ads_sasl_spnego_bind(ADS_STRUCT *ads)
struct berval *scred=NULL;
int rc, i;
ADS_STATUS status;
- DATA_BLOB blob;
+ DATA_BLOB blob = data_blob_null;
char *given_principal = NULL;
char *OIDs[ASN1_MAX_OIDS];
#ifdef HAVE_KRB5
@@ -792,6 +792,9 @@ static ADS_STATUS ads_sasl_spnego_bind(ADS_STRUCT *ads)
done:
ads_free_service_principal(&p);
TALLOC_FREE(frame);
+ if (blob.data != NULL) {
+ data_blob_free(&blob);
+ }
return status;
}
--
Samba Shared Repository
More information about the samba-cvs
mailing list