Bug 326802 - Encrypted home not umounted, loop device not deleted
Summary: Encrypted home not umounted, loop device not deleted
Status: RESOLVED FIXED
Alias: None
Product: openSUSE 10.3
Classification: openSUSE
Component: Other (show other bugs)
Version: RC 1
Hardware: Other Other
: P5 - None : Critical (vote)
Target Milestone: ---
Assignee: Chris Rivera
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-20 12:54 UTC by Marius Tomaschewski
Modified: 2007-09-26 16:57 UTC (History)
3 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---
coolo: SHIP_STOPPER-


Attachments
new umount.crypt (3.08 KB, text/plain)
2007-09-21 10:12 UTC, Michael Calmer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marius Tomaschewski 2007-09-20 12:54:25 UTC
This Bug _may_ depend on yast2-users setup failure - see Bug #326794.

After logout, the encrypted home remains mounted - reason: esd still
running. Logged in again, the encrypted home will be mounted again!!:

# mount
/dev/sdc1 on / type ext3 (rw,acl,user_xattr)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
debugfs on /sys/kernel/debug type debugfs (rw)
udev on /dev type tmpfs (rw)
devpts on /dev/pts type devpts (rw,mode=0620,gid=5)
/dev/mapper/vg0-space on /space type reiserfs (rw,acl,user_xattr)
securityfs on /sys/kernel/security type securityfs (rw)
/space/users on /home type none (rw,bind)
/dev/mapper/_dev_loop0 on /home/mt type ext3 (rw)
/dev/mapper/_dev_loop2 on /home/mt type ext3 (rw)

# losetup -a
/dev/loop0: [fd00]:3763171 (/home/mt.img)
/dev/loop1: [000f]:8888 (/dev/loop0)
/dev/loop2: [fd00]:3763171 (/home/mt.img)
/dev/loop3: [000f]:8901 (/dev/loop2)

The reason is: lsof is not installed (due missed rpm dependencies?).

Killed all "mt" user processes (esd), umounted /dev/mapper/_dev_loop*,
but a manual losetup -d was unable to remove the loop devices.
Comment 1 Marius Tomaschewski 2007-09-20 13:00:17 UTC
With installed lsof, it does not look terrible as above.

The homes are umounted, just the loop devices are not deleted:

/dev/loop0: [fd00]:3763171 (/home/mt.img)

A manual losetup -d /dev/loop0 is able to delete it.
Comment 2 Marius Tomaschewski 2007-09-20 13:06:35 UTC
When I'm logged in, there are two loop devices involved:

xanthos:~ # mount
/dev/mapper/_dev_loop0 on /home/mt type ext3 (rw)

(why it is mounted without acl,user_xattr options??)

xanthos:~ # losetup -a
/dev/loop0: [fd00]:3763171 (/home/mt.img)
/dev/loop1: [000f]:9103 (/dev/loop0)


after logout, the first one is still not deleted:

xanthos:~ # losetup -a
/dev/loop0: [fd00]:3763171 (/home/mt.img)
Comment 3 Michael Calmer 2007-09-20 13:09:36 UTC
I have submitted a fixed pam_mount package which requires now
lsof, util-linux and coreutils for a successful run of /sbin/umount.crypt.

Cris: would you have a look at the "two devices" problem. Why is one not removed after logout?
Comment 4 Chris Rivera 2007-09-20 14:47:38 UTC
I can take a look, but mounting, device ref counting, and unmounting are all handled by pam_mount.
Comment 6 Michael Calmer 2007-09-21 10:12:52 UTC
Created attachment 173822 [details]
new umount.crypt
Comment 7 Marius Tomaschewski 2007-09-21 14:26:31 UTC
Works fine for me now. 
Comment 9 Michael Calmer 2007-09-21 14:44:20 UTC
Ok, I have submitted the fix to STABLE.
Comment 10 Jan Engelhardt 2007-09-26 16:57:40 UTC
Submit it to upstream...