Bug 116670 - mount prints confusing error message when user passes it two directories to mount
Summary: mount prints confusing error message when user passes it two directories to m...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: util-linux
Version: rawhide
Hardware: i386
OS: Linux
medium
low
Target Milestone: ---
Assignee: Elliot Lee
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-02-24 10:10 UTC by Alexandre Oliva
Modified: 2007-11-30 22:10 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2004-12-02 20:57:01 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Alexandre Oliva 2004-02-24 10:10:06 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040217

Description of problem:
Assume there are two user-mountable dirs in /etc/fstab, and a user
attempts to mount them both with a single command line (if it works
with umount, it should work with mount, right?)  It turns out that
mount prints a very confusing error message.

Version-Release number of selected component (if applicable):
util-linux-2.12pre-3

How reproducible:
Always

Steps to Reproduce:
As a non-root user, given that /foo and /bar are user-mountable, run:
1.mount /foo
2.mount /bar
3.umount /foo /bar
4.mount /foo /bar
5.su -
6.mount /foo /bar

Actual Results:  1-3 work; 4 fails with: mount: only root can do that.
 6 explains why: mount: /foo is not a block device.

Expected Results:  it would be nice if mount could print a less
confusing error message, say, only root can specify both device name
and mount point

Additional info:

Comment 1 Elliot Lee 2004-12-02 20:57:01 UTC
mount can't figure out the exact actual error message until it has
tried doing the mount. This would be a security hole for non-root
users, and I believe the "only root can do that" error message can be
triggered by situations other than specifying both a device name and
mount point. The upshot is that not much can change without causing
other problems.


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