On Tue, Jul 07, 2020 at 10:27:30AM +0200, Florian Schmaus wrote: > Providing -S and a path to 'add_key' previously exhibit an unintuitive > behavior: instead of using the salt explicitly provided by the user, > e4crypt would use the salt obtained via EXT4_IOC_GET_ENCRYPTION_PWSALT > on the path. This was because set_policy() was still called with NULL > as salt. > > With this change we now remember the explicitly provided salt (if any) > and use it as argument for set_policy(). > > Eventually > > e4crypt add_key -S s:my-spicy-salt /foo > > will now actually use 'my-spicy-salt' and not something else as salt > for the policy set on /foo. > > Signed-off-by: Florian Schmaus <flo@xxxxxxxxxxxx> Applied, with the spell correction Eric pointed out. - Ted