The fix returns an appropriate error message.
fixes: https://tracker.ceph.com/issues/50394
Signed-off-by: Pritha Srivastava <prsrivas@redhat.com>
(cherry picked from commit
1b943419c45a9b17be71668bd023aeb814171b2c)
time_t *pofs)
{
#define MAX_TOTP_SKEW_HOURS (24 * 7)
- ceph_assert(pins.size() == 2);
-
time_t start_time = ceph::real_clock::to_time_t(now);
time_t time_ofs = 0, time_ofs_abs = 0;
time_t step_size = totp.step_size;
if (totp_pin.size() != 2) {
cerr << "ERROR: missing two --totp-pin params (--totp-pin=<first> --totp-pin=<second>)" << std::endl;
+ return EINVAL;
}
rados::cls::otp::otp_info_t config;