[linux-cifs-client] [RFC/PATCH 1/2]: mount.cifs: Allows passwords of length upto 127 bytes

Steven French sfrench at us.ibm.com
Wed Jan 23 22:26:00 GMT 2008


I have mixed feelings about giving any information on the password length, 
but I agree that mount.cifs should not restrict it.


Steve French
Senior Software Engineer
Linux Technology Center - IBM Austin
phone: 512-838-2294
email: sfrench at-sign us dot ibm dot com



Suresh Jayaraman <sjayaraman at suse.de> 
Sent by: linux-cifs-client-bounces+sfrench=us.ibm.com at lists.samba.org
01/23/2008 08:42 AM

To
Steve French <smfrench at gmail.com>
cc
linux-cifs-client at lists.samba.org
Subject
[linux-cifs-client] [RFC/PATCH 1/2]: mount.cifs: Allows passwords of 
length upto 127 bytes






The current mount.cifs code restricts the maximum password length to 16
bytes. This limit seems to have been introduced due to LanMan and NTLM 
hashing.

However, the Windows versions above Windows 98 (Windows 2000, XP and
above including Samba), supports 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. In case of sec=lanman, if the password is greater than
16 bytes, we let the user know that the password is too long by a kernel
message(PATCH 2/2) which gets logged in to /var/log/messages.

The following patch allows passwords of length greater than 16 bytes.

Signed-off-by: Suresh Jayaraman <sjayaraman at suse.de>
---

Index: cifs-utils/mount.cifs.c
===================================================================
--- cifs-utils.orig/mount.cifs.c
+++ cifs-utils/mount.cifs.c
@@ -338,7 +338,7 @@ static int parse_options(char * options,
  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;

_______________________________________________
linux-cifs-client mailing list
linux-cifs-client at lists.samba.org
https://lists.samba.org/mailman/listinfo/linux-cifs-client




More information about the linux-cifs-client mailing list