Bug 219512 - umount.cifs fails to adjust mtab when using relative pathnames
Summary: umount.cifs fails to adjust mtab when using relative pathnames
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: samba
Version: rawhide
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Jeff Layton
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-12-13 17:22 UTC by Need Real Name
Modified: 2014-06-18 07:35 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-02-05 19:22:49 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Samba Project 4370 0 None None None Never

Description Need Real Name 2006-12-13 17:22:40 UTC
Description of problem:

When giving umount.cifs a relative (rather than full) path name, the filesystem
is unmounted and properly reflected in /proc/mounts but the mtab is not,
resulting in 'stale' entries in mtab. umount works fine.

Case 1:
   mount.cifs remote /path_to/mount_point
   umount.cifs -v /path_to/mount_point

   SUCCESS: unmounted and removed from both /proc/mounts and mtab
       ioctl returned 0 with errno 0 Success
       umount2 succeeded
       attempting to remove from mtab
       1 matching entries in mount table
       entry not copied (ie entry is removed)
       done updating tmp file

Case 2:
   mount.cifs remote /path_to/mount_point
   cd mount_point; cd ..
   umount -v mount_point

   SUCCESS: unmounted and removed from both /proc/mounts and mtab
        optind 2 unmount dir /home/kosowsky/tempcrap/crap12
        umount2 succeeded
        attempting to remove from mtab
        1 matching entries in mount table
        entry not copied (ie entry is removed)
        done updating tmp file

Case 3:
   mount.cifs remote /path_to/mount_point
   cd mount_point; cd ..
   umount.cifs -v mount_point

   FAILURE: unmounted and removed from both /proc/mounts and mtab
        optind 2 unmount dir crap12
        umount2 succeeded
        attempting to remove from mtab
        0 matching entries in mount table
        done updating tmp file

Subsequently running ANY of the following:
   umount.cifs mount_point
   umount.cifs /path-to/mount_point
   umount mount_point
   umount /path-to/mount_point
Gives the following error message (repeated twice if using 'umount')
    This utility only unmounts cifs filesystems.

Comment 1 Need Real Name 2006-12-13 17:25:47 UTC
If you look at the verbose output, it seems apparent that the problem is that
while umount expands the relative path to the full path (and presumably passes
that on to umount.cifs). umount.cifs does not.

So presumably umount.cifs needs to be fixed to first expand to a full pathname.

Comment 6 Need Real Name 2006-12-24 09:13:09 UTC
IS ANYBODY TRACKING & RESPONDING TO THESE BUGS???

Comment 7 Jose Plans 2006-12-24 10:49:17 UTC
Hello,
  
  The bug report you provided is correct and reflect this mtab problem where
umount.cifs cannot update it if the path sent is relative, we are investigating
in the best way to cover this and we will post a fix that will match upstream as
soon as possible. 
  
  Jose

Comment 8 Jose Plans 2006-12-24 10:50:46 UTC
As a workaround (until we get this fixed according to upstream) you can always
hand edit /etc/mtab and remove the cifs mount line. This is safe as the kernel
already removed the hook from /proc/mounts.

Comment 9 Need Real Name 2006-12-24 23:29:05 UTC
Alternative workarounds include:
1. Not using relative paths :) [this is the easiest, as long as I remember]
2. Using a shell wrapper that converts relative to absolute paths...

Comment 10 Jose Plans 2006-12-28 11:09:09 UTC
Or cleaner, if you won't use umount.cifs on setuid to allow users to unmount the
CIFS filesystem, then you could just do :
     
      % umount -i mount_point

This will tell umount not to use the external umount utility.


Comment 11 Need Real Name 2007-03-28 00:15:31 UTC
Is this fixed upstream yet?

Comment 12 Need Real Name 2007-04-11 17:10:30 UTC
Any ETA on a fix?

Comment 13 Need Real Name 2007-11-18 02:34:07 UTC
This still seems to be broken in F8 -- two releases and almost a year after
first reporting the bug.

IS ANYBODY PLANNING ON FIXING THIS??????

Comment 14 Simo Sorce 2007-11-22 00:42:39 UTC
I am but honestly this is a low priority bug as there are simple workarounds.

Btw looking at the release notes I see that a fix for something similar went in
in 3.0.27a which I am about to release for Fedora. Not sure it covers this case tho.

Comment 15 Bug Zapper 2008-11-26 07:07:20 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 16 Bug Zapper 2009-01-09 07:02:19 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.

Comment 17 Jeff Layton 2009-02-05 19:22:49 UTC
Patch for this has now been committed to upstream samba test branches and should make its way into fedora in the near future. Closing with a resolution of UPSTREAM.


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