summaryrefslogtreecommitdiff
path: root/source4/smb_server
diff options
context:
space:
mode:
Diffstat (limited to 'source4/smb_server')
-rw-r--r--source4/smb_server/blob.c4
-rw-r--r--source4/smb_server/smb/nttrans.c2
-rw-r--r--source4/smb_server/smb/request.c16
-rw-r--r--source4/smb_server/smb2/fileio.c2
4 files changed, 12 insertions, 12 deletions
diff --git a/source4/smb_server/blob.c b/source4/smb_server/blob.c
index 3683991526..237ebd4d7e 100644
--- a/source4/smb_server/blob.c
+++ b/source4/smb_server/blob.c
@@ -138,10 +138,10 @@ size_t smbsrv_blob_push_string(TALLOC_CTX *mem_ctx,
alignment = 1;
if (dest_len > 0) {
SCVAL(blob->data + offset, 0, 0);
- ret = push_string(blob->data + offset + 1, str, dest_len-1, flags);
+ ret = push_string(global_smb_iconv_convenience, blob->data + offset + 1, str, dest_len-1, flags);
}
} else {
- ret = push_string(blob->data + offset, str, dest_len, flags);
+ ret = push_string(global_smb_iconv_convenience, blob->data + offset, str, dest_len, flags);
}
/* sometimes the string needs to be terminated, but the length
diff --git a/source4/smb_server/smb/nttrans.c b/source4/smb_server/smb/nttrans.c
index 046f6ca0ec..25cddd6654 100644
--- a/source4/smb_server/smb/nttrans.c
+++ b/source4/smb_server/smb/nttrans.c
@@ -372,7 +372,7 @@ static NTSTATUS nttrans_notify_change_send(struct nttrans_op *op)
ssize_t len;
SIVAL(p, 4, info->nttrans.out.changes[i].action);
- len = push_string(p + 12, info->nttrans.out.changes[i].name.s,
+ len = push_string(global_smb_iconv_convenience, p + 12, info->nttrans.out.changes[i].name.s,
op->trans->out.params.length -
(p+12 - op->trans->out.params.data), STR_UNICODE);
SIVAL(p, 8, len);
diff --git a/source4/smb_server/smb/request.c b/source4/smb_server/smb/request.c
index da8d1e2d05..cdeba02dd7 100644
--- a/source4/smb_server/smb/request.c
+++ b/source4/smb_server/smb/request.c
@@ -408,7 +408,7 @@ size_t req_push_str(struct smbsrv_request *req, uint8_t *dest, const char *str,
dest = req->out.buffer + PTR_DIFF(dest, buf0);
}
- len = push_string(dest, str, len, flags);
+ len = push_string(global_smb_iconv_convenience, dest, str, len, flags);
grow_size = len + PTR_DIFF(dest, req->out.data);
@@ -447,7 +447,7 @@ size_t req_append_var_block(struct smbsrv_request *req,
req_grow_data(req, byte_len + 3 + req->out.data_size);
return byte_len + 3;
}
-/*
+/**
pull a UCS2 string from a request packet, returning a talloced unix string
the string length is limited by the 3 things:
@@ -494,7 +494,7 @@ static size_t req_pull_ucs2(struct smbsrv_request *req, const char **dest, const
return src_len2 + alignment;
}
- ret = convert_string_talloc(req, CH_UTF16, CH_UNIX, src, src_len2, (void **)&dest2);
+ ret = convert_string_talloc(req, global_smb_iconv_convenience, CH_UTF16, CH_UNIX, src, src_len2, (void **)&dest2);
if (ret == -1) {
*dest = NULL;
@@ -505,7 +505,7 @@ static size_t req_pull_ucs2(struct smbsrv_request *req, const char **dest, const
return src_len2 + alignment;
}
-/*
+/**
pull a ascii string from a request packet, returning a talloced string
the string length is limited by the 3 things:
@@ -543,7 +543,7 @@ static size_t req_pull_ascii(struct smbsrv_request *req, const char **dest, cons
src_len2++;
}
- ret = convert_string_talloc(req, CH_DOS, CH_UNIX, src, src_len2, (void **)&dest2);
+ ret = convert_string_talloc(req, global_smb_iconv_convenience, CH_DOS, CH_UNIX, src, src_len2, (void **)&dest2);
if (ret == -1) {
*dest = NULL;
@@ -554,7 +554,7 @@ static size_t req_pull_ascii(struct smbsrv_request *req, const char **dest, cons
return src_len2;
}
-/*
+/**
pull a string from a request packet, returning a talloced string
the string length is limited by the 3 things:
@@ -578,7 +578,7 @@ size_t req_pull_string(struct smbsrv_request *req, const char **dest, const uint
}
-/*
+/**
pull a ASCII4 string buffer from a request packet, returning a talloced string
an ASCII4 buffer is a null terminated string that has a prefix
@@ -611,7 +611,7 @@ size_t req_pull_ascii4(struct smbsrv_request *req, const char **dest, const uint
return ret + 1;
}
-/*
+/**
pull a DATA_BLOB from a request packet, returning a talloced blob
return false if any part is outside the data portion of the packet
diff --git a/source4/smb_server/smb2/fileio.c b/source4/smb_server/smb2/fileio.c
index 47b5dbe60c..a5fc3d8268 100644
--- a/source4/smb_server/smb2/fileio.c
+++ b/source4/smb_server/smb2/fileio.c
@@ -352,7 +352,7 @@ static void smb2srv_notify_send(struct ntvfs_request *ntvfs)
ssize_t len;
SIVAL(p, 4, io->smb2.out.changes[i].action);
- len = push_string(p + 12, io->smb2.out.changes[i].name.s,
+ len = push_string(global_smb_iconv_convenience, p + 12, io->smb2.out.changes[i].name.s,
blob.length - (p+12 - blob.data), STR_UNICODE);
SIVAL(p, 8, len);