Package: e2fsprogs
Version: 1.45.6-1

When e4crypt fails, it should return a non-zero exit code.

here is add_key succeeding and then failing.  note that $? is the first
element in the prompt.  This shows that the return code remains 0 even
though "add_key" fails to add a new key.

0 dkg@alice:~$ /usr/sbin/e4crypt add_key
Enter passphrase (echo disabled): 
Added key with descriptor [214ee2a37ebdd0bf]
0 dkg@alice:~$ /usr/sbin/e4crypt add_key
Enter passphrase (echo disabled): 
Key with descriptor [214ee2a37ebdd0bf] already exists
0 dkg@alice:~$ 

Here is set_policy failing but still returning 0:

0 dkg@alice:~$ /usr/sbin/e4crypt set_policy 214ee2a37ebdd0bf foobar
Error [File exists] setting policy.
The key descriptor [214ee2a37ebdd0bf] may not match the existing encryption 
context for directory [foobar].
0 dkg@alice:~$ 


Regards,

        --dkg

Attachment: signature.asc
Description: PGP signature

Reply via email to