summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorDerrell Lipman <derrell@samba.org>2006-06-27 03:07:02 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:19:00 -0500
commit9220a7bb7ba0468113deae3c033504ab4ff31eb2 (patch)
tree029b3732b5832fa662097f5bfb95b92203721d03 /source3/libsmb
parent9718506d35ca14c5233b613c647609bf2589f38b (diff)
downloadsamba-9220a7bb7ba0468113deae3c033504ab4ff31eb2.tar.gz
samba-9220a7bb7ba0468113deae3c033504ab4ff31eb2.tar.bz2
samba-9220a7bb7ba0468113deae3c033504ab4ff31eb2.zip
r16552: Fix bug 3849.
Added a next_token_no_ltrim() function which does not strip leading separator characters. The new function is used only where really necessary, even though it could reasonably be used in many more places, to avoid superfluous code changes. Derrell (This used to be commit d90061aa933f7d8c81973918657dd72cbc88bab5)
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/libsmbclient.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source3/libsmb/libsmbclient.c b/source3/libsmb/libsmbclient.c
index 7f41103e4f..240be50879 100644
--- a/source3/libsmb/libsmbclient.c
+++ b/source3/libsmb/libsmbclient.c
@@ -359,19 +359,19 @@ smbc_parse_path(SMBCCTX *context,
pstring username, passwd, domain;
const char *u = userinfo;
- next_token(&p, userinfo, "@", sizeof(fstring));
+ next_token_no_ltrim(&p, userinfo, "@", sizeof(fstring));
username[0] = passwd[0] = domain[0] = 0;
if (strchr_m(u, ';')) {
- next_token(&u, domain, ";", sizeof(fstring));
+ next_token_no_ltrim(&u, domain, ";", sizeof(fstring));
}
if (strchr_m(u, ':')) {
- next_token(&u, username, ":", sizeof(fstring));
+ next_token_no_ltrim(&u, username, ":", sizeof(fstring));
pstrcpy(passwd, u);