summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srv_lsa_nt.c27
-rw-r--r--source3/rpc_server/srv_netlog_nt.c9
-rw-r--r--source3/rpc_server/srv_pipe.c6
-rw-r--r--source3/rpc_server/srv_reg_nt.c4
-rw-r--r--source3/rpc_server/srv_samr_nt.c10
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c67
-rw-r--r--source3/rpc_server/srv_srvsvc_nt.c5
-rw-r--r--source3/rpc_server/srv_wkssvc_nt.c2
8 files changed, 50 insertions, 80 deletions
diff --git a/source3/rpc_server/srv_lsa_nt.c b/source3/rpc_server/srv_lsa_nt.c
index afcace3f9c..cd97dfc6d1 100644
--- a/source3/rpc_server/srv_lsa_nt.c
+++ b/source3/rpc_server/srv_lsa_nt.c
@@ -72,7 +72,7 @@ static int init_dom_ref(DOM_R_REF *ref, char *dom_name, DOM_SID *dom_sid)
if (dom_name != NULL) {
for (num = 0; num < ref->num_ref_doms_1; num++) {
fstring domname;
- fstrcpy(domname, dos_unistr2_to_str(&ref->ref_dom[num].uni_dom_name));
+ rpcstr_pull(domname, &ref->ref_dom[num].uni_dom_name, sizeof(domname), -1, 0);
if (strequal(domname, dom_name))
return num;
}
@@ -128,7 +128,7 @@ static void init_lsa_rid2s(DOM_R_REF *ref, DOM_RID2 *rid2,
/* Split name into domain and user component */
- pstrcpy(full_name, dos_unistr2_to_str(&name[i]));
+ rpcstr_pull(full_name, &name[i], sizeof(full_name), -1, 0);
split_domain_name(full_name, dom_name, user);
/* Lookup name */
@@ -238,11 +238,6 @@ static void init_lsa_trans_names(TALLOC_CTX *ctx, DOM_R_REF *ref, LSA_TRANS_NAME
sid_split_rid(&find_sid, &rid);
}
- /* unistr routines take dos codepage strings */
-
- unix_to_dos(dom_name, True);
- unix_to_dos(name, True);
-
dom_idx = init_dom_ref(ref, dom_name, &find_sid);
DEBUG(10,("init_lsa_trans_names: added user '%s\\%s' to "
@@ -337,7 +332,6 @@ uint32 _lsa_query_info(pipes_struct *p, LSA_Q_QUERY_INFO *q_u, LSA_R_QUERY_INFO
{
LSA_INFO_UNION *info = &r_u->dom;
DOM_SID domain_sid;
- fstring dos_domain;
char *name = NULL;
DOM_SID *sid = NULL;
@@ -346,9 +340,6 @@ uint32 _lsa_query_info(pipes_struct *p, LSA_Q_QUERY_INFO *q_u, LSA_R_QUERY_INFO
if (!find_policy_by_hnd(p, &q_u->pol, NULL))
return NT_STATUS_INVALID_HANDLE;
- fstrcpy(dos_domain, global_myworkgroup);
- unix_to_dos(dos_domain, True);
-
switch (q_u->info_class) {
case 0x02:
{
@@ -368,20 +359,20 @@ uint32 _lsa_query_info(pipes_struct *p, LSA_Q_QUERY_INFO *q_u, LSA_R_QUERY_INFO
switch (lp_server_role()) {
case ROLE_DOMAIN_PDC:
case ROLE_DOMAIN_BDC:
- name = dos_domain;
+ name = global_myworkgroup;
sid = &global_sam_sid;
break;
case ROLE_DOMAIN_MEMBER:
- name = dos_domain;
+ name = global_myworkgroup;
/* We need to return the Domain SID here. */
- if (secrets_fetch_domain_sid(dos_domain,
+ if (secrets_fetch_domain_sid(global_myworkgroup,
&domain_sid))
sid = &domain_sid;
else
return NT_STATUS_CANT_ACCESS_DOMAIN_INFO;
break;
case ROLE_STANDALONE:
- name = dos_domain;
+ name = global_myworkgroup;
sid = NULL; /* Tell it we're not in a domain. */
break;
default:
@@ -394,15 +385,15 @@ uint32 _lsa_query_info(pipes_struct *p, LSA_Q_QUERY_INFO *q_u, LSA_R_QUERY_INFO
switch (lp_server_role()) {
case ROLE_DOMAIN_PDC:
case ROLE_DOMAIN_BDC:
- name = dos_domain;
+ name = global_myworkgroup;
sid = &global_sam_sid;
break;
case ROLE_DOMAIN_MEMBER:
- name = dos_domain;
+ name = global_myworkgroup;
sid = &global_sam_sid;
break;
case ROLE_STANDALONE:
- name = dos_domain;
+ name = global_myworkgroup;
sid = &global_sam_sid;
break;
default:
diff --git a/source3/rpc_server/srv_netlog_nt.c b/source3/rpc_server/srv_netlog_nt.c
index bbda4060f2..14f3e1d211 100644
--- a/source3/rpc_server/srv_netlog_nt.c
+++ b/source3/rpc_server/srv_netlog_nt.c
@@ -202,8 +202,7 @@ uint32 _net_req_chal(pipes_struct *p, NET_Q_REQ_CHAL *q_u, NET_R_REQ_CHAL *r_u)
if (!get_valid_user_struct(p->vuid))
return NT_STATUS_NO_SUCH_USER;
- fstrcpy(mach_acct, dos_unistrn2(q_u->uni_logon_clnt.buffer,
- q_u->uni_logon_clnt.uni_str_len));
+ rpcstr_pull(mach_acct,q_u->uni_logon_clnt.buffer,sizeof(fstring),q_u->uni_logon_clnt.uni_str_len*2,0);
strlower(mach_acct);
fstrcat(mach_acct, "$");
@@ -357,8 +356,8 @@ uint32 _net_srv_pwset(pipes_struct *p, NET_Q_SRV_PWSET *q_u, NET_R_SRV_PWSET *r_
DEBUG(5,("_net_srv_pwset: %d\n", __LINE__));
- pstrcpy(mach_acct, dos_unistrn2(q_u->clnt_id.login.uni_acct_name.buffer,
- q_u->clnt_id.login.uni_acct_name.uni_str_len));
+ rpcstr_pull(mach_acct,q_u->clnt_id.login.uni_acct_name.buffer,
+ sizeof(mach_acct),q_u->clnt_id.login.uni_acct_name.uni_str_len*2,0);
DEBUG(3,("Server Password Set Wksta:[%s]\n", mach_acct));
@@ -592,7 +591,7 @@ uint32 _net_sam_logon(pipes_struct *p, NET_Q_SAM_LOGON *q_u, NET_R_SAM_LOGON *r_
/* check username exists */
- pstrcpy(nt_username, dos_unistrn2(uni_samlogon_user->buffer, uni_samlogon_user->uni_str_len));
+ rpcstr_pull(nt_username,uni_samlogon_user->buffer,sizeof(nt_username),uni_samlogon_user->uni_str_len*2,0);
DEBUG(3,("User:[%s]\n", nt_username));
diff --git a/source3/rpc_server/srv_pipe.c b/source3/rpc_server/srv_pipe.c
index 5f6a1d479c..cdf914a164 100644
--- a/source3/rpc_server/srv_pipe.c
+++ b/source3/rpc_server/srv_pipe.c
@@ -296,9 +296,9 @@ static BOOL api_pipe_ntlmssp_verify(pipes_struct *p, RPC_AUTH_NTLMSSP_RESP *ntlm
*/
if (p->ntlmssp_chal_flags & NTLMSSP_NEGOTIATE_UNICODE) {
- fstrcpy(user_name, dos_unistrn2((uint16*)ntlmssp_resp->user, ntlmssp_resp->hdr_usr.str_str_len/2));
- fstrcpy(domain, dos_unistrn2((uint16*)ntlmssp_resp->domain, ntlmssp_resp->hdr_domain.str_str_len/2));
- fstrcpy(wks, dos_unistrn2((uint16*)ntlmssp_resp->wks, ntlmssp_resp->hdr_wks.str_str_len/2));
+ rpcstr_pull(user_name, ntlmssp_resp->user, sizeof(fstring), ntlmssp_resp->hdr_usr.str_str_len*2, 0 );
+ rpcstr_pull(domain, ntlmssp_resp->domain, sizeof(fstring), ntlmssp_resp->hdr_domain.str_str_len*2, 0);
+ rpcstr_pull(wks, ntlmssp_resp->wks, sizeof(fstring), ntlmssp_resp->hdr_wks.str_str_len*2, 0);
} else {
fstrcpy(user_name, ntlmssp_resp->user);
fstrcpy(domain, ntlmssp_resp->domain);
diff --git a/source3/rpc_server/srv_reg_nt.c b/source3/rpc_server/srv_reg_nt.c
index 502d551437..3ed673c68a 100644
--- a/source3/rpc_server/srv_reg_nt.c
+++ b/source3/rpc_server/srv_reg_nt.c
@@ -85,7 +85,7 @@ uint32 _reg_open_entry(pipes_struct *p, REG_Q_OPEN_ENTRY *q_u, REG_R_OPEN_ENTRY
if (!find_policy_by_hnd(p, &q_u->pol, NULL))
return NT_STATUS_INVALID_HANDLE;
- fstrcpy(name, dos_unistrn2(q_u->uni_name.buffer, q_u->uni_name.uni_str_len));
+ rpcstr_pull(name,q_u->uni_name.buffer,sizeof(name),q_u->uni_name.uni_str_len*2,0);
DEBUG(5,("reg_open_entry: %s\n", name));
@@ -129,7 +129,7 @@ uint32 _reg_info(pipes_struct *p, REG_Q_INFO *q_u, REG_R_INFO *r_u)
if (find_policy_by_hnd(p, &q_u->pol, NULL) == -1)
return NT_STATUS_INVALID_HANDLE;
- fstrcpy(name, dos_unistrn2(q_u->uni_type.buffer, q_u->uni_type.uni_str_len));
+ rpcstr_pull(name, q_u->uni_type.buffer, sizeof(name), q_u->uni_type.uni_str_len*2, 0);
DEBUG(5,("reg_info: checking key: %s\n", name));
diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c
index 5106271c60..d783de3b4b 100644
--- a/source3/rpc_server/srv_samr_nt.c
+++ b/source3/rpc_server/srv_samr_nt.c
@@ -246,7 +246,7 @@ static char *unmap_unixname(char *unix_user_name, int name_idx)
if (!*unix_user_name) return NULL;
if (!*mapfile) return NULL;
- lines = file_lines_load(mapfile, NULL,False);
+ lines = file_lines_load(mapfile, NULL);
if (!lines) {
DEBUG(0,("unmap_unixname: can't open username map %s\n", mapfile));
return NULL;
@@ -1253,7 +1253,7 @@ uint32 _samr_lookup_names(pipes_struct *p, SAMR_Q_LOOKUP_NAMES *q_u, SAMR_R_LOOK
rid [i] = 0xffffffff;
type[i] = SID_NAME_UNKNOWN;
- fstrcpy(name, dos_unistrn2(q_u->uni_name[i].buffer, q_u->uni_name[i].uni_str_len));
+ rpcstr_pull(name, q_u->uni_name[i].buffer, sizeof(name), q_u->uni_name[i].uni_str_len*2, 0);
if(sid_equal(&pol_sid, &global_sam_sid)) {
DOM_SID sid;
@@ -1284,8 +1284,8 @@ uint32 _samr_chgpasswd_user(pipes_struct *p, SAMR_Q_CHGPASSWD_USER *q_u, SAMR_R_
r_u->status = NT_STATUS_NOPROBLEMO;
- fstrcpy(user_name, dos_unistrn2(q_u->uni_user_name.buffer, q_u->uni_user_name.uni_str_len));
- fstrcpy(wks , dos_unistrn2(q_u->uni_dest_host.buffer, q_u->uni_dest_host.uni_str_len));
+ rpcstr_pull(user_name, q_u->uni_user_name.buffer, sizeof(user_name), q_u->uni_user_name.uni_str_len*2, 0);
+ rpcstr_pull(wks, q_u->uni_dest_host.buffer, sizeof(wks), q_u->uni_dest_host.uni_str_len,0);
DEBUG(5,("samr_chgpasswd_user: user: %s wks: %s\n", user_name, wks));
@@ -1810,7 +1810,7 @@ uint32 _api_samr_create_user(pipes_struct *p, SAMR_Q_CREATE_USER *q_u, SAMR_R_CR
reply if the account already exists...
*/
- fstrcpy(mach_acct, dos_unistrn2(user_account.buffer, user_account.uni_str_len));
+ rpcstr_pull(mach_acct, user_account.buffer, sizeof(mach_acct), user_account.uni_str_len*2, 0);
strlower(mach_acct);
pdb_init_sam(&sam_pass);
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index 3fcb08891d..7002241a00 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -300,7 +300,6 @@ static uint32 delete_printer_handle(pipes_struct *p, POLICY_HND *hnd)
/* Printer->dev.handlename equals portname equals sharename */
slprintf(command, sizeof(command)-1, "%s \"%s\"", cmd,
Printer->dev.handlename);
- dos_to_unix(command, True); /* Convert printername to unix-codepage */
DEBUG(10,("Running [%s]\n", command));
ret = smbrun(command, NULL);
@@ -944,8 +943,8 @@ BOOL convert_devicemode(char *printername, const DEVICEMODE *devmode,
return False;
}
- unistr_to_dos(nt_devmode->devicename, (const char *)devmode->devicename.buffer, 31);
- unistr_to_dos(nt_devmode->formname, (const char *)devmode->formname.buffer, 31);
+ rpcstr_pull(nt_devmode->devicename,devmode->devicename.buffer, 31, -1, 0);
+ rpcstr_pull(nt_devmode->formname,devmode->formname.buffer, 31, -1, 0);
nt_devmode->specversion=devmode->specversion;
nt_devmode->driverversion=devmode->driverversion;
@@ -1356,7 +1355,6 @@ static BOOL srv_spoolss_replyopenprinter(char *printer, uint32 localprinter, uin
fstring unix_printer;
fstrcpy(unix_printer, printer+2); /* the +2 is to strip the leading 2 backslashs */
- dos_to_unix(unix_printer, True);
if(!spoolss_connect_to_client(&cli, unix_printer))
return False;
@@ -1437,7 +1435,7 @@ static void spoolss_notify_server_name(int snum,
slprintf(temp_name, sizeof(temp_name)-1, "\\\\%s", global_myname);
- len = (uint32)dos_PutUniCode(temp, temp_name, sizeof(temp) - 2, True);
+ len = rpcstr_push(temp, temp_name, sizeof(temp)-2, 0);
data->notify_data.data.length = len / 2 - 1;
data->notify_data.data.string = (uint16 *)talloc(mem_ctx, len);
@@ -1471,8 +1469,7 @@ static void spoolss_notify_printer_name(int snum,
p++;
}
- len = (uint32)dos_PutUniCode(temp, p, sizeof(temp) - 2, True);
-
+ len = rpcstr_push(temp, p, sizeof(temp)-2, 0);
data->notify_data.data.length = len / 2 - 1;
data->notify_data.data.string = (uint16 *)talloc(mem_ctx, len);
@@ -1496,8 +1493,7 @@ static void spoolss_notify_share_name(int snum,
pstring temp;
uint32 len;
- len = (uint32)dos_PutUniCode(temp, lp_servicename(snum),
- sizeof(temp) - 2, True);
+ len = rpcstr_push(temp, lp_servicename(snum), sizeof(temp) - 2, 0);
data->notify_data.data.length = len / 2 - 1;
data->notify_data.data.string = (uint16 *)talloc(mem_ctx, len);
@@ -1524,8 +1520,7 @@ static void spoolss_notify_port_name(int snum,
/* even if it's strange, that's consistant in all the code */
- len = (uint32)dos_PutUniCode(temp, printer->info_2->portname,
- sizeof(temp) - 2, True);
+ len = rpcstr_push(temp, printer->info_2->portname, sizeof(temp) - 2, 0);
data->notify_data.data.length = len / 2 - 1;
data->notify_data.data.string = (uint16 *)talloc(mem_ctx, len);
@@ -1552,9 +1547,7 @@ static void spoolss_notify_driver_name(int snum,
pstring temp;
uint32 len;
- len = (uint32)dos_PutUniCode(temp, printer->info_2->drivername,
- sizeof(temp) - 2, True);
-
+ len = rpcstr_push(temp, printer->info_2->drivername, sizeof(temp) - 2, 0);
data->notify_data.data.length = len / 2 - 1;
data->notify_data.data.string = (uint16 *)talloc(mem_ctx, len);
@@ -1579,11 +1572,10 @@ static void spoolss_notify_comment(int snum,
uint32 len;
if (*printer->info_2->comment == '\0')
- len = (uint32)dos_PutUniCode(temp, lp_comment(snum),
- sizeof(temp) - 2, True);
+ len = rpcstr_push(temp, lp_comment(snum), sizeof(temp) - 2, 0);
+
else
- len = (uint32)dos_PutUniCode(temp, printer->info_2->comment,
- sizeof(temp) - 2, True);
+ len = rpcstr_push(temp, printer->info_2->comment, sizeof(temp) - 2, 0);
data->notify_data.data.length = len / 2 - 1;
data->notify_data.data.string = (uint16 *)talloc(mem_ctx, len);
@@ -1610,8 +1602,7 @@ static void spoolss_notify_location(int snum,
pstring temp;
uint32 len;
- len = (uint32)dos_PutUniCode(temp, printer->info_2->location,
- sizeof(temp) - 2, True);
+ len = rpcstr_push(temp, printer->info_2->location,sizeof(temp) - 2, 0);
data->notify_data.data.length = len / 2 - 1;
data->notify_data.data.string = (uint16 *)talloc(mem_ctx, len);
@@ -1650,8 +1641,7 @@ static void spoolss_notify_sepfile(int snum,
pstring temp;
uint32 len;
- len = (uint32)dos_PutUniCode(temp, printer->info_2->sepfile,
- sizeof(temp) - 2, True);
+ len = rpcstr_push(temp, printer->info_2->sepfile, sizeof(temp) - 2, 0);
data->notify_data.data.length = len / 2 - 1;
data->notify_data.data.string = (uint16 *)talloc(mem_ctx, len);
@@ -1677,8 +1667,7 @@ static void spoolss_notify_print_processor(int snum,
pstring temp;
uint32 len;
- len = (uint32)dos_PutUniCode(temp, printer->info_2->printprocessor,
- sizeof(temp) - 2, True);
+ len = rpcstr_push(temp, printer->info_2->printprocessor, sizeof(temp) - 2, 0);
data->notify_data.data.length = len / 2 - 1;
data->notify_data.data.string = (uint16 *)talloc(mem_ctx, len);
@@ -1704,8 +1693,8 @@ static void spoolss_notify_parameters(int snum,
pstring temp;
uint32 len;
- len = (uint32)dos_PutUniCode(temp, printer->info_2->parameters,
- sizeof(temp) - 2, True);
+ len = rpcstr_push(temp, printer->info_2->parameters, sizeof(temp) -
+ 2, 0);
data->notify_data.data.length = len / 2 - 1;
data->notify_data.data.string = (uint16 *)talloc(mem_ctx, len);
@@ -1731,8 +1720,7 @@ static void spoolss_notify_datatype(int snum,
pstring temp;
uint32 len;
- len = (uint32)dos_PutUniCode(temp, printer->info_2->datatype,
- sizeof(pstring) - 2, True);
+ len = rpcstr_push(temp, printer->info_2->datatype, sizeof(pstring)-2, 0);
data->notify_data.data.length = len / 2 - 1;
data->notify_data.data.string = (uint16 *)talloc(mem_ctx, len);
@@ -1882,8 +1870,8 @@ static void spoolss_notify_username(int snum,
pstring temp;
uint32 len;
- len = (uint32)dos_PutUniCode(temp, queue->user,
- sizeof(temp) - 2, True);
+ len = rpcstr_push(temp, queue->user, sizeof(temp) - 2, 0);
+
data->notify_data.data.length = len / 2 - 1;
data->notify_data.data.string = (uint16 *)talloc(mem_ctx, len);
@@ -1920,9 +1908,8 @@ static void spoolss_notify_job_name(int snum,
pstring temp;
uint32 len;
- len = (uint32)dos_PutUniCode(temp, queue->file, sizeof(temp) - 2,
- True);
-
+ len = rpcstr_push(temp, queue->file, sizeof(temp) - 2, 0);
+
data->notify_data.data.length = len / 2 - 1;
data->notify_data.data.string = (uint16 *)talloc(mem_ctx, len);
@@ -1970,7 +1957,7 @@ static void spoolss_notify_job_status_string(int snum,
}
#endif /* NO LONGER NEEDED. */
- len = (uint32)dos_PutUniCode(temp, p, sizeof(temp) - 2, True);
+ len = rpcstr_push(temp, p, sizeof(temp) - 2, 0);
data->notify_data.data.length = len / 2 - 1;
data->notify_data.data.string = (uint16 *)talloc(mem_ctx, len);
@@ -3487,7 +3474,7 @@ static void init_unistr_array(uint16 **uni_array, fstring *char_array, char *ser
DEBUG(0,("init_unistr_array: Realloc error\n" ));
return;
}
- j += (dos_PutUniCode((char *)(*uni_array+j), line , sizeof(uint16)*strlen(line), True) / sizeof(uint16) );
+ j += (rpcstr_push((*uni_array+j), line, sizeof(uint16)*strlen(line)+2, 0)/ sizeof(uint16));
i++;
}
@@ -4231,8 +4218,6 @@ static BOOL add_printer_hook(NT_PRINTER_INFO_LEVEL *printer)
printer->info_2->portname, printer->info_2->drivername,
printer->info_2->location, driverlocation);
- /* Convert script args to unix-codepage */
- dos_to_unix(command, True);
DEBUG(10,("Running [%s]\n", command));
ret = smbrun(command, &fd);
DEBUGADD(10,("returned [%d]\n", ret));
@@ -4245,7 +4230,7 @@ static BOOL add_printer_hook(NT_PRINTER_INFO_LEVEL *printer)
numlines = 0;
/* Get lines and convert them back to dos-codepage */
- qlines = fd_lines_load(fd, &numlines, True);
+ qlines = fd_lines_load(fd, &numlines);
DEBUGADD(10,("Lines returned = [%d]\n", numlines));
close(fd);
@@ -5507,7 +5492,7 @@ static uint32 enumports_level_1(NEW_BUFFER *buffer, uint32 offered, uint32 *need
}
numlines = 0;
- qlines = fd_lines_load(fd, &numlines,True);
+ qlines = fd_lines_load(fd, &numlines);
DEBUGADD(10,("Lines returned = [%d]\n", numlines));
close(fd);
@@ -5605,7 +5590,7 @@ static uint32 enumports_level_2(NEW_BUFFER *buffer, uint32 offered, uint32 *need
}
numlines = 0;
- qlines = fd_lines_load(fd, &numlines,True);
+ qlines = fd_lines_load(fd, &numlines);
DEBUGADD(10,("Lines returned = [%d]\n", numlines));
close(fd);
@@ -6061,7 +6046,7 @@ uint32 _spoolss_enumprinterdata(pipes_struct *p, SPOOL_Q_ENUMPRINTERDATA *q_u, S
return ERROR_NOT_ENOUGH_MEMORY;
}
- *out_value_len = (uint32)dos_PutUniCode((char *)*out_value, value, in_value_len, True);
+ *out_value_len = rpcstr_push((char *)*out_value,value, in_value_len, 0);
*out_type=type;
diff --git a/source3/rpc_server/srv_srvsvc_nt.c b/source3/rpc_server/srv_srvsvc_nt.c
index b487eb1c82..78d9429b43 100644
--- a/source3/rpc_server/srv_srvsvc_nt.c
+++ b/source3/rpc_server/srv_srvsvc_nt.c
@@ -1229,9 +1229,7 @@ static char *valid_share_pathname(char *dos_pathname)
if (getcwd(saved_pathname, sizeof(saved_pathname)) == NULL)
return False;
- /* Convert to UNIX charset. */
pstrcpy(unix_pathname, ptr);
- dos_to_unix(unix_pathname, True);
ret = chdir(unix_pathname);
@@ -1338,7 +1336,6 @@ uint32 _srv_net_share_set_info(pipes_struct *p, SRV_Q_NET_SHARE_SET_INFO *q_u, S
slprintf(command, sizeof(command)-1, "%s \"%s\" \"%s\" \"%s\" \"%s\"",
lp_change_share_cmd(), CONFIGFILE, share_name, ptr, comment);
- dos_to_unix(command, True); /* Convert to unix-codepage */
DEBUG(10,("_srv_net_share_set_info: Running [%s]\n", command ));
if ((ret = smbrun(command, NULL)) != 0) {
@@ -1455,7 +1452,6 @@ uint32 _srv_net_share_add(pipes_struct *p, SRV_Q_NET_SHARE_ADD *q_u, SRV_R_NET_S
slprintf(command, sizeof(command)-1, "%s \"%s\" \"%s\" \"%s\" \"%s\"",
lp_add_share_cmd(), CONFIGFILE, share_name, ptr, comment);
- dos_to_unix(command, True); /* Convert to unix-codepage */
DEBUG(10,("_srv_net_share_add: Running [%s]\n", command ));
if ((ret = smbrun(command, NULL)) != 0) {
@@ -1522,7 +1518,6 @@ uint32 _srv_net_share_del(pipes_struct *p, SRV_Q_NET_SHARE_DEL *q_u, SRV_R_NET_S
slprintf(command, sizeof(command)-1, "%s \"%s\" \"%s\"",
lp_delete_share_cmd(), CONFIGFILE, lp_servicename(snum));
- dos_to_unix(command, True); /* Convert to unix-codepage */
DEBUG(10,("_srv_net_share_del: Running [%s]\n", command ));
if ((ret = smbrun(command, NULL)) != 0) {
diff --git a/source3/rpc_server/srv_wkssvc_nt.c b/source3/rpc_server/srv_wkssvc_nt.c
index 40771d2fb9..47566bbf3e 100644
--- a/source3/rpc_server/srv_wkssvc_nt.c
+++ b/source3/rpc_server/srv_wkssvc_nt.c
@@ -50,7 +50,7 @@ static void create_wks_info_100(WKS_INFO_100 *inf)
0x000001f4, /* platform id info */
lp_major_announce_version(),
lp_minor_announce_version(),
- my_name, unix_to_dos(domain,False));
+ my_name, domain);
}
/*******************************************************************