selinux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Christian Göttsche" <cgzones@googlemail.com>
To: selinux@vger.kernel.org
Subject: [PATCH 1/5] libsepol: rename validate_policydb to policydb_validate
Date: Wed, 13 Jul 2022 16:11:44 +0200	[thread overview]
Message-ID: <20220713141148.35524-1-cgzones@googlemail.com> (raw)

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(-)

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


             reply	other threads:[~2022-07-13 14:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-13 14:11 Christian Göttsche [this message]
2022-07-13 14:11 ` [PATCH 2/5] libsepol: support const avtab_t pointer in avtab_map() Christian Göttsche
2022-07-13 14:11 ` [PATCH 3/5] libsepol: operator on const pointers during validation Christian Göttsche
2022-07-13 14:11 ` [PATCH 4/5] libsepol: rename parameter name Christian Göttsche
2022-07-13 14:11 ` [PATCH 5/5] libsepol: more strict validation Christian Göttsche
2022-07-20 22:29   ` James Carter
2022-07-20 15:35 ` [PATCH 1/5] libsepol: rename validate_policydb to policydb_validate James Carter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220713141148.35524-1-cgzones@googlemail.com \
    --to=cgzones@googlemail.com \
    --cc=selinux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).