1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-03 04:22:09 +03:00

Fix for @ in pathname from Kian Win.

Jeremy.
This commit is contained in:
Jeremy Allison
-
parent cf99f93613
commit 070fd5180f

View File

@ -92,6 +92,7 @@ smbc_parse_path(const char *fname, char *server, char *share, char *path,
static pstring s; static pstring s;
pstring userinfo; pstring userinfo;
char *p; char *p;
char *q, *r;
int len; int len;
server[0] = share[0] = path[0] = user[0] = password[0] = (char)0; 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 ... * 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; pstring username, passwd, domain;
char *u = userinfo; char *u = userinfo;