|
 |
ab5585 |
From 6b12e0d1284cac96e66780aa4aeb7c32619089fc Mon Sep 17 00:00:00 2001
|
|
 |
ab5585 |
From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= <jpokorny@redhat.com>
|
|
 |
ab5585 |
Date: Thu, 9 Feb 2017 22:46:42 +0100
|
|
 |
ab5585 |
Subject: [PATCH 1/2] Refactor: lib/services: ensure *.h declare externally
|
|
 |
ab5585 |
hidden functions
|
|
 |
ab5585 |
|
|
 |
ab5585 |
...following the precedent of {upstart,systemd}.h. Note also that
|
|
 |
ab5585 |
since hardening-related commit 658fff944 [$LD -z now], it's even more
|
|
 |
ab5585 |
desirable to limit "symbol smog" as much as possible and symbols only
|
|
 |
ab5585 |
used within the library like these are trivially expendable (assuming
|
|
 |
ab5585 |
suitable toolchain).
|
|
 |
ab5585 |
|
|
 |
ab5585 |
As we use G_GNU_C_INTERNAL macro from glib2, we should care to require
|
|
 |
ab5585 |
at least that version that introduced it, i.e., 2.6 per documentation.
|
|
 |
ab5585 |
---
|
|
 |
ab5585 |
lib/services/services_private.h | 14 ++++++++++++++
|
|
 |
ab5585 |
1 file changed, 13 insertions(+), 0 deletions(-)
|
|
 |
ab5585 |
|
|
 |
ab5585 |
diff --git a/lib/services/services_private.h b/lib/services/services_private.h
|
|
 |
ab5585 |
index 60b1b14..41895a9 100644
|
|
 |
ab5585 |
--- a/lib/services/services_private.h
|
|
 |
ab5585 |
+++ b/lib/services/services_private.h
|
|
 |
ab5585 |
@@ -45,30 +45,44 @@ struct svc_action_private_s {
|
|
 |
ab5585 |
#endif
|
|
 |
ab5585 |
};
|
|
 |
ab5585 |
|
|
 |
ab5585 |
+G_GNUC_INTERNAL
|
|
 |
ab5585 |
GList *services_os_get_directory_list(const char *root, gboolean files, gboolean executable);
|
|
 |
ab5585 |
|
|
 |
ab5585 |
+G_GNUC_INTERNAL
|
|
 |
ab5585 |
gboolean services_os_action_execute(svc_action_t * op, gboolean synchronous);
|
|
 |
ab5585 |
|
|
 |
ab5585 |
+G_GNUC_INTERNAL
|
|
 |
ab5585 |
GList *resources_os_list_lsb_agents(void);
|
|
 |
ab5585 |
|
|
 |
ab5585 |
+G_GNUC_INTERNAL
|
|
 |
ab5585 |
GList *resources_os_list_ocf_providers(void);
|
|
 |
ab5585 |
|
|
 |
ab5585 |
+G_GNUC_INTERNAL
|
|
 |
ab5585 |
GList *resources_os_list_ocf_agents(const char *provider);
|
|
 |
ab5585 |
|
|
 |
ab5585 |
+G_GNUC_INTERNAL
|
|
 |
ab5585 |
GList *resources_os_list_nagios_agents(void);
|
|
 |
ab5585 |
|
|
 |
ab5585 |
+G_GNUC_INTERNAL
|
|
 |
ab5585 |
gboolean cancel_recurring_action(svc_action_t * op);
|
|
 |
ab5585 |
|
|
 |
ab5585 |
+G_GNUC_INTERNAL
|
|
 |
ab5585 |
gboolean recurring_action_timer(gpointer data);
|
|
 |
ab5585 |
+
|
|
 |
ab5585 |
+G_GNUC_INTERNAL
|
|
 |
ab5585 |
gboolean operation_finalize(svc_action_t * op);
|
|
 |
ab5585 |
|
|
 |
ab5585 |
+G_GNUC_INTERNAL
|
|
 |
ab5585 |
void services_add_inflight_op(svc_action_t *op);
|
|
 |
ab5585 |
|
|
 |
ab5585 |
+G_GNUC_INTERNAL
|
|
 |
ab5585 |
void handle_blocked_ops(void);
|
|
 |
ab5585 |
|
|
 |
ab5585 |
+G_GNUC_INTERNAL
|
|
 |
ab5585 |
gboolean is_op_blocked(const char *rsc);
|
|
 |
ab5585 |
|
|
 |
ab5585 |
#if SUPPORT_DBUS
|
|
 |
ab5585 |
+G_GNUC_INTERNAL
|
|
 |
ab5585 |
void services_set_op_pending(svc_action_t *op, DBusPendingCall *pending);
|
|
 |
ab5585 |
#endif
|
|
 |
ab5585 |
|
|
 |
ab5585 |
--
|
|
 |
ab5585 |
1.8.3.1
|
|
 |
ab5585 |
|
|
 |
ab5585 |
|
|
 |
ab5585 |
From 31adceb587c1beb90a0d61bb3bf1b634e5516d54 Mon Sep 17 00:00:00 2001
|
|
 |
ab5585 |
From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= <jpokorny@redhat.com>
|
|
 |
ab5585 |
Date: Fri, 10 Feb 2017 10:50:59 +0100
|
|
 |
ab5585 |
Subject: [PATCH 2/2] Refactor: lib/services: ensure some objects not exported
|
|
 |
ab5585 |
accidentally
|
|
 |
ab5585 |
|
|
 |
ab5585 |
They are not tracked by neither public nor private API anyway.
|
|
 |
ab5585 |
See also a note about "symbol smog" in the previous commit.
|
|
 |
ab5585 |
---
|
|
 |
ab5585 |
lib/services/services.c | 6 +++---
|
|
 |
ab5585 |
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
 |
ab5585 |
|
|
 |
ab5585 |
diff --git a/lib/services/services.c b/lib/services/services.c
|
|
 |
ab5585 |
index 4be425c..b1e3b26 100644
|
|
 |
ab5585 |
--- a/lib/services/services.c
|
|
 |
ab5585 |
+++ b/lib/services/services.c
|
|
 |
ab5585 |
@@ -37,11 +37,11 @@
|
|
 |
ab5585 |
/* TODO: Develop a rollover strategy */
|
|
 |
ab5585 |
|
|
 |
ab5585 |
static int operations = 0;
|
|
 |
ab5585 |
-GHashTable *recurring_actions = NULL;
|
|
 |
ab5585 |
+static GHashTable *recurring_actions = NULL;
|
|
 |
ab5585 |
|
|
 |
ab5585 |
/* ops waiting to run async because of conflicting active
|
|
 |
ab5585 |
- * pending ops*/
|
|
 |
ab5585 |
-GList *blocked_ops = NULL;
|
|
 |
ab5585 |
+ * pending ops */
|
|
 |
ab5585 |
+static GList *blocked_ops = NULL;
|
|
 |
ab5585 |
|
|
 |
ab5585 |
/* ops currently active (in-flight) */
|
|
 |
ab5585 |
GList *inflight_ops = NULL;
|
|
 |
ab5585 |
--
|
|
 |
ab5585 |
1.8.3.1
|
|
 |
ab5585 |
|