return log_error_errno(errno_or_else(EINVAL), "Failed to UNIX hash secret key: %m");
r = sd_json_buildo(&e,
- SD_JSON_BUILD_PAIR("credential", SD_JSON_BUILD_BASE64(cid, cid_size)),
+ SD_JSON_BUILD_PAIR_BASE64("credential", cid, cid_size),
SD_JSON_BUILD_PAIR("salt", JSON_BUILD_IOVEC_BASE64(salt)),
- SD_JSON_BUILD_PAIR("hashedPassword", SD_JSON_BUILD_STRING(hashed)),
- SD_JSON_BUILD_PAIR("up", SD_JSON_BUILD_BOOLEAN(FLAGS_SET(lock_with, FIDO2ENROLL_UP))),
- SD_JSON_BUILD_PAIR("uv", SD_JSON_BUILD_BOOLEAN(FLAGS_SET(lock_with, FIDO2ENROLL_UV))),
- SD_JSON_BUILD_PAIR("clientPin", SD_JSON_BUILD_BOOLEAN(FLAGS_SET(lock_with, FIDO2ENROLL_PIN))));
+ SD_JSON_BUILD_PAIR_STRING("hashedPassword", hashed),
+ SD_JSON_BUILD_PAIR_BOOLEAN("up", FLAGS_SET(lock_with, FIDO2ENROLL_UP)),
+ SD_JSON_BUILD_PAIR_BOOLEAN("uv", FLAGS_SET(lock_with, FIDO2ENROLL_UV)),
+ SD_JSON_BUILD_PAIR_BOOLEAN("clientPin", FLAGS_SET(lock_with, FIDO2ENROLL_PIN)));
if (r < 0)
return log_error_errno(r, "Failed to build FIDO2 salt JSON key object: %m");
if (last) {
r = sd_varlink_notifybo(
link,
- SD_JSON_BUILD_PAIR("userName", SD_JSON_BUILD_STRING(last)),
- SD_JSON_BUILD_PAIR("groupName", SD_JSON_BUILD_STRING(p.group_name)));
+ SD_JSON_BUILD_PAIR_STRING("userName", last),
+ SD_JSON_BUILD_PAIR_STRING("groupName", p.group_name));
if (r < 0)
return r;
}
if (last)
return sd_varlink_replybo(
link,
- SD_JSON_BUILD_PAIR("userName", SD_JSON_BUILD_STRING(last)),
- SD_JSON_BUILD_PAIR("groupName", SD_JSON_BUILD_STRING(p.group_name)));
+ SD_JSON_BUILD_PAIR_STRING("userName", last),
+ SD_JSON_BUILD_PAIR_STRING("groupName", p.group_name));
} else {
const char *last = NULL;
if (last) {
r = sd_varlink_notifybo(
link,
- SD_JSON_BUILD_PAIR("userName", SD_JSON_BUILD_STRING(last)),
- SD_JSON_BUILD_PAIR("groupName", SD_JSON_BUILD_STRING(last)));
+ SD_JSON_BUILD_PAIR_STRING("userName", last),
+ SD_JSON_BUILD_PAIR_STRING("groupName", last));
if (r < 0)
return r;
r = sd_varlink_notifybo(
link,
- SD_JSON_BUILD_PAIR("userName", SD_JSON_BUILD_STRING(h->user_name)),
- SD_JSON_BUILD_PAIR("groupName", SD_JSON_BUILD_STRING(*j)));
+ SD_JSON_BUILD_PAIR_STRING("userName", h->user_name),
+ SD_JSON_BUILD_PAIR_STRING("groupName", *j));
if (r < 0)
return r;
}
if (last)
return sd_varlink_replybo(
link,
- SD_JSON_BUILD_PAIR("userName", SD_JSON_BUILD_STRING(last)),
- SD_JSON_BUILD_PAIR("groupName", SD_JSON_BUILD_STRING(last)));
+ SD_JSON_BUILD_PAIR_STRING("userName", last),
+ SD_JSON_BUILD_PAIR_STRING("groupName", last));
}
return sd_varlink_error(link, "io.systemd.UserDatabase.NoRecordFound", NULL);
&v,
"signature",
SD_JSON_BUILD_ARRAY(
- SD_JSON_BUILD_OBJECT(SD_JSON_BUILD_PAIR("data", SD_JSON_BUILD_BASE64(signature, signature_size)),
- SD_JSON_BUILD_PAIR("key", SD_JSON_BUILD_STRING(key)))));
+ SD_JSON_BUILD_OBJECT(SD_JSON_BUILD_PAIR_BASE64("data", signature, signature_size),
+ SD_JSON_BUILD_PAIR_STRING("key", key))));
if (r < 0)
return r;