Bug 134564 - Logging out a user (not root) should trigger a umount of all the volumes he/she mounted
Logging out a user (not root) should trigger a umount of all the volumes he/s...
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: gnome-volume-manager (Show other bugs)
3
All Linux
medium Severity medium
: ---
: ---
Assigned To: John (J5) Palmieri
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-10-04 13:34 EDT by Kyrre Ness Sjøbæk
Modified: 2013-03-13 00:46 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-10-07 17:26:56 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)

  None (edit)
Description Kyrre Ness Sjøbæk 2004-10-04 13:34:53 EDT
<copy-paste from fedora-devel-list>

While there are so much chattering about automounting, security
considerations of the new fstab "console" tag etc., i have as a systems
administrator withnessed one thing - with something as old as floppyes.

People mount up the floppy (acctually, they have no clue that they are
mounting it, they just click the nice little "floppy" icon), get their
files, pull out the floppy (without umounting), and logs out.

Then, 2 minutes later, another user logs in, pulls up his/her floppy,
and... the floppy is mounted. Cant get it umounted, and can't mount
his/her floppy. Grr...

Reason that there is a problem with floppyes and not other removable
storage, is of cource that floppyes is the only removable storage that
the user can pull out without the system gets the message - if you pull
an usb mass storage plug, it gets umounted (and it is mounted "sync" so
you probably won't loose data either). If you try to eject a cd, it wont
come out - untill you umount it (this is really frustrating to new users
as well - the "eject" button should umount the cd and eject it, and if
it is buisy, tell dbus to tell gnome to display that popup we all loved
in fc1)

But what if all volumes that the user mounted when he/she was logged on,
automatically got umounted when the user who mounted it logs out? That
would solve it.

</copy-paste from fedora-devel-list>

Yes, i'm lazy. Dont shoot me. Alan told me to post an RFE to bugzilla,
and it somehow landed on basesystem. Feel free to move it :)
Comment 1 John (J5) Palmieri 2004-10-04 14:25:35 EDT
Sounds ok.  We would have to special case root so if you were logged
into an X session as root (rare but some people do it) it doesn't
unmount.  Pictures dance in my head of g-v-m bringing down '/' ;-)
Comment 2 Kyrre Ness Sjøbæk 2004-10-05 10:54:03 EDT
if (uidnumber > 0) {
 system ("umount -a");
}

Something like that in the shutdown code should umount every
not-in-use volumes the user has permissions to umount. But i see two
problems with this approach:

- What if something bad happens to gnome-volume-manager
- What if the user hits control-alt-backspace (same as #1?)
- What if the user already has "pulled" the floppy, or some stupid app
is running on it? (*KILL* it! Or simply just do a lazy umount, and
wait for the app to die of its own (the users) stupidity?)
Comment 3 John (J5) Palmieri 2004-10-05 11:11:50 EDT
The way it will work is a bit more complicated.  Can't say if it will
get into the release or not since this was requested so late but I'll
see what I can do.  Basicly short term what will happen is we will
itterate over the list of mounts lazy unmounting all mounts with
user=<the session user>.
Comment 4 John (J5) Palmieri 2004-10-07 17:26:56 EDT
Well, I guess it is your lucky day as I have just tested this and it
already works out of the box in Rawhide.
Comment 5 Kyrre Ness Sjøbæk 2004-10-08 04:41:52 EDT
:) Thats nice!

=> it will work like that in fc3 :)

How does it work?
Comment 6 John (J5) Palmieri 2004-10-08 09:47:38 EDT
Rawhide is the development version which will become FC3. 
gnome-volume-manager handles unmounting user mounts when the session
gets logged out.  I tried this with a USB memory drive and a floppy.
Comment 7 Kyrre Ness Sjøbæk 2004-10-09 07:48:26 EDT
Yes i know that. But will it work if the user hits
"control-alt-backspace" to log out as well?

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