Bug 464904

Summary: mount creates duplicate cifs mounts
Product: [Fedora] Fedora Reporter: Ed Avis <ed>
Component: util-linuxAssignee: Karel Zak <kzak>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 9CC: kzak
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-10-01 10:26:02 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ed Avis 2008-10-01 09:48:23 UTC
You can mount the same cifs share at the same mount point several times over!

# mount | grep prod-dr_log
# mount -t cifs //wcl-prod-dr/log /mnt/prod-dr_log -o user=xxx -o password=yyy
# mount | grep prod-dr_log
//wcl-prod-dr/log on /mnt/prod-dr_log type cifs (rw,mand)
# mount -t cifs //wcl-prod-dr/log /mnt/prod-dr_log -o user=x -o password=yyy
# mount | grep prod-dr_log
//wcl-prod-dr/log on /mnt/prod-dr_log type cifs (rw,mand)
//wcl-prod-dr/log on /mnt/prod-dr_log type cifs (rw,mand)

Expected results: the second mount command should fail saying this share is already mounted at this location.

In general, it shouldn't be possible to have the same mount point appear twice in /etc/mtab or the corresponding kernel data.

Comment 1 Karel Zak 2008-10-01 10:26:02 UTC
> In general, it shouldn't be possible to have the same mount point appear twice
> in /etc/mtab or the corresponding kernel data.

This is standard Linux feature.