diff options
author | Colin Gillespie <colin@cgillespie.xyz> | 2023-09-08 17:27:51 +1000 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-09-08 04:05:36 -0400 |
commit | 8d5e53b88aaafe7c01fc369e52dbd1fc8955a77d (patch) | |
tree | c5eee2c2f3fe8d66adc484172d761b803689e3c1 /cmd_key.c | |
parent | 28e6dea65319f425c922f59c8352c9a1969f92d4 (diff) |
cmd_set_passphrase: revoke the invalidated key
After setting a new passphrase, the previous key is left untouched. This
revokes the old key, preventing future actions from using it in error.
Signed-off-by: Colin Gillespie <colin@cgillespie.xyz>
Diffstat (limited to 'cmd_key.c')
-rw-r--r-- | cmd_key.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -111,6 +111,7 @@ int cmd_set_passphrase(int argc, char *argv[]) die("error encrypting key"); crypt->key = new_key; + bch2_revoke_key(c->disk_sb.sb); bch2_write_super(c); bch2_fs_stop(c); return 0; |