Continue on in the f_string_static_t refactoring.
Also take care of adding "const" to the function parameters that pass pointers.
#endif
#ifndef _di_f_account_by_id_
- f_status_t f_account_by_id(const uid_t id, f_account_t *account) {
+ f_status_t f_account_by_id(const uid_t id, f_account_t * const account) {
#ifndef _di_level_0_parameter_checking_
if (!account) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_account_by_id_
#ifndef _di_f_account_by_name_
- f_status_t f_account_by_name(const f_string_t name, f_account_t *account) {
+ f_status_t f_account_by_name(const f_string_static_t name, f_account_t * const account) {
#ifndef _di_level_0_parameter_checking_
if (!account) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
errno = 0;
char buffer[length];
- const int result = getpwnam_r(name, &password, buffer, length, &pointer);
+ const int result = getpwnam_r(name.string, &password, buffer, length, &pointer);
if (result) {
if (errno == EINTR) return F_status_set_error(F_interrupt);
char buffer[F_account_pwd_length_fallback_second_d];
- const int result = getpwnam_r(name, &password, buffer, length, &pointer);
+ const int result = getpwnam_r(name.string, &password, buffer, length, &pointer);
if (result) {
if (errno == EINTR) return F_status_set_error(F_interrupt);
#endif // _di_f_account_by_name_
#ifndef _di_f_account_group_id_by_name_
- f_status_t f_account_group_id_by_name(const f_string_t name, gid_t *id) {
+ f_status_t f_account_group_id_by_name(const f_string_static_t name, gid_t * const id) {
#ifndef _di_level_0_parameter_checking_
if (!id) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
errno = 0;
char buffer[length];
- int result = getgrnam_r(name, &group_data, buffer, length, &pointer);
+ int result = getgrnam_r(name.string, &group_data, buffer, length, &pointer);
if (result) {
if (errno == EINTR) return F_status_set_error(F_interrupt);
char buffer[F_account_pwd_length_fallback_second_d];
- const int result = getgrnam_r(name, &group_data, buffer, length, &pointer);
+ const int result = getgrnam_r(name.string, &group_data, buffer, length, &pointer);
if (result) {
if (errno == EINTR) return F_status_set_error(F_interrupt);
#endif // _di_f_account_group_id_by_name_
#ifndef _di_f_account_group_name_by_id_
- f_status_t f_account_group_name_by_id(const gid_t id, f_string_dynamic_t *name) {
+ f_status_t f_account_group_name_by_id(const gid_t id, f_string_dynamic_t * const name) {
#ifndef _di_level_0_parameter_checking_
if (!name) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_account_group_name_by_id_
#ifndef _di_f_account_id_by_name_
- f_status_t f_account_id_by_name(const f_string_t name, uid_t *id) {
+ f_status_t f_account_id_by_name(const f_string_static_t name, uid_t * const id) {
#ifndef _di_level_0_parameter_checking_
if (!id) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
errno = 0;
char buffer[length];
- const int result = getpwnam_r(name, &password, buffer, length, &pointer);
+ const int result = getpwnam_r(name.string, &password, buffer, length, &pointer);
if (result) {
if (errno == EINTR) return F_status_set_error(F_interrupt);
char buffer[F_account_pwd_length_fallback_second_d];
- const int result = getpwnam_r(name, &password, buffer, length, &pointer);
+ const int result = getpwnam_r(name.string, &password, buffer, length, &pointer);
if (result) {
if (errno == EINTR) return F_status_set_error(F_interrupt);
#endif // _di_f_account_id_by_name_
#ifndef _di_f_account_name_by_id_
- f_status_t f_account_name_by_id(const uid_t id, f_string_dynamic_t *name) {
+ f_status_t f_account_name_by_id(const uid_t id, f_string_dynamic_t * const name) {
#ifndef _di_level_0_parameter_checking_
if (!name) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
* @see getpwuid_r()
*/
#ifndef _di_f_account_by_id_
- extern f_status_t f_account_by_id(const uid_t id, f_account_t *account);
+ extern f_status_t f_account_by_id(const uid_t id, f_account_t * const account);
#endif // _di_f_account_by_id_
/**
* @see getpwnam_r()
*/
#ifndef _di_f_account_by_name_
- extern f_status_t f_account_by_name(const f_string_t name, f_account_t *account);
+ extern f_status_t f_account_by_name(const f_string_static_t name, f_account_t * const account);
#endif // _di_f_account_by_name_
/**
* @see getgrnam_r()
*/
#ifndef _di_f_account_group_id_by_name_
- extern f_status_t f_account_group_id_by_name(const f_string_t name, gid_t *id);
+ extern f_status_t f_account_group_id_by_name(const f_string_static_t name, gid_t * const id);
#endif // _di_f_account_group_id_by_name_
/**
* The id of the group.
* @param name
* This is replaced with by the group name.
- * The name will be NULL terminated.
+ * The name will be NULL terminated after the name.used.
*
* @return
* F_none on success.
* @see getgrgid_r()
*/
#ifndef _di_f_account_group_name_by_id_
- extern f_status_t f_account_group_name_by_id(const gid_t id, f_string_dynamic_t *name);
+ extern f_status_t f_account_group_name_by_id(const gid_t id, f_string_dynamic_t * const name);
#endif // _di_f_account_group_name_by_id_
/**
* @see getpwnam_r()
*/
#ifndef _di_f_account_id_by_name_
- extern f_status_t f_account_id_by_name(const f_string_t name, uid_t *id);
+ extern f_status_t f_account_id_by_name(const f_string_static_t name, uid_t * const id);
#endif // _di_f_account_id_by_name_
/**
* The id of the user.
* @param name
* This is replaced with by the user name.
- * The name will be NULL terminated.
+ * The name will be NULL terminated after the name.used.
*
* @return
* F_none on success.
* @see getpwuid_r()
*/
#ifndef _di_f_account_name_by_id_
- extern f_status_t f_account_name_by_id(const uid_t id, f_string_dynamic_t *name);
+ extern f_status_t f_account_name_by_id(const uid_t id, f_string_dynamic_t * const name);
#endif // _di_f_account_name_by_id_
#ifdef __cplusplus
#endif
#if !defined(_di_f_account_by_name_) || !defined(_di_f_account_by_id_)
- f_status_t private_f_account_from_passwd(const struct passwd password, const f_array_length_t password_length, f_account_t *account) {
+ f_status_t private_f_account_from_passwd(const struct passwd password, const f_array_length_t password_length, f_account_t * const account) {
f_status_t status = F_none;
* @see macro_f_string_dynamic_t_resize()
*/
#if !defined(_di_f_account_by_name_) || !defined(_di_f_account_by_id_)
- extern f_status_t private_f_account_from_passwd(const struct passwd password, const f_array_length_t password_length, f_account_t *account) F_attribute_visibility_internal_d;
+ extern f_status_t private_f_account_from_passwd(const struct passwd password, const f_array_length_t password_length, f_account_t * const account) F_attribute_visibility_internal_d;
#endif // !defined(_di_f_account_by_name_) || !defined(_di_f_account_by_id_)
#ifdef __cplusplus
void test__f_account_by_name__fails(void **state) {
const long size = 20;
- char *name = "name";
f_account_t account = f_account_t_initialize;
+ f_string_t name_string = "name";
+ f_string_static_t name = f_string_static_t_initialize;
+ name.string = name_string;
+ name.used = 4;
+
int errnos[] = {
EINTR,
EIO,
const long size = 20;
struct passwd password;
- char *name = "name";
f_account_t account = f_account_t_initialize;
+ f_string_t name_string = "name";
+ f_string_static_t name = f_string_static_t_initialize;
+ name.string = name_string;
+ name.used = 4;
+
{
will_return(__wrap_sysconf, size);
will_return(__wrap_getpwnam_r, false);
#ifndef _di_level_0_parameter_checking_
void test__f_account_by_name__parameter_checking(void **state) {
- const f_string_t name = f_string_t_initialize;
+ const f_string_static_t name = f_string_static_t_initialize;
{
const f_status_t status = f_account_by_name(name, 0);
const long size = 20;
struct passwd password;
struct passwd pointer;
- char *name = "name";
f_account_t account = f_account_t_initialize;
+ f_string_t name_string = "name";
+ f_string_static_t name = f_string_static_t_initialize;
+ name.string = name_string;
+ name.used = 4;
+
password.pw_uid = 1;
password.pw_gid = 2;
password.pw_dir = "pw_dir";
password.pw_gecos = "pw_gecos";
- password.pw_name = name;
+ password.pw_name = name_string;
password.pw_passwd = "pw_passwd";
password.pw_shell = "pw_shell";
void test__f_account_group_id_by_name__fails(void **state) {
const long size = 20;
- char *name = "name";
gid_t gid = 0;
+ f_string_t name_string = "name";
+ f_string_static_t name = f_string_static_t_initialize;
+ name.string = name_string;
+ name.used = 4;
+
int errnos[] = {
EINTR,
EIO,
const long size = 20;
struct group group_data;
- char *name = "name";
gid_t gid = 0;
+ f_string_t name_string = "name";
+ f_string_static_t name = f_string_static_t_initialize;
+ name.string = name_string;
+ name.used = 4;
+
{
will_return(__wrap_sysconf, size);
will_return(__wrap_getgrnam_r, false);
#ifndef _di_level_0_parameter_checking_
void test__f_account_group_id_by_name__parameter_checking(void **state) {
- const f_string_t name = f_string_t_initialize;
+ const f_string_static_t name = f_string_static_t_initialize;
{
const f_status_t status = f_account_group_id_by_name(name, 0);
char *pointers[] = { "gr_mem", 0 };
gid_t gid = 0;
+ f_string_static_t name = f_string_static_t_initialize;
+
group_data.gr_gid = 1;
group_data.gr_name = "gr_name";
group_data.gr_passwd = "gr_passwd";
will_return(__wrap_getgrnam_r, &group_data);
will_return(__wrap_getgrnam_r, &pointer);
- const f_status_t status = f_account_group_id_by_name(group_data.gr_name, &gid);
+ name.string = group_data.gr_name;
+ name.used = strlen(group_data.gr_name);
+
+ const f_status_t status = f_account_group_id_by_name(name, &gid);
assert_int_equal(status, F_none);
assert_int_equal(gid, group_data.gr_gid);
void test__f_account_id_by_name__fails(void **state) {
const long size = 20;
- char *name = "name";
uid_t uid = 0;
+ f_string_t name_string = "name";
+ f_string_static_t name = f_string_static_t_initialize;
+ name.string = name_string;
+ name.used = 4;
+
int errnos[] = {
EINTR,
EIO,
const long size = 20;
struct passwd password;
- char *name = "name";
uid_t uid = 0;
+ f_string_t name_string = "name";
+ f_string_static_t name = f_string_static_t_initialize;
+ name.string = name_string;
+ name.used = 4;
+
{
will_return(__wrap_sysconf, size);
will_return(__wrap_getpwnam_r, false);
#ifndef _di_level_0_parameter_checking_
void test__f_account_id_by_name__parameter_checking(void **state) {
- const f_string_t name = f_string_t_initialize;
+ const f_string_static_t name = f_string_static_t_initialize;
{
const f_status_t status = f_account_id_by_name(name, 0);
struct passwd pointer;
uid_t uid = 0;
+ f_string_static_t name = f_string_static_t_initialize;
+
password.pw_uid = 1;
password.pw_gid = 2;
password.pw_dir = "pw_dir";
will_return(__wrap_getpwnam_r, &password);
will_return(__wrap_getpwnam_r, &pointer);
- const f_status_t status = f_account_id_by_name(password.pw_name, &uid);
+ name.string = password.pw_name;
+ name.used = strlen(password.pw_name);
+
+ const f_status_t status = f_account_id_by_name(name, &uid);
assert_int_equal(status, F_none);
assert_int_equal(uid, password.pw_uid);
// FLL-0 includes.
#include <fll/level_0/account.h>
-// mock includes.
+// Mock includes.
#include "mock-account.h"
-// test includes.
+// Test includes.
#include "test-account-by_id.h"
#include "test-account-by_name.h"
#include "test-account-group_id_by_name.h"
#if defined(_di_libcap_) || defined(_libcap_legacy_only_)
#ifndef _di_f_capability_ambient_get_
- f_status_t f_capability_ambient_get(const f_capability_value_t value, int *ambient) {
+ f_status_t f_capability_ambient_get(const f_capability_value_t value, int * const ambient) {
#ifndef _di_level_0_parameter_checking_
if (!ambient) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#ifdef _di_libcap_
#ifndef _di_f_capability_clear_
- f_status_t f_capability_clear(f_capability_t *capability) {
+ f_status_t f_capability_clear(f_capability_t * const capability) {
#ifndef _di_level_0_parameter_checking_
if (!capability) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_capability_clear_
#ifndef _di_f_capability_clear_flag_
- f_status_t f_capability_clear_flag(const f_capability_flag_t flag, f_capability_t *capability) {
+ f_status_t f_capability_clear_flag(const f_capability_flag_t flag, f_capability_t * const capability) {
#ifndef _di_level_0_parameter_checking_
if (!capability) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_capability_clear_flag_
#ifndef _di_f_capability_compare_
- f_status_t f_capability_compare(const f_capability_t capability1, const f_capability_t capability2, int *flags) {
+ f_status_t f_capability_compare(const f_capability_t capability1, const f_capability_t capability2, int * const flags) {
return F_status_set_error(F_implemented_not);
}
#endif // _di_f_capability_compare_
#ifndef _di_f_capability_copy_
- f_status_t f_capability_copy(const f_capability_t source, f_capability_t *destination) {
+ f_status_t f_capability_copy(const f_capability_t source, f_capability_t * const destination) {
#ifndef _di_level_0_parameter_checking_
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_capability_copy_
#ifndef _di_f_capability_copy_external_
- f_status_t f_capability_copy_external(const f_capability_t capability, const ssize_t max, void *external, ssize_t *size) {
+ f_status_t f_capability_copy_external(const f_capability_t capability, const ssize_t max, void * const external, ssize_t * const size) {
#ifndef _di_level_0_parameter_checking_
if (!external) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_capability_copy_external_
#ifndef _di_f_capability_copy_internal_
- f_status_t f_capability_copy_internal(const void *external, f_capability_t *capability) {
+ f_status_t f_capability_copy_internal(const void *external, f_capability_t * const capability) {
#ifndef _di_level_0_parameter_checking_
if (!external) return F_status_set_error(F_parameter);
if (!capability) return F_status_set_error(F_parameter);
#endif // _di_f_capability_delete_
#ifndef _di_f_capability_file_descriptor_get_
- f_status_t f_capability_file_descriptor_get(const int descriptor, f_capability_t *capability) {
+ f_status_t f_capability_file_descriptor_get(const int descriptor, f_capability_t * const capability) {
#ifndef _di_level_0_parameter_checking_
if (!capability) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_capability_file_descriptor_set_
#ifndef _di_f_capability_file_get_
- f_status_t f_capability_file_get(const f_string_t path, f_capability_t *capability) {
+ f_status_t f_capability_file_get(const f_string_static_t path, f_capability_t * const capability) {
#ifndef _di_level_0_parameter_checking_
if (!capability) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_capability_file_get_
#ifndef _di_f_capability_file_set_
- f_status_t f_capability_file_set(const f_string_t path, const f_capability_t capability) {
+ f_status_t f_capability_file_set(const f_string_static_t path, const f_capability_t capability) {
return F_status_set_error(F_implemented_not);
}
#endif // _di_f_capability_file_set_
#ifndef _di_f_capability_flag_get_
- f_status_t f_capability_flag_get(const f_capability_t capability, const f_capability_value_t code, const f_capability_flag_t flag, f_capability_flag_value_t *enabled) {
+ f_status_t f_capability_flag_get(const f_capability_t capability, const f_capability_value_t code, const f_capability_flag_t flag, f_capability_flag_value_t * const enabled) {
#ifndef _di_level_0_parameter_checking_
if (!enabled) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_capability_flag_get_
#ifndef _di_f_capability_flag_set_
- f_status_t f_capability_flag_set(const f_capability_flag_t flag, const f_capability_flag_value_t enabled, const f_int32s_t codes, f_capability_t *capability) {
+ f_status_t f_capability_flag_set(const f_capability_flag_t flag, const f_capability_flag_value_t enabled, const f_int32s_t codes, f_capability_t * const capability) {
#ifndef _di_level_0_parameter_checking_
if (!capability) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_capability_flag_set_
#ifndef _di_f_capability_from_name_
- f_status_t f_capability_from_name(const f_string_t name, f_capability_value_t *code) {
+ f_status_t f_capability_from_name(const f_string_static_t name, f_capability_value_t * const code) {
#ifndef _di_level_0_parameter_checking_
if (!code) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_capability_from_name_
#ifndef _di_f_capability_from_text_
- f_status_t f_capability_from_text(const f_string_t text, f_capability_t *capability) {
+ f_status_t f_capability_from_text(const f_string_static_t text, f_capability_t * const capability) {
#ifndef _di_level_0_parameter_checking_
if (!capability) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#ifdef _di_libcap_
#ifndef _di_f_capability_initialize_
- f_status_t f_capability_initialize(f_capability_t *capability) {
+ f_status_t f_capability_initialize(f_capability_t * const capability) {
#ifndef _di_level_0_parameter_checking_
if (!capability) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#if defined(_di_libcap_) || defined(_libcap_legacy_only_)
#ifndef _di_f_capability_mode_get_
- f_status_t f_capability_mode_get(f_capability_mode_t *mode) {
+ f_status_t f_capability_mode_get(f_capability_mode_t * const mode) {
#ifndef _di_level_0_parameter_checking_
if (!mode) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_capability_mode_get_
#ifndef _di_f_capability_mode_get_name_
- f_status_t f_capability_mode_get_name(const f_capability_mode_t mode, f_string_constant_t *name) {
+ f_status_t f_capability_mode_get_name(const f_capability_mode_t mode, f_string_static_t * const name) {
#ifndef _di_level_0_parameter_checking_
if (!name) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_capability_mode_set_
#ifndef _di_f_capability_owner_get_
- f_status_t f_capability_owner_get(const f_capability_t capability, uid_t *id_user) {
+ f_status_t f_capability_owner_get(const f_capability_t capability, uid_t * const id_user) {
#ifndef _di_level_0_parameter_checking_
if (!id_user) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#ifdef _di_libcap_
#ifndef _di_f_capability_process_bound_drop_
- f_status_t f_capability_process_bound_drop(f_capability_value_t code, int *bound) {
+ f_status_t f_capability_process_bound_drop(f_capability_value_t code, int * const bound) {
#ifndef _di_level_0_parameter_checking_
if (!bound) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_capability_process_bound_drop_
#ifndef _di_f_capability_process_bound_get_
- f_status_t f_capability_process_bound_get(f_capability_value_t code, int *bound) {
+ f_status_t f_capability_process_bound_get(f_capability_value_t code, int * const bound) {
#ifndef _di_level_0_parameter_checking_
if (!bound) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_capability_process_bound_get_
#ifndef _di_f_capability_process_get_
- f_status_t f_capability_process_get(f_capability_t *capability) {
+ f_status_t f_capability_process_get(f_capability_t * const capability) {
#ifndef _di_level_0_parameter_checking_
if (!capability) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_capability_process_get_
#ifndef _di_f_capability_process_get_by_id_
- f_status_t f_capability_process_get_by_id(const pid_t id, f_capability_t *capability) {
+ f_status_t f_capability_process_get_by_id(const pid_t id, f_capability_t * const capability) {
#ifndef _di_level_0_parameter_checking_
if (!capability) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#if defined(_di_libcap_) || defined(_libcap_legacy_only_)
#ifndef _di_f_capability_security_bits_get_
- f_status_t f_capability_security_bits_get(f_capability_bits_t *bits) {
+ f_status_t f_capability_security_bits_get(f_capability_bits_t * const bits) {
#ifndef _di_level_0_parameter_checking_
if (!bits) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#ifdef _di_libcap_
#ifndef _di_f_capability_size_
- f_status_t f_capability_size(const f_capability_t capability, ssize_t *size) {
+ f_status_t f_capability_size(const f_capability_t capability, ssize_t * const size) {
#ifndef _di_level_0_parameter_checking_
if (!size) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_capability_supported_code_
#ifndef _di_f_capability_to_name_
- f_status_t f_capability_to_name(const int code, f_string_dynamic_t *name) {
+ f_status_t f_capability_to_name(const int code, f_string_dynamic_t * const name) {
#ifndef _di_level_0_parameter_checking_
if (!name) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_capability_to_name_
#ifndef _di_f_capability_to_text_
- f_status_t f_capability_to_text(const f_capability_t capability, f_string_dynamic_t *text) {
+ f_status_t f_capability_to_text(const f_capability_t capability, f_string_dynamic_t * const text) {
#ifndef _di_level_0_parameter_checking_
if (!text) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#if !defined(_di_libcap_) && !defined(_libcap_legacy_only_)
#ifndef _di_f_capability_ambient_get_
- f_status_t f_capability_ambient_get(const f_capability_value_t value, int *ambient) {
+ f_status_t f_capability_ambient_get(const f_capability_value_t value, int * const ambient) {
#ifndef _di_level_0_parameter_checking_
if (!ambient) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#ifndef _di_libcap_
#ifndef _di_f_capability_clear_
- f_status_t f_capability_clear(f_capability_t *capability) {
+ f_status_t f_capability_clear(f_capability_t * const capability) {
#ifndef _di_level_0_parameter_checking_
if (!capability) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_capability_clear_
#ifndef _di_f_capability_clear_flag_
- f_status_t f_capability_clear_flag(const f_capability_flag_t flag, f_capability_t *capability) {
+ f_status_t f_capability_clear_flag(const f_capability_flag_t flag, f_capability_t * const capability) {
#ifndef _di_level_0_parameter_checking_
if (!capability) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_capability_clear_flag_
#ifndef _di_f_capability_compare_
- f_status_t f_capability_compare(const f_capability_t capability1, const f_capability_t capability2, int *flags) {
+ f_status_t f_capability_compare(const f_capability_t capability1, const f_capability_t capability2, int * const flags) {
if (flags) {
*flags = 0;
#endif // _di_f_capability_compare_
#ifndef _di_f_capability_copy_
- f_status_t f_capability_copy(const f_capability_t source, f_capability_t *destination) {
+ f_status_t f_capability_copy(const f_capability_t source, f_capability_t * const destination) {
#ifndef _di_level_0_parameter_checking_
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_capability_copy_
#ifndef _di_f_capability_copy_external_
- f_status_t f_capability_copy_external(const f_capability_t capability, const ssize_t max, void *external, ssize_t *size) {
+ f_status_t f_capability_copy_external(const f_capability_t capability, const ssize_t max, void * const external, ssize_t * const size) {
#ifndef _di_level_0_parameter_checking_
if (!external) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_capability_copy_external_
#ifndef _di_f_capability_copy_internal_
- f_status_t f_capability_copy_internal(const void *external, f_capability_t *capability) {
+ f_status_t f_capability_copy_internal(const void * const external, f_capability_t * const capability) {
#ifndef _di_level_0_parameter_checking_
if (!external) return F_status_set_error(F_parameter);
if (!capability) return F_status_set_error(F_parameter);
#endif // _di_f_capability_copy_internal_
#ifndef _di_f_capability_delete_
- f_status_t f_capability_delete(f_capability_t *capability) {
+ f_status_t f_capability_delete(f_capability_t * const capability) {
#ifndef _di_level_0_parameter_checking_
if (!capability) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_capability_delete_
#ifndef _di_f_capability_file_descriptor_get_
- f_status_t f_capability_file_descriptor_get(const int descriptor, f_capability_t *capability) {
+ f_status_t f_capability_file_descriptor_get(const int descriptor, f_capability_t * const capability) {
#ifndef _di_level_0_parameter_checking_
if (!capability) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_capability_file_descriptor_set_
#ifndef _di_f_capability_file_get_
- f_status_t f_capability_file_get(const f_string_t path, f_capability_t *capability) {
+ f_status_t f_capability_file_get(const f_string_static_t path, f_capability_t * const capability) {
#ifndef _di_level_0_parameter_checking_
if (!capability) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- *capability = cap_get_file(path);
+ *capability = cap_get_file(path.string);
if (*capability) {
return F_none;
#endif // _di_f_capability_file_get_
#ifndef _di_f_capability_file_set_
- f_status_t f_capability_file_set(const f_string_t path, const f_capability_t capability) {
+ f_status_t f_capability_file_set(const f_string_static_t path, const f_capability_t capability) {
- const int result = cap_set_file(path, capability);
+ const int result = cap_set_file(path.string, capability);
if (result == -1) {
if (errno == EACCES) return F_status_set_error(F_access_denied);
#endif // _di_f_capability_file_set_
#ifndef _di_f_capability_flag_get_
- f_status_t f_capability_flag_get(const f_capability_t capability, const f_capability_value_t code, const f_capability_flag_t flag, f_capability_flag_value_t *enabled) {
+ f_status_t f_capability_flag_get(const f_capability_t capability, const f_capability_value_t code, const f_capability_flag_t flag, f_capability_flag_value_t * const enabled) {
#ifndef _di_level_0_parameter_checking_
if (!enabled) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_capability_flag_get_
#ifndef _di_f_capability_flag_set_
- f_status_t f_capability_flag_set(const f_capability_flag_t flag, const f_capability_flag_value_t enabled, const f_int32s_t codes, f_capability_t *capability) {
+ f_status_t f_capability_flag_set(const f_capability_flag_t flag, const f_capability_flag_value_t enabled, const f_int32s_t codes, f_capability_t * const capability) {
#ifndef _di_level_0_parameter_checking_
if (!capability) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_capability_flag_set_
#ifndef _di_f_capability_from_name_
- f_status_t f_capability_from_name(const f_string_t name, f_capability_value_t *code) {
+ f_status_t f_capability_from_name(const f_string_static_t name, f_capability_value_t * const code) {
#ifndef _di_level_0_parameter_checking_
if (!code) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (cap_from_name(name, code) == -1) {
+ if (cap_from_name(name.string, code) == -1) {
if (errno == EINVAL) return F_status_set_error(F_parameter);
if (errno == ENOMEM) return F_status_set_error(F_memory_not);
#endif // _di_f_capability_from_name_
#ifndef _di_f_capability_from_text_
- f_status_t f_capability_from_text(const f_string_t text, f_capability_t *capability) {
+ f_status_t f_capability_from_text(const f_string_static_t text, f_capability_t * const capability) {
#ifndef _di_level_0_parameter_checking_
if (!capability) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- *capability = cap_from_text(text);
+ *capability = cap_from_text(text.string);
if (*capability) {
return F_none;
#ifndef _di_libcap_
#ifndef _di_f_capability_initialize_
- f_status_t f_capability_initialize(f_capability_t *capability) {
+ f_status_t f_capability_initialize(f_capability_t * const capability) {
#ifndef _di_level_0_parameter_checking_
if (!capability) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_capability_mode_get_
#ifndef _di_f_capability_mode_get_name_
- f_status_t f_capability_mode_get_name(const f_capability_mode_t mode, f_string_constant_t *name) {
+ f_status_t f_capability_mode_get_name(const f_capability_mode_t mode, f_string_static_t * const name) {
#ifndef _di_level_0_parameter_checking_
if (!mode) return F_status_set_error(F_parameter);
if (!name) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- *name = cap_mode_name(mode);
+ name.string = cap_mode_name(mode);
+ name.used = strnlen(name.string, F_string_t_size_d);
+ name.size = 0;
return F_none;
}
#endif // _di_f_capability_mode_set_
#ifndef _di_f_capability_owner_get_
- f_status_t f_capability_owner_get(const f_capability_t capability, uid_t *id_user) {
+ f_status_t f_capability_owner_get(const f_capability_t capability, uid_t * const id_user) {
#ifndef _di_level_0_parameter_checking_
if (!id_user) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#ifndef _di_libcap_
#ifndef _di_f_capability_process_bound_drop_
- f_status_t f_capability_process_bound_drop(f_capability_value_t value, int *bound) {
+ f_status_t f_capability_process_bound_drop(f_capability_value_t value, int * const bound) {
#ifndef _di_level_0_parameter_checking_
if (!bound) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_capability_process_bound_drop_
#ifndef _di_f_capability_process_bound_get_
- f_status_t f_capability_process_bound_get(f_capability_value_t value, int *bound) {
+ f_status_t f_capability_process_bound_get(f_capability_value_t value, int * const bound) {
#ifndef _di_level_0_parameter_checking_
if (!bound) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_capability_process_bound_get_
#ifndef _di_f_capability_process_get_
- f_status_t f_capability_process_get(f_capability_t *capability) {
+ f_status_t f_capability_process_get(f_capability_t * const capability) {
#ifndef _di_level_0_parameter_checking_
if (!capability) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_capability_process_get_
#ifndef _di_f_capability_process_get_by_id_
- f_status_t f_capability_process_get_by_id(const pid_t id, f_capability_t *capability) {
+ f_status_t f_capability_process_get_by_id(const pid_t id, f_capability_t * const capability) {
#ifndef _di_level_0_parameter_checking_
if (!capability) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#if !defined(_di_libcap_) && !defined(_libcap_legacy_only_)
#ifndef _di_f_capability_security_bits_get_
- f_status_t f_capability_security_bits_get(f_capability_bits_t *bits) {
+ f_status_t f_capability_security_bits_get(f_capability_bits_t * const bits) {
#ifndef _di_level_0_parameter_checking_
if (!bits) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#ifndef _di_libcap_
#ifndef _di_f_capability_size_
- f_status_t f_capability_size(const f_capability_t capability, ssize_t *size) {
+ f_status_t f_capability_size(const f_capability_t capability, ssize_t * const size) {
#ifndef _di_level_0_parameter_checking_
if (!size) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_capability_supported_code_
#ifndef _di_f_capability_to_name_
- f_status_t f_capability_to_name(const int code, f_string_dynamic_t *name) {
+ f_status_t f_capability_to_name(const int code, f_string_dynamic_t * const name) {
#ifndef _di_level_0_parameter_checking_
if (!name) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_capability_to_name_
#ifndef _di_f_capability_to_text_
- f_status_t f_capability_to_text(const f_capability_t capability, f_string_dynamic_t *text) {
+ f_status_t f_capability_to_text(const f_capability_t capability, f_string_dynamic_t * const text) {
#ifndef _di_level_0_parameter_checking_
if (!text) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
* @see cap_set_ambient()
*/
#ifndef _di_f_capability_ambient_get_
- extern f_status_t f_capability_ambient_get(const f_capability_value_t value, int *ambient);
+ extern f_status_t f_capability_ambient_get(const f_capability_value_t value, int * const ambient);
#endif // _di_f_capability_ambient_get_
/**
* @see cap_clear()
*/
#ifndef _di_f_capability_clear_
- extern f_status_t f_capability_clear(f_capability_t *capability);
+ extern f_status_t f_capability_clear(f_capability_t * const capability);
#endif // _di_f_capability_clear_
/**
* @see cap_clear_flag()
*/
#ifndef _di_f_capability_clear_flag_
- extern f_status_t f_capability_clear_flag(const f_capability_flag_t flag, f_capability_t *capability);
+ extern f_status_t f_capability_clear_flag(const f_capability_flag_t flag, f_capability_t * const capability);
#endif // _di_f_capability_clear_flag_
/**
* @see cap_compare()
*/
#ifndef _di_f_capability_compare_
- extern f_status_t f_capability_compare(const f_capability_t capability1, const f_capability_t capability2, int *flags);
+ extern f_status_t f_capability_compare(const f_capability_t capability1, const f_capability_t capability2, int * const flags);
#endif // _di_f_capability_compare_
/**
* @see cap_dup()
*/
#ifndef _di_f_capability_copy_
- extern f_status_t f_capability_copy(const f_capability_t source, f_capability_t *destination);
+ extern f_status_t f_capability_copy(const f_capability_t source, f_capability_t * const destination);
#endif // _di_f_capability_copy_
/**
* @see cap_copy_ext()
*/
#ifndef _di_f_capability_copy_external_
- extern f_status_t f_capability_copy_external(const f_capability_t capability, const ssize_t max, void *external, ssize_t *size);
+ extern f_status_t f_capability_copy_external(const f_capability_t capability, const ssize_t max, void * const external, ssize_t * const size);
#endif // _di_f_capability_copy_external_
/**
* @see cap_copy_int()
*/
#ifndef _di_f_capability_copy_internal_
- extern f_status_t f_capability_copy_internal(const void *external, f_capability_t *capability);
+ extern f_status_t f_capability_copy_internal(const void * const external, f_capability_t * const capability);
#endif // _di_f_capability_copy_internal_
/**
* @see cap_free()
*/
#ifndef _di_f_capability_delete_
- extern f_status_t f_capability_delete(f_capability_t *capability);
+ extern f_status_t f_capability_delete(f_capability_t * const capability);
#endif // _di_f_capability_delete_
/**
* @see cap_get_fd()
*/
#ifndef _di_f_capability_file_descriptor_get_
- extern f_status_t f_capability_file_descriptor_get(const int descriptor, f_capability_t *capability);
+ extern f_status_t f_capability_file_descriptor_get(const int descriptor, f_capability_t * const capability);
#endif // _di_f_capability_file_descriptor_get_
/**
* @see cap_get_file()
*/
#ifndef _di_f_capability_file_get_
- extern f_status_t f_capability_file_get(const f_string_t path, f_capability_t *capability);
+ extern f_status_t f_capability_file_get(const f_string_static_t path, f_capability_t * const capability);
#endif // _di_f_capability_file_get_
/**
* @see cap_set_file()
*/
#ifndef _di_f_capability_file_set_
- extern f_status_t f_capability_file_set(const f_string_t path, const f_capability_t capability);
+ extern f_status_t f_capability_file_set(const f_string_static_t path, const f_capability_t capability);
#endif // _di_f_capability_file_set_
/**
* @see cap_get_flag()
*/
#ifndef _di_f_capability_flag_get_
- extern f_status_t f_capability_flag_get(const f_capability_t capability, const f_capability_value_t code, const f_capability_flag_t flag, f_capability_flag_value_t *enabled);
+ extern f_status_t f_capability_flag_get(const f_capability_t capability, const f_capability_value_t code, const f_capability_flag_t flag, f_capability_flag_value_t * const enabled);
#endif // _di_f_capability_flag_get
/**
* @see cap_set_flag()
*/
#ifndef _di_f_capability_flag_set_
- extern f_status_t f_capability_flag_set(const f_capability_flag_t flag, const f_capability_flag_value_t enabled, const f_int32s_t codes, f_capability_t *capability);
+ extern f_status_t f_capability_flag_set(const f_capability_flag_t flag, const f_capability_flag_value_t enabled, const f_int32s_t codes, f_capability_t * const capability);
#endif // _di_f_capability_flag_set_
/**
* @see cap_from_name()
*/
#ifndef _di_f_capability_from_name_
- extern f_status_t f_capability_from_name(const f_string_t name, f_capability_value_t *code);
+ extern f_status_t f_capability_from_name(const f_string_static_t name, f_capability_value_t * const code);
#endif // _di_f_capability_from_name_
/**
* Get the capability represented by the given string.
*
* @param text
- * The human-readable NULL terminated string representing the capabilities (such as "cap_chown+ep").
+ * The human-readable string representing the capabilities (such as "cap_chown+ep").
+ * This must be a NULL terminated string.
* @param capability
* The determined capabilities.
- * This must be freed via f_capability_delete() when finished with.
+ * This must be freed via f_capability_delete().
*
* @return
* F_none on success.
* @see cap_from_text()
*/
#ifndef _di_f_capability_from_text_
- extern f_status_t f_capability_from_text(const f_string_t text, f_capability_t *capability);
+ extern f_status_t f_capability_from_text(const f_string_static_t text, f_capability_t * const capability);
#endif // _di_f_capability_from_text_
/**
* @see cap_init()
*/
#ifndef _di_f_capability_initialize_
- extern f_status_t f_capability_initialize(f_capability_t *capability);
+ extern f_status_t f_capability_initialize(f_capability_t * const capability);
#endif // _di_f_capability_initialize_
/**
* @see cap_get_mode()
*/
#ifndef _di_f_capability_mode_get_
- extern f_status_t f_capability_mode_get(f_capability_mode_t *mode);
+ extern f_status_t f_capability_mode_get(f_capability_mode_t * const mode);
#endif // _di_f_capability_mode_get_
/**
* The capability mode.
* @param name
* The name of the mode.
- * This is a NULL terminated string.
- * This is not an allocated string.
+ * This is NULL terminated after the name.used.
*
* @return
* F_none on success.
* @see cap_get_mode()
*/
#ifndef _di_f_capability_mode_get_name_
- extern f_status_t f_capability_mode_get_name(const f_capability_mode_t mode, f_string_constant_t *name);
+ extern f_status_t f_capability_mode_get_name(const f_capability_mode_t mode, f_string_static_t * const name);
#endif // _di_f_capability_mode_get_name_
/**
* @see cap_get_owner()
*/
#ifndef _di_f_capability_owner_get_
- extern f_status_t f_capability_owner_get(const f_capability_t capability, uid_t *id_user);
+ extern f_status_t f_capability_owner_get(const f_capability_t capability, uid_t * const id_user);
#endif // _di_f_capability_owner_get_
/**
* @see cap_drop_bound()
*/
#ifndef _di_f_capability_process_bound_drop_
- extern f_status_t f_capability_process_bound_drop(f_capability_value_t value, int *bound);
+ extern f_status_t f_capability_process_bound_drop(f_capability_value_t value, int * const bound);
#endif // _di_f_capability_process_bound_drop_
/**
* @see cap_get_bound()
*/
#ifndef _di_f_capability_process_bound_get_
- extern f_status_t f_capability_process_bound_get(f_capability_value_t value, int *bound);
+ extern f_status_t f_capability_process_bound_get(f_capability_value_t value, int * const bound);
#endif // _di_f_capability_process_bound_get_
/**
* @see cap_get_proc()
*/
#ifndef _di_f_capability_process_get_
- extern f_status_t f_capability_process_get(f_capability_t *capability);
+ extern f_status_t f_capability_process_get(f_capability_t * const capability);
#endif // _di_f_capability_process_get_
/**
* @see cap_get_pid()
*/
#ifndef _di_f_capability_process_get_by_id_
- extern f_status_t f_capability_process_get_by_id(const pid_t id, f_capability_t *capability);
+ extern f_status_t f_capability_process_get_by_id(const pid_t id, f_capability_t * const capability);
#endif // _di_f_capability_process_get_by_id_
/**
* @see cap_get_secbits()
*/
#ifndef _di_f_capability_security_bits_get_
- extern f_status_t f_capability_security_bits_get(f_capability_bits_t *bits);
+ extern f_status_t f_capability_security_bits_get(f_capability_bits_t * const bits);
#endif // _di_f_capability_security_bits_get_
/**
* @see cap_size()
*/
#ifndef _di_f_capability_size_
- extern f_status_t f_capability_size(const f_capability_t capability, ssize_t *size);
+ extern f_status_t f_capability_size(const f_capability_t capability, ssize_t * const size);
#endif // _di_f_capability_size_
/**
* @param name
* The determined name.
* The name is appended into this variable.
- * This is not NULL terminated.
+ * This is NULL terminated after the name.used.
*
* @return
* F_none on success.
* @see f_string_dynamic_resize()
*/
#ifndef _di_f_capability_to_name_
- extern f_status_t f_capability_to_name(const f_capability_value_t code, f_string_dynamic_t *name);
+ extern f_status_t f_capability_to_name(const f_capability_value_t code, f_string_dynamic_t * const name);
#endif // _di_f_capability_to_name_
/**
- * Convert the capability to a human-readable NULL terminated string.
+ * Convert the capability to a human-readable string.
*
* This will append the string to text.
*
* @param capability
* The capability code.
* @param text
- * The determined human-readable NULL terminated string.
+ * The determined human-readable string.
+ * This is NULL terminated after the text.used.
*
* @return
* F_none on success.
* @see f_string_dynamic_resize()
*/
#ifndef _di_f_capability_to_text_
- extern f_status_t f_capability_to_text(const f_capability_t capability, f_string_dynamic_t *text);
+ extern f_status_t f_capability_to_text(const f_capability_t capability, f_string_dynamic_t * const text);
#endif // _di_f_capability_to_text_
/**
void test__f_capability_file_get__fails(void **state) {
#if !defined(_di_libcap_)
- const f_string_t path = f_string_t_initialize;
+ const f_string_static_t path = f_string_static_t_initialize;
f_capability_t capability = f_capability_t_initialize;
int errnos[] = {
#ifndef _di_level_0_parameter_checking_
void test__f_capability_file_get__parameter_checking(void **state) {
- const f_string_t path = f_string_t_initialize;
+ const f_string_static_t path = f_string_static_t_initialize;
{
const f_status_t status = f_capability_file_get(path, 0);
void test__f_capability_file_get__works(void **state) {
- const f_string_t path = f_string_t_initialize;
+ const f_string_static_t path = f_string_static_t_initialize;
f_capability_t capability = f_capability_t_initialize;
#if defined(_di_libcap_)
void test__f_capability_file_set__fails(void **state) {
#if !defined(_di_libcap_)
- const f_string_t path = f_string_t_initialize;
+ const f_string_static_t path = f_string_static_t_initialize;
f_capability_t capability = f_capability_t_initialize;
int errnos[] = {
void test__f_capability_file_set__works(void **state) {
- const f_string_t path = f_string_t_initialize;
+ const f_string_static_t path = f_string_static_t_initialize;
f_capability_t capability = f_capability_t_initialize;
#if defined(_di_libcap_)
void test__f_capability_from_name__fails(void **state) {
#if !defined(_di_libcap_)
- const f_string_t name = f_string_t_initialize;
+ const f_string_static_t name = f_string_static_t_initialize;
f_capability_value_t capability_value = f_capability_value_t_initialize;
int errnos[] = {
#ifndef _di_level_0_parameter_checking_
void test__f_capability_from_name__parameter_checking(void **state) {
- const f_string_t name = f_string_t_initialize;
+ const f_string_static_t name = f_string_static_t_initialize;
{
const f_status_t status = f_capability_from_name(name, 0);
void test__f_capability_from_name__works(void **state) {
- const f_string_t name = f_string_t_initialize;
+ const f_string_static_t name = f_string_static_t_initialize;
f_capability_value_t capability_value = f_capability_value_t_initialize;
#if defined(_di_libcap_)
void test__f_capability_from_text__fails(void **state) {
#if !defined(_di_libcap_)
- const f_string_t text = f_string_t_initialize;
+ const f_string_static_t text = f_string_static_t_initialize;
f_capability_t capability = f_capability_t_initialize;
int errnos[] = {
#ifndef _di_level_0_parameter_checking_
void test__f_capability_from_text__parameter_checking(void **state) {
- const f_string_t text = f_string_t_initialize;
+ const f_string_static_t text = f_string_static_t_initialize;
{
const f_status_t status = f_capability_from_text(text, 0);
void test__f_capability_from_text__works(void **state) {
- const f_string_t text = f_string_t_initialize;
+ const f_string_static_t text = f_string_static_t_initialize;
f_capability_t capability = f_capability_t_initialize;
#if defined(_di_libcap_)
void test__f_capability_mode_get_name__works(void **state) {
const f_capability_mode_t mode = f_capability_mode_t_initialize;
- f_string_constant_t constant = f_string_constant_t_initialize;
+ f_string_static_t name = f_string_static_t_initialize;
#if defined(_di_libcap_) || defined(_libcap_legacy_only_)
printf("[ WARN ] f_capability_mode_get_name() is not implemented and cannot be fully tested.\n");
#endif // defined(_di_libcap_) || defined(_libcap_legacy_only_)
{
- const f_status_t status = f_capability_mode_get_name(mode, &constant);
+ const f_status_t status = f_capability_mode_get_name(mode, &name);
#if defined(_di_libcap_) || defined(_libcap_legacy_only_)
assert_int_equal(F_status_set_fine(status), F_implemented_not);
// FLL-0 includes.
#include <fll/level_0/capability.h>
-// mock includes.
+// Mock includes.
#include "mock-capability.h"
-// test includes.
+// Test includes.
#include "test-capability-ambient_get.h"
#include "test-capability-ambient_reset.h"
#include "test-capability-ambient_set.h"
// FLL-0 includes.
#include <fll/level_0/color.h>
-// mock includes.
+// Mock includes.
#include "mock-color.h"
-// test includes.
+// Test includes.
#include "test-color-load_context.h"
#include "test-color-save_1.h"
#include "test-color-save_2.h"
// FLL-0 includes.
#include <fll/level_0/console.h>
-// test includes.
+// Test includes.
#include "test-console-identify.h"
#include "test-console-environment_process.h"
#include "test-console-parameter_prioritize_left.h"
// FLL-0 includes.
#include <fll/level_0/control_group.h>
-// test includes.
+// Test includes.
#include "test-control_group-copy.h"
#ifdef __cplusplus
// FLL-0 includes.
#include <fll/level_0/conversion.h>
-// mock includes.
+// Mock includes.
#include "mock-conversion.h"
-// test includes.
+// Test includes.
#include "test-conversion-character_is_binary.h"
#include "test-conversion-character_is_decimal.h"
#include "test-conversion-character_is_duodecimal.h"
// FLL-0 includes.
#include <fll/level_0/memory.h>
-// test includes.
+// Test includes.
#include "test-memory-adjust.h"
#include "test-memory-delete.h"
#include "test-memory-destroy.h"
#include <fll/level_0/memory.h>
#include <fll/level_0/type_array.h>
-// test includes.
+// Test includes.
#include "test-type_array-array_lengths_adjust.h"
#include "test-type_array-array_lengths_append.h"
#include "test-type_array-array_lengths_decimate_by.h"
status = controller_dynamic_rip_nulless_terminated(buffer, range, &cache->action.generic);
if (F_status_is_error(status)) return status;
- status = f_account_id_by_name(cache->action.generic.string, id);
+ status = f_account_id_by_name(cache->action.generic, id);
if (F_status_is_error(status)) return status;
if (status == F_exist_not) {
status = controller_dynamic_rip_nulless_terminated(buffer, range, &cache->action.generic);
if (F_status_is_error(status)) return status;
- status = f_account_group_id_by_name(cache->action.generic.string, id);
+ status = f_account_group_id_by_name(cache->action.generic, id);
if (F_status_is_error(status)) return status;
if (status == F_exist_not) {
}
}
- status = f_capability_from_text(cache->action.generic.string, &rule->capability);
+ status = f_capability_from_text(cache->action.generic, &rule->capability);
if (F_status_is_error(status) && F_status_set_fine(status) != F_supported_not) {
if (F_status_set_fine(status) == F_memory_not) {
status = F_status_set_fine(status);
if (status == F_number) {
- status = f_account_group_id_by_name(buffer.string, id);
+ status = f_account_group_id_by_name(buffer, id);
if (F_status_is_error(status)) {
fll_error_print(print, F_status_set_fine(status), "f_account_group_id_by_name", F_true);
status = F_status_set_fine(status);
if (status == F_number) {
- status = f_account_id_by_name(buffer.string, id);
+ status = f_account_id_by_name(buffer, id);
if (F_status_is_error(status)) {
fll_error_print(print, status, "f_account_id_by_name", F_true);