summaryrefslogtreecommitdiff
path: root/source3/libsmb/spnego.c
diff options
context:
space:
mode:
authorDerrell Lipman <derrell@samba.org>2005-03-31 05:06:04 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:56:24 -0500
commit9840db418bad5a39edc4a32a1786f5e2d2c9dff8 (patch)
tree4116543c742e1563ae869e1053583dbabf4195b5 /source3/libsmb/spnego.c
parentb76112f2116c3c08c7656387a4a49ea64915f470 (diff)
downloadsamba-9840db418bad5a39edc4a32a1786f5e2d2c9dff8.tar.gz
r6149: Fixes bugs #2498 and 2484.
1. using smbc_getxattr() et al, one may now request all access control entities in the ACL without getting all other NT attributes. 2. added the ability to exclude specified attributes from the result set provided by smbc_getxattr() et al, when requesting all attributes, all NT attributes, or all DOS attributes. 3. eliminated all compiler warnings, including when --enable-developer compiler flags are in use. removed -Wcast-qual flag from list, as that is specifically to force warnings in the case of casting away qualifiers. Note: In the process of eliminating compiler warnings, a few nasties were discovered. In the file libads/sasl.c, PRIVATE kerberos interfaces are being used; and in libsmb/clikrb5.c, both PRIAVE and DEPRECATED kerberos interfaces are being used. Someone who knows kerberos should look at these and determine if there is an alternate method of accomplishing the task. (This used to be commit 994694f7f26da5099f071e1381271a70407f33bb)
Diffstat (limited to 'source3/libsmb/spnego.c')
-rw-r--r--source3/libsmb/spnego.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/source3/libsmb/spnego.c b/source3/libsmb/spnego.c
index 090148d415f..0387e8f67d8 100644
--- a/source3/libsmb/spnego.c
+++ b/source3/libsmb/spnego.c
@@ -47,7 +47,9 @@ static BOOL read_negTokenInit(ASN1_DATA *asn1, negTokenInit_t *token)
0 < asn1_tag_remaining(asn1); i++) {
token->mechTypes =
SMB_REALLOC_ARRAY(token->mechTypes, const char *, i + 2);
- asn1_read_OID(asn1, (char **) (token->mechTypes + i));
+ asn1_read_OID(asn1,
+ CONST_DISCARD(char **,
+ (token->mechTypes + i)));
}
token->mechTypes[i] = NULL;
@@ -182,7 +184,7 @@ static BOOL read_negTokenTarg(ASN1_DATA *asn1, negTokenTarg_t *token)
break;
case ASN1_CONTEXT(1):
asn1_start_tag(asn1, ASN1_CONTEXT(1));
- asn1_read_OID(asn1, (char **) &token->supportedMech);
+ asn1_read_OID(asn1, CONST_DISCARD(char **, &token->supportedMech));
asn1_end_tag(asn1);
break;
case ASN1_CONTEXT(2):
@@ -317,7 +319,8 @@ BOOL free_spnego_data(SPNEGO_DATA *spnego)
if (spnego->negTokenInit.mechTypes) {
int i;
for (i = 0; spnego->negTokenInit.mechTypes[i]; i++) {
- free((void *) spnego->negTokenInit.mechTypes[i]);
+ free(CONST_DISCARD(void *,
+ spnego->negTokenInit.mechTypes[i]));
}
free(spnego->negTokenInit.mechTypes);
}
@@ -326,7 +329,7 @@ BOOL free_spnego_data(SPNEGO_DATA *spnego)
break;
case SPNEGO_NEG_TOKEN_TARG:
if (spnego->negTokenTarg.supportedMech) {
- free((void *) spnego->negTokenTarg.supportedMech);
+ free(CONST_DISCARD(void *, spnego->negTokenTarg.supportedMech));
}
data_blob_free(&spnego->negTokenTarg.responseToken);
data_blob_free(&spnego->negTokenTarg.mechListMIC);