Files
freeipa/ipaclient/plugins
Florence Blanc-Renaud 221768f882 ipa otptoken-sync: return error when sync fails
The command ipa otptoken-sync does not properly handle
errors happening during the synchronization step.

- Even if an error is detected (such as invalid password
provided), the command exits with return code = 0. An
error message is displayed but the exit code should be 1.

- When an invalid token is provided, the token is not
synchronized but the error is not reported back to the
ipa otptoken-sync command.

The first issue can be fixed by raising an exception when
the HTTP response contains an header with an error.
The second issue is fixed by returning LDAP_INVALID_CREDENTIALS
to ldap bind with the sync control if synchronization fails.

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

Signed-off-by: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
2022-09-29 16:33:27 -04:00
..
2018-07-14 12:04:19 +02:00
2019-06-18 10:36:24 +10:00
2021-01-21 13:51:45 +01:00
2016-08-04 17:13:16 +02:00
2022-03-16 12:07:01 +02:00