The bug is in commit 407, this part of the patch and hunk.
I'm testing a fix that changes this patch...
=== modified file 'src/libecryptfs/key_management.c' --- src/libecryptfs/key_management.c 2009-07-17 05:32:26 +0000 +++ src/libecryptfs/key_management.c 2009-07-17 07:32:40 +0000 @@ -583,23 +583,25 @@ /* If the kernel supports filename encryption, add the associated * filename encryption key to the keyring as well */ - if (ecryptfs_get_version(&version) == 0 && + if (ecryptfs_get_version(&version) != 0 || ecryptfs_supports_filename_encryption(version)) { if ((rc = ecryptfs_add_passphrase_key_to_keyring( auth_tok_sig, decrypted_passphrase, - ECRYPTFS_DEFAULT_SALT_FNEK_HEX))) { + ECRYPTFS_DEFAULT_SALT_FNEK_HEX)) < 0) { syslog(LOG_ERR, "Error attempting to add filename encryption key to " "user session keyring; rc = [%d]\n", rc); + goto out; } } if ((rc = ecryptfs_add_passphrase_key_to_keyring(auth_tok_sig, decrypted_passphrase, - salt))) { + salt)) < 0) { syslog(LOG_ERR, "Error attempting to add passphrase key to " "user session keyring; rc = [%d]\n", rc); - } + } else + rc = 0; out: return rc; }
The bug is in commit 407, this part of the patch and hunk.
I'm testing a fix that changes this patch...
=== modified file 'src/libecryptf s/key_managemen t.c' /key_management .c 2009-07-17 05:32:26 +0000 /key_management .c 2009-07-17 07:32:40 +0000 get_version( &version) == 0 && get_version( &version) != 0 ||
ecryptfs_ supports_ filename_ encryption( version) ) { add_passphrase_ key_to_ keyring(
auth_ tok_sig,
decrypted_ passphrase, DEFAULT_ SALT_FNEK_ HEX))) { DEFAULT_ SALT_FNEK_ HEX)) < 0) {
syslog( LOG_ERR,
" Error attempting to add filename encryption key to "
" user session keyring; rc = [%d]\n", rc); add_passphrase_ key_to_ keyring( auth_tok_ sig,
decrypted_ passphrase,
syslog( LOG_ERR, "Error attempting to add passphrase key to "
"user session keyring; rc = [%d]\n", rc);
--- src/libecryptfs
+++ src/libecryptfs
@@ -583,23 +583,25 @@
/* If the kernel supports filename encryption, add the associated
* filename encryption key to the keyring as well
*/
- if (ecryptfs_
+ if (ecryptfs_
if ((rc = ecryptfs_
- ECRYPTFS_
+ ECRYPTFS_
+ goto out;
}
}
if ((rc = ecryptfs_
- salt))) {
+ salt)) < 0) {
- }
+ } else
+ rc = 0;
out:
return rc;
}