void encode(bufferlist &bl) const {
ENCODE_START(1, 1, bl);
- ::encode(ids, bl);
+ encode(ids, bl);
ENCODE_FINISH(bl);
}
void decode(bufferlist::iterator &bl) {
DECODE_START(1, bl);
- ::decode(ids, bl);
+ decode(ids, bl);
DECODE_FINISH(bl);
}
};
void encode(bufferlist &bl) const {
ENCODE_START(1, 1, bl);
- ::encode(otp, bl);
- ::encode(last_checks, bl);
- ::encode(last_success, bl);
+ encode(otp, bl);
+ encode(last_checks, bl);
+ encode(last_success, bl);
ENCODE_FINISH(bl);
}
void decode(bufferlist::iterator &bl) {
DECODE_START(1, bl);
- ::decode(otp, bl);
- ::decode(last_checks, bl);
- ::decode(last_success, bl);
+ decode(otp, bl);
+ decode(last_checks, bl);
+ decode(last_success, bl);
DECODE_FINISH(bl);
}
try {
bufferlist::iterator it = bl.begin();
- ::decode(*instance, it);
+ decode(*instance, it);
} catch (const buffer::error &err) {
CLS_ERR("ERROR: failed to decode %s", key.c_str());
return -EIO;
string key = otp_key_prefix + instance.otp.id;
bufferlist bl;
- ::encode(instance, bl);
+ encode(instance, bl);
int r = cls_cxx_map_set_val(hctx, key, &bl);
if (r < 0) {
static int read_header(cls_method_context_t hctx, otp_header *h)
{
bufferlist bl;
- ::encode(h, bl);
+ encode(h, bl);
int r = cls_cxx_map_get_val(hctx, otp_header_key, &bl);
if (r == -ENOENT || r == -ENODATA) {
*h = otp_header();
auto iter = bl.begin();
try {
- ::decode(*h, iter);
+ decode(*h, iter);
} catch (buffer::error& err) {
CLS_ERR("failed to decode otp_header");
return -EIO;
static int write_header(cls_method_context_t hctx, const otp_header& h)
{
bufferlist bl;
- ::encode(h, bl);
+ encode(h, bl);
int r = cls_cxx_map_set_val(hctx, otp_header_key, &bl);
if (r < 0) {
cls_otp_set_otp_op op;
try {
auto iter = in->begin();
- ::decode(op, iter);
+ decode(op, iter);
} catch (const buffer::error &err) {
CLS_ERR("ERROR: %s(): failed to decode request", __func__);
return -EINVAL;
cls_otp_remove_otp_op op;
try {
auto iter = in->begin();
- ::decode(op, iter);
+ decode(op, iter);
} catch (const buffer::error &err) {
CLS_ERR("ERROR: %s(): failed to decode request", __func__);
return -EINVAL;
cls_otp_get_otp_op op;
try {
auto iter = in->begin();
- ::decode(op, iter);
+ decode(op, iter);
} catch (const buffer::error &err) {
CLS_ERR("ERROR: %s(): failed to decode request", __func__);
return -EINVAL;
result.found_entries.push_back(instance.otp);
}
- ::encode(result, *out);
+ encode(result, *out);
return 0;
}
cls_otp_check_otp_op op;
try {
auto iter = in->begin();
- ::decode(op, iter);
+ decode(op, iter);
} catch (const buffer::error &err) {
CLS_ERR("ERROR: %s(): failed to decode request", __func__);
return -EINVAL;
cls_otp_check_otp_op op;
try {
auto iter = in->begin();
- ::decode(op, iter);
+ decode(op, iter);
} catch (const buffer::error &err) {
CLS_ERR("ERROR: %s(): failed to decode request", __func__);
return -EINVAL;
cls_otp_get_result_reply reply;
instance.find(op.token, &reply.result);
- ::encode(reply, *out);
+ encode(reply, *out);
return 0;
}
cls_otp_get_current_time_op op;
try {
auto iter = in->begin();
- ::decode(op, iter);
+ decode(op, iter);
} catch (const buffer::error &err) {
CLS_ERR("ERROR: %s(): failed to decode request", __func__);
return -EINVAL;
cls_otp_get_current_time_reply reply;
reply.time = real_clock::now();
- ::encode(reply, *out);
+ encode(reply, *out);
return 0;
}
cls_otp_set_otp_op op;
op.entries.push_back(config);
bufferlist in;
- ::encode(op, in);
+ encode(op, in);
rados_op->exec("otp", "otp_set", in);
}
cls_otp_set_otp_op op;
op.entries = entries;
bufferlist in;
- ::encode(op, in);
+ encode(op, in);
rados_op->exec("otp", "otp_set", in);
}
cls_otp_remove_otp_op op;
op.ids.push_back(id);
bufferlist in;
- ::encode(op, in);
+ encode(op, in);
rados_op->exec("otp", "otp_remove", in);
}
bufferlist in;
bufferlist out;
- ::encode(op, in);
+ encode(op, in);
int r = ioctx.exec(oid, "otp", "otp_check", in, out);
if (r < 0) {
return r;
op2.token = buf;
bufferlist in2;
bufferlist out2;
- ::encode(op2, in2);
+ encode(op2, in2);
r = ioctx.exec(oid, "otp", "otp_get_result", in, out);
if (r < 0) {
return r;
auto iter = out.begin();
cls_otp_get_result_reply ret;
try {
- ::decode(ret, iter);
+ decode(ret, iter);
} catch (buffer::error& err) {
return -EBADMSG;
}
bufferlist in;
bufferlist out;
int op_ret;
- ::encode(op, in);
+ encode(op, in);
rop->exec("otp", "otp_get", in, &out, &op_ret);
int r = ioctx.operate(oid, rop, nullptr);
if (r < 0) {
cls_otp_get_otp_reply ret;
auto iter = out.begin();
try {
- ::decode(ret, iter);
+ decode(ret, iter);
} catch (buffer::error& err) {
return -EBADMSG;
}
bufferlist in;
bufferlist out;
int op_ret;
- ::encode(op, in);
+ encode(op, in);
ObjectReadOperation rop;
rop.exec("otp", "get_current_time", in, &out, &op_ret);
int r = ioctx.operate(oid, &rop, nullptr);
cls_otp_get_current_time_reply ret;
auto iter = out.begin();
try {
- ::decode(ret, iter);
+ decode(ret, iter);
} catch (buffer::error& err) {
return -EBADMSG;
}
void encode(bufferlist &bl) const {
ENCODE_START(1, 1, bl);
- ::encode(entries, bl);
+ encode(entries, bl);
ENCODE_FINISH(bl);
}
void decode(bufferlist::iterator &bl) {
DECODE_START(1, bl);
- ::decode(entries, bl);
+ decode(entries, bl);
DECODE_FINISH(bl);
}
};
void encode(bufferlist &bl) const {
ENCODE_START(1, 1, bl);
- ::encode(id, bl);
- ::encode(val, bl);
- ::encode(token, bl);
+ encode(id, bl);
+ encode(val, bl);
+ encode(token, bl);
ENCODE_FINISH(bl);
}
void decode(bufferlist::iterator &bl) {
DECODE_START(1, bl);
- ::decode(id, bl);
- ::decode(val, bl);
- ::decode(token, bl);
+ decode(id, bl);
+ decode(val, bl);
+ decode(token, bl);
DECODE_FINISH(bl);
}
};
void encode(bufferlist &bl) const {
ENCODE_START(1, 1, bl);
- ::encode(token, bl);
+ encode(token, bl);
ENCODE_FINISH(bl);
}
void decode(bufferlist::iterator &bl) {
DECODE_START(1, bl);
- ::decode(token, bl);
+ decode(token, bl);
DECODE_FINISH(bl);
}
};
void encode(bufferlist &bl) const {
ENCODE_START(1, 1, bl);
- ::encode(result, bl);
+ encode(result, bl);
ENCODE_FINISH(bl);
}
void decode(bufferlist::iterator &bl) {
DECODE_START(1, bl);
- ::decode(result, bl);
+ decode(result, bl);
DECODE_FINISH(bl);
}
};
void encode(bufferlist &bl) const {
ENCODE_START(1, 1, bl);
- ::encode(ids, bl);
+ encode(ids, bl);
ENCODE_FINISH(bl);
}
void decode(bufferlist::iterator &bl) {
DECODE_START(1, bl);
- ::decode(ids, bl);
+ decode(ids, bl);
DECODE_FINISH(bl);
}
};
void encode(bufferlist &bl) const {
ENCODE_START(1, 1, bl);
- ::encode(get_all, bl);
- ::encode(ids, bl);
+ encode(get_all, bl);
+ encode(ids, bl);
ENCODE_FINISH(bl);
}
void decode(bufferlist::iterator &bl) {
DECODE_START(1, bl);
- ::decode(get_all, bl);
- ::decode(ids, bl);
+ decode(get_all, bl);
+ decode(ids, bl);
DECODE_FINISH(bl);
}
};
void encode(bufferlist &bl) const {
ENCODE_START(1, 1, bl);
- ::encode(found_entries, bl);
+ encode(found_entries, bl);
ENCODE_FINISH(bl);
}
void decode(bufferlist::iterator &bl) {
DECODE_START(1, bl);
- ::decode(found_entries, bl);
+ decode(found_entries, bl);
DECODE_FINISH(bl);
}
};
void encode(bufferlist &bl) const {
ENCODE_START(1, 1, bl);
- ::encode(time, bl);
+ encode(time, bl);
ENCODE_FINISH(bl);
}
void decode(bufferlist::iterator &bl) {
DECODE_START(1, bl);
- ::decode(time, bl);
+ decode(time, bl);
DECODE_FINISH(bl);
}
};
void encode(bufferlist &bl) const {
ENCODE_START(1, 1, bl);
- ::encode((uint8_t)type, bl);
+ encode((uint8_t)type, bl);
/* if we ever implement anything other than TOTP
* then we'll need to branch here */
- ::encode(id, bl);
- ::encode(seed, bl);
- ::encode((uint8_t)seed_type, bl);
- ::encode(seed_bin, bl);
- ::encode(time_ofs, bl);
- ::encode(step_size, bl);
- ::encode(window, bl);
+ encode(id, bl);
+ encode(seed, bl);
+ encode((uint8_t)seed_type, bl);
+ encode(seed_bin, bl);
+ encode(time_ofs, bl);
+ encode(step_size, bl);
+ encode(window, bl);
ENCODE_FINISH(bl);
}
void decode(bufferlist::iterator &bl) {
DECODE_START(1, bl);
uint8_t t;
- ::decode(t, bl);
+ decode(t, bl);
type = (OTPType)t;
- ::decode(id, bl);
- ::decode(seed, bl);
+ decode(id, bl);
+ decode(seed, bl);
uint8_t st;
- ::decode(st, bl);
+ decode(st, bl);
seed_type = (SeedType)st;
- ::decode(seed_bin, bl);
- ::decode(time_ofs, bl);
- ::decode(step_size, bl);
- ::decode(window, bl);
+ decode(seed_bin, bl);
+ decode(time_ofs, bl);
+ decode(step_size, bl);
+ decode(window, bl);
DECODE_FINISH(bl);
}
void dump(Formatter *f) const;
void encode(bufferlist &bl) const {
ENCODE_START(1, 1, bl);
- ::encode(token, bl);
- ::encode(timestamp, bl);
- ::encode((char)result, bl);
+ encode(token, bl);
+ encode(timestamp, bl);
+ encode((char)result, bl);
ENCODE_FINISH(bl);
}
void decode(bufferlist::iterator &bl) {
DECODE_START(1, bl);
- ::decode(token, bl);
- ::decode(timestamp, bl);
+ decode(token, bl);
+ decode(timestamp, bl);
uint8_t t;
- ::decode(t, bl);
+ decode(t, bl);
result = (OTPCheckResult)t;
DECODE_FINISH(bl);
}
void encode(bufferlist &bl) const {
ENCODE_START(1, 1, bl);
- ::encode(entries, bl);
+ encode(entries, bl);
ENCODE_FINISH(bl);
}
void decode(bufferlist::iterator &bl) {
DECODE_START(1, bl);
- ::decode(entries, bl);
+ decode(entries, bl);
DECODE_FINISH(bl);
}
};
bool modified = mfa_set_status;
- op_ret = retry_raced_bucket_write(store, s, [this] {
+ op_ret = retry_raced_bucket_write(store, s, [&] {
if (mfa_set_status) {
if (mfa_status) {
s->bucket_info.flags |= BUCKET_MFA_ENABLED;
#include "common/errno.h"
#include "common/Formatter.h"
#include "common/ceph_json.h"
-#include "common/backport14.h"
#include "rgw_rados.h"
#include "include/types.h"
int list_keys_init(RGWRados *store, const string& marker, void **phandle) override
{
- auto info = ceph::make_unique<list_keys_info>();
+ auto info = std::make_unique<list_keys_info>();
info->store = store;