[PATCH] [REPOST] mount.cifs: Allow passwords of length upto 127 bytes

Suresh Jayaraman sjayaraman at suse.de
Thu Jul 3 09:34:38 GMT 2008


Steve,

I posted this patch sometime in Feb08
http://lists.samba.org/archive/samba-technical/2008-February/058102.html
and I guess it got an Ack but somehow didn't get merged.
So, reposting - any objections?

The Windows versions above Windows 98 (Windows 2000, XP and above 
including Samba), support passwords up to 127 characters. NTLM passwords
are limited _only_ in GUI, because the dialog box limits it to 14
characters. So it makes sense for mount.cifs to allow passwords up to
127 characters.

---
 source/client/mount.cifs.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/source/client/mount.cifs.c b/source/client/mount.cifs.c
index c24c22e..0d24a44 100644
--- a/source/client/mount.cifs.c
+++ b/source/client/mount.cifs.c
@@ -463,7 +463,7 @@ static int parse_options(char ** optionsp, int * filesys_flags)
 					printf("\npassword specified twice, ignoring second\n");
 				} else
 					got_password = 1;
-			} else if (strnlen(value, 17) < 17) {
+			} else if (strnlen(value, 128) < 128) {
 				if(got_password)
 					printf("\nmount.cifs warning - password specified twice\n");
 				got_password = 1;





More information about the samba-technical mailing list