summaryrefslogtreecommitdiff
path: root/source3/libsmb/clispnego.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/libsmb/clispnego.c')
-rw-r--r--source3/libsmb/clispnego.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/source3/libsmb/clispnego.c b/source3/libsmb/clispnego.c
index cd09a3836f..0935041a34 100644
--- a/source3/libsmb/clispnego.c
+++ b/source3/libsmb/clispnego.c
@@ -91,7 +91,8 @@ DATA_BLOB spnego_gen_negTokenInit(const char *OIDs[],
parse a negTokenInit packet giving a GUID, a list of supported
OIDs (the mechanisms) and a principal name string
*/
-bool spnego_parse_negTokenInit(DATA_BLOB blob,
+bool spnego_parse_negTokenInit(TALLOC_CTX *ctx,
+ DATA_BLOB blob,
char *OIDs[ASN1_MAX_OIDS],
char **principal,
DATA_BLOB *secblob)
@@ -124,7 +125,7 @@ bool spnego_parse_negTokenInit(DATA_BLOB blob,
asn1_start_tag(data,ASN1_SEQUENCE(0));
for (i=0; asn1_tag_remaining(data) > 0 && i < ASN1_MAX_OIDS-1; i++) {
const char *oid_str = NULL;
- asn1_read_OID(data,talloc_autofree_context(),&oid_str);
+ asn1_read_OID(data,ctx,&oid_str);
OIDs[i] = CONST_DISCARD(char *, oid_str);
}
OIDs[i] = NULL;
@@ -162,8 +163,7 @@ bool spnego_parse_negTokenInit(DATA_BLOB blob,
DATA_BLOB sblob = data_blob_null;
/* mechToken [2] OCTET STRING OPTIONAL */
asn1_start_tag(data, ASN1_CONTEXT(2));
- asn1_read_OctetString(data, talloc_autofree_context(),
- &sblob);
+ asn1_read_OctetString(data, ctx, &sblob);
asn1_end_tag(data);
if (secblob) {
*secblob = sblob;
@@ -178,8 +178,7 @@ bool spnego_parse_negTokenInit(DATA_BLOB blob,
asn1_start_tag(data, ASN1_CONTEXT(3));
asn1_start_tag(data, ASN1_SEQUENCE(0));
asn1_start_tag(data, ASN1_CONTEXT(0));
- asn1_read_GeneralString(data,talloc_autofree_context(),
- &princ);
+ asn1_read_GeneralString(data, ctx, &princ);
asn1_end_tag(data);
asn1_end_tag(data);
asn1_end_tag(data);