diff options
-rw-r--r-- | mount.cifs.c | 3 |
1 files changed, 2 insertions, 1 deletions
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 */ |