[PATCH SYSTEMD 3/7] selinux: mark _mac_selinux_generic_access_check with leading underscore

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



`mac_selinux_generic_access_check()` should not be called directly, only
via the wrapper macros `mac_selinux_access_check` and
`mac_selinux_unit_access_check`.
---
 src/core/selinux-access.c |  4 ++--
 src/core/selinux-access.h | 14 +++++++-------
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/core/selinux-access.c b/src/core/selinux-access.c
index e40fd937a6..180fe22773 100644
--- a/src/core/selinux-access.c
+++ b/src/core/selinux-access.c
@@ -177,7 +177,7 @@ static int access_init(sd_bus_error *error) {
    If the machine is in permissive mode it will return ok.  Audit messages will
    still be generated if the access would be denied in enforcing mode.
 */
-int mac_selinux_generic_access_check(
+int _mac_selinux_generic_access_check(
                 sd_bus_message *message,
                 const char *path,
                 const char *permission,
@@ -286,7 +286,7 @@ int mac_selinux_generic_access_check(
 
 #else /* HAVE_SELINUX */
 
-int mac_selinux_generic_access_check(
+int _mac_selinux_generic_access_check(
                 sd_bus_message *message,
                 const char *path,
                 const char *permission,
diff --git a/src/core/selinux-access.h b/src/core/selinux-access.h
index 8931e998d0..8a5582997a 100644
--- a/src/core/selinux-access.h
+++ b/src/core/selinux-access.h
@@ -5,14 +5,14 @@
 
 #include "manager.h"
 
-int mac_selinux_generic_access_check(sd_bus_message *message,
-                                     const char *path,
-                                     const char *permission,
-                                     sd_bus_error *error,
-                                     const char *func);
+int _mac_selinux_generic_access_check(sd_bus_message *message,
+                                      const char *path,
+                                      const char *permission,
+                                      sd_bus_error *error,
+                                      const char *func);
 
 #define mac_selinux_access_check(message, permission, error) \
-        mac_selinux_generic_access_check((message), NULL, (permission), (error), __func__)
+        _mac_selinux_generic_access_check((message), NULL, (permission), (error), __func__)
 
 #define mac_selinux_unit_access_check(unit, message, permission, error) \
-        mac_selinux_generic_access_check((message), unit_label_path(unit), (permission), (error), __func__)
+        _mac_selinux_generic_access_check((message), unit_label_path(unit), (permission), (error), __func__)
-- 
2.32.0




[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux