Bug 248538 - pam_mount does not unmount file system after logout - patch proposed
pam_mount does not unmount file system after logout - patch proposed
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: pam_mount (Show other bugs)
8
All Linux
low Severity low
: ---
: ---
Assigned To: Till Maas
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-07-17 07:43 EDT by Vlado Potisk
Modified: 2010-04-08 10:57 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-10-30 08:55:30 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 Vlado Potisk 2007-07-17 07:43:44 EDT
Description of problem:

I am using the pam_mount for mounting users' encrypted home directories after
login to KDE. Mounting works fine, however pam_mount does not umount it after
logout.

The reason is the filesystem is busy when the umount is attempted, because
certain programs need some time for cleanup before they exit.

This loop inserted immediately before the umount command ("$UMOUNT" "$1";) in
/sbin/umount.crypt file waits until all such processes terminate, max. five seconds:
- - - - - - - - -
for x in 1 2 3 4 5 ; do
        /sbin/fuser -m "$1" || break
        sleep 1
done
- - - - - - - - -

Version-Release number of selected component (if applicable):
pam_mount-0.18-1.fc6

How reproducible:
For me always, but it is a timing issue ...

Steps to Reproduce:
1. install pam_mount for kdm service
2. login to KDE
3. logout
  
Actual results:
Home directory mounted.

Expected results:
Home directory not mounted.

Additional info:
FUSER='/sbin/fuser' and "$FUSER" should be probably defined and used in the patch.
Comment 1 Till Maas 2007-07-17 08:42:16 EDT
(In reply to comment #0)

> I am using the pam_mount for mounting users' encrypted home directories after
> login to KDE. Mounting works fine, however pam_mount does not umount it after
> logout.

I have reported it upstream, maybe this patch will be accepted. In debian this
problem seems to be solved in startkde:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=425314

Maybe adding a file with the loop in /etc/kde/shutdown will help, too.
Comment 2 Vlado Potisk 2007-07-17 13:08:28 EDT
> Maybe adding a file with the loop in /etc/kde/shutdown will help, too.
Those shutdown scripts are started from /usr/bin/startkde, that's why it is not
possible to wait there for the termination of startkde.

> I have reported it upstream, maybe this patch will be accepted.
I'd like to thank you for your quick reaction
Comment 3 Bug Zapper 2008-05-14 09:34:26 EDT
This message is a reminder that Fedora 7 is nearing the end of life. Approximately 30 (thirty) days from now Fedora will stop maintaining and issuing updates for Fedora 7. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '7'.

Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 7's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 7 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora please change the 'version' of this bug. If you are unable to change the version, please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. If possible, it is recommended that you try the newest available Fedora distribution to see if your bug still exists.

Please read the Release Notes for the newest Fedora distribution to make sure it will meet your needs:
http://docs.fedoraproject.org/release-notes/

The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 4 Fedora Update System 2008-10-08 11:01:46 EDT
pam_mount-0.49-1.fc8 has been submitted as an update for Fedora 8.
http://admin.fedoraproject.org/updates/pam_mount-0.49-1.fc8
Comment 5 Fedora Update System 2008-10-09 17:34:36 EDT
pam_mount-0.49-1.fc8 has been pushed to the Fedora 8 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update pam_mount'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F8/FEDORA-2008-8699
Comment 6 Fedora Update System 2008-10-30 08:55:25 EDT
pam_mount-0.49-1.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 7 Tomáš Trnka 2010-04-08 10:45:20 EDT
Even though this bug is so old, I can reliably reproduce the same problem on current F12. In this case some applications (most frequently Akonadi's MySQL daemon) take some time to shutdown and since pam_mount waits *before* sending signals and not after, the app is still running when umount is attempted. Probably the killing logic in mount.c:umount_final() should be rewritten a bit to correctly wait until all applications shut down and not to wait unnecessarily (i.e. when there's nothing to kill).
Comment 8 Till Maas 2010-04-08 10:57:29 EDT
(In reply to comment #7)
> Even though this bug is so old, I can reliably reproduce the same problem on
> current F12. In this case some applications (most frequently Akonadi's MySQL
> daemon) take some time to shutdown and since pam_mount waits *before* sending
> signals and not after, the app is still running when umount is attempted.
> Probably the killing logic in mount.c:umount_final() should be rewritten a bit
> to correctly wait until all applications shut down and not to wait
> unnecessarily (i.e. when there's nothing to kill).    

Please open a new bug report, either here or even preferable at upstream, because it is a different issue (different cause, but same effect).

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