freeipa/ipaclient/plugins
Rob Crittenden a9bb811296 Check for file permissions after the ca/cert-show is complete
The commands ca-show and cert-show provide the ability to direct
the certificate output to a file. If the requested object was
not present then this resulted in a zero-length file.

This is because the check to determine if the file was writable,
by opening it, was done prior to the operation to retrieve
the entry.

So move the check after the data retrieval.

Also convert cert-show to be more consistent with ca-show.

I considered cleaning up the empty file afterward but IMHO we
shouldn't touch the file until we're ready to write. This
costs an API roundtrip but its a small price to pay for
potentially protecting existing data.

Fixes: https://pagure.io/freeipa/issue/9562

Signed-off-by: Rob Crittenden <rcritten@redhat.com>
Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
2024-04-02 23:06:43 +02:00
..
__init__.py ipaclient: introduce ipaclient.plugins 2016-06-03 09:00:34 +02:00
automember.py automember-rebuild: add a notice about high CPU usage 2023-02-02 07:33:36 +01:00
automount.py pylint: remove unneeded disable=unused-private-member 2023-01-10 08:30:58 +01:00
baseuser.py Passkey: extract the passkey from stdout 2023-06-01 08:20:37 +02:00
ca.py Check for file permissions after the ca/cert-show is complete 2024-04-02 23:06:43 +02:00
cert.py Check for file permissions after the ca/cert-show is complete 2024-04-02 23:06:43 +02:00
certmap.py Load certificate files as binary data 2018-04-30 20:42:00 +02:00
certprofile.py client: ignore override errors in command overrides 2016-06-30 16:32:20 +02:00
dns.py Fix translation of commands description in API Browser 2018-06-12 08:38:56 +02:00
hbacrule.py ipalib: split off client-side plugin code into ipaclient 2016-06-03 09:00:34 +02:00
hbactest.py hbactest was not collecting or returning messages 2023-12-19 12:58:50 +01:00
host.py x509: Make certificates represented as objects 2017-07-27 10:28:58 +02:00
idrange.py client: ignore override errors in command overrides 2016-06-30 16:32:20 +02:00
internal.py client: ignore override errors in command overrides 2016-06-30 16:32:20 +02:00
location.py Remove unused variables in the code 2016-09-27 13:35:58 +02:00
migration.py Fix pylint warnings inconsistent-return-statements 2017-12-18 11:51:14 +01:00
misc.py Make env and plugins commands local again 2016-12-02 13:00:06 +01:00
otptoken_yubikey.py pylint: remove unneeded disable=unused-private-member 2023-01-10 08:30:58 +01:00
otptoken.py ipa otptoken-sync: return error when sync fails 2022-09-29 07:58:44 -04:00
passwd.py client: ignore override errors in command overrides 2016-06-30 16:32:20 +02:00
permission.py client: ignore override errors in command overrides 2016-06-30 16:32:20 +02:00
rpcclient.py pylint 2.2: Fix unnecessary pass statement 2018-11-26 16:54:43 +01:00
server.py Handled empty hostname in server-del command 2016-08-24 15:50:25 +02:00
service.py x509: Make certificates represented as objects 2017-07-27 10:28:58 +02:00
stageuser.py API: add new commands for passkey mappings 2023-06-01 08:20:37 +02:00
sudorule.py Improve sudooption docs, make the option multi-value 2021-10-08 10:47:58 +02:00
topology.py topology.py: Removes error message from dictionary. 2017-07-14 09:23:17 +02:00
trust.py client: ignore override errors in command overrides 2016-06-30 16:32:20 +02:00
user.py API: add new commands for passkey mappings 2023-06-01 08:20:37 +02:00
vault.py Vault: add additional fallback to RSA-OAEP wrapping algo 2024-03-05 15:46:01 -05:00