summaryrefslogtreecommitdiff
path: root/libcli/auth
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2010-12-15 17:17:09 +0100
committerAndrew Bartlett <abartlet@samba.org>2010-12-21 15:10:37 +1100
commit13fa6743d86ef6e51b3243cf3045242850358b43 (patch)
tree78b8b495848ad5478bd44d04012f0ffe1be23c2a /libcli/auth
parent464b8fa3173de7cc801195a28b84786cb1c63833 (diff)
downloadsamba-13fa6743d86ef6e51b3243cf3045242850358b43.tar.gz
samba-13fa6743d86ef6e51b3243cf3045242850358b43.tar.bz2
samba-13fa6743d86ef6e51b3243cf3045242850358b43.zip
s3/s4:auth SPNEGO - adaptions for the removed "const" from OIDs
This is needed in order to suppress warnings.
Diffstat (limited to 'libcli/auth')
-rw-r--r--libcli/auth/spnego_parse.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libcli/auth/spnego_parse.c b/libcli/auth/spnego_parse.c
index 27ede1bde4..3bf7aeab62 100644
--- a/libcli/auth/spnego_parse.c
+++ b/libcli/auth/spnego_parse.c
@@ -49,10 +49,12 @@ static bool read_negTokenInit(struct asn1_data *asn1, TALLOC_CTX *mem_ctx,
token->mechTypes = talloc(NULL, const char *);
for (i = 0; !asn1->has_error &&
0 < asn1_tag_remaining(asn1); i++) {
+ char *oid;
token->mechTypes = talloc_realloc(NULL,
token->mechTypes,
const char *, i+2);
- asn1_read_OID(asn1, token->mechTypes, token->mechTypes + i);
+ asn1_read_OID(asn1, token->mechTypes, &oid);
+ token->mechTypes[i] = oid;
}
token->mechTypes[i] = NULL;
@@ -184,6 +186,7 @@ static bool read_negTokenTarg(struct asn1_data *asn1, TALLOC_CTX *mem_ctx,
while (!asn1->has_error && 0 < asn1_tag_remaining(asn1)) {
uint8_t context;
+ char *oid;
if (!asn1_peek_uint8(asn1, &context)) {
asn1->has_error = true;
break;
@@ -199,7 +202,8 @@ static bool read_negTokenTarg(struct asn1_data *asn1, TALLOC_CTX *mem_ctx,
break;
case ASN1_CONTEXT(1):
asn1_start_tag(asn1, ASN1_CONTEXT(1));
- asn1_read_OID(asn1, mem_ctx, &token->supportedMech);
+ asn1_read_OID(asn1, mem_ctx, &oid);
+ token->supportedMech = oid;
asn1_end_tag(asn1);
break;
case ASN1_CONTEXT(2):