Bug 706911 - ecryptfs-mount-private fails with addmntent: Invalid argument
Summary: ecryptfs-mount-private fails with addmntent: Invalid argument
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: ecryptfs-utils
Version: 15
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Michal Hlavinka
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-05-23 12:55 UTC by Stefan Hellermann
Modified: 2011-06-27 06:22 UTC (History)
6 users (show)

Fixed In Version: ecryptfs-utils-87-3.fc15
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-06-21 17:45:17 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Patch proposal (1.14 KB, patch)
2011-05-29 14:36 UTC, Christophe Dumez
no flags Details | Diff

Description Stefan Hellermann 2011-05-23 12:55:41 UTC
Hi,

I'm using ecryptfs to encrypt the folder Private in my home directory. I did the setup with ecryptfs-setup-private in fedora rawhide about 6weeks ago. Since 1-2 weeks this folder does not get unencrypted while logging in, and ecryptfs-mount-private fails, too. Maybe it's related to the latest glibc update?

$ ecryptfs-mount-private 
Enter your login passphrase:
Inserted auth tok with sig [4367cbb5c8890dc2] into the user session keyring
addmntent: Invalid argument


I tried removing all ecryptfs files from my home folder and then setup a new ecryptfs Private folder, but it does not work either.

$ mkdir old
$ mv .ecryptfs/ .Private/ Private/ old
$ ecryptfs-setup-private 
Enter your login passphrase: 
Enter your mount passphrase [leave blank to generate one]: 

************************************************************************
YOU SHOULD RECORD YOUR MOUNT PASSPHRASE AND STORE IT IN A SAFE LOCATION.
  ecryptfs-unwrap-passphrase ~/.ecryptfs/wrapped-passphrase
THIS WILL BE REQUIRED IF YOU NEED TO RECOVER YOUR DATA AT A LATER TIME.
************************************************************************


Done configuring.

Testing mount/write/umount/read...
addmntent: Invalid argument
ERROR:  Could not mount private ecryptfs directory



So I think ecryptfs is unusable in current fedora rawhide.
Versions:
$ rpm -qa | grep ecryptfs
ecryptfs-utils-86-1.fc15.x86_64
$ rpm -qa | grep glibc
glibc-devel-2.13.90-13.x86_64
glibc-devel-2.13.90-13.i686
glibc-headers-2.13.90-13.x86_64
glibc-common-2.13.90-13.x86_64
glibc-2.13.90-13.x86_64
glibc-2.13.90-13.i686

Comment 1 Stefan Hellermann 2011-05-23 21:22:03 UTC
I found:
http://osdir.com/ml/file-systems.ecryptfs.devel/2007-11/msg00016.html

So I replaced the symlink with a static file and ecryptfs works again.

# rm /etc/mtab
# cat /proc/mounts > /etc/mtab

Comment 2 Michal Hlavinka 2011-05-25 06:43:46 UTC
this bug is reported as "rawhide", but with ...fc15... ecryptfs-utils package. What is correct? Fedora 15 or rawhide (Fedora 16) ?

Comment 3 Stefan Hellermann 2011-05-25 09:10:34 UTC
sorry, I reported it short before the Fedora 15 release, but I mean the one in Fedora 15. I have not tried setting up ecryptfs on a freshly installed Fedora 15.

Comment 4 Michal Hlavinka 2011-05-25 09:34:34 UTC
(rawhide is Fedora N+1 since Fedora N aplha)

 I've just tried to reproduce it in Fedora 15 with latest ecryptfs-utils package (ecryptfs-utils-87-1.fc15.x86_64) and it was working fine. Please wait till new package gets pushed in updates-testing repository (should happen within 24 hours), update ecryptfs-utils (yum update --enablerepo=updates-testing ecryptfs-utils) and retest if it's fixed for you. Thanks

Comment 5 dremon 2011-05-27 12:13:31 UTC
Does not work with ecryptfs-utils-87-2.fc15.x86_64 (from updates-testing) - same error related to mtab symlink.

Comment 6 Michal Hlavinka 2011-05-27 14:28:16 UTC
Thanks for reporting this. I've just find computer where I can reproduce this. I'll look at it

Comment 7 Christophe Dumez 2011-05-29 13:25:36 UTC
Same problem here on a clean Fedora 15. I have ecryptfs 87-2.fc15 (32 bits).

Comment 8 Christophe Dumez 2011-05-29 14:36:34 UTC
Created attachment 501615 [details]
Patch proposal

Please find attached a patch proposal.

Basically, it no longer attempts to update mtab if it is a symbolic link since it is not needed (and updating will fail anyway).

Note that this has not been reviewed upstream yet but I have confirmed on my machine that it works as expected.

Comment 9 Christophe Dumez 2011-05-29 14:41:23 UTC
Submitted upstream for review: https://bugs.launchpad.net/ecryptfs/+bug/789888

Comment 10 Fedora Update System 2011-06-07 08:40:55 UTC
ecryptfs-utils-87-3.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/ecryptfs-utils-87-3.fc15

Comment 11 Fedora Update System 2011-06-09 00:07:30 UTC
Package ecryptfs-utils-87-3.fc15:
* should fix your issue,
* was pushed to the Fedora 15 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing ecryptfs-utils-87-3.fc15'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/ecryptfs-utils-87-3.fc15
then log in and leave karma (feedback).

Comment 12 Fedora Update System 2011-06-21 17:45:06 UTC
ecryptfs-utils-87-3.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.


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