summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2008-05-01 08:48:52 -0700
committerJeremy Allison <jra@samba.org>2008-05-01 08:48:52 -0700
commit3cfd1f2be74cedfd70569ae004b57ef1f877fb1a (patch)
treed1bc1b427fa9a1e60a69bf1186d9247da7121a1c
parente9accc2ad6a9ece83f66cc5d6d78a233a2a2c99c (diff)
downloadsamba-3cfd1f2be74cedfd70569ae004b57ef1f877fb1a.tar.gz
samba-3cfd1f2be74cedfd70569ae004b57ef1f877fb1a.tar.bz2
samba-3cfd1f2be74cedfd70569ae004b57ef1f877fb1a.zip
Tidyup to ensure '\n' is treated identically in all
cases. Jeremy. (This used to be commit 818fbc9889af8c9fb6e7978e8ed2269a78f14404)
-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 d1b735525e..c42375b574 100644
--- a/source3/client/mount.cifs.c
+++ b/source3/client/mount.cifs.c
@@ -213,6 +213,7 @@ static int open_cred_file(char * file_name)
for(length = 0;length<4087;length++) {
if ((temp_val[length] == '\n')
|| (temp_val[length] == '\0')) {
+ temp_val[length] = '\0';
break;
}
}
@@ -332,6 +333,7 @@ static int get_password_from_file(int file_descript, char * filename)
break;
} else /* read valid character */ {
if((c == 0) || (c == '\n')) {
+ mountpassword[i] = '\0';
break;
} else
mountpassword[i] = c;