Bug 133941 - patch to add console option to mount(1) and umount(1)
patch to add console option to mount(1) and umount(1)
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: util-linux (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Elliot Lee
: Security
Depends On:
Blocks: 133584
  Show dependency treegraph
 
Reported: 2004-09-28 11:51 EDT by David Zeuthen
Modified: 2013-03-05 22:41 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-10-15 09:29:51 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch to add 'console' option to mount(1) and umount(1) (3.56 KB, patch)
2004-09-28 11:54 EDT, David Zeuthen
no flags Details | Diff
New console patch adding a null check and fixing the snprintf (3.45 KB, patch)
2004-09-30 13:24 EDT, John (J5) Palmieri
no flags Details | Diff
Missed a bracket in the if (3.45 KB, patch)
2004-09-30 13:29 EDT, John (J5) Palmieri
no flags Details | Diff
More robust console patch (5.08 KB, patch)
2004-09-30 14:49 EDT, John (J5) Palmieri
no flags Details | Diff

  None (edit)
Description David Zeuthen 2004-09-28 11:51:38 EDT
As discussed in bug 133584 a more secure way to allow access to
storage devices attached to the system near the console is to add a
'console' option that can appear in the /etc/fstab file. This option
works like the 'user' option but additionally requires that the user
is at the console. Will attach patch that does this.
Comment 1 David Zeuthen 2004-09-28 11:54:01 EDT
Created attachment 104443 [details]
Patch to add 'console' option to mount(1) and umount(1)

Please review and rebuild. I've rebuilt the latest util-linux RPM from Rawhide
with this patch by adding it as the last patch. With my testing the patch
appears to work.
Comment 2 David Zeuthen 2004-09-29 18:35:37 EDT
Rebuilt into beehive packages hal that adds 'console' instead of
'user' and gnome-vfs2 package that understands 'console'. Need this
patch for FC3t3.
Comment 3 Alan Cox 2004-09-30 12:15:15 EDT
Patch is buggy. Can end up snprintf'ing a NULL pointer.
Comment 4 Steve Grubb 2004-09-30 13:00:47 EDT
If an admin puts nousers for a device and console, what is the
expected behavior?

Does noconsole need to be added?

NOTE - there is no check that the user is at the console in the umount
section! 

Should the patch also update the man page?
Comment 5 John (J5) Palmieri 2004-09-30 13:24:14 EDT
Created attachment 104593 [details]
New console patch adding a null check and fixing the snprintf

This patch fixes the previous patch by adding a null check to getusername() and
removing the unneeded subtraction of one from the size argument of snprintf.
Comment 6 John (J5) Palmieri 2004-09-30 13:29:23 EDT
Created attachment 104594 [details]
Missed a bracket in the if

Add an opening bracket for the null check.
Comment 7 John (J5) Palmieri 2004-09-30 14:49:43 EDT
Created attachment 104597 [details]
More robust console patch

Good catch Steve.  New patch changes the flag name from console to pamconsole,
adds a nopamconsole flag, and checks for pamconsole in umount.	I also added
the option to the fstab man file.
Comment 8 David Zeuthen 2004-10-15 09:29:51 EDT
The patch is in util-linux-2.12a-16 which is in Rawhide so I'm closing
this bug.

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