diff --git a/sysdeps/stub_suid/Makefile.am b/sysdeps/stub_suid/Makefile.am index 2a261b44..cfb9daad 100644 --- a/sysdeps/stub_suid/Makefile.am +++ b/sysdeps/stub_suid/Makefile.am @@ -13,7 +13,7 @@ libgtop_sysdeps_suid_la_SOURCES = open.c close.c siglist.c cpu.c mem.c swap.c \ sem_limits.c proclist.c procstate.c procuid.c \ proctime.c procmem.c procsignal.c prockernel.c \ procsegment.c procargs.c procmap.c netload.c \ - interfaces.c ppp.c + netinfo.c interfaces.c ppp.c libgtop_sysdeps_suid_la_LDFLAGS = $(LT_VERSION_INFO) diff --git a/sysdeps/stub_suid/interfaces.c b/sysdeps/stub_suid/interfaces.c index 0add40c6..a5134816 100644 --- a/sysdeps/stub_suid/interfaces.c +++ b/sysdeps/stub_suid/interfaces.c @@ -48,8 +48,8 @@ glibtop_get_interface_names_p (glibtop *server, glibtop_array *array, u_int64_t interface, u_int64_t number, u_int64_t instance, u_int64_t strategy) { - glibtop_init_s (&server, GLIBTOP_SYSDEPS_INTERFACE_NAMES, 0); - + glibtop_init_p (server, GLIBTOP_SYSDEPS_INTERFACE_NAMES, 0); + memset (array, 0, sizeof (glibtop_array)); return NULL; diff --git a/sysdeps/stub_suid/netinfo.c b/sysdeps/stub_suid/netinfo.c index cf256b12..ffb19d67 100644 --- a/sysdeps/stub_suid/netinfo.c +++ b/sysdeps/stub_suid/netinfo.c @@ -27,6 +27,8 @@ #include #include +#include + static const unsigned long _glibtop_sysdeps_netinfo = 0; /* Init function. */ @@ -45,6 +47,8 @@ int glibtop_get_netinfo_p (glibtop *server, glibtop_netinfo *buf, const char *interface, unsigned transport) { + glibtop_init_p (server, GLIBTOP_SYSDEPS_NETINFO, 0); + memset (buf, 0, sizeof (glibtop_netinfo)); return 0; diff --git a/sysdeps/stub_suid/netload.c b/sysdeps/stub_suid/netload.c index 1e2f7ec7..adfb1d16 100644 --- a/sysdeps/stub_suid/netload.c +++ b/sysdeps/stub_suid/netload.c @@ -27,6 +27,8 @@ #include #include +#include + static const unsigned long _glibtop_sysdeps_netload = 0; /* Init function. */ @@ -46,6 +48,8 @@ glibtop_get_netload_p (glibtop *server, glibtop_netload *buf, const char *interface, unsigned transport, unsigned protocol) { + glibtop_init_p (server, GLIBTOP_SYSDEPS_NETLOAD, 0); + memset (buf, 0, sizeof (glibtop_netload)); return 0; diff --git a/sysdeps/stub_suid/ppp.c b/sysdeps/stub_suid/ppp.c index efb27973..784df4b7 100644 --- a/sysdeps/stub_suid/ppp.c +++ b/sysdeps/stub_suid/ppp.c @@ -27,6 +27,8 @@ #include #include +#include + static const unsigned long _glibtop_sysdeps_ppp = 0; /* Init function. */ @@ -44,6 +46,8 @@ glibtop_init_ppp_p (glibtop *server) int glibtop_get_ppp_p (glibtop *server, glibtop_ppp *buf, unsigned short device) { + glibtop_init_p (server, GLIBTOP_SYSDEPS_PPP, 0); + memset (buf, 0, sizeof (glibtop_ppp)); return 0;