Bug 249909 - Need to strip : for mount.cifs support.
Need to strip : for mount.cifs support.
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: autofs (Show other bugs)
4.5
All Linux
low Severity low
: rc
: ---
Assigned To: Jeffrey Moyer
Brock Organ
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-07-27 16:15 EDT by Ray Van Dolson
Modified: 2010-05-18 09:57 EDT (History)
3 users (show)

See Also:
Fixed In Version: RHBA-2008-0702
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-07-24 15:51:25 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Strips out un-wanted colon (528 bytes, patch)
2007-07-27 16:16 EDT, Ray Van Dolson
no flags Details | Diff
Modified spec file to use cifs patch. (33.69 KB, text/plain)
2007-07-27 16:17 EDT, Ray Van Dolson
no flags Details
auto.cifs (1.44 KB, text/plain)
2007-09-24 13:30 EDT, Ray Van Dolson
no flags Details

  None (edit)
Description Ray Van Dolson 2007-07-27 16:15:38 EDT
Description of problem:
Using a fstype of cifs fails with the automounter.

Version-Release number of selected component (if applicable):
autofs-4.1.3-199.3

How reproducible:
Always

Steps to Reproduce:
1. Either set up a custom auto.cifs file or set up an entry in auto.misc using
the cifs file type (instead of smbfs).
2. Attempt to mount.
  
Actual results:
Mounts fail.

Expected results:
Mounts should succeed.

Additional info:
This is the result of the ':' being left in the command passed to mount.cifs. 
There is a patch already being applied to resolve this for smbfs, and it is
trivial to resolve for cifs.  I will attach a patch.

cifs has proven to be much more reliable than smbfs which is why I am using it.
Comment 1 Ray Van Dolson 2007-07-27 16:16:49 EDT
Created attachment 160134 [details]
Strips out un-wanted colon
Comment 2 Ray Van Dolson 2007-07-27 16:17:49 EDT
Created attachment 160135 [details]
Modified spec file to use cifs patch.

spec file I used to include the cifs patch.
Comment 3 Jeffrey Moyer 2007-08-24 14:18:39 EDT
I'll take a look at this.  Thanks for the patch!
Comment 5 Jeffrey Moyer 2007-09-21 17:29:27 EDT
Ray,

Would you mind including the map entry that you used to test this patch?  There
are at least 2 ways that a share can be specified, and I want to make sure that
the case you use is covered.
Comment 6 Ray Van Dolson 2007-09-24 13:29:05 EDT
Jeff, some interesting results.  It had been a couple months since I originally
filed this so I'd forgotten a bunch of the details.  Here are results using an
entry in auto.misc:

cifs -fstype=cifs,username=rayXXXX,password=XXXXXX,domain=esri.com
://LEORAY-XP/Files

This entry appears to work fine via /misc/cifs even with stock version -199.3.

Where I run into problems is using an auto.cifs script which generates map
entries like this:

-fstype=cifs,file_mode=0644,dir_mode=0755,uid=root,gid=root,domain=esri.com,credentials=/etc/auto.cifs.credentials
\
         /Files ://LEORAY-XP/Files

This only works when using my patched version -199.4 which strips the : out.  I
will attach my auto.cifs file.  With -199.3, an strace of mount.cifs's output
tells me:

execve("/sbin/mount.cifs.real", ["/sbin/mount.cifs.real", "://LEORAY-XP/Files",
"/cifs/LEORAY-XP/Files", "-o",
"rw,file_mode=0644,dir_mode=0755,uid=0,gid=0,domain=esri.com,credentials=/etc/auto.cifs.credentials"],
[/* 24 vars */]) = 0
...
...
write(1, "mount error: could not find target server. TCP name ///LEORAY-XP/Files
not found  rc = 134526947\nNo ip address specified and hostname not found\n",
144) = 144

I will also note something else interesting and probably unrelated.  It does not
appear that "mount.cifs" makes use of the "domain" parameter inside a
credentials file.  However, smbclient does make use of "domain".  So I have to
provide it on the command line for mount.cifs.

Let me know if you need any additional information.
Comment 7 Ray Van Dolson 2007-09-24 13:30:49 EDT
Created attachment 204321 [details]
auto.cifs
Comment 8 Ray Van Dolson 2007-09-24 13:32:28 EDT
Word wrapping looks funky above. The maps should all be on one line except the
auto.cifs generated one which is line broken where the \ is.
Comment 9 Jeffrey Moyer 2007-09-24 13:36:15 EDT
This is really helpful information, thank you!  I'll see what I can work out.
Comment 10 RHEL Product and Program Management 2007-11-28 23:17:07 EST
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.
Comment 11 Jeffrey Moyer 2008-01-02 14:33:20 EST
A fix for this issue was built into autofs version 4.1.3-131.1.
Comment 12 Ray Van Dolson 2008-01-02 18:49:35 EST
Do you mean 4.1.3-231.1?
Comment 13 Jeffrey Moyer 2008-01-03 09:09:04 EST
(In reply to comment #12)
> Do you mean 4.1.3-231.1?

Yes!  Sorry about that!
Comment 14 Gregory Lee Bartholomew 2008-01-23 19:57:36 EST
I'm having this exact problem (mount string works with file: but not with
program:), but my autofs version is newer than the supposedly patched 4.1.3-231.1.

[root@home etc]# rpm -q autofs
autofs-5.0.1-31.x86_64
[root@home etc]# uname -a
Linux home.cs.siue.edu 2.6.23.8-34.fc7 #1 SMP Thu Nov 22 20:39:56 EST 2007
x86_64 x86_64 x86_64 GNU/Linux
[root@home etc]# tail -n 1 /var/log/messages
Jan 23 18:44:39 home automount[7567]: parse_mount: parse(sun): failed to expand
map entry
[root@home etc]# cat /etc/auto.homes
#! /bin/bash

echo "-fstype=cifs,dom=campus.siue.edu,credentials=/home/gbartho/credentials.txt
://ebserver-11.ac.siue.edu/2\$"

exit 0
[root@home etc]# date
Wed Jan 23 18:51:27 CST 2008
[root@home etc]# 
Comment 15 Jeffrey Moyer 2008-01-24 09:17:49 EST
(In reply to comment #14)
> I'm having this exact problem (mount string works with file: but not with
> program:), but my autofs version is newer than the supposedly patched 4.1.3-231.1.
> 
> [root@home etc]# rpm -q autofs
> autofs-5.0.1-31.x86_64

Are you running RHEL 4?  It certainly doesn't appear so.  You'll want to create
a new bug and file it against whichever distribution you are running (FC7?).
Comment 16 Gregory Lee Bartholomew 2008-01-24 11:01:53 EST
Sorry, I thought hats and fedoras were made by the same people. I'll try to find
fedora's bugzilla.
Comment 17 Jeffrey Moyer 2008-01-24 11:10:27 EST
(In reply to comment #16)
> Sorry, I thought hats and fedoras were made by the same people. I'll try to find
> fedora's bugzilla.

Oh, it's the same bugzilla, just a different "Product" tag.  So, you can still
go to http://bugzilla.redhat.com/, but instead of selecting "Red Hat Enterprise
Linux" on the "Enter a new bug" page, you would select Fedora.  Here, try this
link out:

  http://tinyurl.com/23tbw6

Just fill in the summary and problem description and click submit.

Cheers,

Jeff
Comment 18 Jeffrey Moyer 2008-01-24 11:37:56 EST
(In reply to comment #16)
> Sorry, I thought hats and fedoras were made by the same people. I'll try to find
> fedora's bugzilla.

I went ahead and filed that bug for you:  bug #430113.

Cheers,

Jeff
Comment 21 Barry Donahue 2008-06-12 10:26:43 EDT
Verified by RHTS job #23575
Comment 22 Jeffrey Moyer 2008-06-17 15:59:47 EDT
I updated the test case to cover more cifs URLs and it fails.  The problem is
that we overwrite the colon used to denote the server port with a slash.  This
needs fixing.
Comment 24 Jeffrey Moyer 2008-06-24 09:53:03 EDT
The test case fails due to not escaping a colon as part of the CIFS url.  This
is not a bug introduced by this patch set, and should be worked-around using the
no-slashify-colons map option.  I'm setting this back to modified.
Comment 27 Barry Donahue 2008-06-25 15:14:38 EDT
Verified RHTS job #24346
Comment 29 errata-xmlrpc 2008-07-24 15:51:25 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2008-0702.html

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