Bug 133941 - patch to add console option to mount(1) and umount(1)
Summary: patch to add console option to mount(1) and umount(1)
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: util-linux
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Elliot Lee
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 133584
TreeView+ depends on / blocked
 
Reported: 2004-09-28 15:51 UTC by David Zeuthen
Modified: 2013-03-06 03:41 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-10-15 13:29:51 UTC
Type: ---
Embargoed:


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

Description David Zeuthen 2004-09-28 15:51:38 UTC
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 15:54:01 UTC
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 22:35:37 UTC
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 16:15:15 UTC
Patch is buggy. Can end up snprintf'ing a NULL pointer.


Comment 4 Steve Grubb 2004-09-30 17:00:47 UTC
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 17:24:14 UTC
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 17:29:23 UTC
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 18:49:43 UTC
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 13:29:51 UTC
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.