Bug 116670 - mount prints confusing error message when user passes it two directories to mount
mount prints confusing error message when user passes it two directories to m...
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: util-linux (Show other bugs)
rawhide
i386 Linux
medium Severity low
: ---
: ---
Assigned To: Elliot Lee
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-02-24 05:10 EST by Alexandre Oliva
Modified: 2007-11-30 17:10 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-12-02 15:57:01 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Alexandre Oliva 2004-02-24 05:10:06 EST
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 15:57:01 EST
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.