Windows allows up to 127 byte passwords, and we using a 64 byte limit
in most places and a 16 byte limit when using the "pass=" mount option
Acked-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
#define SAFE_FREE(x) do { if ((x) != NULL) {free(x); x=NULL;} } while(0)
#endif
#define SAFE_FREE(x) do { if ((x) != NULL) {free(x); x=NULL;} } while(0)
#endif
-#define MOUNT_PASSWD_SIZE 64
+#define MOUNT_PASSWD_SIZE 128
#define DOMAIN_SIZE 64
/* currently maximum length of IPv6 address string */
#define DOMAIN_SIZE 64
/* currently maximum length of IPv6 address string */
printf("\npassword specified twice, ignoring second\n");
} else
got_password = 1;
printf("\npassword specified twice, ignoring second\n");
} else
got_password = 1;
- } else if (strnlen(value, 17) < 17) {
+ } else if (strnlen(value, MOUNT_PASSWD_SIZE) < MOUNT_PASSWD_SIZE) {
if(got_password)
printf("\nmount.cifs warning - password specified twice\n");
got_password = 1;
if(got_password)
printf("\nmount.cifs warning - password specified twice\n");
got_password = 1;