Bug 4300 - "password too long" if using password variable.
Summary: "password too long" if using password variable.
Alias: None
Product: CifsVFS
Classification: Unclassified
Component: kernel fs (show other bugs)
Version: 2.6
Hardware: x86 Linux
: P3 normal
Target Milestone: ---
Assignee: Steve French
QA Contact:
: 5360 (view as bug list)
Depends on:
Reported: 2006-12-18 04:25 UTC by James Jarvis
Modified: 2009-05-14 15:14 UTC (History)
1 user (show)

See Also:

Patch to allow up to 127 byte passwords (1.24 KB, patch)
2009-05-14 15:11 UTC, Steve French
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description James Jarvis 2006-12-18 04:25:09 UTC
Kernel = 2.6.17-1.2187_FC5
Applies to passwords >~16 characters
Mount works if password is entered at password prompt. 
Mount fails if same password is passed on the command line as password=${PASSWORD} shell variable.
Password matches regexp /[A-Za-z0-9]/ so not unusual just long.

From my naive coding I think the line in mount.cifs.c ...
} else if (strnlen(value, 17) < 17) {

is where the error arises. I note higher up in the mount.cifs.c code the password is allowed to be up to 64 characters.
Comment 1 Jérôme Poulin 2008-03-31 11:43:56 UTC
See Bug 5360 now.
Comment 2 Steve French 2009-05-14 15:11:40 UTC
Created attachment 4159 [details]
Patch to allow up to 127 byte passwords
Comment 3 Steve French 2009-05-14 15:13:07 UTC
Fix checked into Samba
Comment 4 Steve French 2009-05-14 15:14:22 UTC
*** Bug 5360 has been marked as a duplicate of this bug. ***