summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-10-22 02:50:20 +0000
committerJeremy Allison <jra@samba.org>2001-10-22 02:50:20 +0000
commit18ffa22657b694857cc948949e567a514bc68d65 (patch)
tree55fd25158a7a70d388212ccf6bdbb4ce975ad8cf /source3
parent61adb3396d4ab1a26764d76387976894524e6a76 (diff)
downloadsamba-18ffa22657b694857cc948949e567a514bc68d65.tar.gz
samba-18ffa22657b694857cc948949e567a514bc68d65.tar.bz2
samba-18ffa22657b694857cc948949e567a514bc68d65.zip
Fix for @ in pathname from Kian Win.
Jeremy. (This used to be commit 070fd5180fef921efb363ff24f04a298254f108b)
Diffstat (limited to 'source3')
-rw-r--r--source3/libsmb/libsmbclient.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source3/libsmb/libsmbclient.c b/source3/libsmb/libsmbclient.c
index 9dca4637f4..6a00855bff 100644
--- a/source3/libsmb/libsmbclient.c
+++ b/source3/libsmb/libsmbclient.c
@@ -92,6 +92,7 @@ smbc_parse_path(const char *fname, char *server, char *share, char *path,
static pstring s;
pstring userinfo;
char *p;
+ char *q, *r;
int len;
server[0] = share[0] = path[0] = user[0] = password[0] = (char)0;
@@ -133,7 +134,10 @@ smbc_parse_path(const char *fname, char *server, char *share, char *path,
* exists ...
*/
- if (strchr_m(p, '@')) {
+ /* check that '@' occurs before '/', if '/' exists at all */
+ q = strchr_m(p, '@');
+ r = strchr_m(p, '/');
+ if (q && (!r || q < r)) {
pstring username, passwd, domain;
char *u = userinfo;