Bug 230533 - mount.cifs can't handle comma in password
Summary: mount.cifs can't handle comma in password
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: samba
Version: 5.0
Hardware: i386
OS: Linux
high
medium
Target Milestone: ---
: ---
Assignee: Simo Sorce
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-03-01 09:49 UTC by Dominik Fischer
Modified: 2007-11-30 22:07 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-03-26 12:21:30 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Dominik Fischer 2007-03-01 09:49:56 UTC
Description of problem:
mount.cifs can't handle comma in password 

Version-Release number of selected component (if applicable):
mount.cifs version: 1.10

How reproducible:
Everytime when using comma in password. 

Steps to Reproduce:
1. Change your Windows-Password (or Samba-Password) to somewhat containing a comma 
2. Try to mount a (Windows-)Share
  
Actual results:
# mount -t cifs //server.example.com/netlogon /mnt
Password: 
mount error 13 = Permission denied
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)

Expected results:
# mount -t cifs //server.example.com/netlogon /mnt
./.

Additional info:
./.

Comment 1 Dominik Fischer 2007-03-01 10:05:46 UTC
Search for "comma" under:
http://samba.osmirror.nl/samba/ftp/cifs-cvs/mount.cifs.c

This gives you the following:
(...)
if(mountpassword) {
	/* BB add handling for commas in password here */				
strncpy(mountpassword,temp_val,length);
	got_password = 1;
}
(...)


Comment 3 Simo Sorce 2007-03-19 21:32:26 UTC
What about using a credentials file instead of putting the password on the mount
command line?
Is there anything preventing you from using a credentials file?
If so what? Maybe that's easy to fix quickly.

(password on command lines are usually bad anyway as they may leak through ps
for example)

Comment 4 Dominik Fischer 2007-03-20 08:46:48 UTC
Since I didn't want the password in the command history I first use the credential
file. After that I tried out passing the password on the command line and last 
I left out the password and entered it after I got prompted for it.
Nothing of that worked with comma in the password.

Does using the credentials file work at your site?


Comment 5 Simo Sorce 2007-03-20 14:30:29 UTC
Work for me on RHEL5.
Command line can;t handle passwords with coma, but the other three mechanisms work:
- credential file
- PASSWD env var
- password prompt

I am inclined to close this bug, can you still reproduce this on RHEL5 GA ?


Comment 6 Dominik Fischer 2007-03-26 08:59:24 UTC
I've verified this in RHEL5 GA: it works like described in the last comment. So
I agree to close this bug for now.



Note You need to log in before you can comment on or make changes to this bug.