Bug 4781 - umount.cifs can't clean up /etc/mtab if trailing slashes used
umount.cifs can't clean up /etc/mtab if trailing slashes used
Status: RESOLVED FIXED
Product: CifsVFS
Classification: Unclassified
Component: user space tools
2.6
All Linux
: P3 normal
: ---
Assigned To: Steve French
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-07-12 01:47 UTC by Steve Langasek
Modified: 2007-11-16 15:33 UTC (History)
2 users (show)

See Also:


Attachments
trim trailing slashes to canonicalize mountpoint names on unmount (559 bytes, patch)
2007-07-12 01:49 UTC, Steve Langasek
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Langasek 2007-07-12 01:47:00 UTC
If umount.cifs is called by a user to unmount a user-mounted filesystem, the /etc/mtab entry will not be cleaned up if the mount point is specified on the commandline with a trailing slash.

The reason for this is that mount points are canonicalized within /etc/mtab with no trailing slash, but umount.cifs compares the mountpoint values in /etc/mtab to the commandline option without trimming trailing slashes.

Patch to follow.
Comment 1 Steve Langasek 2007-07-12 01:49:30 UTC
Created attachment 2812 [details]
trim trailing slashes to canonicalize mountpoint names on unmount

Simple patch to canonicalize any mountpoint names passed to umount.cifs by removing trailing slashes