summaryrefslogtreecommitdiff
path: root/source3/client
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2008-05-01 08:39:16 -0700
committerJeremy Allison <jra@samba.org>2008-05-01 08:39:16 -0700
commite9accc2ad6a9ece83f66cc5d6d78a233a2a2c99c (patch)
tree979f634b518a9f2e2fbeb7af5dc5709169856f83 /source3/client
parente7142ef180d88e5e0daa6b853a04ff9f1ce4d22a (diff)
downloadsamba-e9accc2ad6a9ece83f66cc5d6d78a233a2a2c99c.tar.gz
samba-e9accc2ad6a9ece83f66cc5d6d78a233a2a2c99c.tar.bz2
samba-e9accc2ad6a9ece83f66cc5d6d78a233a2a2c99c.zip
Fix bug #5434 found by Ted Percival <ted@midg3t.net>.
Introduced by me in the strlcpy cleanup. Ensure the loaded password doesn't contain the '\n' at the end. Jeremy. (This used to be commit 41984743d9e89b6568119832c35ee4c0024e43a2)
Diffstat (limited to 'source3/client')
-rw-r--r--source3/client/mount.cifs.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source3/client/mount.cifs.c b/source3/client/mount.cifs.c
index 96ab4a8910..d1b735525e 100644
--- a/source3/client/mount.cifs.c
+++ b/source3/client/mount.cifs.c
@@ -236,6 +236,7 @@ static int open_cred_file(char * file_name)
for(length = 0;length<MOUNT_PASSWD_SIZE+1;length++) {
if ((temp_val[length] == '\n')
|| (temp_val[length] == '\0')) {
+ temp_val[length] = '\0';
break;
}
}
@@ -264,6 +265,7 @@ static int open_cred_file(char * file_name)
for(length = 0;length<DOMAIN_SIZE+1;length++) {
if ((temp_val[length] == '\n')
|| (temp_val[length] == '\0')) {
+ temp_val[length] = '\0';
break;
}
}