Can't parse passphrase with "=" from passphrase_passwd_file

Bug #1419861 reported by Lukáš Karas on 2015-02-09
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
eCryptfs
Undecided
Unassigned

Bug Description

I am not able to mount my ecryptfs FS using passphrase in file (option key=passphrase:passphrase_passwd_file=file.txt) when passphrase contains equals character (for example "passphrase_passwd=abc=123").

In this case, I get this error message (in syslog):
mount.ecryptfs: tf_pass_file: Cannot find [passwd] directive

It works fine in interactive mode or if passphrase don't contains equals character.

It looks like bug in "parse_options_file" function called from here:
http://bazaar.launchpad.net/~ecryptfs/ecryptfs/trunk/view/head:/src/key_mod/ecryptfs_key_mod_passphrase.c#L76

Related branches

Jason Xing (wlxing) wrote :

Hi Lukáš Karas,

Are you still working on that issue? Or have you fixed that bug? I'm assigning this bug to myself.
If you've already done that, please let me know. Thank you.

Jason

Changed in ecryptfs:
assignee: nobody → Jason Xing (wlxing)
status: New → In Progress
Lukáš Karas (lukas-karas) wrote :

No, I was not work on this. I just change my password and report the bug :-) Thank you that you will look at it.

Jason Xing (wlxing) wrote :

Hi Lukáš Karas,

I quick go through this part in source code. This is not a bug because the code shows that we should not use '=' character when we mount ecryptfs with "-o passphrase_passwd_file=[filename]".
[code link: http://bazaar.launchpad.net/~ecryptfs/ecryptfs/trunk/view/head:/src/libecryptfs/cmd_ln_parser.c#L257]

But I still want to know why the developers of eCryptfs confine users to this(unable to use '=' character, for example). Anyone who have any comments on this are welcome!

Jason

Changed in ecryptfs:
status: In Progress → Invalid
assignee: Jason Xing (wlxing) → nobody
Jason Xing (wlxing) wrote :

I still think it is a bug because there is no reason that eCryptfs doesn't allow users to choose the passphrase including '=' character : -)

Changed in ecryptfs:
status: Invalid → Confirmed
assignee: nobody → Jason Xing (wlxing)
Jason Xing (wlxing) wrote :

Also, my explanation about that source code maybe wrong. I will check that one more time. I'm sorry.

Jason Xing (wlxing) on 2017-03-29
Changed in ecryptfs:
status: Confirmed → In Progress
Jason Xing (wlxing) wrote :

Hello Tyler Hicks,

I have fixed this bug and push it to my branch (link: https://code.launchpad.net/~wlxing/ecryptfs/ecryptfs).
Could you have some time to look at that (adding only 2 lines) : -)

BTW, the patch is attached but it is not the standard format. Could you(or someone else) help me make a standard patch?

I would appreciate it!

Cheers,
Jason

Tyler Hicks (tyhicks) wrote :

Applied to lp:ecryptfs as r886

Changed in ecryptfs:
status: In Progress → Fix Committed
Jason Xing (wlxing) on 2017-05-26
Changed in ecryptfs:
assignee: Jason Xing (wlxing) → nobody
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers