2011-02-17 11:16:40 |
Mirko Hahn |
description |
Binary package hint: upower
upower doesn't recognize a cryptswap partition created using the ecryptfs-setup-swap, rendering the AllowHibernateEncryptedSwap setting in /etc/UPower/UPower.conf ineffective.
Using the ecryptfs-setup-swap script, I got the following /etc/crypttab line:
# <target name> <source device> <key file> <options>
cryptswap1 /dev/sda5 /dev/urandom swap,cipher=aes-cbc-essiv:sha256
To prevent hibernation issues with randomly encrypted swap, I attempted to prevent hibernation and discovered, that /etc/UPower/UPower.conf has a setting called AllowHibernateEncryptedSwap which seems to do just that. Therefore, I altered the corresponding line to:
# This controls whether hibernate is allowed when using encrypted swap.
#
# default=true
AllowHibernateEncryptedSwap=false
The remainder of the file is identical to the original version since I reinstalled my system just yesterday. I then rebooted, expecting hibernation options to disappear from the shutdown menu. Seeing how this didn't happen, I used D-feet to inspect the org.freedesktop.UPower D-Bus interface (system bus) which returned a boolean value of 1 for property CanHibernate on object path /org/freedesktop/UPower, indicating that UPower had not properly identified the encrypted swap.
=== conjecture (!) on possible cause ===
A brief glance over the original source package (minus all patches) upower_0.9.5.orig.tar.gz as provided by Launchpad indicates that upower identifies encrypted swap partitions by comparing entries in /proc/swaps and /etc/crypttab. However, my /proc/swaps reads
Filename Type Size Used Priority
/dev/dm-0 partition 8000364 0 -1
which is actually the device symlinked by /dev/mapper/cryptswap. The reason why upower doesn't identify these two entries might therefore be lack of symlink resolution in upower's up_backend_has_encrypted_swap (located in src/linux/up-backend.c, line ~387)
=== apport information ===
Architecture: amd64
DistroRelease: Ubuntu 10.10
EcryptfsInUse: Yes
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release amd64 (20101007)
NonfreeKernelModules: fglrx
Package: upower 0.9.5-4
PackageArchitecture: amd64
ProblemType: Bug
SourcePackage: upower
Tags: maverick
Uname: Linux 2.6.35-27-generic x86_64 |
Binary package hint: upower
upower doesn't recognize a cryptswap partition created using the ecryptfs-setup-swap, rendering the AllowHibernateEncryptedSwap setting in /etc/UPower/UPower.conf ineffective.
Using the ecryptfs-setup-swap script, I got the following /etc/crypttab line:
# <target name> <source device> <key file> <options>
cryptswap1 /dev/sda5 /dev/urandom swap,cipher=aes-cbc-essiv:sha256
To prevent hibernation issues with randomly encrypted swap, I attempted to prevent hibernation and discovered, that /etc/UPower/UPower.conf has a setting called AllowHibernateEncryptedSwap which seems to do just that. Therefore, I altered the corresponding line to:
# This controls whether hibernate is allowed when using encrypted swap.
#
# default=true
AllowHibernateEncryptedSwap=false
The remainder of the file is identical to the original version since I reinstalled my system just yesterday. I then rebooted, expecting hibernation options to disappear from the shutdown menu. Seeing how this didn't happen, I used D-feet to inspect the org.freedesktop.UPower D-Bus interface (system bus) which returned a boolean value of 1 for property CanHibernate on object path /org/freedesktop/UPower, indicating that UPower had not properly identified the encrypted swap.
=== conjecture (!) on possible cause ===
A brief glance over the original source package (minus all patches) upower_0.9.5.orig.tar.gz as provided by Launchpad indicates that upower identifies encrypted swap partitions by comparing entries in /proc/swaps and /etc/crypttab. However, my /proc/swaps reads
Filename Type Size Used Priority
/dev/dm-0 partition 8000364 0 -1
which is actually the device symlinked by /dev/mapper/cryptswap. The reason why upower doesn't identify these two entries might therefore be lack of symlink resolution in upower's up_backend_has_encrypted_swap (located in src/linux/up-backend.c, line ~387)
=== apport information ===
Architecture: amd64
DistroRelease: Ubuntu 10.10
EcryptfsInUse: Yes
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release amd64 (20101007)
NonfreeKernelModules: fglrx
Package: upower 0.9.5-4
PackageArchitecture: amd64
ProblemType: Bug
SourcePackage: upower
Tags: maverick
Uname: Linux 2.6.35-27-generic x86_64 |
|