diff mbox series

[v2,1/5] libsepol: rename validate_policydb to policydb_validate

Message ID 20220721152444.31690-1-cgzones@googlemail.com (mailing list archive)
State Accepted
Commit 938530171bcf
Headers show
Series [v2,1/5] libsepol: rename validate_policydb to policydb_validate | expand

Commit Message

Christian Göttsche July 21, 2022, 3:24 p.m. UTC
Most global functions operating on a policy database use policydb as
prefix.

Since this function is not exported there should not be any external
use.

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
---
 libsepol/src/policydb.c          | 2 +-
 libsepol/src/policydb_validate.c | 2 +-
 libsepol/src/policydb_validate.h | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

Comments

James Carter Aug. 1, 2022, 6:48 p.m. UTC | #1
On Thu, Jul 21, 2022 at 11:34 AM Christian Göttsche
<cgzones@googlemail.com> wrote:
>
> Most global functions operating on a policy database use policydb as
> prefix.
>
> Since this function is not exported there should not be any external
> use.
>
> Signed-off-by: Christian Göttsche <cgzones@googlemail.com>

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


> ---
>  libsepol/src/policydb.c          | 2 +-
>  libsepol/src/policydb_validate.c | 2 +-
>  libsepol/src/policydb_validate.h | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/libsepol/src/policydb.c b/libsepol/src/policydb.c
> index fc260eb6..8a65df05 100644
> --- a/libsepol/src/policydb.c
> +++ b/libsepol/src/policydb.c
> @@ -4570,7 +4570,7 @@ int policydb_read(policydb_t * p, struct policy_file *fp, unsigned verbose)
>                 }
>         }
>
> -       if (validate_policydb(fp->handle, p))
> +       if (policydb_validate(fp->handle, p))
>                 goto bad;
>
>         return POLICYDB_SUCCESS;
> diff --git a/libsepol/src/policydb_validate.c b/libsepol/src/policydb_validate.c
> index 99d4eb7f..e1dad236 100644
> --- a/libsepol/src/policydb_validate.c
> +++ b/libsepol/src/policydb_validate.c
> @@ -1330,7 +1330,7 @@ static void validate_array_destroy(validate_t flavors[])
>  /*
>   * Validate policydb
>   */
> -int validate_policydb(sepol_handle_t *handle, policydb_t *p)
> +int policydb_validate(sepol_handle_t *handle, policydb_t *p)
>  {
>         validate_t flavors[SYM_NUM] = {};
>
> diff --git a/libsepol/src/policydb_validate.h b/libsepol/src/policydb_validate.h
> index d9f7229b..b7f9f191 100644
> --- a/libsepol/src/policydb_validate.h
> +++ b/libsepol/src/policydb_validate.h
> @@ -4,4 +4,4 @@
>  #include <sepol/policydb/policydb.h>
>
>  int value_isvalid(uint32_t value, uint32_t nprim);
> -int validate_policydb(sepol_handle_t *handle, policydb_t *p);
> +int policydb_validate(sepol_handle_t *handle, policydb_t *p);
> --
> 2.36.1
>
James Carter Aug. 9, 2022, 3:20 p.m. UTC | #2
On Mon, Aug 1, 2022 at 2:48 PM James Carter <jwcart2@gmail.com> wrote:
>
> On Thu, Jul 21, 2022 at 11:34 AM Christian Göttsche
> <cgzones@googlemail.com> wrote:
> >
> > Most global functions operating on a policy database use policydb as
> > prefix.
> >
> > Since this function is not exported there should not be any external
> > use.
> >
> > Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
>
> For this series:
> Acked-by: James Carter <jwcart2@gmail.com>
>

This series has been merged.
Thanks,
Jim

>
> > ---
> >  libsepol/src/policydb.c          | 2 +-
> >  libsepol/src/policydb_validate.c | 2 +-
> >  libsepol/src/policydb_validate.h | 2 +-
> >  3 files changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/libsepol/src/policydb.c b/libsepol/src/policydb.c
> > index fc260eb6..8a65df05 100644
> > --- a/libsepol/src/policydb.c
> > +++ b/libsepol/src/policydb.c
> > @@ -4570,7 +4570,7 @@ int policydb_read(policydb_t * p, struct policy_file *fp, unsigned verbose)
> >                 }
> >         }
> >
> > -       if (validate_policydb(fp->handle, p))
> > +       if (policydb_validate(fp->handle, p))
> >                 goto bad;
> >
> >         return POLICYDB_SUCCESS;
> > diff --git a/libsepol/src/policydb_validate.c b/libsepol/src/policydb_validate.c
> > index 99d4eb7f..e1dad236 100644
> > --- a/libsepol/src/policydb_validate.c
> > +++ b/libsepol/src/policydb_validate.c
> > @@ -1330,7 +1330,7 @@ static void validate_array_destroy(validate_t flavors[])
> >  /*
> >   * Validate policydb
> >   */
> > -int validate_policydb(sepol_handle_t *handle, policydb_t *p)
> > +int policydb_validate(sepol_handle_t *handle, policydb_t *p)
> >  {
> >         validate_t flavors[SYM_NUM] = {};
> >
> > diff --git a/libsepol/src/policydb_validate.h b/libsepol/src/policydb_validate.h
> > index d9f7229b..b7f9f191 100644
> > --- a/libsepol/src/policydb_validate.h
> > +++ b/libsepol/src/policydb_validate.h
> > @@ -4,4 +4,4 @@
> >  #include <sepol/policydb/policydb.h>
> >
> >  int value_isvalid(uint32_t value, uint32_t nprim);
> > -int validate_policydb(sepol_handle_t *handle, policydb_t *p);
> > +int policydb_validate(sepol_handle_t *handle, policydb_t *p);
> > --
> > 2.36.1
> >
diff mbox series

Patch

diff --git a/libsepol/src/policydb.c b/libsepol/src/policydb.c
index fc260eb6..8a65df05 100644
--- a/libsepol/src/policydb.c
+++ b/libsepol/src/policydb.c
@@ -4570,7 +4570,7 @@  int policydb_read(policydb_t * p, struct policy_file *fp, unsigned verbose)
 		}
 	}
 
-	if (validate_policydb(fp->handle, p))
+	if (policydb_validate(fp->handle, p))
 		goto bad;
 
 	return POLICYDB_SUCCESS;
diff --git a/libsepol/src/policydb_validate.c b/libsepol/src/policydb_validate.c
index 99d4eb7f..e1dad236 100644
--- a/libsepol/src/policydb_validate.c
+++ b/libsepol/src/policydb_validate.c
@@ -1330,7 +1330,7 @@  static void validate_array_destroy(validate_t flavors[])
 /*
  * Validate policydb
  */
-int validate_policydb(sepol_handle_t *handle, policydb_t *p)
+int policydb_validate(sepol_handle_t *handle, policydb_t *p)
 {
 	validate_t flavors[SYM_NUM] = {};
 
diff --git a/libsepol/src/policydb_validate.h b/libsepol/src/policydb_validate.h
index d9f7229b..b7f9f191 100644
--- a/libsepol/src/policydb_validate.h
+++ b/libsepol/src/policydb_validate.h
@@ -4,4 +4,4 @@ 
 #include <sepol/policydb/policydb.h>
 
 int value_isvalid(uint32_t value, uint32_t nprim);
-int validate_policydb(sepol_handle_t *handle, policydb_t *p);
+int policydb_validate(sepol_handle_t *handle, policydb_t *p);