# between Acct-Session-ID so can't be used to identify and 802.1X session (we ignore it).
#
# If a session matching the username is found on the port specified, and the
-# session is still active then thats good enough...
+# session is still active then that's good enough...
#
# Author: Arran Cudbard-Bell <arran.cudbard-bell@freeradius.org>
#
while(<FD>) {
#
# Check for ^Port. If we don't see it we
- # wont get confused by non-portslave-finger
+ # won't get confused by non-portslave-finger
# output too.
#
if (/^Port/) {
# and tunnel ID's are for a given Virtual-Access interface to construct
# the following OID: .1.3.6.1.4.1.9.10.24.1.3.2.1.2.2.$tunID.$sessID
# Then gets the username from that OID.
-# Make sure you set the $realm variable at the begining of the file if
+# Make sure you set the $realm variable at the beginning of the file if
# needed. The new type for naslist is cisco_l2tp
sub find_l2tp_login
# We want mtxrInterfaceStatsName from MIKROTIK-MIB
$oid = "1.3.6.1.4.1.14988.1.1.14.1.1.2";
- # Mikrotik doesnt give port IDs correctly to RADIUS :(
+ # Mikrotik doesn't give port IDs correctly to RADIUS :(
# practically this would limit us to a simple only-one user limit for
# this script to work properly.
@output = snmpwalk_prog($ARGV[1], $password, "$oid");
($login, $password) = naspasswd($terminalserver, 1);
return 2 if ($password eq "");
- # MikroTik routeros doesnt tell us to which port the user is connected
+ # MikroTik RouterOS doesn't tell us to which port the user is connected
# practically this would limit us to a simple only-one user limit for
# this script to work properly.
$t = new Net::Telnet (Timeout => 5,
$t->waitfor('/\[.*@.*\] > /');
# It is not possible to get the line numbers etc.
- # Thus we cant support if simultaneous-use is over 1
- # At least I was using pppoe so it wasnt possible.
+ # Thus we can't support if simultaneous-use is over 1
+ # At least I was using pppoe so it wasn't possible.
$t->print('ppp active print column name detail');
# Somehow routeros echo'es our commands 2 times. We dont want to mix
#check for # of $user in output
#the output includes only one = between name and username so we can
- #safely use it as a seperator.
+ #safely use it as a separator.
#disabled until mikrotik starts to send newline after each line...
# @output = $output;
return 2;
}
- # Get loggin information
+ # Get login information
($root, $password) = naspasswd($terminalserver, 1);
return 2 if ($password eq "");
}
-/** Allocates a stats template which describes a single guage/counter
+/** Allocates a stats template which describes a single gauge/counter
*
* This is just intended to simplify allocating a fairly complex memory structure
* src and dst pointers must be set
* @param conf Radsniff configuration.
* @param plugin_instance usually the type of packet (in our case).
* @param type string, the name of a collection of stats e.g. exchange
- * @param type_instance the name of the counter/guage within the collection e.g. latency.
+ * @param type_instance the name of the counter/gauge within the collection e.g. latency.
* @param stats structure to derive statistics from.
* @param values Value templates used to populate lcc_value_list.
* @return
uint64_t rejected; //!< Requests to which we received a reject
uint64_t lost; //!< Requests to which we received no response
uint64_t passed; //!< Requests which passed a filter
- uint64_t failed; //!< Requests which failed a fitler
+ uint64_t failed; //!< Requests which failed a filter
} rc_stats_t;
typedef struct {
* will stay permanently as "activating".
*
* We detect this condition and warn about it here, using the
- * presence of the NOTIFY_SOCKET envrionmental variable to determine
+ * presence of the NOTIFY_SOCKET environmental variable to determine
* whether we're running under systemd.
*/
if (getenv("NOTIFY_SOCKET")) INFO("Built without support for systemd watchdog, but running under systemd");
/*
* Ensure all thread local memory is cleaned up
* before we start cleaning up global resources.
- * This is necessay for single threaded mode
+ * This is necessary for single threaded mode
* to ensure that thread local resources that
* depend on global resources are freed at the
* appropriate time.
RETURN_OK(0);
}
-/** Determine if unresolved atttributes are allowed
+/** Determine if unresolved attributes are allowed
*
*/
static size_t command_allow_unresolved(command_result_t *result, command_file_ctx_t *cc,
}},
{ L("max-buffer-size"), &(command_entry_t){
.func = command_max_buffer_size,
- .usage = "max-buffer-size[ <intger>]",
+ .usage = "max-buffer-size[ <integer>]",
.description = "Limit the maximum temporary buffer space available for any command which uses it"
}},
{ L("migrate "), &(command_entry_t){
return -1;
}
if (EVP_DigestInit_ex((*checkcode)->md_ctx, md, NULL) != 1) {
- fr_tls_strerror_printf("Failed intialising MD ctx");
+ fr_tls_strerror_printf("Failed initialising MD ctx");
goto error;
}
Key = CK || IK
FC = 0x20
P0 = access network identity (3GPP TS 24.302)
- L0 = length of acceess network identity (2 octets, big endian)
+ L0 = length of access network identity (2 octets, big endian)
P1 = SQN xor AK (if AK is not used, AK is treated as 000..0
L1 = 0x00 0x06
@endverbatim
/** Create any kind of VP from the attribute contents
*
* @param[in] ctx to allocate new attributes in.
- * @param[in] out to addd new attributes to.
+ * @param[in] out to add new attributes to.
* @param[in] parent the current attribute we're processing.
* @param[in] data to parse. Points to the data field of the attribute.
* @param[in] attr_len length of the attribute being parsed.
/*
* This should never happen, and probably means that
- * some sort of memory corruption has occured.
+ * some sort of memory corruption has occurred.
*/
if (unlikely(decr_len > (AKA_SIM_IMSI_MAX_LEN + 1))) {
fr_strerror_printf("Decrypted data len invalid. Expected %i bytes, got %zu bytes",
* - If the previous section returned a failure rcode, enter the FAILURE-NOTIFICATION state.
* - ...or call a function to process the contents of the AKA-Identity message, mainly the AT_IDENTITY value.
* - If the message does not contain AT_IDENTITY, then enter the FAILURE-NOTIFICATION state.
- * - If the user requested another identity, re-enter the AKA-Identity sate.
+ * - If the user requested another identity, re-enter the AKA-Identity state.
* - ...or continue based on the value of &Identity-Type which was added by #aka_identity,
* and possibly modified by the user.
* - Fastauth - Enter the REAUTHENTICATION state.
* - If the previous section returned a failure rcode, enter the FAILURE-NOTIFICATION state.
* - ...or call a function to process the contents of the SIM-Start message, mainly the AT_IDENTITY value.
* - If the message does not contain AT_IDENTITY, then enter the FAILURE-NOTIFICATION state.
- * - If the user requested another identity, re-enter the SIM-START sate.
+ * - If the user requested another identity, re-enter the SIM-START state.
* - ...or continue based on the value of &Identity-Type which was added by #sim_start,
* and possibly modified by the user.
* - Fastauth
(void) fr_control_gc(c, rb);
m = fr_control_message_alloc(c, rb, id, data, data_size);
if (!m) {
- fr_strerror_const("Failed allocationg after GC");
+ fr_strerror_const("Failed allocating after GC");
return -2;
}
}
/*
* This is "const", and the user can't
- * touch it. So we just re-use the same
+ * touch it. So we just reuse the same
* configuration everywhere.
*/
connection->child->app_io_instance = inst->app_io_instance;
/*
* This is "const", and the user can't
- * touch it. So we just re-use the same
+ * touch it. So we just reuse the same
* configuration everywhere.
*/
child->app_io_instance = inst->app_io_instance;
* @param[in] m the message to be localized
* @param[in] message_size the size of the message, including the fr_message_t
* @return
- * - NULL on allocation errror
+ * - NULL on allocation error
* - a newly localized message
*/
fr_message_t *fr_message_localize(TALLOC_CTX *ctx, fr_message_t *m, size_t message_size)
* almost immediately fr_message_alloc(). Multiple calls in series
* to fr_message_reserve() MUST NOT be done. The caller could also
* just call fr_ring_buffer_alloc(m->rb, size) if they wanted, and
- * then udpate m->data_size by hand...
+ * then update m->data_size by hand...
*
* The message is returned
*
JPATH_SELECTOR_INVALID = 0,
JPATH_SELECTOR_ROOT, //!< Jump to the root of the document.
JPATH_SELECTOR_CURRENT, //!< Continue at the current node in the document.
- JPATH_SELECTOR_WILDCARD, //!< Wildcard, operate over all array indicies, or fields
+ JPATH_SELECTOR_WILDCARD, //!< Wildcard, operate over all array indices, or fields
JPATH_SELECTOR_FIELD, //!< A field, current JSON node must be an object.
JPATH_SELECTOR_INDEX, //!< Array index, current JSON node must be an array.
JPATH_SELECTOR_SLICE, //!< Array slice, current JSON node must be an array.
* @param inlen length of in.
* @return
* - > 0 on success.
- * - <= 0 on error (* -1 to get offset error ocurred at).
+ * - <= 0 on error (* -1 to get offset error occurred at).
*/
static ssize_t jpath_array_parse(jpath_selector_t *selector, char const *in, size_t inlen)
{
*
* @return
* - > 0 on success.
- * - <= 0 on error (* -1 to get offset error ocurred at).
+ * - <= 0 on error (* -1 to get offset error occurred at).
*/
ssize_t fr_jpath_parse(TALLOC_CTX *ctx, fr_jpath_node_t **head, char const *in, size_t inlen)
{
/*
* Existing key will have refcount decremented
- * and will be freed if thise drops to zero.
+ * and will be freed if this drops to zero.
*/
json_object_object_add(obj, fr_sbuff_start(&attr_name), values);
}
///< rootDSE.
char const *version_str; //!< As returned from the vendorVersion attribute in the
///< rootDSE.
- fr_ldap_directory_type_t type; ///< Cannonical server implementation.
+ fr_ldap_directory_type_t type; ///< Canonical server implementation.
bool cleartext_password; //!< Whether the server will return the user's plaintext
///< password.
fr_dlist_t entry; //!< Entry in list of possible referrals
fr_ldap_query_t *query; //!< Query this referral relates to
LDAPURLDesc *referral_url; //!< URL for the referral
- char *host_uri; //!< Host URI used for referral conneciton
+ char *host_uri; //!< Host URI used for referral connection
char const *identity; //!< Bind identity for referral connection
- char const *password; //!< Bind password for referral connecition
+ char const *password; //!< Bind password for referral connection
fr_ldap_thread_trunk_t *ttrunk; //!< Trunk this referral should use
request_t *request; //!< Request this referral relates to
} fr_ldap_referral_t;
typedef enum {
LDAP_PROC_REFERRAL = 2, //!< LDAP server returned referral URLs.
LDAP_PROC_CONTINUE = 1, //!< Operation is in progress.
- LDAP_PROC_SUCCESS = 0, //!< Operation was successfull.
+ LDAP_PROC_SUCCESS = 0, //!< Operation was successful.
LDAP_PROC_ERROR = -1, //!< Unrecoverable library/server error.
* @param[in] el the event occurred in.
* @param[in] fd the event occurred on.
* @param[in] flags from kevent.
- * @param[in] fd_errno The error that ocurred.
+ * @param[in] fd_errno The error that occurred.
* @param[in] uctx Connection config and handle.
*/
static void _ldap_bind_io_error(UNUSED fr_event_list_t *el, UNUSED int fd,
/*
* Ensure the fd is invalid to start with, preventing
* attempts to remove fd events if the server is shut down
- * before the LDAP conneciton is established
+ * before the LDAP connection is established
*/
c->fd = -1;
*
* Inform the remote LDAP server that we no longer want responses to specific queries.
*
- * @param[in] el For timer mangement.
+ * @param[in] el For timer management.
* @param[in] tconn The trunk connection handle
* @param[in] conn The specific connection queries will be cancelled on
* @param[in] uctx Context provided to fr_trunk_alloc
*
* @param[in] tconn Trunk handle.
* @param[in] el Event list which will be used for I/O and timer events.
- * @param[in] conn_conf Configuration of the connnection.
+ * @param[in] conn_conf Configuration of the connection.
* @param[in] log_prefix What to prefix log messages with.
* @param[in] uctx User context passed to fr_trunk_alloc.
*/
/** Merge connection and call specific client and server controls
*
* LDAP_OPT_CLIENT_CONTROLS and LDAP_OPT_SERVER_CONTROLS are useless
- * because they're overriden in their entirety if any call specific
+ * because they're overridden in their entirety if any call specific
* controls are specified.
*
* @param[out] serverctrls_out Where to write serverctrls.
#define NMAS_E_ACCESS_NOT_ALLOWED (NMAS_E_BASE-59) /* -1659 0xFFFFF985 */
#define NMAS_E_INVALID_SPM_REQUEST (NMAS_E_BASE-97) /* -1697 0xFFFFF95F */
-/* OID of LDAP extenstion calls to read Universal Password */
+/* OID of LDAP extension calls to read Universal Password */
#define NMASLDAP_GET_PASSWORD_REQUEST "2.16.840.1.113719.1.39.42.100.13"
#define NMASLDAP_GET_PASSWORD_RESPONSE "2.16.840.1.113719.1.39.42.100.14"
/*
* Walk the value (v) and test (t), comparing until
- * there is a mis-match or the end of one is reached.
+ * there is a mismatch or the end of one is reached.
*/
while ((v <= v_end) && (t <= t_end)) {
/*
* @param[in] el the event occurred in.
* @param[in] fd the event occurred on.
* @param[in] flags from kevent.
- * @param[in] fd_errno The error that ocurred.
+ * @param[in] fd_errno The error that occurred.
* @param[in] uctx Connection config and handle.
*/
static void _ldap_sasl_bind_io_error(UNUSED fr_event_list_t *el, UNUSED int fd,
* @param[in] el the event occurred in.
* @param[in] fd the event occurred on.
* @param[in] flags from kevent.
- * @param[in] fd_errno The error that ocurred.
+ * @param[in] fd_errno The error that occurred.
* @param[in] uctx Connection config and handle.
*/
static void _ldap_start_tls_io_error(UNUSED fr_event_list_t *el, UNUSED int fd, UNUSED int flags,
* be returned to the redis cluster code.
*/
typedef enum {
- REDIS_RCODE_SUCCESS = 0, //!< Operation was successfull.
+ REDIS_RCODE_SUCCESS = 0, //!< Operation was successful.
REDIS_RCODE_ERROR = -1, //!< Unrecoverable library/server error.
REDIS_RCODE_TRY_AGAIN = -2, //!< Try the operation again.
REDIS_RCODE_RECONNECT = -3, //!< Transitory error, caller should retry the operation
*
* #cluster_map_get and #cluster_map_apply, perform the operations described
* above. The get function, issues the 'cluster slots' command and performs validation, the
- * apply function processes and applys the map.
+ * apply function processes and applies the map.
*
* Failing to apply a map is not a fatal error at runtime, and is only fatal on startup if
* pool.start > 0.
fr_socket_t pending_addr; //!< New node address to be applied when the pool
//!< is reconnected.
- fr_redis_cluster_t *cluster; //!< Commmon configuration (database number,
+ fr_redis_cluster_t *cluster; //!< Common configuration (database number,
//!< password, etc..).
fr_pool_t *pool; //!< Pool associated with this node.
CONF_SECTION *pool_cs; //!< Pool configuration section associated with node.
* - May perform a temporary redirect on receiving a #REDIS_RCODE_ASK status.
* - May reserve a new connection on receiving a #REDIS_RCODE_RECONNECT status.
*
- * If a remap is in progress, has ocurred within the last second, has recently failed,
+ * If a remap is in progress, has occurred within the last second, has recently failed,
* or fails, the '-MOVE' will be treated as a temporary redirect (-ASK).
*
* This allows the server to be more responsive during remaps, as unless the worker has been
tls_conf = fr_tls_conf_parse_client(tls_cs);
if (!tls_conf) {
- ERROR("%s - Failed to parse TLS configuation", cluster->log_prefix);
+ ERROR("%s - Failed to parse TLS configuration", cluster->log_prefix);
talloc_free(cluster);
return NULL;
}
fr_connection_t const *conn = talloc_get_type_abort_const(uctx, fr_connection_t);
fr_redis_handle_t *h = conn->h;
- DEBUG4("redis handle %p - FD %i now readble", h, fd);
+ DEBUG4("redis handle %p - FD %i now readable", h, fd);
redisAsyncHandleRead(h->ac);
}
FALL_THROUGH;
#if HIREDIS_MAJOR >= 1
- case REDIS_REPLY_BIGNUM: /* FIXME - Could try and conver to integer ? */
+ case REDIS_REPLY_BIGNUM: /* FIXME - Could try and convert to integer ? */
#endif
case REDIS_REPLY_STRING:
case REDIS_REPLY_STATUS:
return 0;
}
- ERROR("%s[%d]: Failed expanding '%s' - No matchin files", frame->filename, frame->lineno,
+ ERROR("%s[%d]: Failed expanding '%s' - No matching files", frame->filename, frame->lineno,
value);
return -1;
}
/*
* Skip semicolon if we see it after a
* CONF_PAIR. Also allow comma for
- * backwards compatablity with secret
+ * backwards compatibility with secret
* things in v3.
*/
if ((*ptr == ';') || (*ptr == ',')) {
/**
* $Id$
* @file cf_parse.c
- * @brief Covert internal format configuration values into native C types.
+ * @brief Convert internal format configuration values into native C types.
*
* @copyright 2017 Arran Cudbard-Bell (a.cudbardb@freeradius.org)
* @copyright 2000,2006 The FreeRADIUS server project
* @param[in] _name of the CONF_PAIR to search for.
* @param[in] _type to parse the CONF_PAIR as.
* @param[in] _flags controlling parsing behaviour.
- * @param[in] _struct contaning the field to write the result to.
+ * @param[in] _struct containing the field to write the result to.
* @param[in] _field to write the result to.
*/
# define FR_CONF_OFFSET_TYPE_FLAGS(_name, _type, _flags, _struct, _field) \
*
* @param[in] _name of the CONF_PAIR to search for.
* @param[in] _flags controlling parsing behaviour.
- * @param[in] _struct contaning the field to write the result to.
+ * @param[in] _struct containing the field to write the result to.
* @param[in] _field to write the result to.
*/
# define FR_CONF_OFFSET_FLAGS(_name, _flags, _struct, _field) \
/** conf_parser_t which parses a single CONF_PAIR, writing the result to a field in a struct
*
* @param[in] _name of the CONF_PAIR to search for.
- * @param[in] _struct contaning the field to write the result to.
+ * @param[in] _struct containing the field to write the result to.
* @param[in] _field to write the result to.
*/
# define FR_CONF_OFFSET(_name, _struct, _field) \
* @param[in] _name of the CONF_PAIR to search for.
* @param[in] _type to parse the CONF_PAIR as.
* @param[in] _flags controlling parsing behaviour.
- * @param[in] _struct contaning the field to write the result to.
+ * @param[in] _struct containing the field to write the result to.
* @param[in] _field to write the result to.
*/
# define FR_CONF_OFFSET_IS_SET(_name, _type, _flags, _struct, _field) \
*/
DIAG_OFF(attributes)
typedef enum CC_HINT(flag_enum) {
- CONF_FLAG_HIDDEN = 0, //!< Used by scripts to ommit items from the
+ CONF_FLAG_HIDDEN = 0, //!< Used by scripts to omit items from the
///< generated documentation.
CONF_FLAG_SUBSECTION = (1 << 1), //!< Instead of putting the information into a
///< configuration structure, the configuration
*
* @param[in] ci to return the location of.
* @return
- * - -1 if the #CONF_ITEM was created programatically.
+ * - -1 if the #CONF_ITEM was created programmatically.
* - >= 0 where in the config file the line was parsed from.
*/
int _cf_lineno(CONF_ITEM const *ci)
*
* @param[in] ci to return the location of.
* @return
- * - NULL if the #CONF_ITEM was created programatically.
+ * - NULL if the #CONF_ITEM was created programmatically.
* - The path of the config file the #CONF_ITEM was located in.
*/
char const *_cf_filename(CONF_ITEM const *ci)
#ifdef WITH_TRIE
/*
* @todo - either support client definitions where "proto = *",
- * or udpate this code to allow for that. i.e. we create yet
+ * or update this code to allow for that. i.e. we create yet
* another set of v4/v6 tries, for "proto = *" clients. And then
* do lookups there, too. Or, just unify the udp/tcp tries, and
* instead do post-processing? Though those two clients can have
&FR_DBUFF_TMP(bin, bin_len),
&FR_SBUFF_IN(value + 2, hex_len), false);
if (converted < (bin_len - 1)) {
- cf_log_err(cs, "Invalide hex string in shared secret");
+ cf_log_err(cs, "Invalid hex string in shared secret");
goto error;
}
/*
* Hacks for simplicity. These data types aren't allowed as
- * parameters, so we can re-use them for something else.
+ * parameters, so we can reuse them for something else.
*/
// our fixed string. Any data type LESS than this must be a real data type
/** The requisite period of time has passed, try and re-open the connection
*
- * @param[in] el the time event ocurred on.
+ * @param[in] el the time event occurred on.
* @param[in] now The current time.
* @param[in] uctx The #fr_connection_t the fd is associated with.
*/
*
* Connection wasn't opened within the configured period of time
*
- * @param[in] el the time event ocurred on.
+ * @param[in] el the time event occurred on.
* @param[in] now The current time.
* @param[in] uctx The #fr_connection_t the fd is associated with.
*/
* @param[in] h Handle that was successfully opened.
* @param[in] uctx User context.
* @return
- * - #FR_CONNECTION_STATE_CONNECTED if the handle is useable.
+ * - #FR_CONNECTION_STATE_CONNECTED if the handle is usable.
* - #FR_CONNECTION_STATE_FAILED if the handle is unusable.
*/
typedef fr_connection_state_t (*fr_connection_open_t)(fr_event_list_t *el, void *h, void *uctx);
* @param[in] request currently being processed, may be NULL.
* @param[in] args to call as a fr_value_box_list_t. Program will
* be the first box and arguments in the subsequent boxes.
- * @param[in] env_pairs list of pairs to be presented as evironment variables
+ * @param[in] env_pairs list of pairs to be presented as environment variables
* to the child.
* @param[in] env_escape Wrap string values in double quotes, and apply doublequote
* escaping to all environmental variable values.
* @param[in] request currently being processed, may be NULL.
* @param[in] args to call as a fr_value_box_list_t. Program will
* be the first box and arguments in the subsequent boxes.
- * @param[in] env_pairs list of pairs to be presented as evironment variables
+ * @param[in] env_pairs list of pairs to be presented as environment variables
* to the child.
* @param[in] env_escape Wrap string values in double quotes, and apply doublequote
* escaping to all environmental variable values.
* @param[in] cmd Command to execute. This is parsed into argv[]
* parts, then each individual argv part is
* xlat'ed.
- * @param[in] request Current reuqest
+ * @param[in] request Current request
* @param[in] exec_wait set to true to read from or write to child.
* @param[in] input_pairs list of value pairs - these will be put into
* the environment variables of the child.
*
* @param to_init Array of autoinit structures detailing libraries to initialise
* @return
- * - 0 on succcess
+ * - 0 on success
* - -1 on failure
*/
static int lib_auto_instantiate(global_lib_autoinst_t * const *to_init)
*
* This could all be done in a macro, but it turns out some implementations of the
* variadic macros do not work at all well if the va_list being written to is further
- * up the stack (which is required as you still need a function to convert the elipses
+ * up the stack (which is required as you still need a function to convert the ellipsis
* into a va_list).
*
* So, we use this small wrapper function instead, which will hopefully guarantee
/*
* Reset the colourisation state. The configuration
* files can disable colourisation if the terminal
- * supports it. The configation files *cannot* enable
+ * supports it. The configuration files *cannot* enable
* colourisation if the terminal window doesn't support
* it.
*/
#ifdef HAVE_SETUID
uid_t server_uid; //!< UID we're running as.
- gid_t server_gid; //!< GID we're runing as.
+ gid_t server_gid; //!< GID we're running as.
uid_t uid; //!< UID we should run as.
bool uid_is_set;
gid_t gid; //!< GID we should run as.
* The majority of modules will have a single set of thread-specific instance data.
*
* An exception is dynamic modules, which may have multiple sets of thread-specific instance data tied to
- * a sepcific dynamic use of that module.
+ * a specific dynamic use of that module.
*
* @param[in] ctx Talloc ctx to bind thread specific data to.
* @param[out] out Where to write the allocated #module_thread_instance_t.
rmi = module_root(mi);
/*
- * Fixup the type name, incase something calls
+ * Fixup the type name, in case something calls
* talloc_get_type_abort() on it...
*/
if (!mi->module->thread_inst_type) {
* Allows the module to initialise connection pools, and complete any registrations that depend on
* attributes created during the bootstrap phase.
*
- * @param[in] ml containing modules ot instantiate.
+ * @param[in] ml containing modules to instantiate.
* @return
* - 0 on success.
* - -1 on failure.
typedef struct {
dl_module_inst_t const *inst; //!< Dynamic loader API handle for the module.
void *thread; //!< Thread specific instance data.
- void *env_data; //!< Per call enviornment data.
+ void *env_data; //!< Per call environment data.
void *rctx; //!< Resume ctx that a module previously set.
} module_ctx_t;
/*
* We're reusing pool data add it to our local config
* section. This allows other modules to transitively
- * re-use a pool through this module.
+ * reuse a pool through this module.
*/
if (mycs != cs) {
DEBUG4("%s: Copying pool reference %p from config item \"%s.pool\" to config item \"%s.pool\"",
* module as "foo" in the configuration. If the
* module exports a "recv bar" method, and the
* virtual server has a "recv bar" processing
- * section, then they shoul match.
+ * section, then they should match.
*
* Unfortunately, this process is O(N*M).
* Luckily, we only do it if all else fails, so
* @param[in] root of the server configuration.
* @return
* - 0 if all modules were bootstrapped successfully.
- * - -1 if a module/virtual module failed to boostrap.
+ * - -1 if a module/virtual module failed to bootstrap.
*/
int modules_rlm_bootstrap(CONF_SECTION *root)
{
typedef enum {
PASSWORD_CLEARTEXT = 0, //!< Variable length.
- PASSWORD_HASH, //!< Fixed lenth.
+ PASSWORD_HASH, //!< Fixed length.
PASSWORD_HASH_SALTED, //!< Fixed length hash, variable length salt.
PASSWORD_HASH_VARIABLE //!< Variable length everything.
} password_type_t;
#endif
static fr_pair_t *password_process_header(TALLOC_CTX *ctx, request_t *request, fr_pair_t *known_good);
-/** Metdata for various password attributes
+/** Metadata for various password attributes
*
*/
static password_info_t password_info[] = {
/** Find a "known good" password in the control list of a request
*
* Searches for a "known good" password attribute, and applies any processing
- * and normification operations to it, returning a new mormalised fr_pair_t.
+ * and normification operations to it, returning a new normalised fr_pair_t.
*
* The ctx passed in should be freed when the caller is done with the returned
* fr_pair_t, or alternatively, a persistent ctx may be used and the value
*
* The following macros must be defined before this header is included:
*
- * - PROCESS_INST the type fo structure that holds instance data for the process module.
+ * - PROCESS_INST the type of structure that holds instance data for the process module.
* - PROCESS_PACKET_TYPE an enum, or generic type (uint32) that can hold
* all valid packet types.
* - PROCESS_PACKET_CODE_VALID the name of a macro or function which accepts one argument
//!< and responses.
fr_dict_t const *dict; //!< Dictionary of the protocol that this request belongs to.
- fr_pair_t *pair_root; //!< Root atribute which contains the
+ fr_pair_t *pair_root; //!< Root attribute which contains the
///< other list attributes as children.
/** Pair lists associated with the request
void *opaque; //!< Opaque data.
bool free_on_replace; //!< Whether to talloc_free(opaque) when the request data is removed.
bool free_on_parent; //!< Whether to talloc_free(opaque) when the request is freed
- bool persist; //!< Whether this data should be transfered to a session_entry_t
+ bool persist; //!< Whether this data should be transferred to a session_entry_t
//!< after we're done processing this request.
#ifndef NDEBUG
fr_rb_tree_t *tree; //!< rbtree used to lookup state value.
fr_dlist_head_t to_expire; //!< Linked list of entries to free.
- fr_time_delta_t timeout; //!< How long to wait before cleaning up state entires.
+ fr_time_delta_t timeout; //!< How long to wait before cleaning up state entries.
bool thread_safe; //!< Whether we lock the tree whilst modifying it.
pthread_mutex_t mutex; //!< Synchronisation mutex.
}
/*
- * Link it to the end of the list, which is implicitely
+ * Link it to the end of the list, which is implicitly
* ordered by cleanup time.
*/
fr_dlist_insert_tail(&state->to_expire, entry);
*
* If the request is freed, it's freed immediately.
*
- * Otherwise, if there's another round, we re-use
+ * Otherwise, if there's another round, we reuse
* the state entry and insert it back into the
* tree.
*/
* due to the ability to add multiple instances of each attribute for the
* pair list performance tests.
*
- * So, when entering strings to build tmpls, ensure the top level attriubutes
+ * So, when entering strings to build tmpls, ensure the top level attributes
* all end -0.
*
* The same applies to immediate children of group attributes since they will
}
/*
- * One instance of attribute at the top level - search for non-existant
+ * One instance of attribute at the top level - search for non-existent
*/
static void test_level_1_one_missing(void)
{
*
* Depending what arguments are passed, either copies the value to buff, or writes a pointer
* to a string buffer to out. This allows the most efficient access to the value resolved by
- * the #tmpl_t, avoiding unecessary string copies.
+ * the #tmpl_t, avoiding unnecessary string copies.
*
* @note This function is used where raw string values are needed, which may mean the string
* returned may be binary data or contain unprintable chars. #fr_snprint or #fr_asprint
* If the ref is outside of the internal namespace, then we use it.
*
* If the ref is inside of the internal namespace (e.g. "request"), then we do
- * somthing else.
+ * something else.
*
* If we were given a root dictionary on input, use that. We have to follow this
* dictionary because this function calls itself recursively, WITHOUT updating
if (!dict_def || tr_rules->force_dict_def) dict_def = tr_rules->dict_def;
/*
- * First component is special becase we may need
+ * First component is special because we may need
* to search for it in multiple dictionaries.
*
* This emulates what's done in the initial
TMPL_ATTR_VERIFY(vpt);
}
-/** Covert the leaf attribute of a tmpl to a unknown/raw type
+/** Convert the leaf attribute of a tmpl to a unknown/raw type
*
*/
void tmpl_attr_to_raw(tmpl_t *vpt)
* For refs we skip the attribute pointed to be the ref
* and just print its children.
*
- * In addtion skip printing "request." in most cases.
+ * In addition skip printing "request." in most cases.
*/
if ((stack.da[depth] == request_attr_request) && tmpl_attr_list_next(tmpl_attr(vpt), ar) &&
(ar->filter.type == TMPL_ATTR_FILTER_TYPE_NONE)) continue;
/** Print a #tmpl_t to a string
*
* This function should primarily be used for regenerating vpt->name when the contents
- * of the #tmpl_t is changed programatically, or when the #tmpl_t is being serialized
+ * of the #tmpl_t is changed programmatically, or when the #tmpl_t is being serialized
* in some non-standard way, i.e. as a value for a field in a database.
*
* This function is the direct counterpart to #tmpl_afrom_substr.
/** Verify the attribute reference in a tmpl_t make sense
*
- * @note If the attribute refernece is is invalid, causes the server to exit.
+ * @note If the attribute reference is is invalid, causes the server to exit.
*
* @param file obtained with __FILE__.
* @param line obtained with __LINE__.
* simple parse that isn't wrong. We therefore
* accept most anything that's vaguely well
* formed, and rely on the next stage to do a
- * more rigourous check.
+ * more rigorous check.
*/
skip_string:
*out = p;
* @param[in] oneshot Should this watcher only be run once.
* @param[in] uctx Context to pass to function.
* @return
- * - NULL if an invlaid state is passed.
+ * - NULL if an invalid state is passed.
* - A new watch entry handle on success.
*/
fr_trunk_watch_entry_t *fr_trunk_add_watch(fr_trunk_t *trunk, fr_trunk_state_t state,
/** Move requests off of a connection and requeue elsewhere
*
* @note We don't re-queue on draining or draining to free, as requests should have already been
- * moved off of te connection. It's also dangerous as the trunk management code main
+ * moved off of the connection. It's also dangerous as the trunk management code main
* clean up a connection in this state when it's run on re-queue, and then the caller
* may try and access a now freed connection.
*
* In the case of TRUNK_CONN_DRAINING_TO_FREE the trunk
* management code should spawn a new connection to takes its place.
*
- * Connections placed in the DRAINING_TO_FREE sate are being
+ * Connections placed in the DRAINING_TO_FREE state are being
* closed preemptively to deal with bugs on the server we're
* talking to, or misconfigured firewalls which are trashing
* TCP/UDP connection states.
size_t req_pool_size; //!< The size of the talloc pool allocated with the treq.
bool always_writable; //!< Set to true if our ability to write requests to
- ///< a connection handle is not dependant on the state
+ ///< a connection handle is not dependent on the state
///< of the underlying connection, i.e. if the library
///< used to implement the connection can always receive
///< and buffer new requests irrespective of the state
*
* If the treq (trunk request) is in the FR_TRUNK_REQUEST_STATE_PARTIAL or
* FR_TRUNK_REQUEST_STATE_SENT states, this callback will be called prior
- * to moving the treq to a new connection, requeueing the tre or freeing
+ * to moving the treq to a new connection, requeueing the treq or freeing
* the treq.
*
* The treq, and any associated resources, should be
return bd->bio;
}
- fr_assert_msg(!tls_bio_talloc_agg->dbuff_out.buff, "BIO not finialised");
+ fr_assert_msg(!tls_bio_talloc_agg->dbuff_out.buff, "BIO not finalised");
MEM(fr_dbuff_init_talloc(ctx, &bd->dbuff_out, &bd->tctx, init, max)); /* Where we read from */
bd->dbuff_in = FR_DBUFF_BIND_END_ABS(&bd->dbuff_out); /* Where we write to */
{
SESSION_ID(sess_id, tls_cache->load.sess);
- RDEBUG3("Session ID %pV - Session ownership transfered to libssl", &sess_id);
+ RDEBUG3("Session ID %pV - Session ownership transferred to libssl", &sess_id);
*copy = 0;
tls_cache->load.sess = NULL;
}
/*
* If keys is NULL, then OpenSSL returns the expected
- * key length, which may be different across diferent
+ * key length, which may be different across different
* flavours/versions of OpenSSL.
*
* We could calculate this in conf.c, but, if in future
* TLS1_3_VERSION is available in OpenSSL 1.1.1.
*
* TLS1_4_VERSION does not exist yet. But we allow it
- * only if it is explictly permitted by the
+ * only if it is explicitly permitted by the
* administrator.
*/
if (conf->tls_max_version > (float) 0.0) {
#endif
/*
- * Set eliptical curve crypto configuration.
+ * Set elliptical curve crypto configuration.
*/
#ifndef OPENSSL_NO_ECDH
if (ctx_ecdh_curve_set(ctx, conf->ecdh_curve, conf->disable_single_dh_use) < 0) goto error;
/*
* Grab the X509 extensions, and create attributes out of them.
- * For laziness, we re-use the OpenSSL names
+ * For laziness, we reuse the OpenSSL names
*/
if (sk_X509_EXTENSION_num(ext_list) > 0) {
int i;
*/
int fr_tls_session_alert(UNUSED request_t *request, fr_tls_session_t *session, uint8_t level, uint8_t description)
{
- if (session->alerts_sent > 3) return -1; /* Some kind of sate machine brokenness */
+ if (session->alerts_sent > 3) return -1; /* Some kind of state machine brokenness */
/*
* Ignore less severe alerts
*
* @param[in] request being cancelled.
* @param[in] action we're being signalled with.
- * @param[in] uctx the SSL * to cancell.
+ * @param[in] uctx the SSL * to cancel.
*/
static void tls_session_async_handshake_signal(UNUSED request_t *request, UNUSED fr_signal_t action, void *uctx)
{
/** Remove a call_env_parsed_t from the list of parsed call envs
*
- * @note Indended to be used by subsection callbacks to remove a call_env_parsed_t
+ * @note Intended to be used by subsection callbacks to remove a call_env_parsed_t
* from the list of parsed call envs (typically on error).
*
* @param[in] parsed to remove parsed data from.
*
* Ensure that the module has a "map" entry in its module
* header? Or ensure that the map is registered in the
- * "boostrap" phase, so that it's always available here.
+ * "bootstrap" phase, so that it's always available here.
*/
if (!pass2_fixup_map_rhs(g, unlang_ctx->rules)) goto error;
value = cf_pair_value(cp);
if (!value) {
- cf_log_err(csi, "Retry configuration must specifiy a value");
+ cf_log_err(csi, "Retry configuration must specify a value");
return false;
}
/*
* If we're compiling an empty section, then the
- * *intepreter* type is GROUP, even if the *debug names*
+ * *interpreter* type is GROUP, even if the *debug names*
* are something else.
*/
g = group_allocate(parent, cs, ext);
fr_assert(current->parent);
if (!box) {
- RWDEBUG("Failed exapnding result");
+ RWDEBUG("Failed expanding result");
return -1;
}
/*
* For "+=", if there's no existing attribute, create one, and rewrite the operator we
* apply to ":=". Which also means moving the operator be in edit_map_t, and then updating the
- * "apply" funtions above to use that for the operations, but map->op for printing.
+ * "apply" functions above to use that for the operations, but map->op for printing.
*
* This allows "foo += 4" to set "foo := 4" when the attribute doesn't exist. It also allows us
* to do list appending to an empty list. But likely only for strings, octets, and numbers.
/** Update the current result after each instruction, and after popping each stack frame
*
* @param[in] request The current request.
- * @param[in] frame The curren stack frame.
+ * @param[in] frame The current stack frame.
* @param[in,out] result The current section result.
* @param[in,out] priority The current section priority.
* @return
/** Evaluates all the unlang nodes in a section
*
* @param[in] request The current request.
- * @param[in] frame The curren stack frame.
+ * @param[in] frame The current stack frame.
* @param[in,out] result The current section result.
* @param[in,out] priority The current section priority.
* @return
*
* @param[in] request The current request.
* @return
- * - true if the request is resumable (i.e. has yeilded)
+ * - true if the request is resumable (i.e. has yielded)
* - false if the request is not resumable (i.e. has not yielded)
*/
bool unlang_interpret_is_resumable(request_t *request)
/** Signal the owner of the interpreter that a request has yielded
*
- * This is called whenever a request has given control back to the interpeter.
+ * This is called whenever a request has given control back to the interpreter.
*/
typedef void (*unlang_request_yield_t)(request_t *request, void *uctx);
-/** Signal the owner of the interpeter that a request is ready to be resumed
+/** Signal the owner of the interpreter that a request is ready to be resumed
*
* This is called any time a yielded request has resumed.
*/
typedef void (*unlang_request_resume_t)(request_t *request, void *uctx);
-/** Signal the owner of the interpeter that a request is now runnable
+/** Signal the owner of the interpreter that a request is now runnable
*
* This is called any time a yielded request has been marked runnable.
*/
typedef void (*unlang_request_runnable_t)(request_t *request, void *uctx);
-/** Signal the owner of the interpeter that a request is now runnable
+/** Signal the owner of the interpreter that a request is now runnable
*
* This is called any time a yielded request has been marked runnable.
*/
case UNLANG_UPDATE_MAP_EXPANDED_LHS:
/*
- * map_to_list_mod() already concatentates the LHS, so we don't need to do it here.
+ * map_to_list_mod() already concatenates the LHS, so we don't need to do it here.
*/
if (!map->rhs) goto next;
* the resumption frame and execute the xlat interpreter.
*
* When the xlat interpreter finishes, and pops the xlat frame, the unlang interpreter
- * will then call the module resumption frame, allowing the module to continue exectuion.
+ * will then call the module resumption frame, allowing the module to continue execution.
*
* @param[in] ctx To allocate talloc value boxes and values in.
* @param[out] p_success Whether xlat evaluation was successful.
* the resumption frame and execute the tmpl expansion.
*
* When the tmpl interpreter finishes, and pops the tmpl frame, the unlang interpreter
- * will then call the module resumption frame, allowing the module to continue exectuion.
+ * will then call the module resumption frame, allowing the module to continue execution.
*
* @param[in] ctx To allocate talloc value boxes and values in.
* @param[out] out Where to write the result of the expansion.
* $Id$
*
* @file unlang/try_priv.h
- * @brief Declarations for unlang trys
+ * @brief Declaration for unlang try
*
* @copyright 2023 Network RADIUS SAS (legal@networkradius.com)
*/
*
*
* @param[in] XLAT_ARGS_N the name of the macro to expand.
- * Created by concating ``XLAT_ARGS_ + <number of variadic arguments>``.
+ * Created by concatenating ``XLAT_ARGS_ + <number of variadic arguments>``.
* @param[in] _list The input list of value boxes.
* @param[in] ... The variadic arguments themselves.
*/
*
* Example:
@verbatim
-%log.err("Big errror here")
+%log.err("Big error here")
@endverbatim
*
* @ingroup xlat_functions
* $Id$
*
* @file xlat_eval.c
- * @brief String expansion ("translation"). Evaluation of pre-parsed xlat epxansions.
+ * @brief String expansion ("translation"). Evaluation of pre-parsed xlat expansions.
*
* @copyright 2018-2021 Arran Cudbard-Bell (a.cudbardb@freeradius.org)
* @copyright 2000,2006 The FreeRADIUS server project
}
/*
- * Start searching from the next entry, OR start seaching from where we left off before.
+ * Start searching from the next entry, OR start searching from where we left off before.
*/
if (j < 0) j = i + 1;
/*
* We've parsed one "thing", so we stop. The
- * next thing shoud be an operator, not another
+ * next thing should be an operator, not another
* value.
*/
*out_c = '\0';
/** Register an xlat function for a module
*
- * @param[in] ctx Used to automate deregistration of the xlat fnction.
+ * @param[in] ctx Used to automate deregistration of the xlat function.
* @param[in] mctx Instantiation context from the module.
* Will be duplicated and passed to future xlat calls.
* @param[in] name of the xlat.
/** Register an xlat function
*
- * @param[in] ctx Used to automate deregistration of the xlat fnction.
+ * @param[in] ctx Used to automate deregistration of the xlat function.
* @param[in] name of the xlat.
* @param[in] func to register.
* @param[in] return_type what type of output the xlat function will produce.
if (arg->variadic) {
if (!fr_cond_assert_msg(last, "%s - variadic can only be set on the last argument", x->name)) return -1;
if (!fr_cond_assert_msg(!arg->required, "%s - required can't be set on a variadic argument. "
- "Set required in the preceeding entry", x->name)) return -1;
+ "Set required in the preceding entry", x->name)) return -1;
}
if (arg->always_escape) {
#ifndef NDEBUG
char const * _CONST file; //!< File where the xlat was allocated.
- int line; //!< Line where the xlat was alocated.
+ int line; //!< Line where the xlat was allocated.
#endif
union {
#ifndef NDEBUG
char const * _CONST file; //!< File where the xlat was allocated.
- int line; //!< Line where the xlat was alocated.
+ int line; //!< Line where the xlat was allocated.
#endif
};
/*
* value op attribute
*
- * We just swap LHS and RHS without caring about the operator, because wee don't use the
+ * We just swap LHS and RHS without caring about the operator, because we don't use the
* operator, and the caller has no idea that we swapped the pointers..
*/
if ((rhs->type == XLAT_TMPL) && tmpl_is_attr(rhs->vpt) &&
*/
head->flags = node->flags;
if (xlat_finalize(head, NULL) < 0) {
- PERROR("Failed boostrapping function \"%s\"",
+ PERROR("Failed bootstrapping function \"%s\"",
xrf->func->name);
goto error;
}
* @param[out] _out Pointer to buffer to parse
* @param[in] _start Start of the buffer to parse.
* @param[in] _len_or_end Either an end pointer or the length
- * of the buffer we're deconding.
+ * of the buffer we're decoding.
*/
#define fr_dbuff_init(_out, _start, _len_or_end) \
_fr_dbuff_init(_out, \
/** @name Extension requests
*
* These functions/macros may be used to request that the underlying buffer is
- * either extended to accomodate more data, or that data is shifted out of the
+ * either extended to accommodate more data, or that data is shifted out of the
* buffer, and that the buffer is refilled.
*
* @{
/** Copy data from a dbuff or marker to a fixed sized C type
*
* @param[out] _out Where to write the data. If out is an integer type
- * a byteswap will be performed if native endianess
+ * a byteswap will be performed if native endianness
* is not big endian.
* @param[in] _dbuff_or_marker to copy data from. Will be advanced by the number
* of bytes consumed, i.e. if out is a uin16_t *,
FR_DICT_ATTR_NOTFOUND = -1, //!< Attribute couldn't be found.
FR_DICT_ATTR_PROTOCOL_NOTFOUND = -2, //!< Protocol couldn't be found.
FR_DICT_ATTR_PARSE_ERROR = -3, //!< Attribute string couldn't be parsed
- FR_DICT_ATTR_INTERNAL_ERROR = -4, //!< Internal error ocurred.
+ FR_DICT_ATTR_INTERNAL_ERROR = -4, //!< Internal error occurred.
FR_DICT_ATTR_OOM = -5, //!< Memory allocation error.
FR_DICT_ATTR_NOT_DESCENDENT = -6, //!< Attribute is not a descendent of the parent
///< attribute.
#include <freeradius-devel/util/dict_ext.h>
/** @} */
-/** @name Programatically create dictionary attributes and values
+/** @name Programmatically create dictionary attributes and values
*
* @{
*/
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-/** Common functions for test files which need to programatically create test dictionaries
+/** Common functions for test files which need to programmatically create test dictionaries
*
* @file src/lib/util/dict_test.c
*
/** (Re-)Initialize the special internal dictionary
*
- * This dictionary has additional programatically generated attributes added to it,
+ * This dictionary has additional programmatically generated attributes added to it,
* and is checked in addition to the protocol specific dictionaries.
*
* @note The dictionary pointer returned in out must have its reference counter
* @note Will leave the sbuff pointing at the component the error occurred at
* so that the caller can attempt to process the component in another way.
* An err pointer should be provided in order to determine if an error
- * ocurred.
+ * occurred.
*
* @param[out] err The parsing error that occurred.
* @param[out] out The deepest attribute we resolved.
* @param[in] da The vendor attribute.
* @return
* - The vendor.
- * - NULL if no vendor with that number was regitered for this protocol.
+ * - NULL if no vendor with that number was registered for this protocol.
*/
fr_dict_vendor_t const *fr_dict_vendor_by_da(fr_dict_attr_t const *da)
{
* @param[in] name to search for.
* @return
* - The vendor.
- * - NULL if no vendor with that name was regitered for this protocol.
+ * - NULL if no vendor with that name was registered for this protocol.
*/
fr_dict_vendor_t const *fr_dict_vendor_by_name(fr_dict_t const *dict, char const *name)
{
* @param[in] vendor_pen to search for.
* @return
* - The vendor.
- * - NULL if no vendor with that number was regitered for this protocol.
+ * - NULL if no vendor with that number was registered for this protocol.
*/
fr_dict_vendor_t const *fr_dict_vendor_by_num(fr_dict_t const *dict, uint32_t vendor_pen)
{
* This function will search through all loaded dictionaries, or a subset of
* loaded dictionaries, for a matching attribute in the top level namespace.
*
- * This attribute may be qualified with `<protcol>.` to selection an attribute
+ * This attribute may be qualified with `<protocol>.` to selection an attribute
* in a specific case.
*
* @note If calling this function from the server any list or request qualifiers
* @note If calling this function from the server any list or request qualifiers
* should be stripped first.
*
- * @note err should be checked to determine if a parse error ocurred.
+ * @note err should be checked to determine if a parse error occurred.
*
* @param[out] err Why parsing failed. May be NULL.
* @see fr_dict_attr_err_t
* @note If calling this function from the server any list or request qualifiers
* should be stripped first.
*
- * @note err should be checked to determine if a parse error ocurred.
+ * @note err should be checked to determine if a parse error occurred.
*
* @param[out] err Why parsing failed. May be NULL.
* @see fr_dict_attr_err_t
}
/*
- * Do a second pass, ensuring that the name has at least one alpha-numeric character.
+ * Do a second pass, ensuring that the name has at least one alphanumeric character.
*/
for (p = buffer; p < (buffer + len); p++) {
if (sbuff_char_alpha_num[(uint8_t) *p]) break;
*
* This should only be used when dictionaries are being dynamically loaded during
* compilation. It should not be used to load dictionaries at runtime, or if
- * modules need to load dicitonaries (use static fr_dict_autoload_t defs).
+ * modules need to load dictionaries (use static fr_dict_autoload_t defs).
*/
struct fr_dict_autoload_talloc_s {
* Mainly useful for resolving "forward" references from unlang immediately.
*
* @note If the talloc chunk is freed it does not mean the dictionary will
- * be immediately freeed. It will be freed when all other references
+ * be immediately freed. It will be freed when all other references
* to the dictionary are gone.
*
- * @parma[in] ctx to bind the dictionary lifetime to.
- * @parma[in] proto to load.
+ * @param[in] ctx to bind the dictionary lifetime to.
+ * @param[in] proto to load.
* @param[in] dependent to register this reference to. Will be dupd.
*/
fr_dict_autoload_talloc_t *_fr_dict_autoload_talloc(TALLOC_CTX *ctx, fr_dict_t const **out, char const *proto, char const *dependent)
* Note that by design, next > end. We don't care about
* the size of the buffer we put "label" into. We only
* care that all bytes of "label" are valid, and we don't
- * access memroy after "label".
+ * access memory after "label".
*/
/*
* ... an entire domain name or a list of
* labels at the end of a domain name is
* replaced with a pointer to a prior
- * occurance of the same name.
+ * occurrence of the same name.
* ...
*
* Note the key word PRIOR. If we
/*
* We call edit_record() twice, which involves two
* complete passes over the edit list. That's fine,
- * either the edit list is small, OR we will eventially
+ * either the edit list is small, OR we will eventually
* put the VPs to be edited into an RB tree.
*/
if (edit_record(el, FR_EDIT_INSERT, vp, list, to_replace) < 0) return -1;
/** Commit an edit list.
*
* If there are nested transactions, then this transaction is
- * committed only when the parent transaction has been commited.
+ * committed only when the parent transaction has been committed.
*
*/
void fr_edit_list_commit(fr_edit_list_t *el)
* @param[in] prev Previous set of functions mapped to filters.
* @return
* - >= 0 the number of changes written to out.
- * - < 0 an error ocurred.
+ * - < 0 an error occurred.
*/
static ssize_t fr_event_build_evset(
#ifndef WITH_EVENT_DEBUG
* @param[in] error function to call when an error occurs on the fd.
* @param[in] uctx to pass to handler.
* @return
- * - 0 on succes.
+ * - 0 on success.
* - -1 on failure.
*/
int _fr_event_fd_insert(NDEBUG_LOCATION_ARGS
}
/*
- * If there is an event, re-use it instead of freeing it
+ * If there is an event, reuse it instead of freeing it
* and allocating a new one. This is to reduce memory
* churn for repeat events.
*/
/*
* Failed adding waiter for process, but process has not completed...
*
- * This weird, but seems to happen on macOS ocassionally.
+ * This weird, but seems to happen on macOS occasionally.
*
* Add an event to run early exit...
*
* exist. Look for the LAST path name. Try
* to create that. If there's an error, we leave
* the path path as the one at which the
- * error occured.
+ * error occurred.
*/
p = strrchr(path, FR_DIR_SEP);
if (!p || (p == path)) return start - path; /* last path component and we've previously failed */
/*
* Catch Linux weirdness.
*
- * You'd think this'd be enough to quiet clang scan,
+ * You'd think this would be enough to quiet clang scan,
* but it's not.
*/
if (unlikely((tsibs == 0) || (lcores == 0) || (lcores > tsibs))) {
* found and a record for AF_INET6 exists that record will be returned.
*
* If fallback is specified and af is AF_INET6, and a record with AF_INET4 exists
- * that record will be returned inseted.
+ * that record will be returned inserted.
*
* @param[out] out Where to write result.
* @param[in] af To search for in preference.
*
* @note Should only be used on nonblocking file descriptors.
* @note Socket should likely be closed on timeout.
- * @note iovec may be modified in such a way that it's not re-usable.
+ * @note iovec may be modified in such a way that it's not reusable.
* @note Leaves errno set to the last error that occurred.
*
* @param fd to write to.
*
* @param m The state machine
* @return
- * - 0 for "no transition has occured"
+ * - 0 for "no transition has occurred"
* - >0 for "we are in a new state".
* -<0 for "error, you should tear down the state machine".
*
* @param m The state machine
* @param signal the signal to send to the state machne
* @return
- * - 0 for "no transition has occured"
+ * - 0 for "no transition has occurred"
* - >0 for "we are in a new state".
* -<0 for "error, you should tear down the state machine".
*
* If attr and vendor match a dictionary entry then a VP with that #fr_dict_attr_t
* will be returned.
*
- * If attr or vendor are uknown will call dict_attruknown to create a dynamic
+ * If attr or vendor are unknown will call dict_attruknown to create a dynamic
* #fr_dict_attr_t of #FR_TYPE_OCTETS.
*
* Which type of #fr_dict_attr_t the #fr_pair_t was created with can be determined by
/** Iterate over pairs which are decedents of the specified da
*
- * @param[in] list to itterate over.
+ * @param[in] list to iterate over.
* @param[in] current The fr_pair_t cursor->current. Will be advanced and checked to
* see if it matches the specified fr_dict_attr_t.
* @param[in] uctx The fr_dict_attr_t to search for.
*
* @param[in] list to get the head from
*
- * @return the pointer to the dlist wihin the pair list.
+ * @return the pointer to the dlist within the pair list.
*/
_INLINE fr_dlist_head_t *fr_pair_list_to_dlist(fr_pair_list_t const *list)
{
if (!found) goto do_add;
/*
- * Delete *all* matching attribues.
+ * Delete *all* matching attributes.
*/
fr_pair_delete_by_da(to, found->da);
goto do_add;
if ((i == 0) && (perc > 0) && (reps > 0)) {
fr_pair_t *new_vp;
/*
- * Copy the required number of attributes from the first itteration
+ * Copy the required number of attributes from the first iteration
* to use for duplicating attributes to required percentage.
* Duplicates are at the beginning of the source list
*/
if (i == 0) {
/*
- * On the first itteration, just move the test pairs to the final list
+ * On the first iteration, just move the test pairs to the final list
*/
fr_pair_list_append(&full_list, &list);
} else {
/*
- * With subsequent itterations, replicate the duplicates from the first
- * itteration to maintain the percentage of attribute repeats
+ * With subsequent iterations, replicate the duplicates from the first
+ * iteration to maintain the percentage of attribute repeats
*/
vp = fr_pair_list_head(&dups);
fr_pair_sublist_copy(ctx, &full_list, &dups, vp, 0);
TEST_CASE("Validating PAIR_VERIFY()");
PAIR_VERIFY(vp);
- TEST_CASE("Converting regular 'vp' as unkown");
+ TEST_CASE("Converting regular 'vp' as unknown");
TEST_CHECK(fr_pair_raw_from_pair(vp, &value, 1) == 0);
TEST_CASE("Checking if a real 'raw' vp");
/** Implements the default iterator to encode pairs belonging to a specific dictionary that are not internal
*
- * @param[in] list to itterate over.
+ * @param[in] list to iterate over.
* @param[in] current The fr_pair_t cursor->current. Will be advanced and checked to
* see if it matches the specified fr_dict_t.
* @param[in] uctx The fr_dict_t to search for.
/** Initialises a red black tree
*
- * This variant initates an #fr_rb_node_t on the heap. This allows the data structure
+ * This variant initiates an #fr_rb_node_t on the heap. This allows the data structure
* to be inserted into multiple trees.
*
* @param[out] _tree to initialise.
/** Initialises a red black that verifies elements are of a specific talloc type
*
* This variant stores #fr_rb_node_t data inline with the data structure to avoid
- * initating #fr_rb_node_t on the heap.
+ * initiating #fr_rb_node_t on the heap.
*
* It is suitable for use where the data structure will only be inserted into a
* fixed set of trees.
/** Initialises a red black tree
*
* This variant stores #fr_rb_node_t data inline with the data structure to avoid
- * initating #fr_rb_node_t on the heap.
+ * initiating #fr_rb_node_t on the heap.
*
* It is suitable for use where the data structure will only be inserted into a
* fixed set of trees.
return -1;
}
-/** Used to define a number parsing functions for singed integers
+/** Used to define a number parsing functions for signed integers
*
* @param[in] _name Function suffix.
* @param[in] _type Output type.
SBUFF_PARSE_INT_DEF(int64, int64_t, INT64_MIN, INT64_MAX, 20, 0)
SBUFF_PARSE_INT_DEF(ssize, ssize_t, SSIZE_MIN, SSIZE_MAX, 20, 0)
-/** Used to define a number parsing functions for singed integers
+/** Used to define a number parsing functions for signed integers
*
* @param[in] _name Function suffix.
* @param[in] _type Output type.
* normally stop at the "-". However, we will still stop at "Framed-=User", as
* "-=" may be a terminal sequence.
*
- * There is no perfect solution here, other than to fix the input grammer so that
+ * There is no perfect solution here, other than to fix the input grammar so that
* it has no ambiguity. Since we can't do that, we choose to err on the side of
* allowing the existing grammar, where it makes sense
*/
* @param[in] sbuff to search for char in.
* @param[in] c char to search for.
* @return
- * - true and avance if the next character matches.
+ * - true and advance if the next character matches.
* - false and don't advance if the next character doesn't match.
*/
bool fr_sbuff_next_if_char(fr_sbuff_t *sbuff, char c)
* @param[in] sbuff to search for char in.
* @param[in] c char to search for.
* @return
- * - true and avance unless the character matches.
+ * - true and advance unless the character matches.
* - false and don't advance if the next character matches.
*/
bool fr_sbuff_next_unless_char(fr_sbuff_t *sbuff, char c)
size_t fr_sbuff_extend_file(fr_sbuff_t *sbuff, size_t extension);
-size_t fr_sbuff_extend_talloc(fr_sbuff_t *sbuff, size_t extenison);
+size_t fr_sbuff_extend_talloc(fr_sbuff_t *sbuff, size_t extension);
int fr_sbuff_trim_talloc(fr_sbuff_t *sbuff, size_t len);
/*
* Escapes and substitution
*/
- TEST_CASE("Escape with substition to same char");
+ TEST_CASE("Escape with substitution to same char");
fr_sbuff_init_in(&sbuff, in_escapes, sizeof(in_escapes) - 1);
slen = fr_sbuff_out_unescape_until(&FR_SBUFF_OUT(escape_out, sizeof(escape_out)), &sbuff, SIZE_MAX,
&FR_SBUFF_TERM("g"), &pipe_rules);
TEST_CHECK_STRCMP(escape_out, "i am a |t|est string");
TEST_CHECK_STRCMP(sbuff.p, "");
- TEST_CASE("Escape with substition to different char");
+ TEST_CASE("Escape with substitution to different char");
fr_sbuff_init_in(&sbuff, in_escapes, sizeof(in_escapes) - 1);
slen = fr_sbuff_out_unescape_until(&FR_SBUFF_OUT(escape_out, sizeof(escape_out)), &sbuff, SIZE_MAX,
&FR_SBUFF_TERM("g"), &pipe_rules_sub);
p = fr_sbuff_adv_to_chr_utf8(&sbuff, SIZE_MAX, "🍆 ");
TEST_CHECK(p == NULL);
- TEST_CASE("Check for token at the end of the string within len contraints");
+ TEST_CASE("Check for token at the end of the string within len constraints");
fr_sbuff_init_in(&sbuff, in, sizeof(in) - 1);
p = fr_sbuff_adv_to_chr_utf8(&sbuff, (sizeof("🥺🥺🥺🥺🍪😀") - 1), "😀");
TEST_CHECK(p == sbuff.start + (sizeof("🥺🥺🥺🥺🍪") - 1));
/** Returns a semid for the semaphore associated with the file
*
- * @param[in] file to get or create sempahore from.
+ * @param[in] file to get or create semaphore from.
* @param[in] proj_id if 0 will default to '0xf4ee4a31'.
* @param[in] uid that should own the semaphore.
* @param[in] gid that should own the semaphore.
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-/** Resouce pool management using slabs of memory
+/** Resource pool management using slabs of memory
*
* @file src/lib/util/slab.h
*
/*
* Releasing the first element should reset the destructor
- * so releasing this re-use of it will not update the result
+ * so releasing this reuse of it will not update the result
* of the initial release.
*/
if (test_elements[4]) test_elements[4]->name = talloc_strdup(test_elements[4], "Different length string");
if (test_elements[0] && test_elements[2]) TEST_CHECK(test_elements[2]->name == test_elements[0]->name);
/*
- * Replace the element's string so that the callback on relase has
+ * Replace the element's string so that the callback on release has
* a different string to work on.
*/
if (test_elements[2]) talloc_free(test_elements[2]->name);
* 1.0:
* * supporting must ANSI syntaxic_sugars
* 0.0:
- * * suppot %s %c %d
+ * * support %s %c %d
*
* THANKS(for the patches and ideas):
* Miles Bader
/*
* return an ascii representation of the integral part of the number
* and set fract to be an ascii representation of the fraction part
- * the container for the fraction and the integral part or staticly
+ * the container for the fraction and the integral part or statically
* declare with fix size
*/
PRIVATE char *
i = (i < p->precision ? i : p->precision);
p->width -= i;
PAD_RIGHT(p);
- while (i-- > 0) { /* put the sting */
+ while (i-- > 0) { /* put the string */
PUT_CHAR(*tmp, p);
tmp++;
}
/*
* If there's nothing after the decimal point,
- * trunctate the decimal point. i.e. Don't print
+ * truncate the decimal point. i.e. Don't print
* "5."
*/
if (*q == '.') {
return (fr_unix_time_unwrap(delta) / NSEC) / 386400;
}
-/** Covert a time_t into out internal fr_unix_time_t
+/** Convert a time_t into out internal fr_unix_time_t
*
* Our internal unix time representation is unsigned and in nanoseconds which
* is different from time_t which is signed and has seconds resolution.
/** Free a fr_trie_t
*
* We can't use talloc_free(), because we can't talloc_parent the
- * nodes frome each other, as talloc_steal() is O(N). So, we just
+ * nodes from each other, as talloc_steal() is O(N). So, we just
* recurse manually.
*/
static void trie_free(fr_trie_t *trie)
/*
* Note that we do NOT free "node". The caller still
- * needs it for some activies.
+ * needs it for some activities.
*/
return split;
}
*
* - NETWORK format is the format we send/receive on the wire. It is not a perfect representation
* of data packing for all protocols, so you will likely need to overload conversion for some types.
- * - fr_value_box_to_network is used to covert INTERNAL format data to generic NETWORK format data.
+ * - fr_value_box_to_network is used to convert INTERNAL format data to generic NETWORK format data.
* For uint32s, IP addresses etc... This means BIG ENDIAN uint8 ordering.
* - fr_value_box_from_network is used to convert packet buffer fragments in NETWORK format to
* INTERNAL format.
* data from external data sources like SQL databases and REST APIs.
*
* They do not include terminals to stop parsing as it assumes the values
- * are discreet, and not wrapped in quotes.
+ * are discrete, and not wrapped in quotes.
*/
fr_sbuff_parse_rules_t const *value_parse_rules_unquoted[T_TOKEN_LAST] = {
[T_BARE_WORD] = &value_parse_rules_bareword_unquoted,
*
* #FR_TYPE_SIZE is not encodable, as it is system specific.
*
- * This function will not encode stuctural types (TLVs, VSAs etc...). These are usually
+ * This function will not encode structural types (TLVs, VSAs etc...). These are usually
* specific to the protocol anyway.
*
* All of the dictionary rules are respected. string/octets can have
{
fr_value_box_t tmp;
/*
- * Store list poiters to restore later - fr_value_box_cast clears them
+ * Store list pointers to restore later - fr_value_box_cast clears them
*/
fr_value_box_entry_t entry = vb->entry;
* @param[in] tainted Whether the value came from a trusted source.
* @return
* - >= 0 on success (number of bytes parsed).
- * - < 0 on error (where the parse error ocurred).
+ * - < 0 on error (where the parse error occurred).
*/
static inline CC_HINT(always_inline)
fr_slen_t fr_value_box_from_numeric_substr(fr_value_box_t *dst, fr_type_t dst_type,
/*
* Free the boxes last so if there's
- * an issue concating them, everything
+ * an issue concatenating them, everything
* is still in a known state.
*/
fr_value_box_list_foreach_safe(list, vb) {
/*
* Free the boxes last so if there's
- * an issue concating them, everything
+ * an issue concatenating them, everything
* is still in a known state.
*/
fr_value_box_list_foreach_safe(list, vb) {
*
* fr_type_t should be an enumeration of the values in this union.
*
- * Don't change the order of the fields below without checing that the output of radsize doesn't change.
+ * Don't change the order of the fields below without checking that the output of radsize doesn't change.
*/
struct value_box_s {
/** Type and flags should appear together for packing efficiency
/** Initialise an empty/null box that will be filled later
*
- * @param[in] _vb to initalise.
+ * @param[in] _vb to initialise.
*/
#define fr_value_box_init_null(_vb) _fr_value_box_init(NDEBUG_LOCATION_EXP _vb, FR_TYPE_NULL, NULL, false)
DEF_UNBOXING_FUNC(fr_unix_time_t, date, FR_TYPE_DATE)
-/** Unbox simple types peforming type checks
+/** Unbox simple types performing type checks
*
* @param[out] _var to write to.
* @param[in] _box to unbox.
#include "proto_bfd.h"
typedef struct {
- fr_client_t client; //!< might as well re-use this, others need it
+ fr_client_t client; //!< might as well reuse this, others need it
uint16_t port; //!< peer port where packets are sent to
*
* @param[in] instance Ctx data for this application.
* @param[in] sc to add our file descriptor to.
- * @param[in] conf Listen section parsed to give us isntance.
+ * @param[in] conf Listen section parsed to give us instance.
* @return
* - 0 on success.
* - -1 on failure.
MPRINT("LINE :%s", p);
/*
- * Skip this for backwards compatability.
+ * Skip this for backwards compatibility.
*/
if (strncasecmp((char const *) p, "Request-Authenticator", 21) == 0) goto next;
*
* @param[in] instance Ctx data for this application.
* @param[in] sc to add our file descriptor to.
- * @param[in] conf Listen section parsed to give us isntance.
+ * @param[in] conf Listen section parsed to give us instance.
* @return
* - 0 on success.
* - -1 on failure.
/** Start processing a new work file
*
* @param[in] thread the thread instance.
- * @param[in] triggered_by_delete true if this was trigged by a vnode_delete.
+ * @param[in] triggered_by_delete true if this was triggered by a vnode_delete.
* When a new file is moved over a workfile
* vnode delete can serve as an indication
* that new data is available.
*
* @param[in] instance Ctx data for this application.
* @param[in] sc to add our file descriptor to.
- * @param[in] conf Listen section parsed to give us isntance.
+ * @param[in] conf Listen section parsed to give us instance.
* @return
* - 0 on success.
* - -1 on failure.
*
* @param[in] instance Ctx data for this application.
* @param[in] sc to add our file descriptor to.
- * @param[in] conf Listen section parsed to give us isntance.
+ * @param[in] conf Listen section parsed to give us instance.
* @return
* - 0 on success.
* - -1 on failure.
*
* @param[in] instance Ctx data for this application.
* @param[in] sc to add our file descriptor to.
- * @param[in] conf Listen section parsed to give us isntance.
+ * @param[in] conf Listen section parsed to give us instance.
* @return
* - 0 on success.
* - -1 on failure.
* $Id$
*
* @file persistent_search.h
- * @brief Callback routines for direcories implementing persistent search
+ * @brief Callback routines for directories implementing persistent search
*
* @copyright 2022 Network RADIUS SAS (legal@networkradius.com)
*/
*/
if (inst->app_io->common.instantiate &&
(inst->app_io->common.instantiate(MODULE_INST_CTX(inst->io_submodule)) < 0)) {
- cf_log_err(conf, "Instantation failed for \"%s\"", inst->app_io->common.name);
+ cf_log_err(conf, "Instantiation failed for \"%s\"", inst->app_io->common.name);
return -1;
}
/*
* These configuration items are not printed by default,
- * because normal people shouln't be touching them.
+ * because normal people shouldn't be touching them.
*/
if (!inst->max_packet_size) inst->max_packet_size = inst->app_io->default_message_size;
if (!inst->num_messages) inst->num_messages = 2;
(void) fr_event_timer_in(sync, el, &sync->cookie_ev, sync->inst->cookie_interval, ldap_sync_cookie_event, sync);
}
-/** Enque a new cookie store packet
+/** Enqueue a new cookie store packet
*
* Create a new internal packet containing the cookie we received from the LDAP server.
* This allows the administrator to store the cookie and provide it on a future call to
*
* - Sync Info Message with syncInfoValue of syncIdSet can reference
* multiple directory entries.
- * - Various sync related messages can inculde a new cookie in
+ * - Various sync related messages can include a new cookie in
* addition to their other data.
*/
static ssize_t proto_ldap_child_mod_read(fr_listen_t *li, UNUSED void **packet_ctx, UNUSED fr_time_t *recv_time_p, UNUSED uint8_t *buffer,
* $Id$
*
* @file rfc4533.h
- * @brief Callback routines for direcories implementing RFC 4533
+ * @brief Callback routines for directories implementing RFC 4533
*
* @copyright 2022 Network RADIUS SAS (legal@networkradius.com)
*/
*
* @param[in] instance Ctx data for this application.
* @param[in] sc to add our file descriptor to.
- * @param[in] conf Listen section parsed to give us isntance.
+ * @param[in] conf Listen section parsed to give us instance.
* @return
* - 0 on success.
* - -1 on failure.
if (ret != 0) return ret;
/*
- * Then ordered by code, which is usally the same.
+ * Then ordered by code, which is usually the same.
*/
return (a[0] < b[0]) - (a[0] > b[0]);
}
*
* @param[in] instance Ctx data for this application.
* @param[in] sc to add our file descriptor to.
- * @param[in] conf Listen section parsed to give us isntance.
+ * @param[in] conf Listen section parsed to give us instance.
* @return
* - 0 on success.
* - -1 on failure.
if (ret != 0) return ret;
/*
- * Then ordered by opcode, which is usally the same.
+ * Then ordered by opcode, which is usually the same.
*/
return (a->opcode < b->opcode) - (a->opcode > b->opcode);
}
request_t *request, void *handle,
fr_value_box_t const *key);
-/** Update the ttl of an entry in the cace
+/** Update the ttl of an entry in the cache
*
* @note This callback optional. If it's not specified the cache code will expire and
* recreate the entry with a new TTL.
CONF_PARSER_TERMINATOR
};
-/** Calls EVP_get_digestbyname() to covert the digest type
+/** Calls EVP_get_digestbyname() to convert the digest type
*
* @param[in] ctx to allocate data in.
* @param[out] out EVP_MD representing the OpenSSL digest type.
lcb_error_t couchbase_server_stats(lcb_t instance, const void *cookie)
{
lcb_error_t error; /* couchbase command return */
- lcb_server_stats_cmd_t cmd; /* server stats command stuct */
+ lcb_server_stats_cmd_t cmd; /* server stats command struct */
const lcb_server_stats_cmd_t *commands[1]; /* server stats commands array */
/* init commands */
lcb_error_t couchbase_set_key(lcb_t instance, const char *key, const char *document, int expire)
{
lcb_error_t error; /* couchbase command return */
- lcb_store_cmd_t cmd; /* store command stuct */
+ lcb_store_cmd_t cmd; /* store command struct */
const lcb_store_cmd_t *commands[1]; /* store commands array */
/* init commands */
/**
* $Id$
*
- * @brief Utillity functions used in the module.
+ * @brief Utility functions used in the module.
* @file mod.c
*
* @author Aaron Hurt (ahurt@anbcs.com)
/** Check the health of a connection handle
*
- * Attempt to determing the state of the Couchbase connection by requesting
+ * Attempt to determine the state of the Couchbase connection by requesting
* a cluster statistics report. Mark the connection as failed if the request
* returns anything other than success.
*
{
CONF_SECTION *cs; /* module config list */
CONF_ITEM *ci; /* config item */
- CONF_PAIR *cp; /* conig pair */
+ CONF_PAIR *cp; /* config pair */
const char *attribute, *element; /* attribute and element names */
/* find update list */
cf_section_alloc(NULL, NULL, "client", vkey);
if (client_map_section(client, map, _get_client_value, cookie->jobj) < 0) {
- /* free config setion */
+ /* free config section */
talloc_free(client);
/* set return */
retval = -1;
c = client_afrom_cs(NULL, client, false, 0);
if (!c) {
ERROR("failed to allocate client");
- /* free config setion */
+ /* free config section */
talloc_free(client);
/* set return */
retval = -1;
/** Handle authorization requests using Couchbase document data
*
- * Attempt to fetch the document assocaited with the requested user by
+ * Attempt to fetch the document associated with the requested user by
* using the deterministic key defined in the configuration. When a valid
* document is found it will be parsed and the containing value pairs will be
* injected into the request.
/** Initialize the rlm_couchbase module
*
- * Intialize the module and create the initial Couchbase connection pool.
+ * Initialize the module and create the initial Couchbase connection pool.
*
* @param mctx The module instance.
* @return
* map to which entries.
*
* Some fields are unused, so there isn't a 1-1
- * mapping betweeen CSV file fields, and fields
+ * mapping between CSV file fields, and fields
* in the map.
*/
if (last_field && (*p == ',') && (strcmp(p + 1, inst->index_field_name) == 0)) {
fr_hmac_sha1(binding->compound_mac, (uint8_t *)binding, sizeof(*binding), t->cmk, EAP_FAST_CMK_LEN);
if (memcmp(binding->compound_mac, cmac, sizeof(cmac))) {
- RDEBUG2("Crypto-Binding TLV mis-match");
+ RDEBUG2("Crypto-Binding TLV mismatch");
RHEXDUMP3((uint8_t const *) binding->compound_mac,
sizeof(binding->compound_mac), "Calculated Compound MAC");
return FR_RADIUS_CODE_ACCESS_REJECT;
case EAP_TLS_RECORD_RECV_COMPLETE:
/*
* TLSv1.3 makes application data immediately
- * avaliable when the handshake is finished.
+ * available when the handshake is finished.
*/
if (SSL_is_init_finished(tls_session->ssl) && (peap->status == PEAP_STATUS_INVALID)) {
peap->status = PEAP_STATUS_TUNNEL_ESTABLISHED;
}
/*
- * now we can savely construct PWE
+ * now we can safely construct PWE
*/
BN_bin2bn(xbuf, primebytelen, x_candidate);
do_equation(session->group, y_sqrd, x_candidate, bnctx);
* Anything else: fail.
*
* Also, remove the session from the cache so that
- * the client can't re-use it.
+ * the client can't reuse it.
*/
default:
fr_tls_cache_deny(request, tls_session);
* ...and if we want raw punycode or to tweak Bootstring parameters,
* we can do similar things. All defaults should result in IDNA
* ToASCII with the use_std3_ascii_rules flag set, allow_unassigned unset,
- * because that is the forseeable use case.
+ * because that is the foreseeable use case.
*
* Note that doing anything much different will require choosing the
* appropriate libidn API functions, as we currently call the IDNA
char const *uri; //!< URI of imap server
fr_time_delta_t timeout; //!< Timeout for connection and server response
fr_curl_tls_t tls;
- fr_curl_conn_config_t conn_config; //!< Re-usable CURL handle config
+ fr_curl_conn_config_t conn_config; //!< Reusable CURL handle config
} rlm_imap_t;
FR_SLAB_TYPES(imap, fr_curl_io_request_t)
* timeout information
* and TLS information
*
- * Then it queues the request and yeilds until a response is given
+ * Then it queues the request and yields until a response is given
* When it responds, mod_authenticate_resume is called.
*/
static unlang_action_t CC_HINT(nonnull(1,2)) mod_authenticate(rlm_rcode_t *p_result, module_ctx_t const *mctx, request_t *request)
rlm_isc_dhcp_info_t *old;
/*
- * Duplicate or overlapping "subnet" entries aren't allowd.
+ * Duplicate or overlapping "subnet" entries aren't allowed.
*/
old = fr_trie_lookup_by_key(parent->subnets, &(info->argv[0]->vb_ipv4addr), bits);
if (old) {
#ifdef WITH_SASL
ldap_auth_call_env_t *call_env = auth_ctx->call_env;
- RDEBUG2("Login attept using identity \"%pV\"", &call_env->user_sasl_authname);
+ RDEBUG2("Login attempt using identity \"%pV\"", &call_env->user_sasl_authname);
return fr_ldap_sasl_bind_auth_async(request, auth_ctx->thread, call_env->user_sasl_mech.vb_strvalue,
call_env->user_sasl_authname.vb_strvalue,
};
/*
- * Check for a cahed copy of the DN
+ * Check for a cached copy of the DN
*/
auth_ctx->dn = rlm_find_user_dn_cached(request);
/** Resume function called after each potential yield in LDAP authorization
*
- * Some operations may or may not yeild. E.g. if group membership is
+ * Some operations may or may not yield. E.g. if group membership is
* read from an attribute returned with the user object and is already
- * in the correct form, that will not yeild.
+ * in the correct form, that will not yield.
* Hence, each state may fall through to the next.
*
* @param p_result Result of current authorization.
* @param priority Unused.
* @param request Current request.
- * @param uctx Current authrorization context.
+ * @param uctx Current authorization context.
* @return One of the RLM_MODULE_* values.
*/
static unlang_action_t mod_authorize_resume(rlm_rcode_t *p_result, UNUSED int *priority, request_t *request, void *uctx)
autz_ctx->dn = rlm_find_user_dn_cached(request);
/*
- * Retrive universal password
+ * Retrieve universal password
*/
REPEAT_MOD_AUTHORIZE_RESUME;
autz_ctx->status = LDAP_AUTZ_EDIR_BIND;
/** Modify user's object in LDAP
*
- * Process a modifcation map to update a user object in the LDAP directory.
+ * Process a modification map to update a user object in the LDAP directory.
*
* @param[out] p_result the result of the modification.
* @param[in] inst rlm_ldap instance.
case LINELOG_DST_UNIX:
#ifndef HAVE_SYS_UN_H
- cf_log_err(conf, "Unix sockets are not supported on this sytem");
+ cf_log_err(conf, "Unix sockets are not supported on this system");
return -1;
#else
inst->pool = module_rlm_connection_pool_init(cf_section_find(conf, "unix", NULL),
finish:
/*
- * Don't free, we re-use the fr_pair_ts for the next message
+ * Don't free, we reuse the fr_pair_ts for the next message
*/
vp = fr_dcursor_remove(&cursor);
if (!fr_cond_assert(vp == t->lvl)) fr_dcursor_append(&cursor, vp);
case LOGTEE_DST_UNIX:
#ifndef HAVE_SYS_UN_H
- cf_log_err(conf, "Unix sockets are not supported on this sytem");
+ cf_log_err(conf, "Unix sockets are not supported on this system");
return -1;
#endif
DIAG_OFF(DIAG_UNKNOWN_PRAGMAS)
DIAG_OFF(used-but-marked-unused) /* fix spurious warnings for sk macros */
-/** Extract components of OCSP responser URL from a certificate
+/** Extract components of OCSP responder URL from a certificate
*
* @param[in] cert to extract URL from.
* @param[out] host_out Portion of the URL (must be freed with free()).
/*
* This is wrapper for fr_log
- * Now users can call radiusd::log(level,msg) wich is the same
+ * Now users can call radiusd::log(level,msg) which is the same
* as calling fr_log from C code.
*/
static XS(XS_radiusd_log)
}
/*
- * This is a wraper for xlat_aeval
+ * This is a wrapper for xlat_aeval
* Now users are able to get data that is accessible only via xlat
* e.g. %client(...)
* Call syntax is radiusd::xlat(string), string will be handled the
* that must be referenced in later calls, store a handle to it
* in *instance otherwise put a null pointer there.
*
- * Setup a hashes wich we will use later
+ * Setup a hashes which we will use later
* parse a module and give it a chance to live
*
*/
* Allocate a new perl interpreter to do the parsing
*/
if ((inst->perl = perl_alloc()) == NULL) {
- ERROR("No memory for allocating new perl interpretor!");
+ ERROR("No memory for allocating new perl interpreter!");
return -1;
}
perl_construct(inst->perl); /* ...and initialise it */
code = type_enum->value->vb_uint32;
/*
- * Cheat, and re-use the "type" array for allowed packet
+ * Cheat, and reuse the "type" array for allowed packet
* types.
*/
if (!code ||
u->can_retransmit = false;
}
-/** Reset a status_check packet, ready to re-use
+/** Reset a status_check packet, ready to reuse
*
*/
static void status_check_reset(udp_handle_t *h, udp_request_t *u)
* packet, then u->rr MUST already have been
* deleted in the request_cancel() function
* or request_release_conn() function when
- * the REQUEUE signal was recevied.
+ * the REQUEUE signal was received.
*/
if (!u->packet || !u->can_retransmit) {
fr_assert(!u->rr);
Platforms:: MacOS, Linux, FreeBSD
-Rationale:: As there are no ACKs required this tests mesures the rate at which rlm_radius + transport can send
+Rationale:: As there are no ACKs required this tests measures the rate at which rlm_radius + transport can send
packets. On Linux and FreeBSD we'd expect an exceptionally high packet rate in this mode as we coalesce multiple
outbound packets and send them using single system call
(`sendmmsg` for datagrams, and aggregated buffers + `write` for streams).
** Verify No Message-Authenticator attribute is present
* Send a <<CoA-Request>>
** Verify packet is well formed.
-** Verify Message-Authenticator attribue is present.
+** Verify Message-Authenticator attribute is present.
* Send a <<Disconnect-Request>>
** Verify packet is well formed.
-** Verify Message-Authenticator attribue is present.
+** Verify Message-Authenticator attribute is present.
=== 3.2. Outbound packet buffer overrun
RETURN_MODULE_FAIL;
}
}
- close(fd); /* and implicitely release the locks */
+ close(fd); /* and implicitly release the locks */
RETURN_MODULE_OK;
}
talloc_free(filename);
if (fd > -1) {
- close(fd); /* and implicitely release the locks */
+ close(fd); /* and implicitly release the locks */
}
RETURN_MODULE_RCODE(rcode);
/*
* Ordering is important, needs to be LIFO
- * for proper talloc pool re-use.
+ * for proper talloc pool reuse.
*/
talloc_free(device_str);
talloc_free(gateway_str);
if (!randle) return XLAT_ACTION_FAIL;
/*
- * Walk the incomming boxes, assessing where each is in the URI,
+ * Walk the incoming boxes, assessing where each is in the URI,
* escaping tainted ones where needed. Following each space in the
* input a new VB group is started.
*/
*
* @note The final version needs to be much more complex. We can only have one
* event loop per instance of rlm_sigtran, so we need to record link references
- * and re-use existing SCTP/MTP3 connections where appropriate.
+ * and reuse existing SCTP/MTP3 connections where appropriate.
*
* @param[in] ctx to allocate connection data in.
* @param[out] out where to write the new sigtran connection.
}
}
-/* it is asssumed that the SCCP stack checked the size */
+/* it is assumed that the SCCP stack checked the size */
static int patch_address(uint32_t offset, int pc, struct msgb *msg)
{
struct sccp_called_party_address *party;
static const struct rate_ctr_desc mtp_link_cfg_description[] = {
[MTP_LNK_IN] = { "total.in", "Messages in "},
[MTP_LNK_OUT] = { "total.out", "Messages out "},
- [MTP_LNK_ERROR] = { "total.error", "Errors occured "},
+ [MTP_LNK_ERROR] = { "total.error", "Errors occurred "},
[MTP_LNK_DRP] = { "total.dropped", "Messages dropped "},
[MTP_LNK_SLTM_TOUT] = { "sltm.timeouts", "SLTM timeouts "},
};
static const struct log_info_cat default_categories[] = {
[DINP] = {
.name = "DINP",
- .description = "A-bis Intput Subsystem",
+ .description = "A-bis Input Subsystem",
.enabled = 1, .loglevel = LOGL_NOTICE,
},
[DSCCP] = {
struct osmo_timer_list ping_timeout;
struct osmo_timer_list pong_timeout;
- /* mgcp messgaes */
+ /* mgcp messages */
struct mgcp_callagent mgcp_agent;
/* application pointer */
/*
- * Represet M3UA client (and later server) links
+ * Represent M3UA client (and later server) links
*/
#pragma once
/* various hacks/quirks to deal with broken equipment */
/*
- * Some equipments do not look into the codec list but only the
+ * Some equipment do not look into the codec list but only the
* size of it.
*/
unsigned fixed_ass_cmpl_reply : 1;
msgb_put(msg, ret);
- /* then read te length as specified in header */
+ /* then read the length as specified in header */
msg->l2h = msg->data + sizeof(*hh);
len = ntohs(hh->len);
ret = recv(bfd->fd, msg->l2h, len, 0);
mtp_link_failure(link);
goto exit;
} else if (hdr->data_type > UDP_DATA_MSU_PRIO_3) {
- LOGP(DINP, LOGL_ERROR, "Link failue on %d/%s of %d/%s.\n",
+ LOGP(DINP, LOGL_ERROR, "Link failure on %d/%s of %d/%s.\n",
link->nr, link->name, link->set->nr, link->set->name);
mtp_link_failure(link);
goto exit;
link->was_up = 0;
one_up = is_one_up(link->set);
- /* our linkset is now unsuable */
+ /* our linkset is now unusable */
if (was_up && !one_up)
mtp_linkset_down(link->set);
link->clear_queue(link);
/* this appears to be round robin or such.. */
hdr->addr = MTP_ADDR(sls % 16, set->dpc, set->sccp_opc);
- /* generate the UDT message... libsccp does not offer formating yet */
+ /* generate the UDT message... libsccp does not offer formatting yet */
udt = (struct sccp_data_unitdata *) msgb_put(out, sizeof(*udt));
udt->type = SCCP_MSG_TYPE_UDT;
udt->proto_class = SCCP_PROTOCOL_CLASS_0;
struct sccp_connection_request *cr;
struct msgb *msg;
- LOGP(DINP, LOGL_NOTICE, "Handling CR localy.\n");
+ LOGP(DINP, LOGL_NOTICE, "Handling CR locally.\n");
cr = (struct sccp_connection_request *) inpt->l2h;
msg = create_sccp_refuse(&cr->source_local_reference);
if (msg) {
return -1;
}
- /* veryify the MTP Linkset */
+ /* verify the MTP Linkset */
src = mtp_link_set_num(app->bsc, src_num);
if (!src) {
LOGP(DINP, LOGL_ERROR,
return -3;
}
- /* veryify the MTP Linkset */
+ /* verify the MTP Linkset */
dst = mtp_link_set_num(app->bsc, dst_num);
if (!dst) {
LOGP(DINP, LOGL_ERROR,
- "SS7 %d/%s destionation linkset not found with nr: %d.\n",
+ "SS7 %d/%s destination linkset not found with nr: %d.\n",
app->nr, app->name, dst_num);
return -2;
}
return -1;
}
- /* veryify the MTP Linkset */
+ /* verify the MTP Linkset */
mtp = mtp_link_set_num(app->bsc, src_num);
if (!mtp) {
LOGP(DINP, LOGL_ERROR,
header_list_t header_list; //!< List of SMTP headers to add to emails.
bool set_date;
- fr_curl_conn_config_t conn_config; //!< Re-usable CURL handle config
+ fr_curl_conn_config_t conn_config; //!< Reusable CURL handle config
} rlm_smtp_t;
/*
* Email header and body
* File attachments
*
- * Then it queues the request and yeilds until a response is given
+ * Then it queues the request and yields until a response is given
* When it responds, smtp_io_module_resume is called.
*/
static unlang_action_t CC_HINT(nonnull) mod_mail(rlm_rcode_t *p_result, module_ctx_t const *mctx, request_t *request)
/*
* Clear our local log buffer, and free any messages which weren't
- * reconfiged (so we don't leak memory).
+ * reconfigured (so we don't leak memory).
*/
talloc_free_children(conn->log_ctx);
memset(&conn->last_error, 0, sizeof(conn->last_error));
/* Set the connection timeout */
#if 0
- /* Not suported ? */
+ /* Not supported ? */
SQLSetConnectAttr(conn->dbc_handle, SQL_ATTR_LOGIN_TIMEOUT, &timeout_ms, SQL_IS_UINTEGER);
#endif
try_again:
/*
- * Try again query when deadlock, beacuse in any case it
+ * Try again query when deadlock, because in any case it
* will be retried.
*/
if (fb_sql_query(conn, query)) {
*
* @param db handle to extract error from (may be NULL).
* @param status to check (if unused, set to SQLITE_OK).
- * @param fmt to preprend.
+ * @param fmt to prepend.
* @param ... arguments to fmt.
*/
static void sql_print_error(sqlite3 *db, int status, char const *fmt, ...)
TALLOC_FREE(handle->row);
/*
- * Executes the SQLite query and interates over the results
+ * Executes the SQLite query and iterates over the results
*/
status = sqlite3_step(conn->statement);
}
/*
- * Check Accounting packets for their accoutning status
+ * Check Accounting packets for their accounting status
* Call the relevant module based on the status
*/
static unlang_action_t CC_HINT(nonnull) mod_accounting(rlm_rcode_t *p_result, module_ctx_t const *mctx, request_t *request)
* First try to authenticate against the current OTP, then step
* back in increments of BACK_STEP_SECS, up to BACK_STEPS times,
* to authenticate properly in cases of long transit delay, as
- * described in RFC 6238, secion 5.2.
+ * described in RFC 6238, section 5.2.
*/
for (i = 0, then = now; i <= cfg->lookback_steps; i++, then -= cfg->lookback_steps) {
Performs an MX lookup for the owner, returning just the first result.
.PP
.SH CAVEATS
-Logging from rlm_unbound can be problematic, especialy if more than one
+Logging from rlm_unbound can be problematic, especially if more than one
instantiation of the module is used. This is due to the need for additional
features in the underlying libunbound which hopefully will be enhanced over
time.
/*
* The unbound context needs to be "finalised" to fix its settings.
* The API does not expose a method to do this, rather it happens on first
- * use. A quick workround is to delete data which won't be present
+ * use. A quick workaround is to delete data which won't be present
*/
ub_ctx_data_remove(t->ev_b->ub, "notar33lsite.foo123.nottld A 127.0.0.1");
* @param[in] ifindex of the interface we're binding to.
* @return
* - >= 0 a file descriptor to read/write packets on.
- * - <0 an error ocurred.
+ * - <0 an error occurred.
*/
int fr_dhcpv4_raw_socket_open(struct sockaddr_ll *link_layer, int ifindex)
{
sock_len = sizeof(struct sockaddr_ll);
data_len = recvfrom(sockfd, raw_packet, MAX_PACKET_SIZE, 0, (struct sockaddr *)link_layer, &sock_len);
- data_offset = ETH_HDR_SIZE + IP_HDR_SIZE + UDP_HDR_SIZE; /* DHCP data datas after Ethernet, IP, UDP */
+ data_offset = ETH_HDR_SIZE + IP_HDR_SIZE + UDP_HDR_SIZE; /* DHCP data after Ethernet, IP, UDP */
if (data_len <= data_offset) DISCARD_RP("Payload (%d) smaller than required for layers 2+3+4", (int)data_len);
*/
#define VLAN_VID_UNPACK(_vlan) ((htons((_vlan)->tag_control) & 0x0fff))
-/** Pack the PCP (Priority Code Point) DEI (Drop Eligable Indicator) and VID (VLAN ID)
+/** Pack the PCP (Priority Code Point) DEI (Drop Eligible Indicator) and VID (VLAN ID)
*
* Packs the PCP, DEI and VID into the TCI (Tag control information). Output will be a 16bit integer
* in network byte order.
* @param out list to append pairs to
* @param parent attribute within which which to decode
* @param dbuff to parse
- * @param decode_ctx to pass to decoder funtion
+ * @param decode_ctx to pass to decoder function
* @return
* - bytes of dbuff consumed
* - < 0 on error
* value: A value to compare against the masked bits at
* offset in a users packet.
*
- * compNeq: Defines type of comarison (Equal or Notequal)
+ * compNeq: Defines type of comparison (Equal or Notequal)
* default is Equal.
*
* fill: Round things out to a dword boundary
/*
* Code of 0 is not understood.
- * Code of 16 or greate is not understood.
+ * Code of 16 or greater is not understood.
*/
if ((packet[0] == 0) ||
(packet[0] >= FR_RADIUS_CODE_MAX)) {
* Message-Authenticator attributes.
*/
if (require_ma && !seen_ma) {
- FR_DEBUG_STRERROR_PRINTF("we equire Message-Authenticator attribute, but it is not in the packet");
+ FR_DEBUG_STRERROR_PRINTF("we require Message-Authenticator attribute, but it is not in the packet");
failure = DECODE_FAIL_MA_MISSING;
goto finish;
}
/*
* When the unknown attributes were created by
- * decode_vsa_internal, the hierachy between that unknown
+ * decode_vsa_internal, the hierarchy between that unknown
* attribute and first known attribute was cloned
* meaning we can now free the unknown vendor.
*/
case FR_TYPE_OCTETS:
/*
* This attribute SHOULD have fixed size, but it
- * doesn't. Therefor it's malformed.
+ * doesn't. Therefore it's malformed.
*/
if (parent->flags.length && (data_len != parent->flags.length)) goto raw;
FALL_THROUGH;
/*
* If we don't have a tag root already, then record where
- * we're putting the top level attributes and add tha tags
+ * we're putting the top level attributes and add the tags
* there.
*/
if (!packet_ctx->tag_root) {
case 1:
/*
- * Lenght fields are set to zero, because they
+ * Length fields are set to zero, because they
* will get over-ridden later.
*/
fr_dbuff_marker(&vsa_length_field, &work_dbuff);
}
/*
- * FIXME: Go to an LRU system. This prevents ID re-use
+ * FIXME: Go to an LRU system. This prevents ID reuse
* for as long as possible. The main problem with that
* approach is that it requires us to populate the
* LRU/FIFO when we add a new socket, or a new destination,
/*
* 3.6. Encryption
*
- * If there's a secret, we alway decrypt the packets.
+ * If there's a secret, we always decrypt the packets.
*/
if (secret && packet_is_encrypted(pkt)) {
size_t length;
${Q}echo $(TMUX_KEY) > $@
#
-# Stupid 'make' doesn' know how to create directories.
+# Stupid 'make' doesn't know how to create directories.
#
.PHONY: $(BUILD_DIR)/tests/daemon/
$(BUILD_DIR)/tests/daemon/:
test_fail
}
-# Checking full capture group overun
+# Checking full capture group overrun
if ('a_b_c_d_e_f_g_h_i_j_k_l_m_n_o_p_q_r_s_t_u_v_w_x_y_z_A_B_C_D_E_F_G' =~ /^(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)_(.)$/) {
if (!("%{0}%{1}%{2}%{3}%{4}%{5}%{6}%{7}%{8}%{9}%{10}%{11}%{12}%{13}%{14}%{15}%{16}%{17}%{18}%{19}%{20}%{21}%{22}%{23}%{24}%{25}%{26}%{27}%{28}%{29}%{30}%{31}%{32}" == 'a_b_c_d_e_f_g_h_i_j_k_l_m_n_o_p_q_r_s_t_u_v_w_x_y_z_A_B_C_D_E_F_GabcdefghijklmnopqrstuvwxyzABCDEF')) {
test_fail
}
#
-# We can't check order, as there's offically no guarantee on the
+# We can't check order, as there's officially no guarantee on the
# order in which child sections will be evaluated.
#
&Tmp-String-0 ^= 'boink'
}
-# The prepended value should be first followd by the other two
+# The prepended value should be first followed by the other two
if (!((&Tmp-String-0[0] == 'boink')) || (!(&Tmp-String-0[1] == 'foo')) || (!(%{Tmp-String-0[2]} == 'baz'))) {
test_fail
}
# &control.Tmp-String-0 ^= &Tmp-String-0
#}
-# (Temporary method to acheive the same - as per issue noted above)
+# (Temporary method to achieve the same - as per issue noted above)
update {
&control ^= &request
}
$(TEST): test.ldap_sync.dir $(patsubst %/all.mk,test.ldap_sync/%,$(FILES))
#
-# Ensure diretory for "touch" files exists
+# Ensure directory for "touch" files exists
#
test.ldap_sync.dir:
${Q}mkdir -p $(BUILD_DIR)/tests/test.ldap_sync
&request -= &Tmp-uint64-0[*]
-# 36. Multiple array indicies
+# 36. Multiple array indices
map json &Tmp-String-0 {
&Tmp-Signed-0 += '$[3][0,1]'
}
test_fail
}
-# 33. Expect success - Nested array with multiple indicies
+# 33. Expect success - Nested array with multiple indices
if (%json_jpath_validate("$[0][1,2]") != '9:$[0][1,2]') {
test_fail
}
#
-# Run the "ldapssl" module - an instance of ldap using an ssl conneciton
+# Run the "ldapssl" module - an instance of ldap using an ssl connection
# PRE: acct
#
ldapssl
#
-# Run the "ldapssl" module - an instance of ldap using an ssl conneciton
+# Run the "ldapssl" module - an instance of ldap using an ssl connection
# PRE: auth_ssl
#
if ($RAD_REQUEST{'User-Name'} =~ /^baduser/i) {
# Reject user and tell him why
$RAD_REPLY{'Reply-Message'} = "Denied access by rlm_perl function";
- # For testing return NOTFOUND - returning REJECT immediatly rejects the packet so fails the test
+ # For testing return NOTFOUND - returning REJECT immediately rejects the packet so fails the test
return RLM_MODULE_NOTFOUND;
} else {
# Accept user and set some attribute
return split(/ /, $_[0]);
}
-# Take an arbitary number of scalars and retun an array of array refs
+# Take an arbitrary number of scalars and return an array of array refs
sub xlatscalar2arrayref {
my @array;
for (my $i = 0; $i <= $#_; $i++) {
# TODO
# A number of these tests return multiple values - either arrays, or hashes.
# Currently xlats have all returned values concatenated into a single value box -
-# once multiple retuned boxes are handled to produce multiple attributes the tests
+# once multiple returned boxes are handled to produce multiple attributes the tests
# will need amending.
&Tmp-String-0 := "hello,goodbye,welcome,farewell"
test_fail
}
-# Take host from incomming packet
+# Take host from incoming packet
&control.Tmp-String-1 := "%(rest:http://%{Login-IP-Host}:%{Tmp-Integer-0}/test.txt)"
if (!(&REST-HTTP-Status-Code == 200) || !(&control.Tmp-String-1 == "Sample text response\n")) {
test_fail
}
-# Port is not allowed from incomming packet
+# Port is not allowed from incoming packet
&control.Tmp-String-1 := "%(rest:http://%{Tmp-String-0}:%{NAS-Port}/test.txt)"
if (!(&Module-Failure-Message == "Failed escaping URI: Tainted value not allowed for port") || !(&control.Tmp-String-1 == "")) {
test_fail
}
- # We shouldnt magically acquire new proxy state values
+ # We shouldn't magically acquire new proxy state values
if (&reply.Proxy-State) {
test_fail
}
{% if grains['os'] == 'Ubuntu' %}
# In Ubuntu 14.10, openldap comes with a broken AppArmor profile (can't connect through socket)
-# Disable AppArmor alltogether
+# Disable AppArmor altogether
/etc/init.d/apparmor teardown:
cmd.run
-- There was WAAAY too many indexes previously. This combo index
-- should take care of the most common searches.
-- I have commented out all the old indexes, but left them in case
--- someone wants them. I don't recomend anywone use them all at once
+-- someone wants them. I don't recommend anywone use them all at once
-- as they will slow down your DB too much.
-- - pnixon 2003-07-13
--
TACACS_BUILD_DIR := $(BUILD_DIR)/tests/tacacs
#
-# We need the 'tacacs_plus' Python3 module to excute TACACS+ tests
+# We need the 'tacacs_plus' Python3 module to execute TACACS+ tests
# i.e: Needed by ./scripts/tacacs/tacacs_client
#
$(TACACS_BUILD_DIR)/depends.mk:
#
# And we do not (yet) allow for filters on leaf attributes. See
#
-# @todo - feature - allowe expressions in tmpl_attr_parse_filter(()
+# @todo - feature - allow expressions in tmpl_attr_parse_filter(()
#
condition &User-Name[&User-Name == 'bar'] == "foo"
match ERROR offset 12: Invalid filter - cannot use filter on leaf attributes
MPRINT1("Master ignoring packet (data length %zd)\n", data_size);
discard:
- fr_message_done(&cd->m); /* yeah, re-use it for the next packet... */
+ fr_message_done(&cd->m); /* yeah, reuse it for the next packet... */
continue;
}
fprintf(stderr, "usage: ring_buffer_test [OPTS]\n");
fprintf(stderr, " -x Debugging mode.\n");
fprintf(stderr, " -s <string> Set random seed to <string>.\n");
- fprintf(stderr, " -l <length> Set the interation number to <length>.\n");
+ fprintf(stderr, " -l <length> Set the iteration number to <length>.\n");
fr_exit_now(EXIT_SUCCESS);
}