From b046d4196855294d57bf57a5b31fbfab41125d4b Mon Sep 17 00:00:00 2001 From: Jeff Layton Date: Wed, 28 Apr 2010 07:13:17 -0400 Subject: mount.cifs: fix parsing of password in parse_username Signed-off-by: Jeff Layton --- mount.cifs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mount.cifs.c b/mount.cifs.c index 3e30219..1040e8b 100644 --- a/mount.cifs.c +++ b/mount.cifs.c @@ -308,9 +308,10 @@ static int parse_username(char *rawuser, struct parsed_mount_info *parsed_info) /* everything after first % sign is a password */ password = strchr(rawuser, '%'); if (password) { - rc = set_password(parsed_info, password); + rc = set_password(parsed_info, password + 1); if (rc) return rc; + *password = '\0'; } /* everything after first '/' or '\' is a username */ -- cgit v1.2.3