Debian Bug report logs - #956627
e4crypt: set_policy and add_key can both fail but return exit code 0

version graph

Package: e2fsprogs; Maintainer for e2fsprogs is Theodore Y. Ts'o <[email protected]>; Source for e2fsprogs is src:e2fsprogs (PTS, buildd, popcon).

Reported by: Daniel Kahn Gillmor <[email protected]>

Date: Mon, 13 Apr 2020 18:51:01 UTC

Severity: normal

Found in version e2fsprogs/1.45.6-1

Reply or subscribe to this bug.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to [email protected], Theodore Y. Ts'o <[email protected]>:
Bug#956627; Package e2fsprogs. (Mon, 13 Apr 2020 18:51:03 GMT) (full text, mbox, link).


Acknowledgement sent to Daniel Kahn Gillmor <[email protected]>:
New Bug report received and forwarded. Copy sent to Theodore Y. Ts'o <[email protected]>. (Mon, 13 Apr 2020 18:51:03 GMT) (full text, mbox, link).


Message #5 received at [email protected] (full text, mbox, reply):

From: Daniel Kahn Gillmor <[email protected]>
To: [email protected]
Subject: e4crypt: set_policy and add_key can both fail but return exit code 0
Date: Mon, 13 Apr 2020 14:46:43 -0400
[Message part 1 (text/plain, inline)]
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
[signature.asc (application/pgp-signature, inline)]

Send a report that this bug log contains spam.


Debian bug tracking system administrator <[email protected]>. Last modified: Fri May 16 02:15:18 2025; Machine Name: bembo

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU General Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.