summaryrefslogtreecommitdiff
path: root/source4/libcli
diff options
context:
space:
mode:
Diffstat (limited to 'source4/libcli')
-rw-r--r--source4/libcli/auth/clikrb5.c2
-rw-r--r--source4/libcli/auth/ntlmssp_parse.c4
-rw-r--r--source4/libcli/auth/spnego.c2
-rw-r--r--source4/libcli/auth/spnego.h2
-rw-r--r--source4/libcli/raw/rawrequest.c2
-rw-r--r--source4/libcli/raw/rawsearch.c5
-rw-r--r--source4/libcli/util/asn1.c4
7 files changed, 12 insertions, 9 deletions
diff --git a/source4/libcli/auth/clikrb5.c b/source4/libcli/auth/clikrb5.c
index 78492d2352..c3ea33aaec 100644
--- a/source4/libcli/auth/clikrb5.c
+++ b/source4/libcli/auth/clikrb5.c
@@ -386,7 +386,7 @@ cleanup_princ:
{
static krb5_data kdata;
- kdata.data = krb5_principal_get_comp_string(context, principal, i);
+ kdata.data = discard_const(krb5_principal_get_comp_string(context, principal, i));
kdata.length = strlen(kdata.data);
return &kdata;
}
diff --git a/source4/libcli/auth/ntlmssp_parse.c b/source4/libcli/auth/ntlmssp_parse.c
index 22ed783666..c36bb6a4fc 100644
--- a/source4/libcli/auth/ntlmssp_parse.c
+++ b/source4/libcli/auth/ntlmssp_parse.c
@@ -64,7 +64,7 @@ BOOL msrpc_gen(TALLOC_CTX *mem_ctx, DATA_BLOB *blob,
case 'U':
s = va_arg(ap, char *);
head_size += 8;
- n = push_ucs2_talloc(pointers, &pointers[i].data, s);
+ n = push_ucs2_talloc(pointers, (void **)&pointers[i].data, s);
if (n == -1) {
return False;
}
@@ -87,7 +87,7 @@ BOOL msrpc_gen(TALLOC_CTX *mem_ctx, DATA_BLOB *blob,
n = va_arg(ap, int);
intargs[i] = n;
s = va_arg(ap, char *);
- n = push_ucs2_talloc(pointers, &pointers[i].data, s);
+ n = push_ucs2_talloc(pointers, (void **)&pointers[i].data, s);
if (n == -1) {
return False;
}
diff --git a/source4/libcli/auth/spnego.c b/source4/libcli/auth/spnego.c
index 85d77992fa..2779f47474 100644
--- a/source4/libcli/auth/spnego.c
+++ b/source4/libcli/auth/spnego.c
@@ -483,7 +483,7 @@ static NTSTATUS gensec_spnego_update(struct gensec_security *gensec_security, TA
{
/* The server offers a list of mechanisms */
- char *my_mechs[] = {NULL, NULL};
+ const char *my_mechs[] = {NULL, NULL};
NTSTATUS nt_status = NT_STATUS_INVALID_PARAMETER;
if (!in.length) {
diff --git a/source4/libcli/auth/spnego.h b/source4/libcli/auth/spnego.h
index 926cb7f88d..3b9d148c67 100644
--- a/source4/libcli/auth/spnego.h
+++ b/source4/libcli/auth/spnego.h
@@ -41,7 +41,7 @@ enum spnego_negResult {
};
struct spnego_negTokenInit {
- char **mechTypes;
+ const char **mechTypes;
int reqFlags;
DATA_BLOB mechToken;
DATA_BLOB mechListMIC;
diff --git a/source4/libcli/raw/rawrequest.c b/source4/libcli/raw/rawrequest.c
index 89155451da..dd21eb89ea 100644
--- a/source4/libcli/raw/rawrequest.c
+++ b/source4/libcli/raw/rawrequest.c
@@ -548,7 +548,7 @@ static size_t smbcli_req_pull_ucs2(struct smbcli_request *req, TALLOC_CTX *mem_c
of bytes consumed in the packet is returned
*/
size_t smbcli_req_pull_ascii(struct smbcli_request *req, TALLOC_CTX *mem_ctx,
- char **dest, const char *src, int byte_len, uint_t flags)
+ char **dest, const char *src, int byte_len, uint_t flags)
{
int src_len, src_len2;
ssize_t ret;
diff --git a/source4/libcli/raw/rawsearch.c b/source4/libcli/raw/rawsearch.c
index df44dbffa4..dd8904dfd1 100644
--- a/source4/libcli/raw/rawsearch.c
+++ b/source4/libcli/raw/rawsearch.c
@@ -42,6 +42,8 @@ static void smb_raw_search_backend(struct smbcli_request *req,
p = req->in.data + 3;
for (i=0; i < count; i++) {
+ char *name;
+
search_data.search.id.reserved = CVAL(p, 0);
memcpy(search_data.search.id.name, p+1, 11);
search_data.search.id.handle = CVAL(p, 12);
@@ -51,7 +53,8 @@ static void smb_raw_search_backend(struct smbcli_request *req,
search_data.search.write_time = raw_pull_dos_date(req->transport,
p + 22);
search_data.search.size = IVAL(p, 26);
- smbcli_req_pull_ascii(req, mem_ctx, &search_data.search.name, p+30, 13, STR_ASCII);
+ smbcli_req_pull_ascii(req, mem_ctx, &name, p+30, 13, STR_ASCII);
+ search_data.search.name = name;
if (!callback(private, &search_data)) {
break;
}
diff --git a/source4/libcli/util/asn1.c b/source4/libcli/util/asn1.c
index 15d9243acd..e03b1d5f39 100644
--- a/source4/libcli/util/asn1.c
+++ b/source4/libcli/util/asn1.c
@@ -494,7 +494,7 @@ int asn1_tag_remaining(ASN1_DATA *data)
}
/* read an object ID from a ASN1 buffer */
-BOOL asn1_read_OID(ASN1_DATA *data, char **OID)
+BOOL asn1_read_OID(ASN1_DATA *data, const char **OID)
{
uint8_t b;
char *tmp_oid = NULL;
@@ -525,7 +525,7 @@ BOOL asn1_read_OID(ASN1_DATA *data, char **OID)
/* check that the next object ID is correct */
BOOL asn1_check_OID(ASN1_DATA *data, const char *OID)
{
- char *id;
+ const char *id;
if (!asn1_read_OID(data, &id)) return False;