[BUG] gpg.absent
does not honor user/gnupghome, gpg.delete_key
does not honor gnupghome
#63159
Labels
gpg.absent
does not honor user/gnupghome, gpg.delete_key
does not honor gnupghome
#63159
Description
gpg.absent
cannot delete keys for any user (apart from root and salt) or a different GNUPGHOME. It checks for the presence of keys in the keychain without passing the necessary params:salt/salt/states/gpg.py
Line 161 in 474ea03
Setup
irrelevant
Steps to Reproduce the behavior
Expected behavior
The key being deleted
Screenshots
Versions Report
salt --versions-report
(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)Additional context
Another issue:
gpg.absent
state confusesgpg.delete_key
kwargs by using positional args and passesuser
asfingerprint
andgnupghome
asdelete_secret
as seen here:salt/salt/states/gpg.py
Lines 175 to 179 in 474ea03
salt/salt/modules/gpg.py
Lines 495 to 502 in 474ea03
This is masked by the first issue, which causes it to almost never reach that line if any of the mentioned params are set.
Another issue:
gpg.delete_key
tries to look up the key from the keychain to determine if it can be deleted, again forgetting thegnupghome
parameter.salt/salt/modules/gpg.py
Line 556 in 474ea03
But I really want to stop flooding the issue tracker with the gpg modules (this being the 6th). The described issues seemed like a sensible fit, so I hope it's fine to mash them together like this.
The text was updated successfully, but these errors were encountered: