~wlxing/ecryptfs/lp1694272

Viewing all changes in revision 886.

  • Committer: Tyler Hicks
  • Author(s): Jason Xing
  • Date: 2017-05-25 21:22:24 UTC
  • Revision ID: tyhicks@canonical.com-20170525212224-tqak9r72mp1beh8c
libecryptfs: Handle '=' characters in mount option string values

Users cannot mount ecryptfs with "-o passphrase_passwd_file=mykey" (<mykey> is
"passwd=123=abc") or "-o passwd=123=abc". Because the passphrase user uses
includes "=" character.

Because in the manner of process_comma_tok() function, ecryptfs will store
"passwd=123" as the @current->name and "abc" as @current->value. That will go
wrong when we go into tf_pass_file() function because it cannot match the name
"passphrase_passwd" or "passwd".

Add two lines in process_comma_tok() to change that case. If we match one "="
character in the string, we don't need to loop and match another "=" again.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: