Thanks Dustin. I've done as you suggested and I'm attaching the result
As you seem to be interested in including the script in future releases, I've done a bit of stress testing, to gain a bit of confidence the script won't break apart at the first corner case. These are the commands I ran on my home directory to stress test the script:
The second (long) command won't work when the filename contains single quotes, but the script under test DOES work in those cases.
Another oddity I have found with the second command is that directory .gvfs yields i-node 1. I'm not a gnome expert, so don't know how to handle this case. The script currently complains that .gvfs does not have a counterpart in the encrypted root.
Thanks Dustin. I've done as you suggested and I'm attaching the result
As you seem to be interested in including the script in future releases, I've done a bit of stress testing, to gain a bit of confidence the script won't break apart at the first corner case. These are the commands I ran on my home directory to stress test the script:
* Firstly, quite gentle: find . -print0 | xargs -0 -L 1 ecryptfs- filename- plain2encrypted 2> errors.txt ecryptfs- filename- plain2encrypted \'TOK1234\' 2>> errors2.txt`; pla=`ecryptfs- filename- plain2encrypted -s "$enc" 2>> errors3.txt`; echo "$pla"; [ \'TOK1234\' = "$pla" ] || echo \'TOK1234\' "does not match $pla" >> errors4.txt '
* Then, a bit more involved: find . -print0 | xargs -0 -L 1 -I TOK1234 bash -c $'enc=`
The second (long) command won't work when the filename contains single quotes, but the script under test DOES work in those cases.
Another oddity I have found with the second command is that directory .gvfs yields i-node 1. I'm not a gnome expert, so don't know how to handle this case. The script currently complains that .gvfs does not have a counterpart in the encrypted root.
Thanks and regards,
Sergio Mena