summaryrefslogtreecommitdiff
path: root/source3/rpc_parse/parse_dfs.c
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2003-09-29 06:17:09 +0000
committerTim Potter <tpot@samba.org>2003-09-29 06:17:09 +0000
commit5400952f7f74d6e656fcf4ded173868ecec3cb77 (patch)
tree24ac373cfcffe454faaac14ffd7c8f572d7c2c63 /source3/rpc_parse/parse_dfs.c
parent64dbd7cbff3fa7a4e560571ec38207a7176e4646 (diff)
downloadsamba-5400952f7f74d6e656fcf4ded173868ecec3cb77.tar.gz
samba-5400952f7f74d6e656fcf4ded173868ecec3cb77.tar.bz2
samba-5400952f7f74d6e656fcf4ded173868ecec3cb77.zip
Merge from 3.0:
>Fix for #480. Change the interface for init_unistr2 to not take a length >but a flags field. We were assuming that 2*strlen(mb_string) == length of ucs2-le string. >This is not the case. Count it after conversion. >Jeremy. (This used to be commit e2ab9e54cd0ec0002175cf18ff364f4aebaf85a0)
Diffstat (limited to 'source3/rpc_parse/parse_dfs.c')
-rw-r--r--source3/rpc_parse/parse_dfs.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/source3/rpc_parse/parse_dfs.c b/source3/rpc_parse/parse_dfs.c
index 6f13500359..0d0ce557b2 100644
--- a/source3/rpc_parse/parse_dfs.c
+++ b/source3/rpc_parse/parse_dfs.c
@@ -80,9 +80,9 @@ BOOL init_dfs_q_dfs_remove(DFS_Q_DFS_REMOVE *q_d, const char *entrypath,
const char *servername, const char *sharename)
{
DEBUG(5,("init_dfs_q_dfs_remove\n"));
- init_unistr2(&q_d->DfsEntryPath, entrypath, strlen(entrypath)+1);
- init_unistr2(&q_d->ServerName, servername, strlen(servername)+1);
- init_unistr2(&q_d->ShareName, sharename, strlen(sharename)+1);
+ init_unistr2(&q_d->DfsEntryPath, entrypath, UNI_STR_TERMINATE);
+ init_unistr2(&q_d->ServerName, servername, UNI_STR_TERMINATE);
+ init_unistr2(&q_d->ShareName, sharename, UNI_STR_TERMINATE);
q_d->ptr_ServerName = q_d->ptr_ShareName = 1;
return True;
}
@@ -155,11 +155,11 @@ BOOL init_dfs_q_dfs_add(DFS_Q_DFS_ADD *q_d, const char *entrypath,
{
DEBUG(5,("init_dfs_q_dfs_add\n"));
q_d->ptr_DfsEntryPath = q_d->ptr_ServerName = q_d->ptr_ShareName = 1;
- init_unistr2(&q_d->DfsEntryPath, entrypath, strlen(entrypath)+1);
- init_unistr2(&q_d->ServerName, servername, strlen(servername)+1);
- init_unistr2(&q_d->ShareName, sharename, strlen(sharename)+1);
+ init_unistr2(&q_d->DfsEntryPath, entrypath, UNI_STR_TERMINATE);
+ init_unistr2(&q_d->ServerName, servername, UNI_STR_TERMINATE);
+ init_unistr2(&q_d->ShareName, sharename, UNI_STR_TERMINATE);
if(comment != NULL) {
- init_unistr2(&q_d->Comment, comment, strlen(comment)+1);
+ init_unistr2(&q_d->Comment, comment,UNI_STR_TERMINATE);
q_d->ptr_Comment = 1;
} else {
q_d->ptr_Comment = 0;
@@ -237,9 +237,9 @@ BOOL init_dfs_q_dfs_get_info(DFS_Q_DFS_GET_INFO *q_d, const char *entrypath,
uint32 info_level)
{
DEBUG(5,("init_dfs_q2_get_info\n"));
- init_unistr2(&q_d->uni_path, entrypath, strlen(entrypath)+1);
- init_unistr2(&q_d->uni_server, servername, strlen(servername)+1);
- init_unistr2(&q_d->uni_share, sharename, strlen(sharename)+1);
+ init_unistr2(&q_d->uni_path, entrypath, UNI_STR_TERMINATE);
+ init_unistr2(&q_d->uni_server, servername, UNI_STR_TERMINATE);
+ init_unistr2(&q_d->uni_share, sharename, UNI_STR_TERMINATE);
q_d->level = info_level;
q_d->ptr_server = q_d->ptr_share = 1;
return True;