Skip to content

Commit

Permalink
Fix many misspellings
Browse files Browse the repository at this point in the history
Use codespell (https://github.com/codespell-project/codespell) in order
to find many common misspellings that are present in English texts.

Signed-off-by: Nicolas Iooss <[email protected]>
  • Loading branch information
fishilico committed Sep 18, 2019
1 parent e17e489 commit b550c0e
Show file tree
Hide file tree
Showing 208 changed files with 712 additions and 712 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ patches, please follow these guidelines:
- Must apply against HEAD of the master branch
- Separate large patches into logical patches
- Patch descriptions must end with your "Signed-off-by" line. This means your
code meets the Developer's certificate of origin, see bellow.
code meets the Developer's certificate of origin, see below.

When adding new, large features or tools it is best to discuss the
design on the mailing list prior to submitting the patch.
Expand Down
8 changes: 4 additions & 4 deletions checkpolicy/policy_define.c
Original file line number Diff line number Diff line change
Expand Up @@ -2022,7 +2022,7 @@ int avrule_ioctl_ranges(struct av_ioctl_range_list **rangelist)
return -1;
if (avrule_merge_ioctls(&rangehead))
return -1;
/* flip ranges if these are ommited*/
/* flip ranges if these are omitted */
if (omit) {
if (avrule_omit_ioctls(&rangehead))
return -1;
Expand Down Expand Up @@ -2189,7 +2189,7 @@ int avrule_xperms_used(av_extended_perms_t *xperms)
/*
* using definitions found in kernel document ioctl-number.txt
* The kernel components of an ioctl command are:
* dir, size, driver, and fucntion. Only the driver and function fields
* dir, size, driver, and function. Only the driver and function fields
* are considered here
*/
#define IOC_DRIV(x) (x >> 8)
Expand Down Expand Up @@ -3377,9 +3377,9 @@ int define_filename_trans(void)
goto bad;
}

/* We expand the class set into seperate rules. We expand the types
/* We expand the class set into separate rules. We expand the types
* just to make sure there are not duplicates. They will get turned
* into seperate rules later */
* into separate rules later */
if (type_set_expand(&stypes, &e_stypes, policydbp, 1))
goto bad;

Expand Down
2 changes: 1 addition & 1 deletion dbus/selinux_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def __init__(self, *p, **k):

#
# The semanage method runs a transaction on a series of semanage commands,
# these commnds can take the output of customized
# these commands can take the output of customized
#
@slip.dbus.polkit.require_auth("org.selinux.semanage")
@dbus.service.method("org.selinux", in_signature='s')
Expand Down
4 changes: 2 additions & 2 deletions gui/polgen.ui
Original file line number Diff line number Diff line change
Expand Up @@ -901,7 +901,7 @@
<object class="GtkTreeView" id="existing_user_treeview">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="tooltip-text" translatable="yes">Select the user roles that will transiton to the %s domain.</property>
<property name="tooltip-text" translatable="yes">Select the user roles that will transition to the %s domain.</property>
<property name="headers_visible">False</property>
</object>
</child>
Expand Down Expand Up @@ -1004,7 +1004,7 @@ role tab</property>
<object class="GtkTreeView" id="user_transition_treeview">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="tooltip-text" translatable="yes">Select the user roles that will transiton to this applications domains.</property>
<property name="tooltip-text" translatable="yes">Select the user roles that will transition to this applications domains.</property>
<property name="headers_visible">False</property>
</object>
</child>
Expand Down
2 changes: 1 addition & 1 deletion gui/polgengui.py
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,7 @@ def on_name_page_next(self, *args):
self.syslog_checkbutton.set_active(policy.use_syslog)

def stand_alone(self):
desktopName = _("Configue SELinux")
desktopName = _("Configure SELinux")

self.setupScreen()
self.mainWindow.connect("destroy", self.quit)
Expand Down
2 changes: 1 addition & 1 deletion gui/system-config-selinux.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ def setupScreen(self):
self.view.get_selection().select_path((0,))

def stand_alone(self):
desktopName = _("Configue SELinux")
desktopName = _("Configure SELinux")

self.setupScreen()

Expand Down
2 changes: 1 addition & 1 deletion libselinux/include/selinux/get_context_list.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ extern "C" {
/* Given a list of authorized security contexts for the user,
query the user to select one and set *newcon to refer to it.
Caller must free via freecon.
Returns 0 on sucess or -1 otherwise. */
Returns 0 on success or -1 otherwise. */
extern int query_user_context(char ** list,
char ** newcon);

Expand Down
2 changes: 1 addition & 1 deletion libselinux/include/selinux/selinux.h
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ extern int security_compute_user_raw(const char * scon,
/* Validate a transition. This determines whether a transition from scon to newcon
using tcon as the target for object class tclass is valid in the loaded policy.
This checks against the mlsvalidatetrans and validatetrans constraints in the loaded policy.
Returns 0 if allowed and -1 if an error occured with errno set */
Returns 0 if allowed and -1 if an error occurred with errno set */
extern int security_validatetrans(const char *scon,
const char *tcon,
security_class_t tclass,
Expand Down
2 changes: 1 addition & 1 deletion libselinux/man/man3/security_compute_av.3
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ source context. It is mainly used by
is used to determine if a transition from scon to newcon using tcon as the object
is valid for object class tclass. This checks against the mlsvalidatetrans and
validatetrans constraints in the loaded policy. Returns 0 if allowed, and -1
if an error occured with errno set.
if an error occurred with errno set.

.BR security_get_initial_context ()
is used to get the context of a kernel initial security identifier specified by
Expand Down
4 changes: 2 additions & 2 deletions libselinux/man/man3/selinux_restorecon.3
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ If this is a directory and the
.B SELINUX_RESTORECON_RECURSE
has been set (for descending through directories), then
.BR selinux_restorecon ()
will write an SHA1 digest of specfile entries caculated by
will write an SHA1 digest of specfile entries calculated by
.BR selabel_get_digests_all_partial_matches (3)
to an extended attribute of
.IR security.sehash
Expand Down Expand Up @@ -196,7 +196,7 @@ To improve performance when relabeling file systems recursively (e.g. the
.B SELINUX_RESTORECON_RECURSE
flag is set)
.BR selinux_restorecon ()
will write a caculated SHA1 digest of the specfile entries returned by
will write a calculated SHA1 digest of the specfile entries returned by
.BR selabel_get_digests_all_partial_matches (3)
to an extended attribute named
.IR security.sehash
Expand Down
2 changes: 1 addition & 1 deletion libselinux/src/label_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ static int load_mmap(FILE *fp, size_t len, struct selabel_handle *rec,
uint32_t stem_len;
int newid;

/* the length does not inlude the nul */
/* the length does not include the nul */
rc = next_entry(&stem_len, mmap_area, sizeof(uint32_t));
if (rc < 0 || !stem_len) {
rc = -1;
Expand Down
2 changes: 1 addition & 1 deletion libselinux/src/label_file.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ struct selabel_sub {
/* A file security context specification. */
struct spec {
struct selabel_lookup_rec lr; /* holds contexts for lookup result */
char *regex_str; /* regular expession string for diagnostics */
char *regex_str; /* regular expression string for diagnostics */
char *type_str; /* type string for diagnostic messages */
struct regex_data * regex; /* backend dependent regular expression data */
bool regex_compiled; /* bool to indicate if the regex is compiled */
Expand Down
4 changes: 2 additions & 2 deletions libselinux/src/regex.h
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ int regex_cmp(struct regex_data *regex1, struct regex_data *regex2) hidden;
* the buffer.
*
* @arg error_data Error data as returned by regex_prepare_data.
* @arg buffer String buffer to hold the formated error string.
* @arg buf_size Total size of the given bufer in bytes.
* @arg buffer String buffer to hold the formatted error string.
* @arg buf_size Total size of the given buffer in bytes.
*/
void regex_format_error(struct regex_error_data const *error_data, char *buffer,
size_t buf_size) hidden;
Expand Down
2 changes: 1 addition & 1 deletion libselinux/src/sestatus.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
*/
struct selinux_status_t
{
uint32_t version; /* version number of thie structure */
uint32_t version; /* version number of this structure */
uint32_t sequence; /* sequence number of seqlock logic */
uint32_t enforcing; /* current setting of enforcing mode */
uint32_t policyload; /* times of policy reloaded */
Expand Down
2 changes: 1 addition & 1 deletion libselinux/src/sha1.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
// Modified to:
// - stop symbols being exported for libselinux shared library - October 2015
// Richard Haines <[email protected]>
// - Not cast the workspace from a byte array to a CHAR64LONG16 due to allignment isses.
// - Not cast the workspace from a byte array to a CHAR64LONG16 due to alignment isses.
// Fixes:
// sha1.c:73:33: error: cast from 'uint8_t *' (aka 'unsigned char *') to 'CHAR64LONG16 *' increases required alignment from 1 to 4 [-Werror,-Wcast-align]
// CHAR64LONG16* block = (CHAR64LONG16*) workspace;
Expand Down
2 changes: 1 addition & 1 deletion libselinux/src/stringrep.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ static struct discover_class_node * discover_class(const char *s)
if (sscanf(buf, "%hu", &node->value) != 1)
goto err3;

/* load up permission indicies */
/* load up permission indices */
snprintf(path, sizeof path, "%s/class/%s/perms",selinux_mnt,s);
dir = opendir(path);
if (dir == NULL)
Expand Down
2 changes: 1 addition & 1 deletion libselinux/utils/sefcontext_compile.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ static int process_file(struct selabel_handle *rec, const char *filename)
* u32 - spec has meta characters
* u32 - The specs prefix_len if >= SELINUX_COMPILED_FCONTEXT_PREFIX_LEN
* u32 - data length of the pcre regex
* char - a bufer holding the raw pcre regex info
* char - a buffer holding the raw pcre regex info
* u32 - data length of the pcre regex study daya
* char - a buffer holding the raw pcre regex study data
*/
Expand Down
2 changes: 1 addition & 1 deletion libsemanage/include/semanage/modules.h
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ int semanage_module_install_info(semanage_handle_t *sh,
*
* Returns:
* 0 success
* -1 failure, out of memeory
* -1 failure, out of memory
* -2 failure, @module not found or couldn't be removed
*/
int semanage_module_remove_key(semanage_handle_t *sh,
Expand Down
2 changes: 1 addition & 1 deletion libsemanage/src/boolean_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ hidden_proto(semanage_bool_clone)
hidden_proto(semanage_bool_set_name)
hidden_proto(semanage_bool_set_value)

/* BOOL RECORD: metod table */
/* BOOL RECORD: method table */
extern record_table_t SEMANAGE_BOOL_RTABLE;

extern int bool_file_dbase_init(semanage_handle_t * handle,
Expand Down
2 changes: 1 addition & 1 deletion libsemanage/src/booleans_policydb.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ typedef struct dbase_policydb dbase_t;
record_policydb_table_t SEMANAGE_BOOL_POLICYDB_RTABLE = {
.add = NULL,
.modify = NULL,
/* FIXME: these casts depend on stucts in libsepol matching structs
/* FIXME: these casts depend on structs in libsepol matching structs
* in libsemanage. This is incredibly fragile - the casting gets
* rid of warnings, but is not type safe.
*/
Expand Down
2 changes: 1 addition & 1 deletion libsemanage/src/database.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ typedef struct record_table {
int (*clone) (struct semanage_handle * handle,
const record_t * rec, record_t ** new_rec);

/* Deallocate record resources. Must sucessfully handle NULL. */
/* Deallocate record resources. Must successfully handle NULL. */
void (*free) (record_t * rec);

} record_table_t;
Expand Down
2 changes: 1 addition & 1 deletion libsemanage/src/fcontext_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ hidden_proto(semanage_fcontext_key_create)
hidden_proto(semanage_fcontext_free)
hidden_proto(semanage_fcontext_iterate_local)

/* FCONTEXT RECORD: metod table */
/* FCONTEXT RECORD: method table */
extern record_table_t SEMANAGE_FCONTEXT_RTABLE;

extern int fcontext_file_dbase_init(semanage_handle_t * handle,
Expand Down
2 changes: 1 addition & 1 deletion libsemanage/src/handle.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ void semanage_select_store(semanage_handle_t * sh, char *storename,
assert(sh != NULL);

/* This just sets the storename to what the user requests, no
verification of existance will be done until connect */
verification of existence will be done until connect */
free(sh->conf->store_path);
sh->conf->store_path = strdup(storename);
assert(sh->conf->store_path); /* no way to return failure */
Expand Down
2 changes: 1 addition & 1 deletion libsemanage/src/iface_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ hidden_proto(semanage_iface_create)
hidden_proto(semanage_iface_set_msgcon)
hidden_proto(semanage_iface_set_name)

/* IFACE RECORD: metod table */
/* IFACE RECORD: method table */
extern record_table_t SEMANAGE_IFACE_RTABLE;

extern int iface_policydb_dbase_init(semanage_handle_t * handle,
Expand Down
4 changes: 2 additions & 2 deletions libsemanage/src/modules.c
Original file line number Diff line number Diff line change
Expand Up @@ -849,7 +849,7 @@ int semanage_module_set_enabled(semanage_handle_t *sh,

hidden_def(semanage_module_set_enabled)

/* This function exists only for ABI compatability. It has been deprecated and
/* This function exists only for ABI compatibility. It has been deprecated and
* should not be used. Instead, use semanage_module_set_enabled() */
int semanage_module_enable(semanage_handle_t *sh, char *module_name)
{
Expand Down Expand Up @@ -877,7 +877,7 @@ int semanage_module_enable(semanage_handle_t *sh, char *module_name)
return rc;
}

/* This function exists only for ABI compatability. It has been deprecated and
/* This function exists only for ABI compatibility. It has been deprecated and
* should not be used. Instead, use semanage_module_set_enabled() */
int semanage_module_disable(semanage_handle_t *sh, char *module_name)
{
Expand Down
2 changes: 1 addition & 1 deletion libsemanage/src/policy.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ struct semanage_handle;
struct semanage_policy_table {

/* Returns the current policy serial/commit number
* A negative number is returned in case of failre */
* A negative number is returned in case of failure */
int (*get_serial) (struct semanage_handle *);

/* Destroy a connection */
Expand Down
2 changes: 1 addition & 1 deletion libsemanage/src/semanageswig_python.i
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
%apply int *OUTPUT { uint16_t * };

%include <cstring.i>
/* This is needed to properly mmaped binary data in SWIG */
/* This is needed to properly mmap binary data in SWIG */
%cstring_output_allocate_size(void **mapped_data, size_t *data_len, munmap(*$1, *$2));

%typemap(in, numinputs=0) char **(char *temp=NULL) {
Expand Down
2 changes: 1 addition & 1 deletion libsemanage/src/user_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ hidden_proto(semanage_user_add_role)
hidden_proto(semanage_user_exists)
hidden_proto(semanage_user_query)

/* USER record: metod table */
/* USER record: method table */
extern record_table_t SEMANAGE_USER_RTABLE;

/* USER BASE record: method table */
Expand Down
2 changes: 1 addition & 1 deletion libsemanage/src/utilities.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ char *semanage_str_replace(const char *search, const char *replace,
if (slen == 0)
return NULL;

/* Count the occurences of search in src and compute the new size */
/* Count the occurrences of search in src and compute the new size */
for (p = strstr(src, search); p != NULL; p = strstr(p + slen, search)) {
count++;
if (lim && count >= lim)
Expand Down
14 changes: 7 additions & 7 deletions libsemanage/src/utilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,16 @@ int semanage_is_prefix(const char *str, const char *val) WARN_UNUSED;

/**
* @param str the string to semanage_split
* @return malloc'd string after the first run of charachters that aren't whitespace
* @return malloc'd string after the first run of characters that aren't whitespace
*/
char *semanage_split_on_space(const char *str) WARN_UNUSED;

/**
* @param str the string to semanage_split
* @param delim the string delimiter. NOT a set of charachters that can be
* @param delim the string delimiter. NOT a set of characters that can be
* a delimiter.
* if *delim == '\0' behaves as semanage_splitOnSpace()
* @return a ptr to the first charachter past the delimiter.
* @return a ptr to the first character past the delimiter.
* if delim doesn't appear in the string, returns a ptr to the
* trailing null in the string
*/
Expand All @@ -102,15 +102,15 @@ int semanage_cmp_plist_t(const semanage_list_t ** x,
const semanage_list_t ** y);
/**
* @param data a target string
* @param what a charachter
* @param what a character
* @returns the number of times the char appears in the string
*/
int semanage_str_count(const char *data, char what);
/**
* @param - a string
* @param the charachter to trim to
* @param the character to trim to
* @return - mangles the string, converting the first
* occurrance of the charachter to a '\0' from
* occurrence of the character to a '\0' from
* the end of the string.
*/
void semanage_rtrim(char *str, char trim_to);
Expand All @@ -119,7 +119,7 @@ void semanage_rtrim(char *str, char trim_to);
* @param value being searched for
* @param replacement value that replaces found search values
* @param string being searched and replaced on
* @param maximum number of value occurences (zero for unlimited)
* @param maximum number of value occurrences (zero for unlimited)
* @return newly-allocated string with the replaced values
*/
char *semanage_str_replace(const char *search, const char *replace,
Expand Down
4 changes: 2 additions & 2 deletions libsemanage/tests/test_bool.c
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ void test_bool_query(void)
helper_bool_query(SH_TRANS, BOOL_NONEXISTENT, -1);
}

/* Functon bool_exists */
/* Function bool_exists */
void helper_bool_exists(level_t level, const char *bool_str, int exp_resp)
{
semanage_bool_key_t *key;
Expand Down Expand Up @@ -884,7 +884,7 @@ void test_bool_iterate_local(void)
cleanup_handle(SH_TRANS);
}

/* Functtion bool_list_local */
/* Function bool_list_local */
void test_bool_list_local(void)
{
semanage_bool_t **records;
Expand Down

0 comments on commit b550c0e

Please sign in to comment.