Bug 304261 - autofs fails to mount cifs share
Summary: autofs fails to mount cifs share
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: autofs
Version: 9
Hardware: i386
OS: Linux
low
medium
Target Milestone: ---
Assignee: Ian Kent
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: bzcl34nup
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-09-24 23:54 UTC by Manfred Kostopulos
Modified: 2009-01-09 09:01 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2009-01-09 07:16:39 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
debug output from autofs + automount maps from /etc (20.00 KB, application/x-tar)
2007-09-25 12:27 UTC, Manfred Kostopulos
no flags Details

Description Manfred Kostopulos 2007-09-24 23:54:59 UTC
Description of problem:
Mounting of cifs shares via autofs fails if the name of the server from which
the mount is coming begins with a lowercase character, if the names begins with
a uppercase letter or is an IP-address the mount works ok.
It seems that if the first char is a lowercase letter, a '/' gets somehow
removed from the /sbin/mount.cifs call and the mount.cifs fails with
'mount error: improperly formatted' (see strace).
Downgrading to the F7 rpm (autofs-5.0.1-27) didn't resolve to issue, so maybe
another part (maybe the autofs4 kernel module?) is involved too.
A Fedora 7 system with the same autofs configuration is working like expected.

Version-Release number of selected component (if applicable):
autofs-5.0.2-15
kernel-2.6.23-0.195.rc7.git3.fc8

How reproducible:
Always

Steps to Reproduce:
1. Create a auto.misc file in /etc with the following example content:

E -fstype=cifs,username=xxx,password=xxx ://server/E

2. restart autofs and try to automount /server/E 
   then change the 'server' to 'Server' with uppercase first letter and repeat.

3. try to mount share in both cases
  
Actual results:
cannot access /server/E: No such file or directory if the servername is lowercase
All is fine when the first letter is uppercase

Expected results:
cifs file system should be mounted by autofs even if servername is all lowercase

Additional info:

strace extract with lowercase server-name:
[pid 32335] execve("/sbin/mount.cifs", ["/sbin/mount.cifs"..., "/muttsu/E"...,
"/muttsu/E"..., "-o"..., "rw,iocharset=utf8,uid=501,gid=10"...], [/* 21 vars
*/]) = 0
....
....
pid 32335] write(1, "mount error: improperly formatte"..., 130) = 130
[pid 32329] <... read resumed> "mount error: improperly formatte"..., 2047) = 130
mount fails

strace extract with first-char uppercase server-name:
[pid 32479] execve("/sbin/mount.cifs", ["/sbin/mount.cifs"..., "//Muttsu/E"...,
"/muttsu/E"..., "-o"..., "rw,iocharset=utf8,uid=501,gid=10"...], [/* 21 vars
*/]) = 0
...
...
the mount works

As you can see there is a '/' missing in the first strace in the call of mount.cifs.

Maybe I'm wrong how the UNC has to be formatted for autofs with cifs, but I'm
still think it is strange how the first slash gets removed in some cases.

Comment 1 Ian Kent 2007-09-25 10:28:58 UTC
I'm having trouble following your description above.

What is the corresponding master map entry?
What is the command line used to request the mount?
Is the file /etc/auto.misc executable?

Please include a debug log of this happening.
Information on doing this can be found at
http://people.redhat.com/jmoyer.

Ian


Comment 2 Manfred Kostopulos 2007-09-25 12:27:06 UTC
Created attachment 205421 [details]
debug output from autofs + automount maps from /etc

Comment 3 Manfred Kostopulos 2007-09-25 12:37:38 UTC
Comment on attachment 205421 [details]
debug output from autofs + automount maps from /etc

It turned out that the mount works ok (I thought it didn't work in the first
bugreport, maybe I didn't restart autofs properly, sorry my bad) if it is in
the 'auto.misc' file, but not if it's a different file named for example
'auto.muttsu'
I've now created a master map with 2 entries named auto.misc and auto.muttsu.
If I call "ls /misc/E" the mount works and the content is listed. 
If I call "ls /muttsu/E" the ls command fails with "No such file or directory".
When I now change the "//muttsu/E" to "//Muttsu/E" in the /etc/auto.muttsu file
and restart autofs the "ls /muttsu/E" works and the content is listed.
I have now enabled debugging and included the /var/log/debug output and all
relevant automount files from /etc in a tar file as a attachment (user,password
from credentials file replaced).

Comment 4 Bug Zapper 2008-04-04 13:54:18 UTC
Based on the date this bug was created, it appears to have been reported
during the development of Fedora 8. In order to refocus our efforts as
a project we are changing the version of this bug to '8'.

If this bug still exists in rawhide, please change the version back to
rawhide.
(If you're unable to change the bug's version, add a comment to the bug
and someone will change it for you.)

Thanks for your help and we apologize for the interruption.

The process we're following is outlined here:
http://fedoraproject.org/wiki/BugZappers/F9CleanUp

We will be following the process here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping to ensure this
doesn't happen again.

Comment 5 Bug Zapper 2008-11-26 07:50:56 UTC
This message is a reminder that Fedora 8 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 8.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '8'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 8's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 8 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 6 Bug Zapper 2009-01-09 07:16:39 UTC
Fedora 8 changed to end-of-life (EOL) status on 2009-01-07. Fedora 8 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.


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