summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2007-06-21 17:05:59 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:23:30 -0500
commit6c7a17b82002aa829b0bb238b325fe222a076572 (patch)
treeef6ba969dd7526b828f83ca7f21e1c4cd34d90ec /source3
parent851224a92463f5a556864a2a7ed648a8019e84e8 (diff)
downloadsamba-6c7a17b82002aa829b0bb238b325fe222a076572.tar.gz
samba-6c7a17b82002aa829b0bb238b325fe222a076572.tar.bz2
samba-6c7a17b82002aa829b0bb238b325fe222a076572.zip
r23571: Fix, parsing of multi byte share names.
Thanks to SATOH Fumiyasu Fixes 4720 Jerry, this is a showstopper for 3.0.25b, please grab it into SAMBA_3_0_RELEASE before cuting the tarballs. Simo. (This used to be commit d2846e6b90e8774a729e6cf3a0c809aa8ff4a93a)
Diffstat (limited to 'source3')
-rw-r--r--source3/client/client.c26
1 files changed, 10 insertions, 16 deletions
diff --git a/source3/client/client.c b/source3/client/client.c
index 35716ab13c..721fa83156 100644
--- a/source3/client/client.c
+++ b/source3/client/client.c
@@ -3970,14 +3970,6 @@ static int do_message_op(void)
/* if the service has not yet been specified lets see if it is available in the popt stack */
if (!service_opt && poptPeekArg(pc)) {
pstrcpy(service, poptGetArg(pc));
- /* Convert any '/' characters in the service name to '\' characters */
- string_replace(service, '/','\\');
-
- if (count_chars(service,'\\') < 3) {
- d_printf("\n%s: Not enough '\\' characters in service\n",service);
- poptPrintUsage(pc, stderr, 0);
- exit(1);
- }
service_opt = True;
}
@@ -4065,14 +4057,6 @@ static int do_message_op(void)
/* if the service has not yet been specified lets see if it is available in the popt stack */
if (!service_opt && poptPeekArg(pc)) {
pstrcpy(service, poptGetArg(pc));
- /* Convert any '/' characters in the service name to '\' characters */
- string_replace(service, '/','\\');
-
- if (count_chars(service,'\\') < 3) {
- d_printf("\n%s: Not enough '\\' characters in service\n",service);
- poptPrintUsage(pc, stderr, 0);
- exit(1);
- }
service_opt = True;
}
@@ -4111,6 +4095,16 @@ static int do_message_op(void)
}
load_interfaces();
+
+ if (service_opt) {
+ /* Convert any '/' characters in the service name to '\' characters */
+ string_replace(service, '/','\\');
+ if (count_chars(service,'\\') < 3) {
+ d_printf("\n%s: Not enough '\\' characters in service\n",service);
+ poptPrintUsage(pc, stderr, 0);
+ exit(1);
+ }
+ }
if ( strlen(new_workgroup) != 0 )
set_global_myworkgroup( new_workgroup );