All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Correct misc typos
@ 2022-04-08 13:10 Christian Göttsche
  2022-04-12 13:45 ` James Carter
  0 siblings, 1 reply; 6+ messages in thread
From: Christian Göttsche @ 2022-04-08 13:10 UTC (permalink / raw)
  To: selinux

Found by typos[1].

[1]: https://github.com/crate-ci/typos

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
---
 libsemanage/src/genhomedircon.c             | 2 +-
 libsemanage/src/handle.h                    | 2 +-
 libsemanage/src/semanage_store.c            | 2 +-
 libsemanage/tests/test_iface.c              | 2 +-
 policycoreutils/newrole/newrole.pamd        | 2 +-
 policycoreutils/run_init/run_init.pamd      | 2 +-
 python/sepolgen/src/sepolgen/objectmodel.py | 2 +-
 python/sepolgen/src/sepolgen/refpolicy.py   | 2 +-
 python/sepolgen/tests/test_audit.py         | 2 +-
 python/sepolgen/tests/test_refpolicy.py     | 2 +-
 python/sepolicy/sepolicy-bash-completion.sh | 6 +++---
 python/sepolicy/sepolicy/gui.py             | 4 ++--
 12 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/libsemanage/src/genhomedircon.c b/libsemanage/src/genhomedircon.c
index 7ca9afc3..8f8774d3 100644
--- a/libsemanage/src/genhomedircon.c
+++ b/libsemanage/src/genhomedircon.c
@@ -490,7 +490,7 @@ static int STR_COMPARATOR(const void *a, const void *b)
 	return strcmp((const char *) a, (const char *) b);
 }
 
-/* make_tempate
+/* make_template
  * @param	s	  the settings holding the paths to various files
  * @param	pred	function pointer to function to use as filter for slurp
  * 					file filter
diff --git a/libsemanage/src/handle.h b/libsemanage/src/handle.h
index 4d2aae8f..c7f4e903 100644
--- a/libsemanage/src/handle.h
+++ b/libsemanage/src/handle.h
@@ -72,7 +72,7 @@ struct semanage_handle {
 	int do_check_contexts;	/* whether to run setfiles check the file contexts file */
 
 	/* This timeout is used for transactions and waiting for lock
-	   -1 means wait indefinetely
+	   -1 means wait indefinitely
 	   0 means return immediately
 	   >0 means wait that many seconds */
 	int timeout;
diff --git a/libsemanage/src/semanage_store.c b/libsemanage/src/semanage_store.c
index c6d2c5e7..14a0957a 100644
--- a/libsemanage/src/semanage_store.c
+++ b/libsemanage/src/semanage_store.c
@@ -1327,7 +1327,7 @@ static char **split_args(const char *arg0, char *arg_string,
 		goto cleanup;
 	s = arg_string;
 	/* parse the argument string one character at a time,
-	 * repsecting quotes and other special characters */
+	 * respecting quotes and other special characters */
 	while (s != NULL && *s != '\0') {
 		switch (*s) {
 		case '\\':{
diff --git a/libsemanage/tests/test_iface.c b/libsemanage/tests/test_iface.c
index 434372f8..46937e10 100644
--- a/libsemanage/tests/test_iface.c
+++ b/libsemanage/tests/test_iface.c
@@ -47,7 +47,7 @@ void test_iface_get_set_msgcon(void);
 void test_iface_create(void);
 void test_iface_clone(void);
 
-/* iterfaces_policy.h */
+/* interfaces_policy.h */
 void test_iface_query(void);
 void test_iface_exists(void);
 void test_iface_count(void);
diff --git a/policycoreutils/newrole/newrole.pamd b/policycoreutils/newrole/newrole.pamd
index de3582f3..683c5441 100644
--- a/policycoreutils/newrole/newrole.pamd
+++ b/policycoreutils/newrole/newrole.pamd
@@ -1,5 +1,5 @@
 #%PAM-1.0
-# Uncomment the next line if you do not want to enter your passwd everytime
+# Uncomment the next line if you do not want to enter your passwd every time
 # auth       sufficient   pam_rootok.so
 auth       include	system-auth
 account    include	system-auth
diff --git a/policycoreutils/run_init/run_init.pamd b/policycoreutils/run_init/run_init.pamd
index 1c323d20..ef460134 100644
--- a/policycoreutils/run_init/run_init.pamd
+++ b/policycoreutils/run_init/run_init.pamd
@@ -1,5 +1,5 @@
 #%PAM-1.0
-# Uncomment the next line if you do not want to enter your passwd everytime
+# Uncomment the next line if you do not want to enter your passwd every time
 #auth       sufficient   pam_rootok.so
 auth       include	system-auth
 account    include	system-auth
diff --git a/python/sepolgen/src/sepolgen/objectmodel.py b/python/sepolgen/src/sepolgen/objectmodel.py
index 84955f7c..ccce86c1 100644
--- a/python/sepolgen/src/sepolgen/objectmodel.py
+++ b/python/sepolgen/src/sepolgen/objectmodel.py
@@ -95,7 +95,7 @@ class PermMappings:
     """The information flow properties of a set of object classes and permissions.
 
     PermMappings maps one or more classes and permissions to their PermMap objects
-    describing their information flow charecteristics.
+    describing their information flow characteristics.
     """
     def __init__(self):
         self.classes = { }
diff --git a/python/sepolgen/src/sepolgen/refpolicy.py b/python/sepolgen/src/sepolgen/refpolicy.py
index 3e907e91..9cac1b95 100644
--- a/python/sepolgen/src/sepolgen/refpolicy.py
+++ b/python/sepolgen/src/sepolgen/refpolicy.py
@@ -34,7 +34,7 @@ import selinux
 # the data structures that we need for policy generation.
 #
 
-# Constans for referring to fields
+# Constants for referring to fields
 SRC_TYPE  = 0
 TGT_TYPE  = 1
 OBJ_CLASS = 2
diff --git a/python/sepolgen/tests/test_audit.py b/python/sepolgen/tests/test_audit.py
index dbe6be2a..b659bf3b 100644
--- a/python/sepolgen/tests/test_audit.py
+++ b/python/sepolgen/tests/test_audit.py
@@ -230,7 +230,7 @@ class TestGeneration(unittest.TestCase):
 
         self.assertEqual(len(avs), 1)
 
-    def test_genaration_granted(self):
+    def test_generation_granted(self):
         parser = sepolgen.audit.AuditParser()
         parser.parse_string(granted1)
         avs = parser.to_access()
diff --git a/python/sepolgen/tests/test_refpolicy.py b/python/sepolgen/tests/test_refpolicy.py
index c7219fd5..a24381a6 100644
--- a/python/sepolgen/tests/test_refpolicy.py
+++ b/python/sepolgen/tests/test_refpolicy.py
@@ -144,7 +144,7 @@ class TestSecurityContext(unittest.TestCase):
         self.assertNotEqual(sc1, sc3)
         self.assertNotEqual(sc1, sc4)
 
-class TestObjecClass(unittest.TestCase):
+class TestObjectClass(unittest.TestCase):
     def test_init(self):
         o = refpolicy.ObjectClass(name="file")
         self.assertEqual(o.name, "file")
diff --git a/python/sepolicy/sepolicy-bash-completion.sh b/python/sepolicy/sepolicy-bash-completion.sh
index 779fd75b..13638e4d 100644
--- a/python/sepolicy/sepolicy-bash-completion.sh
+++ b/python/sepolicy/sepolicy-bash-completion.sh
@@ -36,10 +36,10 @@ __get_all_booleans () {
 __get_all_types () {
     seinfo -t 2> /dev/null | tail -n +3
 }
-__get_all_admin_interaces () {
+__get_all_admin_interfaces () {
     awk '/InterfaceVector.*_admin /{ print $2 }' /var/lib/sepolgen/interface_info | awk -F '_admin' '{ print $1 }'
 }
-__get_all_user_role_interaces () {
+__get_all_user_role_interfaces () {
     awk '/InterfaceVector.*_role /{ print $2 }' /var/lib/sepolgen/interface_info | awk -F '_role' '{ print $1 }'
 }
 __get_all_user_domains () {
@@ -139,7 +139,7 @@ _sepolicy () {
                 COMPREPLY=( $(compgen -W "-n --name -t --type" -- "$cur") )
                 return 0
             elif [ "$prev" = "--admin" -o "$prev" = "-a" ]; then
-                COMPREPLY=( $(compgen -W "$( __get_all_admin_interaces ) " -- "$cur") )
+                COMPREPLY=( $(compgen -W "$( __get_all_admin_interfaces ) " -- "$cur") )
                 return 0
             elif [ "$prev" = "--user" -o "$prev" = "-u" ]; then
                 COMPREPLY=( $(compgen -W "$( __get_all_users )" -- "$cur") )
diff --git a/python/sepolicy/sepolicy/gui.py b/python/sepolicy/sepolicy/gui.py
index c9ca158d..4f892f82 100644
--- a/python/sepolicy/sepolicy/gui.py
+++ b/python/sepolicy/sepolicy/gui.py
@@ -1309,9 +1309,9 @@ class SELinuxGui():
                 filename = i['filename']
             else:
                 filename = None
-            self.transitions_files_inital_data_insert(i['target'], i['class'], i['transtype'], filename)
+            self.transitions_files_initial_data_insert(i['target'], i['class'], i['transtype'], filename)
 
-    def transitions_files_inital_data_insert(self, path, tclass, dest, name):
+    def transitions_files_initial_data_insert(self, path, tclass, dest, name):
         iter = self.transitions_file_liststore.append()
         self.transitions_file_liststore.set_value(iter, 0, path)
         self.transitions_file_liststore.set_value(iter, 1, tclass)
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] Correct misc typos
  2022-04-08 13:10 [PATCH] Correct misc typos Christian Göttsche
@ 2022-04-12 13:45 ` James Carter
  2022-04-12 18:01   ` James Carter
  0 siblings, 1 reply; 6+ messages in thread
From: James Carter @ 2022-04-12 13:45 UTC (permalink / raw)
  To: Christian Göttsche; +Cc: SElinux list

On Fri, Apr 8, 2022 at 11:24 AM Christian Göttsche
<cgzones@googlemail.com> wrote:
>
> Found by typos[1].
>
> [1]: https://github.com/crate-ci/typos
>
> Signed-off-by: Christian Göttsche <cgzones@googlemail.com>

Acked-by: James Carter <jwcart2@gmail.com>

> ---
>  libsemanage/src/genhomedircon.c             | 2 +-
>  libsemanage/src/handle.h                    | 2 +-
>  libsemanage/src/semanage_store.c            | 2 +-
>  libsemanage/tests/test_iface.c              | 2 +-
>  policycoreutils/newrole/newrole.pamd        | 2 +-
>  policycoreutils/run_init/run_init.pamd      | 2 +-
>  python/sepolgen/src/sepolgen/objectmodel.py | 2 +-
>  python/sepolgen/src/sepolgen/refpolicy.py   | 2 +-
>  python/sepolgen/tests/test_audit.py         | 2 +-
>  python/sepolgen/tests/test_refpolicy.py     | 2 +-
>  python/sepolicy/sepolicy-bash-completion.sh | 6 +++---
>  python/sepolicy/sepolicy/gui.py             | 4 ++--
>  12 files changed, 15 insertions(+), 15 deletions(-)
>
> diff --git a/libsemanage/src/genhomedircon.c b/libsemanage/src/genhomedircon.c
> index 7ca9afc3..8f8774d3 100644
> --- a/libsemanage/src/genhomedircon.c
> +++ b/libsemanage/src/genhomedircon.c
> @@ -490,7 +490,7 @@ static int STR_COMPARATOR(const void *a, const void *b)
>         return strcmp((const char *) a, (const char *) b);
>  }
>
> -/* make_tempate
> +/* make_template
>   * @param      s         the settings holding the paths to various files
>   * @param      pred    function pointer to function to use as filter for slurp
>   *                                     file filter
> diff --git a/libsemanage/src/handle.h b/libsemanage/src/handle.h
> index 4d2aae8f..c7f4e903 100644
> --- a/libsemanage/src/handle.h
> +++ b/libsemanage/src/handle.h
> @@ -72,7 +72,7 @@ struct semanage_handle {
>         int do_check_contexts;  /* whether to run setfiles check the file contexts file */
>
>         /* This timeout is used for transactions and waiting for lock
> -          -1 means wait indefinetely
> +          -1 means wait indefinitely
>            0 means return immediately
>            >0 means wait that many seconds */
>         int timeout;
> diff --git a/libsemanage/src/semanage_store.c b/libsemanage/src/semanage_store.c
> index c6d2c5e7..14a0957a 100644
> --- a/libsemanage/src/semanage_store.c
> +++ b/libsemanage/src/semanage_store.c
> @@ -1327,7 +1327,7 @@ static char **split_args(const char *arg0, char *arg_string,
>                 goto cleanup;
>         s = arg_string;
>         /* parse the argument string one character at a time,
> -        * repsecting quotes and other special characters */
> +        * respecting quotes and other special characters */
>         while (s != NULL && *s != '\0') {
>                 switch (*s) {
>                 case '\\':{
> diff --git a/libsemanage/tests/test_iface.c b/libsemanage/tests/test_iface.c
> index 434372f8..46937e10 100644
> --- a/libsemanage/tests/test_iface.c
> +++ b/libsemanage/tests/test_iface.c
> @@ -47,7 +47,7 @@ void test_iface_get_set_msgcon(void);
>  void test_iface_create(void);
>  void test_iface_clone(void);
>
> -/* iterfaces_policy.h */
> +/* interfaces_policy.h */
>  void test_iface_query(void);
>  void test_iface_exists(void);
>  void test_iface_count(void);
> diff --git a/policycoreutils/newrole/newrole.pamd b/policycoreutils/newrole/newrole.pamd
> index de3582f3..683c5441 100644
> --- a/policycoreutils/newrole/newrole.pamd
> +++ b/policycoreutils/newrole/newrole.pamd
> @@ -1,5 +1,5 @@
>  #%PAM-1.0
> -# Uncomment the next line if you do not want to enter your passwd everytime
> +# Uncomment the next line if you do not want to enter your passwd every time
>  # auth       sufficient   pam_rootok.so
>  auth       include     system-auth
>  account    include     system-auth
> diff --git a/policycoreutils/run_init/run_init.pamd b/policycoreutils/run_init/run_init.pamd
> index 1c323d20..ef460134 100644
> --- a/policycoreutils/run_init/run_init.pamd
> +++ b/policycoreutils/run_init/run_init.pamd
> @@ -1,5 +1,5 @@
>  #%PAM-1.0
> -# Uncomment the next line if you do not want to enter your passwd everytime
> +# Uncomment the next line if you do not want to enter your passwd every time
>  #auth       sufficient   pam_rootok.so
>  auth       include     system-auth
>  account    include     system-auth
> diff --git a/python/sepolgen/src/sepolgen/objectmodel.py b/python/sepolgen/src/sepolgen/objectmodel.py
> index 84955f7c..ccce86c1 100644
> --- a/python/sepolgen/src/sepolgen/objectmodel.py
> +++ b/python/sepolgen/src/sepolgen/objectmodel.py
> @@ -95,7 +95,7 @@ class PermMappings:
>      """The information flow properties of a set of object classes and permissions.
>
>      PermMappings maps one or more classes and permissions to their PermMap objects
> -    describing their information flow charecteristics.
> +    describing their information flow characteristics.
>      """
>      def __init__(self):
>          self.classes = { }
> diff --git a/python/sepolgen/src/sepolgen/refpolicy.py b/python/sepolgen/src/sepolgen/refpolicy.py
> index 3e907e91..9cac1b95 100644
> --- a/python/sepolgen/src/sepolgen/refpolicy.py
> +++ b/python/sepolgen/src/sepolgen/refpolicy.py
> @@ -34,7 +34,7 @@ import selinux
>  # the data structures that we need for policy generation.
>  #
>
> -# Constans for referring to fields
> +# Constants for referring to fields
>  SRC_TYPE  = 0
>  TGT_TYPE  = 1
>  OBJ_CLASS = 2
> diff --git a/python/sepolgen/tests/test_audit.py b/python/sepolgen/tests/test_audit.py
> index dbe6be2a..b659bf3b 100644
> --- a/python/sepolgen/tests/test_audit.py
> +++ b/python/sepolgen/tests/test_audit.py
> @@ -230,7 +230,7 @@ class TestGeneration(unittest.TestCase):
>
>          self.assertEqual(len(avs), 1)
>
> -    def test_genaration_granted(self):
> +    def test_generation_granted(self):
>          parser = sepolgen.audit.AuditParser()
>          parser.parse_string(granted1)
>          avs = parser.to_access()
> diff --git a/python/sepolgen/tests/test_refpolicy.py b/python/sepolgen/tests/test_refpolicy.py
> index c7219fd5..a24381a6 100644
> --- a/python/sepolgen/tests/test_refpolicy.py
> +++ b/python/sepolgen/tests/test_refpolicy.py
> @@ -144,7 +144,7 @@ class TestSecurityContext(unittest.TestCase):
>          self.assertNotEqual(sc1, sc3)
>          self.assertNotEqual(sc1, sc4)
>
> -class TestObjecClass(unittest.TestCase):
> +class TestObjectClass(unittest.TestCase):
>      def test_init(self):
>          o = refpolicy.ObjectClass(name="file")
>          self.assertEqual(o.name, "file")
> diff --git a/python/sepolicy/sepolicy-bash-completion.sh b/python/sepolicy/sepolicy-bash-completion.sh
> index 779fd75b..13638e4d 100644
> --- a/python/sepolicy/sepolicy-bash-completion.sh
> +++ b/python/sepolicy/sepolicy-bash-completion.sh
> @@ -36,10 +36,10 @@ __get_all_booleans () {
>  __get_all_types () {
>      seinfo -t 2> /dev/null | tail -n +3
>  }
> -__get_all_admin_interaces () {
> +__get_all_admin_interfaces () {
>      awk '/InterfaceVector.*_admin /{ print $2 }' /var/lib/sepolgen/interface_info | awk -F '_admin' '{ print $1 }'
>  }
> -__get_all_user_role_interaces () {
> +__get_all_user_role_interfaces () {
>      awk '/InterfaceVector.*_role /{ print $2 }' /var/lib/sepolgen/interface_info | awk -F '_role' '{ print $1 }'
>  }
>  __get_all_user_domains () {
> @@ -139,7 +139,7 @@ _sepolicy () {
>                  COMPREPLY=( $(compgen -W "-n --name -t --type" -- "$cur") )
>                  return 0
>              elif [ "$prev" = "--admin" -o "$prev" = "-a" ]; then
> -                COMPREPLY=( $(compgen -W "$( __get_all_admin_interaces ) " -- "$cur") )
> +                COMPREPLY=( $(compgen -W "$( __get_all_admin_interfaces ) " -- "$cur") )
>                  return 0
>              elif [ "$prev" = "--user" -o "$prev" = "-u" ]; then
>                  COMPREPLY=( $(compgen -W "$( __get_all_users )" -- "$cur") )
> diff --git a/python/sepolicy/sepolicy/gui.py b/python/sepolicy/sepolicy/gui.py
> index c9ca158d..4f892f82 100644
> --- a/python/sepolicy/sepolicy/gui.py
> +++ b/python/sepolicy/sepolicy/gui.py
> @@ -1309,9 +1309,9 @@ class SELinuxGui():
>                  filename = i['filename']
>              else:
>                  filename = None
> -            self.transitions_files_inital_data_insert(i['target'], i['class'], i['transtype'], filename)
> +            self.transitions_files_initial_data_insert(i['target'], i['class'], i['transtype'], filename)
>
> -    def transitions_files_inital_data_insert(self, path, tclass, dest, name):
> +    def transitions_files_initial_data_insert(self, path, tclass, dest, name):
>          iter = self.transitions_file_liststore.append()
>          self.transitions_file_liststore.set_value(iter, 0, path)
>          self.transitions_file_liststore.set_value(iter, 1, tclass)
> --
> 2.35.1
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Correct misc typos
  2022-04-12 13:45 ` James Carter
@ 2022-04-12 18:01   ` James Carter
  0 siblings, 0 replies; 6+ messages in thread
From: James Carter @ 2022-04-12 18:01 UTC (permalink / raw)
  To: Christian Göttsche; +Cc: SElinux list

On Tue, Apr 12, 2022 at 9:45 AM James Carter <jwcart2@gmail.com> wrote:
>
> On Fri, Apr 8, 2022 at 11:24 AM Christian Göttsche
> <cgzones@googlemail.com> wrote:
> >
> > Found by typos[1].
> >
> > [1]: https://github.com/crate-ci/typos
> >
> > Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
>
> Acked-by: James Carter <jwcart2@gmail.com>
>

Merged.
thanks,
Jim

> > ---
> >  libsemanage/src/genhomedircon.c             | 2 +-
> >  libsemanage/src/handle.h                    | 2 +-
> >  libsemanage/src/semanage_store.c            | 2 +-
> >  libsemanage/tests/test_iface.c              | 2 +-
> >  policycoreutils/newrole/newrole.pamd        | 2 +-
> >  policycoreutils/run_init/run_init.pamd      | 2 +-
> >  python/sepolgen/src/sepolgen/objectmodel.py | 2 +-
> >  python/sepolgen/src/sepolgen/refpolicy.py   | 2 +-
> >  python/sepolgen/tests/test_audit.py         | 2 +-
> >  python/sepolgen/tests/test_refpolicy.py     | 2 +-
> >  python/sepolicy/sepolicy-bash-completion.sh | 6 +++---
> >  python/sepolicy/sepolicy/gui.py             | 4 ++--
> >  12 files changed, 15 insertions(+), 15 deletions(-)
> >
> > diff --git a/libsemanage/src/genhomedircon.c b/libsemanage/src/genhomedircon.c
> > index 7ca9afc3..8f8774d3 100644
> > --- a/libsemanage/src/genhomedircon.c
> > +++ b/libsemanage/src/genhomedircon.c
> > @@ -490,7 +490,7 @@ static int STR_COMPARATOR(const void *a, const void *b)
> >         return strcmp((const char *) a, (const char *) b);
> >  }
> >
> > -/* make_tempate
> > +/* make_template
> >   * @param      s         the settings holding the paths to various files
> >   * @param      pred    function pointer to function to use as filter for slurp
> >   *                                     file filter
> > diff --git a/libsemanage/src/handle.h b/libsemanage/src/handle.h
> > index 4d2aae8f..c7f4e903 100644
> > --- a/libsemanage/src/handle.h
> > +++ b/libsemanage/src/handle.h
> > @@ -72,7 +72,7 @@ struct semanage_handle {
> >         int do_check_contexts;  /* whether to run setfiles check the file contexts file */
> >
> >         /* This timeout is used for transactions and waiting for lock
> > -          -1 means wait indefinetely
> > +          -1 means wait indefinitely
> >            0 means return immediately
> >            >0 means wait that many seconds */
> >         int timeout;
> > diff --git a/libsemanage/src/semanage_store.c b/libsemanage/src/semanage_store.c
> > index c6d2c5e7..14a0957a 100644
> > --- a/libsemanage/src/semanage_store.c
> > +++ b/libsemanage/src/semanage_store.c
> > @@ -1327,7 +1327,7 @@ static char **split_args(const char *arg0, char *arg_string,
> >                 goto cleanup;
> >         s = arg_string;
> >         /* parse the argument string one character at a time,
> > -        * repsecting quotes and other special characters */
> > +        * respecting quotes and other special characters */
> >         while (s != NULL && *s != '\0') {
> >                 switch (*s) {
> >                 case '\\':{
> > diff --git a/libsemanage/tests/test_iface.c b/libsemanage/tests/test_iface.c
> > index 434372f8..46937e10 100644
> > --- a/libsemanage/tests/test_iface.c
> > +++ b/libsemanage/tests/test_iface.c
> > @@ -47,7 +47,7 @@ void test_iface_get_set_msgcon(void);
> >  void test_iface_create(void);
> >  void test_iface_clone(void);
> >
> > -/* iterfaces_policy.h */
> > +/* interfaces_policy.h */
> >  void test_iface_query(void);
> >  void test_iface_exists(void);
> >  void test_iface_count(void);
> > diff --git a/policycoreutils/newrole/newrole.pamd b/policycoreutils/newrole/newrole.pamd
> > index de3582f3..683c5441 100644
> > --- a/policycoreutils/newrole/newrole.pamd
> > +++ b/policycoreutils/newrole/newrole.pamd
> > @@ -1,5 +1,5 @@
> >  #%PAM-1.0
> > -# Uncomment the next line if you do not want to enter your passwd everytime
> > +# Uncomment the next line if you do not want to enter your passwd every time
> >  # auth       sufficient   pam_rootok.so
> >  auth       include     system-auth
> >  account    include     system-auth
> > diff --git a/policycoreutils/run_init/run_init.pamd b/policycoreutils/run_init/run_init.pamd
> > index 1c323d20..ef460134 100644
> > --- a/policycoreutils/run_init/run_init.pamd
> > +++ b/policycoreutils/run_init/run_init.pamd
> > @@ -1,5 +1,5 @@
> >  #%PAM-1.0
> > -# Uncomment the next line if you do not want to enter your passwd everytime
> > +# Uncomment the next line if you do not want to enter your passwd every time
> >  #auth       sufficient   pam_rootok.so
> >  auth       include     system-auth
> >  account    include     system-auth
> > diff --git a/python/sepolgen/src/sepolgen/objectmodel.py b/python/sepolgen/src/sepolgen/objectmodel.py
> > index 84955f7c..ccce86c1 100644
> > --- a/python/sepolgen/src/sepolgen/objectmodel.py
> > +++ b/python/sepolgen/src/sepolgen/objectmodel.py
> > @@ -95,7 +95,7 @@ class PermMappings:
> >      """The information flow properties of a set of object classes and permissions.
> >
> >      PermMappings maps one or more classes and permissions to their PermMap objects
> > -    describing their information flow charecteristics.
> > +    describing their information flow characteristics.
> >      """
> >      def __init__(self):
> >          self.classes = { }
> > diff --git a/python/sepolgen/src/sepolgen/refpolicy.py b/python/sepolgen/src/sepolgen/refpolicy.py
> > index 3e907e91..9cac1b95 100644
> > --- a/python/sepolgen/src/sepolgen/refpolicy.py
> > +++ b/python/sepolgen/src/sepolgen/refpolicy.py
> > @@ -34,7 +34,7 @@ import selinux
> >  # the data structures that we need for policy generation.
> >  #
> >
> > -# Constans for referring to fields
> > +# Constants for referring to fields
> >  SRC_TYPE  = 0
> >  TGT_TYPE  = 1
> >  OBJ_CLASS = 2
> > diff --git a/python/sepolgen/tests/test_audit.py b/python/sepolgen/tests/test_audit.py
> > index dbe6be2a..b659bf3b 100644
> > --- a/python/sepolgen/tests/test_audit.py
> > +++ b/python/sepolgen/tests/test_audit.py
> > @@ -230,7 +230,7 @@ class TestGeneration(unittest.TestCase):
> >
> >          self.assertEqual(len(avs), 1)
> >
> > -    def test_genaration_granted(self):
> > +    def test_generation_granted(self):
> >          parser = sepolgen.audit.AuditParser()
> >          parser.parse_string(granted1)
> >          avs = parser.to_access()
> > diff --git a/python/sepolgen/tests/test_refpolicy.py b/python/sepolgen/tests/test_refpolicy.py
> > index c7219fd5..a24381a6 100644
> > --- a/python/sepolgen/tests/test_refpolicy.py
> > +++ b/python/sepolgen/tests/test_refpolicy.py
> > @@ -144,7 +144,7 @@ class TestSecurityContext(unittest.TestCase):
> >          self.assertNotEqual(sc1, sc3)
> >          self.assertNotEqual(sc1, sc4)
> >
> > -class TestObjecClass(unittest.TestCase):
> > +class TestObjectClass(unittest.TestCase):
> >      def test_init(self):
> >          o = refpolicy.ObjectClass(name="file")
> >          self.assertEqual(o.name, "file")
> > diff --git a/python/sepolicy/sepolicy-bash-completion.sh b/python/sepolicy/sepolicy-bash-completion.sh
> > index 779fd75b..13638e4d 100644
> > --- a/python/sepolicy/sepolicy-bash-completion.sh
> > +++ b/python/sepolicy/sepolicy-bash-completion.sh
> > @@ -36,10 +36,10 @@ __get_all_booleans () {
> >  __get_all_types () {
> >      seinfo -t 2> /dev/null | tail -n +3
> >  }
> > -__get_all_admin_interaces () {
> > +__get_all_admin_interfaces () {
> >      awk '/InterfaceVector.*_admin /{ print $2 }' /var/lib/sepolgen/interface_info | awk -F '_admin' '{ print $1 }'
> >  }
> > -__get_all_user_role_interaces () {
> > +__get_all_user_role_interfaces () {
> >      awk '/InterfaceVector.*_role /{ print $2 }' /var/lib/sepolgen/interface_info | awk -F '_role' '{ print $1 }'
> >  }
> >  __get_all_user_domains () {
> > @@ -139,7 +139,7 @@ _sepolicy () {
> >                  COMPREPLY=( $(compgen -W "-n --name -t --type" -- "$cur") )
> >                  return 0
> >              elif [ "$prev" = "--admin" -o "$prev" = "-a" ]; then
> > -                COMPREPLY=( $(compgen -W "$( __get_all_admin_interaces ) " -- "$cur") )
> > +                COMPREPLY=( $(compgen -W "$( __get_all_admin_interfaces ) " -- "$cur") )
> >                  return 0
> >              elif [ "$prev" = "--user" -o "$prev" = "-u" ]; then
> >                  COMPREPLY=( $(compgen -W "$( __get_all_users )" -- "$cur") )
> > diff --git a/python/sepolicy/sepolicy/gui.py b/python/sepolicy/sepolicy/gui.py
> > index c9ca158d..4f892f82 100644
> > --- a/python/sepolicy/sepolicy/gui.py
> > +++ b/python/sepolicy/sepolicy/gui.py
> > @@ -1309,9 +1309,9 @@ class SELinuxGui():
> >                  filename = i['filename']
> >              else:
> >                  filename = None
> > -            self.transitions_files_inital_data_insert(i['target'], i['class'], i['transtype'], filename)
> > +            self.transitions_files_initial_data_insert(i['target'], i['class'], i['transtype'], filename)
> >
> > -    def transitions_files_inital_data_insert(self, path, tclass, dest, name):
> > +    def transitions_files_initial_data_insert(self, path, tclass, dest, name):
> >          iter = self.transitions_file_liststore.append()
> >          self.transitions_file_liststore.set_value(iter, 0, path)
> >          self.transitions_file_liststore.set_value(iter, 1, tclass)
> > --
> > 2.35.1
> >

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Correct misc typos
  2023-01-09 15:53 ` James Carter
@ 2023-01-11 15:53   ` James Carter
  0 siblings, 0 replies; 6+ messages in thread
From: James Carter @ 2023-01-11 15:53 UTC (permalink / raw)
  To: Christian Göttsche; +Cc: selinux

On Mon, Jan 9, 2023 at 10:53 AM James Carter <jwcart2@gmail.com> wrote:
>
> On Thu, Jan 5, 2023 at 12:26 PM Christian Göttsche
> <cgzones@googlemail.com> wrote:
> >
> > Found by codespell(1) and typos[1].
> >
> > [1]: https://github.com/crate-ci/typos
> >
> > Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
>
> Acked-by: James Carter <jwcart2@gmail.com>
>

Merged.
Thanks,
Jim

> > ---
> >  libselinux/src/label_db.c                             | 2 +-
> >  libselinux/src/regex.c                                | 2 +-
> >  libselinux/src/sha1.c                                 | 2 +-
> >  libsepol/cil/src/cil_post.c                           | 2 +-
> >  libsepol/cil/src/cil_resolve_ast.c                    | 2 +-
> >  libsepol/src/module_to_cil.c                          | 2 +-
> >  libsepol/tests/policies/test-deps/base-metreq.conf    | 2 +-
> >  libsepol/tests/policies/test-deps/base-notmetreq.conf | 2 +-
> >  libsepol/tests/policies/test-deps/small-base.conf     | 2 +-
> >  libsepol/tests/policies/test-expander/alias-base.conf | 2 +-
> >  libsepol/tests/policies/test-expander/role-base.conf  | 2 +-
> >  libsepol/tests/policies/test-expander/small-base.conf | 2 +-
> >  libsepol/tests/policies/test-expander/user-base.conf  | 2 +-
> >  libsepol/tests/policies/test-hooks/cmp_policy.conf    | 2 +-
> >  libsepol/tests/policies/test-hooks/small-base.conf    | 2 +-
> >  libsepol/tests/policies/test-linker/small-base.conf   | 2 +-
> >  policycoreutils/newrole/newrole.c                     | 2 +-
> >  python/semanage/semanage                              | 2 +-
> >  python/sepolicy/sepolicy/manpage.py                   | 2 +-
> >  19 files changed, 19 insertions(+), 19 deletions(-)
> >
> > diff --git a/libselinux/src/label_db.c b/libselinux/src/label_db.c
> > index bd73201c..3f803037 100644
> > --- a/libselinux/src/label_db.c
> > +++ b/libselinux/src/label_db.c
> > @@ -31,7 +31,7 @@
> >   * For example:
> >   * ----------------------------------------
> >   * #
> > - * # It is an example specfile for database obejcts
> > + * # It is an example specfile for database objects
> >   * #
> >   * db_database  template1           system_u:object_r:sepgsql_db_t:s0
> >   *
> > diff --git a/libselinux/src/regex.c b/libselinux/src/regex.c
> > index 149a7973..ae7ad690 100644
> > --- a/libselinux/src/regex.c
> > +++ b/libselinux/src/regex.c
> > @@ -167,7 +167,7 @@ int regex_writef(struct regex_data *regex, FILE *fp, int do_write_precompregex)
> >         PCRE2_UCHAR *bytes = NULL;
> >
> >         if (do_write_precompregex) {
> > -               /* encode the patter for serialization */
> > +               /* encode the pattern for serialization */
> >                 rc = pcre2_serialize_encode((const pcre2_code **)&regex->regex,
> >                                             1, &bytes, &serialized_size, NULL);
> >                 if (rc != 1) {
> > diff --git a/libselinux/src/sha1.c b/libselinux/src/sha1.c
> > index a8484677..9d51e04a 100644
> > --- a/libselinux/src/sha1.c
> > +++ b/libselinux/src/sha1.c
> > @@ -11,7 +11,7 @@
> >  //  Modified to:
> >  //    - stop symbols being exported for libselinux shared library - October 2015
> >  //                                                                    Richard Haines <richard_c_haines@btinternet.com>
> > -//    - Not cast the workspace from a byte array to a CHAR64LONG16 due to alignment isses.
> > +//    - Not cast the workspace from a byte array to a CHAR64LONG16 due to alignment issues.
> >  //      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;
> > diff --git a/libsepol/cil/src/cil_post.c b/libsepol/cil/src/cil_post.c
> > index 11e572e2..a7c66ead 100644
> > --- a/libsepol/cil/src/cil_post.c
> > +++ b/libsepol/cil/src/cil_post.c
> > @@ -1193,7 +1193,7 @@ static int __cil_cat_expr_range_to_bitmap_helper(struct cil_list_item *i1, struc
> >         struct cil_cat *c2 = (struct cil_cat *)d2;
> >
> >         if (n1->flavor == CIL_CATSET || n2->flavor == CIL_CATSET) {
> > -               cil_log(CIL_ERR, "Category sets cannont be used in a category range\n");
> > +               cil_log(CIL_ERR, "Category sets cannot be used in a category range\n");
> >                 goto exit;
> >         }
> >
> > diff --git a/libsepol/cil/src/cil_resolve_ast.c b/libsepol/cil/src/cil_resolve_ast.c
> > index f5e22c97..d2bfdc81 100644
> > --- a/libsepol/cil/src/cil_resolve_ast.c
> > +++ b/libsepol/cil/src/cil_resolve_ast.c
> > @@ -778,7 +778,7 @@ int cil_resolve_classcommon(struct cil_tree_node *current, void *extra_args)
> >         class = (struct cil_class *)class_datum;
> >         common = (struct cil_class *)common_datum;
> >         if (class->common != NULL) {
> > -               cil_log(CIL_ERR, "class cannot be associeated with more than one common\n");
> > +               cil_log(CIL_ERR, "class cannot be associated with more than one common\n");
> >                 rc = SEPOL_ERR;
> >                 goto exit;
> >         }
> > diff --git a/libsepol/src/module_to_cil.c b/libsepol/src/module_to_cil.c
> > index b900290a..2b24d33e 100644
> > --- a/libsepol/src/module_to_cil.c
> > +++ b/libsepol/src/module_to_cil.c
> > @@ -2330,7 +2330,7 @@ static int user_to_cil(int indent, struct policydb *pdb, struct avrule_block *bl
> >         }
> >
> >         if (block->flags & AVRULE_OPTIONAL) {
> > -               // sensitivites in user statements in optionals do not have the
> > +               // sensitivities in user statements in optionals do not have the
> >                 // standard -1 offset
> >                 sens_offset = 0;
> >         }
> > diff --git a/libsepol/tests/policies/test-deps/base-metreq.conf b/libsepol/tests/policies/test-deps/base-metreq.conf
> > index b7528dde..d8e1f40b 100644
> > --- a/libsepol/tests/policies/test-deps/base-metreq.conf
> > +++ b/libsepol/tests/policies/test-deps/base-metreq.conf
> > @@ -33,7 +33,7 @@ class key_socket
> >  class unix_stream_socket
> >  class unix_dgram_socket
> >
> > -# sysv-ipc-related clases
> > +# sysv-ipc-related classes
> >  class sem
> >  class msg
> >  class msgq
> > diff --git a/libsepol/tests/policies/test-deps/base-notmetreq.conf b/libsepol/tests/policies/test-deps/base-notmetreq.conf
> > index eee36dca..ecd92f6f 100644
> > --- a/libsepol/tests/policies/test-deps/base-notmetreq.conf
> > +++ b/libsepol/tests/policies/test-deps/base-notmetreq.conf
> > @@ -33,7 +33,7 @@ class key_socket
> >  class unix_stream_socket
> >  class unix_dgram_socket
> >
> > -# sysv-ipc-related clases
> > +# sysv-ipc-related classes
> >  class msg
> >  class msgq
> >  class shm
> > diff --git a/libsepol/tests/policies/test-deps/small-base.conf b/libsepol/tests/policies/test-deps/small-base.conf
> > index 98f49c23..848d1741 100644
> > --- a/libsepol/tests/policies/test-deps/small-base.conf
> > +++ b/libsepol/tests/policies/test-deps/small-base.conf
> > @@ -33,7 +33,7 @@ class key_socket
> >  class unix_stream_socket
> >  class unix_dgram_socket
> >
> > -# sysv-ipc-related clases
> > +# sysv-ipc-related classes
> >  class sem
> >  class msg
> >  class msgq
> > diff --git a/libsepol/tests/policies/test-expander/alias-base.conf b/libsepol/tests/policies/test-expander/alias-base.conf
> > index b950039d..34955924 100644
> > --- a/libsepol/tests/policies/test-expander/alias-base.conf
> > +++ b/libsepol/tests/policies/test-expander/alias-base.conf
> > @@ -33,7 +33,7 @@ class key_socket
> >  class unix_stream_socket
> >  class unix_dgram_socket
> >
> > -# sysv-ipc-related clases
> > +# sysv-ipc-related classes
> >  class sem
> >  class msg
> >  class msgq
> > diff --git a/libsepol/tests/policies/test-expander/role-base.conf b/libsepol/tests/policies/test-expander/role-base.conf
> > index 8e88b4be..a387c8c0 100644
> > --- a/libsepol/tests/policies/test-expander/role-base.conf
> > +++ b/libsepol/tests/policies/test-expander/role-base.conf
> > @@ -33,7 +33,7 @@ class key_socket
> >  class unix_stream_socket
> >  class unix_dgram_socket
> >
> > -# sysv-ipc-related clases
> > +# sysv-ipc-related classes
> >  class sem
> >  class msg
> >  class msgq
> > diff --git a/libsepol/tests/policies/test-expander/small-base.conf b/libsepol/tests/policies/test-expander/small-base.conf
> > index 055ea054..ac180f35 100644
> > --- a/libsepol/tests/policies/test-expander/small-base.conf
> > +++ b/libsepol/tests/policies/test-expander/small-base.conf
> > @@ -33,7 +33,7 @@ class key_socket
> >  class unix_stream_socket
> >  class unix_dgram_socket
> >
> > -# sysv-ipc-related clases
> > +# sysv-ipc-related classes
> >  class sem
> >  class msg
> >  class msgq
> > diff --git a/libsepol/tests/policies/test-expander/user-base.conf b/libsepol/tests/policies/test-expander/user-base.conf
> > index b31ee8cd..789a59a2 100644
> > --- a/libsepol/tests/policies/test-expander/user-base.conf
> > +++ b/libsepol/tests/policies/test-expander/user-base.conf
> > @@ -33,7 +33,7 @@ class key_socket
> >  class unix_stream_socket
> >  class unix_dgram_socket
> >
> > -# sysv-ipc-related clases
> > +# sysv-ipc-related classes
> >  class sem
> >  class msg
> >  class msgq
> > diff --git a/libsepol/tests/policies/test-hooks/cmp_policy.conf b/libsepol/tests/policies/test-hooks/cmp_policy.conf
> > index 9082b333..3c510bc4 100644
> > --- a/libsepol/tests/policies/test-hooks/cmp_policy.conf
> > +++ b/libsepol/tests/policies/test-hooks/cmp_policy.conf
> > @@ -33,7 +33,7 @@ class key_socket
> >  class unix_stream_socket
> >  class unix_dgram_socket
> >
> > -# sysv-ipc-related clases
> > +# sysv-ipc-related classes
> >  class sem
> >  class msg
> >  class msgq
> > diff --git a/libsepol/tests/policies/test-hooks/small-base.conf b/libsepol/tests/policies/test-hooks/small-base.conf
> > index 9082b333..3c510bc4 100644
> > --- a/libsepol/tests/policies/test-hooks/small-base.conf
> > +++ b/libsepol/tests/policies/test-hooks/small-base.conf
> > @@ -33,7 +33,7 @@ class key_socket
> >  class unix_stream_socket
> >  class unix_dgram_socket
> >
> > -# sysv-ipc-related clases
> > +# sysv-ipc-related classes
> >  class sem
> >  class msg
> >  class msgq
> > diff --git a/libsepol/tests/policies/test-linker/small-base.conf b/libsepol/tests/policies/test-linker/small-base.conf
> > index 890ebbeb..15ced459 100644
> > --- a/libsepol/tests/policies/test-linker/small-base.conf
> > +++ b/libsepol/tests/policies/test-linker/small-base.conf
> > @@ -33,7 +33,7 @@ class key_socket
> >  class unix_stream_socket
> >  class unix_dgram_socket
> >
> > -# sysv-ipc-related clases
> > +# sysv-ipc-related classes
> >  class sem
> >  class msg
> >  class msgq
> > diff --git a/policycoreutils/newrole/newrole.c b/policycoreutils/newrole/newrole.c
> > index c2afa37e..d9efa68a 100644
> > --- a/policycoreutils/newrole/newrole.c
> > +++ b/policycoreutils/newrole/newrole.c
> > @@ -1289,7 +1289,7 @@ int main(int argc, char *argv[])
> >         /*
> >          * Step 5:  Execute a new shell with the new context in `new_context'.
> >          *
> > -        * Establish context, namesapce and any options for the new shell
> > +        * Establish context, namespace and any options for the new shell
> >          */
> >         if (optind < 1)
> >                 optind = 1;
> > diff --git a/python/semanage/semanage b/python/semanage/semanage
> > index b21d1484..e0bd98a9 100644
> > --- a/python/semanage/semanage
> > +++ b/python/semanage/semanage
> > @@ -130,7 +130,7 @@ class SetImportFile(argparse.Action):
> >                  sys.exit(1)
> >          setattr(namespace, self.dest, values)
> >
> > -# define dictionary for seobject OBEJCTS
> > +# define dictionary for seobject OBJECTS
> >  object_dict = {
> >      'login': seobject.loginRecords,
> >      'user': seobject.seluserRecords,
> > diff --git a/python/sepolicy/sepolicy/manpage.py b/python/sepolicy/sepolicy/manpage.py
> > index 1bff8f9a..a488dcbf 100755
> > --- a/python/sepolicy/sepolicy/manpage.py
> > +++ b/python/sepolicy/sepolicy/manpage.py
> > @@ -739,7 +739,7 @@ SELinux %(domainname)s policy is very flexible allowing users to setup their %(d
> >  .B STANDARD FILE CONTEXT
> >
> >  SELinux defines the file context types for the %(domainname)s, if you wanted to
> > -store files with these types in a diffent paths, you need to execute the semanage command to specify alternate labeling and then use restorecon to put the labels on disk.
> > +store files with these types in a different paths, you need to execute the semanage command to specify alternate labeling and then use restorecon to put the labels on disk.
> >
> >  .B semanage fcontext -a -t %(type)s '/srv/%(domainname)s/content(/.*)?'
> >  .br
> > --
> > 2.39.0
> >

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Correct misc typos
  2023-01-05 17:13 Christian Göttsche
@ 2023-01-09 15:53 ` James Carter
  2023-01-11 15:53   ` James Carter
  0 siblings, 1 reply; 6+ messages in thread
From: James Carter @ 2023-01-09 15:53 UTC (permalink / raw)
  To: Christian Göttsche; +Cc: selinux

On Thu, Jan 5, 2023 at 12:26 PM Christian Göttsche
<cgzones@googlemail.com> wrote:
>
> Found by codespell(1) and typos[1].
>
> [1]: https://github.com/crate-ci/typos
>
> Signed-off-by: Christian Göttsche <cgzones@googlemail.com>

Acked-by: James Carter <jwcart2@gmail.com>

> ---
>  libselinux/src/label_db.c                             | 2 +-
>  libselinux/src/regex.c                                | 2 +-
>  libselinux/src/sha1.c                                 | 2 +-
>  libsepol/cil/src/cil_post.c                           | 2 +-
>  libsepol/cil/src/cil_resolve_ast.c                    | 2 +-
>  libsepol/src/module_to_cil.c                          | 2 +-
>  libsepol/tests/policies/test-deps/base-metreq.conf    | 2 +-
>  libsepol/tests/policies/test-deps/base-notmetreq.conf | 2 +-
>  libsepol/tests/policies/test-deps/small-base.conf     | 2 +-
>  libsepol/tests/policies/test-expander/alias-base.conf | 2 +-
>  libsepol/tests/policies/test-expander/role-base.conf  | 2 +-
>  libsepol/tests/policies/test-expander/small-base.conf | 2 +-
>  libsepol/tests/policies/test-expander/user-base.conf  | 2 +-
>  libsepol/tests/policies/test-hooks/cmp_policy.conf    | 2 +-
>  libsepol/tests/policies/test-hooks/small-base.conf    | 2 +-
>  libsepol/tests/policies/test-linker/small-base.conf   | 2 +-
>  policycoreutils/newrole/newrole.c                     | 2 +-
>  python/semanage/semanage                              | 2 +-
>  python/sepolicy/sepolicy/manpage.py                   | 2 +-
>  19 files changed, 19 insertions(+), 19 deletions(-)
>
> diff --git a/libselinux/src/label_db.c b/libselinux/src/label_db.c
> index bd73201c..3f803037 100644
> --- a/libselinux/src/label_db.c
> +++ b/libselinux/src/label_db.c
> @@ -31,7 +31,7 @@
>   * For example:
>   * ----------------------------------------
>   * #
> - * # It is an example specfile for database obejcts
> + * # It is an example specfile for database objects
>   * #
>   * db_database  template1           system_u:object_r:sepgsql_db_t:s0
>   *
> diff --git a/libselinux/src/regex.c b/libselinux/src/regex.c
> index 149a7973..ae7ad690 100644
> --- a/libselinux/src/regex.c
> +++ b/libselinux/src/regex.c
> @@ -167,7 +167,7 @@ int regex_writef(struct regex_data *regex, FILE *fp, int do_write_precompregex)
>         PCRE2_UCHAR *bytes = NULL;
>
>         if (do_write_precompregex) {
> -               /* encode the patter for serialization */
> +               /* encode the pattern for serialization */
>                 rc = pcre2_serialize_encode((const pcre2_code **)&regex->regex,
>                                             1, &bytes, &serialized_size, NULL);
>                 if (rc != 1) {
> diff --git a/libselinux/src/sha1.c b/libselinux/src/sha1.c
> index a8484677..9d51e04a 100644
> --- a/libselinux/src/sha1.c
> +++ b/libselinux/src/sha1.c
> @@ -11,7 +11,7 @@
>  //  Modified to:
>  //    - stop symbols being exported for libselinux shared library - October 2015
>  //                                                                    Richard Haines <richard_c_haines@btinternet.com>
> -//    - Not cast the workspace from a byte array to a CHAR64LONG16 due to alignment isses.
> +//    - Not cast the workspace from a byte array to a CHAR64LONG16 due to alignment issues.
>  //      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;
> diff --git a/libsepol/cil/src/cil_post.c b/libsepol/cil/src/cil_post.c
> index 11e572e2..a7c66ead 100644
> --- a/libsepol/cil/src/cil_post.c
> +++ b/libsepol/cil/src/cil_post.c
> @@ -1193,7 +1193,7 @@ static int __cil_cat_expr_range_to_bitmap_helper(struct cil_list_item *i1, struc
>         struct cil_cat *c2 = (struct cil_cat *)d2;
>
>         if (n1->flavor == CIL_CATSET || n2->flavor == CIL_CATSET) {
> -               cil_log(CIL_ERR, "Category sets cannont be used in a category range\n");
> +               cil_log(CIL_ERR, "Category sets cannot be used in a category range\n");
>                 goto exit;
>         }
>
> diff --git a/libsepol/cil/src/cil_resolve_ast.c b/libsepol/cil/src/cil_resolve_ast.c
> index f5e22c97..d2bfdc81 100644
> --- a/libsepol/cil/src/cil_resolve_ast.c
> +++ b/libsepol/cil/src/cil_resolve_ast.c
> @@ -778,7 +778,7 @@ int cil_resolve_classcommon(struct cil_tree_node *current, void *extra_args)
>         class = (struct cil_class *)class_datum;
>         common = (struct cil_class *)common_datum;
>         if (class->common != NULL) {
> -               cil_log(CIL_ERR, "class cannot be associeated with more than one common\n");
> +               cil_log(CIL_ERR, "class cannot be associated with more than one common\n");
>                 rc = SEPOL_ERR;
>                 goto exit;
>         }
> diff --git a/libsepol/src/module_to_cil.c b/libsepol/src/module_to_cil.c
> index b900290a..2b24d33e 100644
> --- a/libsepol/src/module_to_cil.c
> +++ b/libsepol/src/module_to_cil.c
> @@ -2330,7 +2330,7 @@ static int user_to_cil(int indent, struct policydb *pdb, struct avrule_block *bl
>         }
>
>         if (block->flags & AVRULE_OPTIONAL) {
> -               // sensitivites in user statements in optionals do not have the
> +               // sensitivities in user statements in optionals do not have the
>                 // standard -1 offset
>                 sens_offset = 0;
>         }
> diff --git a/libsepol/tests/policies/test-deps/base-metreq.conf b/libsepol/tests/policies/test-deps/base-metreq.conf
> index b7528dde..d8e1f40b 100644
> --- a/libsepol/tests/policies/test-deps/base-metreq.conf
> +++ b/libsepol/tests/policies/test-deps/base-metreq.conf
> @@ -33,7 +33,7 @@ class key_socket
>  class unix_stream_socket
>  class unix_dgram_socket
>
> -# sysv-ipc-related clases
> +# sysv-ipc-related classes
>  class sem
>  class msg
>  class msgq
> diff --git a/libsepol/tests/policies/test-deps/base-notmetreq.conf b/libsepol/tests/policies/test-deps/base-notmetreq.conf
> index eee36dca..ecd92f6f 100644
> --- a/libsepol/tests/policies/test-deps/base-notmetreq.conf
> +++ b/libsepol/tests/policies/test-deps/base-notmetreq.conf
> @@ -33,7 +33,7 @@ class key_socket
>  class unix_stream_socket
>  class unix_dgram_socket
>
> -# sysv-ipc-related clases
> +# sysv-ipc-related classes
>  class msg
>  class msgq
>  class shm
> diff --git a/libsepol/tests/policies/test-deps/small-base.conf b/libsepol/tests/policies/test-deps/small-base.conf
> index 98f49c23..848d1741 100644
> --- a/libsepol/tests/policies/test-deps/small-base.conf
> +++ b/libsepol/tests/policies/test-deps/small-base.conf
> @@ -33,7 +33,7 @@ class key_socket
>  class unix_stream_socket
>  class unix_dgram_socket
>
> -# sysv-ipc-related clases
> +# sysv-ipc-related classes
>  class sem
>  class msg
>  class msgq
> diff --git a/libsepol/tests/policies/test-expander/alias-base.conf b/libsepol/tests/policies/test-expander/alias-base.conf
> index b950039d..34955924 100644
> --- a/libsepol/tests/policies/test-expander/alias-base.conf
> +++ b/libsepol/tests/policies/test-expander/alias-base.conf
> @@ -33,7 +33,7 @@ class key_socket
>  class unix_stream_socket
>  class unix_dgram_socket
>
> -# sysv-ipc-related clases
> +# sysv-ipc-related classes
>  class sem
>  class msg
>  class msgq
> diff --git a/libsepol/tests/policies/test-expander/role-base.conf b/libsepol/tests/policies/test-expander/role-base.conf
> index 8e88b4be..a387c8c0 100644
> --- a/libsepol/tests/policies/test-expander/role-base.conf
> +++ b/libsepol/tests/policies/test-expander/role-base.conf
> @@ -33,7 +33,7 @@ class key_socket
>  class unix_stream_socket
>  class unix_dgram_socket
>
> -# sysv-ipc-related clases
> +# sysv-ipc-related classes
>  class sem
>  class msg
>  class msgq
> diff --git a/libsepol/tests/policies/test-expander/small-base.conf b/libsepol/tests/policies/test-expander/small-base.conf
> index 055ea054..ac180f35 100644
> --- a/libsepol/tests/policies/test-expander/small-base.conf
> +++ b/libsepol/tests/policies/test-expander/small-base.conf
> @@ -33,7 +33,7 @@ class key_socket
>  class unix_stream_socket
>  class unix_dgram_socket
>
> -# sysv-ipc-related clases
> +# sysv-ipc-related classes
>  class sem
>  class msg
>  class msgq
> diff --git a/libsepol/tests/policies/test-expander/user-base.conf b/libsepol/tests/policies/test-expander/user-base.conf
> index b31ee8cd..789a59a2 100644
> --- a/libsepol/tests/policies/test-expander/user-base.conf
> +++ b/libsepol/tests/policies/test-expander/user-base.conf
> @@ -33,7 +33,7 @@ class key_socket
>  class unix_stream_socket
>  class unix_dgram_socket
>
> -# sysv-ipc-related clases
> +# sysv-ipc-related classes
>  class sem
>  class msg
>  class msgq
> diff --git a/libsepol/tests/policies/test-hooks/cmp_policy.conf b/libsepol/tests/policies/test-hooks/cmp_policy.conf
> index 9082b333..3c510bc4 100644
> --- a/libsepol/tests/policies/test-hooks/cmp_policy.conf
> +++ b/libsepol/tests/policies/test-hooks/cmp_policy.conf
> @@ -33,7 +33,7 @@ class key_socket
>  class unix_stream_socket
>  class unix_dgram_socket
>
> -# sysv-ipc-related clases
> +# sysv-ipc-related classes
>  class sem
>  class msg
>  class msgq
> diff --git a/libsepol/tests/policies/test-hooks/small-base.conf b/libsepol/tests/policies/test-hooks/small-base.conf
> index 9082b333..3c510bc4 100644
> --- a/libsepol/tests/policies/test-hooks/small-base.conf
> +++ b/libsepol/tests/policies/test-hooks/small-base.conf
> @@ -33,7 +33,7 @@ class key_socket
>  class unix_stream_socket
>  class unix_dgram_socket
>
> -# sysv-ipc-related clases
> +# sysv-ipc-related classes
>  class sem
>  class msg
>  class msgq
> diff --git a/libsepol/tests/policies/test-linker/small-base.conf b/libsepol/tests/policies/test-linker/small-base.conf
> index 890ebbeb..15ced459 100644
> --- a/libsepol/tests/policies/test-linker/small-base.conf
> +++ b/libsepol/tests/policies/test-linker/small-base.conf
> @@ -33,7 +33,7 @@ class key_socket
>  class unix_stream_socket
>  class unix_dgram_socket
>
> -# sysv-ipc-related clases
> +# sysv-ipc-related classes
>  class sem
>  class msg
>  class msgq
> diff --git a/policycoreutils/newrole/newrole.c b/policycoreutils/newrole/newrole.c
> index c2afa37e..d9efa68a 100644
> --- a/policycoreutils/newrole/newrole.c
> +++ b/policycoreutils/newrole/newrole.c
> @@ -1289,7 +1289,7 @@ int main(int argc, char *argv[])
>         /*
>          * Step 5:  Execute a new shell with the new context in `new_context'.
>          *
> -        * Establish context, namesapce and any options for the new shell
> +        * Establish context, namespace and any options for the new shell
>          */
>         if (optind < 1)
>                 optind = 1;
> diff --git a/python/semanage/semanage b/python/semanage/semanage
> index b21d1484..e0bd98a9 100644
> --- a/python/semanage/semanage
> +++ b/python/semanage/semanage
> @@ -130,7 +130,7 @@ class SetImportFile(argparse.Action):
>                  sys.exit(1)
>          setattr(namespace, self.dest, values)
>
> -# define dictionary for seobject OBEJCTS
> +# define dictionary for seobject OBJECTS
>  object_dict = {
>      'login': seobject.loginRecords,
>      'user': seobject.seluserRecords,
> diff --git a/python/sepolicy/sepolicy/manpage.py b/python/sepolicy/sepolicy/manpage.py
> index 1bff8f9a..a488dcbf 100755
> --- a/python/sepolicy/sepolicy/manpage.py
> +++ b/python/sepolicy/sepolicy/manpage.py
> @@ -739,7 +739,7 @@ SELinux %(domainname)s policy is very flexible allowing users to setup their %(d
>  .B STANDARD FILE CONTEXT
>
>  SELinux defines the file context types for the %(domainname)s, if you wanted to
> -store files with these types in a diffent paths, you need to execute the semanage command to specify alternate labeling and then use restorecon to put the labels on disk.
> +store files with these types in a different paths, you need to execute the semanage command to specify alternate labeling and then use restorecon to put the labels on disk.
>
>  .B semanage fcontext -a -t %(type)s '/srv/%(domainname)s/content(/.*)?'
>  .br
> --
> 2.39.0
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] Correct misc typos
@ 2023-01-05 17:13 Christian Göttsche
  2023-01-09 15:53 ` James Carter
  0 siblings, 1 reply; 6+ messages in thread
From: Christian Göttsche @ 2023-01-05 17:13 UTC (permalink / raw)
  To: selinux

Found by codespell(1) and typos[1].

[1]: https://github.com/crate-ci/typos

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
---
 libselinux/src/label_db.c                             | 2 +-
 libselinux/src/regex.c                                | 2 +-
 libselinux/src/sha1.c                                 | 2 +-
 libsepol/cil/src/cil_post.c                           | 2 +-
 libsepol/cil/src/cil_resolve_ast.c                    | 2 +-
 libsepol/src/module_to_cil.c                          | 2 +-
 libsepol/tests/policies/test-deps/base-metreq.conf    | 2 +-
 libsepol/tests/policies/test-deps/base-notmetreq.conf | 2 +-
 libsepol/tests/policies/test-deps/small-base.conf     | 2 +-
 libsepol/tests/policies/test-expander/alias-base.conf | 2 +-
 libsepol/tests/policies/test-expander/role-base.conf  | 2 +-
 libsepol/tests/policies/test-expander/small-base.conf | 2 +-
 libsepol/tests/policies/test-expander/user-base.conf  | 2 +-
 libsepol/tests/policies/test-hooks/cmp_policy.conf    | 2 +-
 libsepol/tests/policies/test-hooks/small-base.conf    | 2 +-
 libsepol/tests/policies/test-linker/small-base.conf   | 2 +-
 policycoreutils/newrole/newrole.c                     | 2 +-
 python/semanage/semanage                              | 2 +-
 python/sepolicy/sepolicy/manpage.py                   | 2 +-
 19 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/libselinux/src/label_db.c b/libselinux/src/label_db.c
index bd73201c..3f803037 100644
--- a/libselinux/src/label_db.c
+++ b/libselinux/src/label_db.c
@@ -31,7 +31,7 @@
  * For example:
  * ----------------------------------------
  * #
- * # It is an example specfile for database obejcts
+ * # It is an example specfile for database objects
  * #
  * db_database  template1           system_u:object_r:sepgsql_db_t:s0
  *
diff --git a/libselinux/src/regex.c b/libselinux/src/regex.c
index 149a7973..ae7ad690 100644
--- a/libselinux/src/regex.c
+++ b/libselinux/src/regex.c
@@ -167,7 +167,7 @@ int regex_writef(struct regex_data *regex, FILE *fp, int do_write_precompregex)
 	PCRE2_UCHAR *bytes = NULL;
 
 	if (do_write_precompregex) {
-		/* encode the patter for serialization */
+		/* encode the pattern for serialization */
 		rc = pcre2_serialize_encode((const pcre2_code **)&regex->regex,
 					    1, &bytes, &serialized_size, NULL);
 		if (rc != 1) {
diff --git a/libselinux/src/sha1.c b/libselinux/src/sha1.c
index a8484677..9d51e04a 100644
--- a/libselinux/src/sha1.c
+++ b/libselinux/src/sha1.c
@@ -11,7 +11,7 @@
 //  Modified to:
 //    - stop symbols being exported for libselinux shared library - October 2015
 //								       Richard Haines <richard_c_haines@btinternet.com>
-//    - Not cast the workspace from a byte array to a CHAR64LONG16 due to alignment isses.
+//    - Not cast the workspace from a byte array to a CHAR64LONG16 due to alignment issues.
 //      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;
diff --git a/libsepol/cil/src/cil_post.c b/libsepol/cil/src/cil_post.c
index 11e572e2..a7c66ead 100644
--- a/libsepol/cil/src/cil_post.c
+++ b/libsepol/cil/src/cil_post.c
@@ -1193,7 +1193,7 @@ static int __cil_cat_expr_range_to_bitmap_helper(struct cil_list_item *i1, struc
 	struct cil_cat *c2 = (struct cil_cat *)d2;
 
 	if (n1->flavor == CIL_CATSET || n2->flavor == CIL_CATSET) {
-		cil_log(CIL_ERR, "Category sets cannont be used in a category range\n");
+		cil_log(CIL_ERR, "Category sets cannot be used in a category range\n");
 		goto exit;
 	}
 
diff --git a/libsepol/cil/src/cil_resolve_ast.c b/libsepol/cil/src/cil_resolve_ast.c
index f5e22c97..d2bfdc81 100644
--- a/libsepol/cil/src/cil_resolve_ast.c
+++ b/libsepol/cil/src/cil_resolve_ast.c
@@ -778,7 +778,7 @@ int cil_resolve_classcommon(struct cil_tree_node *current, void *extra_args)
 	class = (struct cil_class *)class_datum;
 	common = (struct cil_class *)common_datum;
 	if (class->common != NULL) {
-		cil_log(CIL_ERR, "class cannot be associeated with more than one common\n");
+		cil_log(CIL_ERR, "class cannot be associated with more than one common\n");
 		rc = SEPOL_ERR;
 		goto exit;
 	}
diff --git a/libsepol/src/module_to_cil.c b/libsepol/src/module_to_cil.c
index b900290a..2b24d33e 100644
--- a/libsepol/src/module_to_cil.c
+++ b/libsepol/src/module_to_cil.c
@@ -2330,7 +2330,7 @@ static int user_to_cil(int indent, struct policydb *pdb, struct avrule_block *bl
 	}
 
 	if (block->flags & AVRULE_OPTIONAL) {
-		// sensitivites in user statements in optionals do not have the
+		// sensitivities in user statements in optionals do not have the
 		// standard -1 offset
 		sens_offset = 0;
 	}
diff --git a/libsepol/tests/policies/test-deps/base-metreq.conf b/libsepol/tests/policies/test-deps/base-metreq.conf
index b7528dde..d8e1f40b 100644
--- a/libsepol/tests/policies/test-deps/base-metreq.conf
+++ b/libsepol/tests/policies/test-deps/base-metreq.conf
@@ -33,7 +33,7 @@ class key_socket
 class unix_stream_socket
 class unix_dgram_socket
 
-# sysv-ipc-related clases
+# sysv-ipc-related classes
 class sem
 class msg
 class msgq
diff --git a/libsepol/tests/policies/test-deps/base-notmetreq.conf b/libsepol/tests/policies/test-deps/base-notmetreq.conf
index eee36dca..ecd92f6f 100644
--- a/libsepol/tests/policies/test-deps/base-notmetreq.conf
+++ b/libsepol/tests/policies/test-deps/base-notmetreq.conf
@@ -33,7 +33,7 @@ class key_socket
 class unix_stream_socket
 class unix_dgram_socket
 
-# sysv-ipc-related clases
+# sysv-ipc-related classes
 class msg
 class msgq
 class shm
diff --git a/libsepol/tests/policies/test-deps/small-base.conf b/libsepol/tests/policies/test-deps/small-base.conf
index 98f49c23..848d1741 100644
--- a/libsepol/tests/policies/test-deps/small-base.conf
+++ b/libsepol/tests/policies/test-deps/small-base.conf
@@ -33,7 +33,7 @@ class key_socket
 class unix_stream_socket
 class unix_dgram_socket
 
-# sysv-ipc-related clases
+# sysv-ipc-related classes
 class sem
 class msg
 class msgq
diff --git a/libsepol/tests/policies/test-expander/alias-base.conf b/libsepol/tests/policies/test-expander/alias-base.conf
index b950039d..34955924 100644
--- a/libsepol/tests/policies/test-expander/alias-base.conf
+++ b/libsepol/tests/policies/test-expander/alias-base.conf
@@ -33,7 +33,7 @@ class key_socket
 class unix_stream_socket
 class unix_dgram_socket
 
-# sysv-ipc-related clases
+# sysv-ipc-related classes
 class sem
 class msg
 class msgq
diff --git a/libsepol/tests/policies/test-expander/role-base.conf b/libsepol/tests/policies/test-expander/role-base.conf
index 8e88b4be..a387c8c0 100644
--- a/libsepol/tests/policies/test-expander/role-base.conf
+++ b/libsepol/tests/policies/test-expander/role-base.conf
@@ -33,7 +33,7 @@ class key_socket
 class unix_stream_socket
 class unix_dgram_socket
 
-# sysv-ipc-related clases
+# sysv-ipc-related classes
 class sem
 class msg
 class msgq
diff --git a/libsepol/tests/policies/test-expander/small-base.conf b/libsepol/tests/policies/test-expander/small-base.conf
index 055ea054..ac180f35 100644
--- a/libsepol/tests/policies/test-expander/small-base.conf
+++ b/libsepol/tests/policies/test-expander/small-base.conf
@@ -33,7 +33,7 @@ class key_socket
 class unix_stream_socket
 class unix_dgram_socket
 
-# sysv-ipc-related clases
+# sysv-ipc-related classes
 class sem
 class msg
 class msgq
diff --git a/libsepol/tests/policies/test-expander/user-base.conf b/libsepol/tests/policies/test-expander/user-base.conf
index b31ee8cd..789a59a2 100644
--- a/libsepol/tests/policies/test-expander/user-base.conf
+++ b/libsepol/tests/policies/test-expander/user-base.conf
@@ -33,7 +33,7 @@ class key_socket
 class unix_stream_socket
 class unix_dgram_socket
 
-# sysv-ipc-related clases
+# sysv-ipc-related classes
 class sem
 class msg
 class msgq
diff --git a/libsepol/tests/policies/test-hooks/cmp_policy.conf b/libsepol/tests/policies/test-hooks/cmp_policy.conf
index 9082b333..3c510bc4 100644
--- a/libsepol/tests/policies/test-hooks/cmp_policy.conf
+++ b/libsepol/tests/policies/test-hooks/cmp_policy.conf
@@ -33,7 +33,7 @@ class key_socket
 class unix_stream_socket
 class unix_dgram_socket
 
-# sysv-ipc-related clases
+# sysv-ipc-related classes
 class sem
 class msg
 class msgq
diff --git a/libsepol/tests/policies/test-hooks/small-base.conf b/libsepol/tests/policies/test-hooks/small-base.conf
index 9082b333..3c510bc4 100644
--- a/libsepol/tests/policies/test-hooks/small-base.conf
+++ b/libsepol/tests/policies/test-hooks/small-base.conf
@@ -33,7 +33,7 @@ class key_socket
 class unix_stream_socket
 class unix_dgram_socket
 
-# sysv-ipc-related clases
+# sysv-ipc-related classes
 class sem
 class msg
 class msgq
diff --git a/libsepol/tests/policies/test-linker/small-base.conf b/libsepol/tests/policies/test-linker/small-base.conf
index 890ebbeb..15ced459 100644
--- a/libsepol/tests/policies/test-linker/small-base.conf
+++ b/libsepol/tests/policies/test-linker/small-base.conf
@@ -33,7 +33,7 @@ class key_socket
 class unix_stream_socket
 class unix_dgram_socket
 
-# sysv-ipc-related clases
+# sysv-ipc-related classes
 class sem
 class msg
 class msgq
diff --git a/policycoreutils/newrole/newrole.c b/policycoreutils/newrole/newrole.c
index c2afa37e..d9efa68a 100644
--- a/policycoreutils/newrole/newrole.c
+++ b/policycoreutils/newrole/newrole.c
@@ -1289,7 +1289,7 @@ int main(int argc, char *argv[])
 	/*
 	 * Step 5:  Execute a new shell with the new context in `new_context'. 
 	 *
-	 * Establish context, namesapce and any options for the new shell
+	 * Establish context, namespace and any options for the new shell
 	 */
 	if (optind < 1)
 		optind = 1;
diff --git a/python/semanage/semanage b/python/semanage/semanage
index b21d1484..e0bd98a9 100644
--- a/python/semanage/semanage
+++ b/python/semanage/semanage
@@ -130,7 +130,7 @@ class SetImportFile(argparse.Action):
                 sys.exit(1)
         setattr(namespace, self.dest, values)
 
-# define dictionary for seobject OBEJCTS
+# define dictionary for seobject OBJECTS
 object_dict = {
     'login': seobject.loginRecords,
     'user': seobject.seluserRecords,
diff --git a/python/sepolicy/sepolicy/manpage.py b/python/sepolicy/sepolicy/manpage.py
index 1bff8f9a..a488dcbf 100755
--- a/python/sepolicy/sepolicy/manpage.py
+++ b/python/sepolicy/sepolicy/manpage.py
@@ -739,7 +739,7 @@ SELinux %(domainname)s policy is very flexible allowing users to setup their %(d
 .B STANDARD FILE CONTEXT
 
 SELinux defines the file context types for the %(domainname)s, if you wanted to
-store files with these types in a diffent paths, you need to execute the semanage command to specify alternate labeling and then use restorecon to put the labels on disk.
+store files with these types in a different paths, you need to execute the semanage command to specify alternate labeling and then use restorecon to put the labels on disk.
 
 .B semanage fcontext -a -t %(type)s '/srv/%(domainname)s/content(/.*)?'
 .br
-- 
2.39.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-01-11 15:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-08 13:10 [PATCH] Correct misc typos Christian Göttsche
2022-04-12 13:45 ` James Carter
2022-04-12 18:01   ` James Carter
2023-01-05 17:13 Christian Göttsche
2023-01-09 15:53 ` James Carter
2023-01-11 15:53   ` James Carter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.