summaryrefslogtreecommitdiff
path: root/source3/client
diff options
context:
space:
mode:
authorAndreas Schneider <anschneider@suse.de>2007-12-06 12:29:52 +0100
committerVolker Lendecke <vl@sernet.de>2007-12-06 12:40:55 +0100
commita5c0558e4711a48ce0397d739328e6ddd4d28d43 (patch)
treed3ad8042e50a42a1bc94b3da6d8b26bbc397618c /source3/client
parentef42d66cd085d84d169618a9d58006df2680f3ec (diff)
downloadsamba-a5c0558e4711a48ce0397d739328e6ddd4d28d43.tar.gz
samba-a5c0558e4711a48ce0397d739328e6ddd4d28d43.tar.bz2
samba-a5c0558e4711a48ce0397d739328e6ddd4d28d43.zip
Remove trailing slashes from service name
(This used to be commit a9b686bfdcf993d5423875543f154607836ac143)
Diffstat (limited to 'source3/client')
-rw-r--r--source3/client/client.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source3/client/client.c b/source3/client/client.c
index a65906c21a..ed33d42081 100644
--- a/source3/client/client.c
+++ b/source3/client/client.c
@@ -3937,6 +3937,7 @@ static int do_message_op(void)
int main(int argc,char *argv[])
{
pstring base_directory;
+ int len = 0;
int opt;
pstring query_host;
bool message = False;
@@ -4149,6 +4150,12 @@ static int do_message_op(void)
poptPrintUsage(pc, stderr, 0);
exit(1);
}
+ /* Remove trailing slashes */
+ len = strlen(service);
+ while(len > 0 && service[len - 1] == '\\') {
+ --len;
+ service[len] = '\0';
+ }
}
if ( strlen(new_workgroup) != 0 )