summaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
authorBenoît Dejean <bdejean@src.gnome.org>2005-08-02 09:47:21 +0000
committerBenoît Dejean <bdejean@src.gnome.org>2005-08-02 09:47:21 +0000
commit78cb7832c50f0cbb8225a201d46539198cf99a25 (patch)
tree907169723e04fa7a360739f8ca00c714e7104efd /sysdeps
parentb3979e69426cd74386ed9fc6e99f55a4ec353b88 (diff)
downloadlibgtop-78cb7832c50f0cbb8225a201d46539198cf99a25.tar.gz
Moved _glibtop_init_hook_[sp] declaration to private glibtop/init_hooks.h.
* configure.in: * include/glibtop/Makefile.am: * include/glibtop/glibtop-server.h: * include/glibtop/init_hooks.h: * include/glibtop/sysdeps.h: * lib/init.c: (glibtop_init_s): * lib/sysdeps.c: * sysdeps/aix/open.c: (glibtop_init_p): * sysdeps/common/sysdeps_suid.c: * sysdeps/freebsd/open.c: (glibtop_init_p): * sysdeps/osf1/open_suid.c: (glibtop_init_p): * sysdeps/solaris/open_suid.c: (glibtop_init_p): * sysdeps/stub_suid/open.c: (glibtop_init_p): Moved _glibtop_init_hook_[sp] declaration to private glibtop/init_hooks.h. Marked them const. Fixed GLIBTOP_SUID_NETLIST issues.
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/aix/open.c4
-rw-r--r--sysdeps/common/sysdeps_suid.c6
-rw-r--r--sysdeps/freebsd/open.c3
-rw-r--r--sysdeps/osf1/open_suid.c4
-rw-r--r--sysdeps/solaris/open_suid.c4
-rw-r--r--sysdeps/stub_suid/open.c3
6 files changed, 15 insertions, 9 deletions
diff --git a/sysdeps/aix/open.c b/sysdeps/aix/open.c
index 8a0757fa..5c4056ba 100644
--- a/sysdeps/aix/open.c
+++ b/sysdeps/aix/open.c
@@ -26,7 +26,7 @@
#include <glibtop.h>
#include <glibtop/error.h>
#include <glibtop/open.h>
-
+#include <glibtop/init_hooks.h>
#include "glibtop_suid.h"
/* !!! THIS FUNCTION RUNS SUID ROOT - CHANGE WITH CAUTION !!! */
@@ -35,7 +35,7 @@ void
glibtop_init_p (glibtop *server, const unsigned long features,
const unsigned flags)
{
- glibtop_init_func_t *init_fkt;
+ const glibtop_init_func_t *init_fkt;
if (server == NULL)
glibtop_error_r (NULL, "glibtop_init_p (server == NULL)");
diff --git a/sysdeps/common/sysdeps_suid.c b/sysdeps/common/sysdeps_suid.c
index 97731d9f..5b52348c 100644
--- a/sysdeps/common/sysdeps_suid.c
+++ b/sysdeps/common/sysdeps_suid.c
@@ -25,8 +25,9 @@
#include <glibtop/open.h>
#include <glibtop/union.h>
#include <glibtop/sysdeps.h>
+#include <glibtop/init_hooks.h>
-glibtop_init_func_t _glibtop_init_hook_p [] = {
+const glibtop_init_func_t _glibtop_init_hook_p [] = {
#if GLIBTOP_SUID_CPU
glibtop_init_cpu_p,
#endif
@@ -84,6 +85,9 @@ glibtop_init_func_t _glibtop_init_hook_p [] = {
#if GLIBTOP_SUID_NETLOAD
glibtop_init_netload_p,
#endif
+#if GLIBTOP_SUID_NETLIST
+ glibtop_init_netlist_p,
+#endif
#if GLIBTOP_SUID_PPP
glibtop_init_ppp_p,
#endif
diff --git a/sysdeps/freebsd/open.c b/sysdeps/freebsd/open.c
index 8546ae2c..2d66f39e 100644
--- a/sysdeps/freebsd/open.c
+++ b/sysdeps/freebsd/open.c
@@ -23,6 +23,7 @@
#include <glibtop.h>
#include <glibtop/open.h>
+#include <glibtop/init_hooks.h>
/* !!! THIS FUNCTION RUNS SUID ROOT - CHANGE WITH CAUTION !!! */
@@ -30,7 +31,7 @@ void
glibtop_init_p (glibtop *server, const unsigned long features,
const unsigned flags)
{
- glibtop_init_func_t *init_fkt;
+ const glibtop_init_func_t *init_fkt;
if (server == NULL)
glibtop_error_r (NULL, "glibtop_init_p (server == NULL)");
diff --git a/sysdeps/osf1/open_suid.c b/sysdeps/osf1/open_suid.c
index 95f9d360..913169e3 100644
--- a/sysdeps/osf1/open_suid.c
+++ b/sysdeps/osf1/open_suid.c
@@ -23,7 +23,7 @@
#include <glibtop.h>
#include <glibtop/open.h>
-
+#include <glibtop/init_hooks.h>
#include <glibtop_suid.h>
#include <unistd.h>
@@ -35,7 +35,7 @@ void
glibtop_init_p (glibtop *server, const unsigned long features,
const unsigned flags)
{
- glibtop_init_func_t *init_fkt;
+ const glibtop_init_func_t *init_fkt;
if (server == NULL)
glibtop_error_r (NULL, "glibtop_init_p (server == NULL)");
diff --git a/sysdeps/solaris/open_suid.c b/sysdeps/solaris/open_suid.c
index 95d8ae95..6da260dd 100644
--- a/sysdeps/solaris/open_suid.c
+++ b/sysdeps/solaris/open_suid.c
@@ -23,7 +23,7 @@
#include <glibtop.h>
#include <glibtop/open.h>
-
+#include <glibtop/init_hooks.h>
#include <glibtop_suid.h>
#include <unistd.h>
@@ -35,7 +35,7 @@ void
glibtop_init_p (glibtop *server, const unsigned long features,
const unsigned flags)
{
- glibtop_init_func_t *init_fkt;
+ const glibtop_init_func_t *init_fkt;
if (server == NULL)
glibtop_error_r (NULL, "glibtop_init_p (server == NULL)");
diff --git a/sysdeps/stub_suid/open.c b/sysdeps/stub_suid/open.c
index b903acd9..d498f795 100644
--- a/sysdeps/stub_suid/open.c
+++ b/sysdeps/stub_suid/open.c
@@ -23,6 +23,7 @@
#include <glibtop.h>
#include <glibtop/open.h>
+#include <glibtop/init_hooks.h>
/* !!! THIS FUNCTION RUNS SUID ROOT - CHANGE WITH CAUTION !!! */
@@ -30,7 +31,7 @@ void
glibtop_init_p (glibtop *server, const unsigned long features,
const unsigned flags)
{
- glibtop_init_func_t *init_fkt;
+ const glibtop_init_func_t *init_fkt;
if (server == NULL)
glibtop_error_r (NULL, "glibtop_init_p (server == NULL)");