Bug 683187 - pam_mount not deleting loop devices correctly
Summary: pam_mount not deleting loop devices correctly
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: pam_mount
Version: 14
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Till Maas
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-03-08 19:39 UTC by Kambiz Aghaiepour
Modified: 2012-08-16 14:56 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-08-16 14:56:51 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Kambiz Aghaiepour 2011-03-08 19:39:24 UTC
Description of problem:

When umount-ing encrypted filesystems loop mounted from a file image, the loop devices are never deleted after the last user session logs out.  As such, after a number of remote login and logouts, loop devices are exhausted and the encrypted file is no longer mounted.

Version-Release number of selected component (if applicable):

F14, pam_mount-2.5-1.fc14.x86_64


How reproducible:

after the setup of the img file, and encrypted filesystem setup, login and out remotely a number of times. 

Steps to Reproduce:

1.  dd if=/dev/urandom of=/home/kambiz.img bs=1M count=1024
2.  losetup /dev/loop0 /home/kambiz.img
3.  cryptsetup luksFormat /dev/loop0 
4.  cryptsetup luksOpen /dev/loop0 kambiz
5.  mke2fs -j -m 2 /dev/mapper/kambiz
6.  cryptsetup luksClose kambiz
7.  losetup -d /dev/loop0
8.  setup pam_mount as documented, and add to pam_mount.conf.xml:
    <volume path="/home/%(USER).img" mountpoint="~" cipher="aes-cbc-essiv:sha256" />
9.  login remotely and back out a number of times until the mount point is no longer available.
  
Actual results:


Expected results:


Additional info:

I was able to do the following workaround, which may or may not be ideal.  Add the following to /etc/security/pam_mount.conf.xml:


<umount>/sbin/umount.local %(MNTPT)</umount>

and place the following in /sbin/umount.local :


#!/bin/sh

mntpt=$1
loopdev=`mount | grep " $mntpt " | awk '{ print $1 }'`
umount $mntpt 1>/dev/null 2>&1
losetup -d $loopdev 1>/dev/null 2>&1

Comment 1 Till Maas 2012-06-20 19:40:23 UTC
Can you please test pam_mount-2.13-1.fc17 if you are already using F17? The package is in updates-testing soon.

Comment 2 Fedora End Of Life 2012-08-16 14:56:54 UTC
This message is a notice that Fedora 14 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 14. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained.  At this time, all open bugs with a Fedora 'version'
of '14' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this 
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen 
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we were unable to fix it before Fedora 14 reached 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, you are encouraged to click on 
"Clone This Bug" (top right of this page) and open it against that 
version of Fedora.

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.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping


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