New file.

1998-06-06  Martin Baulig  <martin@home-of-linux.org>

        * sysdeps/osf1/glibtop_server.h: New file.

        * sysdeps/osf1/*.c: renamed all functions implementing
        features that don't need to be suid to '__s'.
This commit is contained in:
Martin Baulig
1998-06-06 18:48:17 +00:00
committed by Martin Baulig
parent 222df2c7d6
commit 0a323e5080
9 changed files with 54 additions and 8 deletions

View File

@@ -31,7 +31,7 @@ static const unsigned long _glibtop_sysdeps_cpu =
/* Provides information about cpu usage. */ /* Provides information about cpu usage. */
void void
glibtop_get_cpu__r (glibtop *server, glibtop_cpu *buf) glibtop_get_cpu__s (glibtop *server, glibtop_cpu *buf)
{ {
struct tbl_sysinfo sysinfo; struct tbl_sysinfo sysinfo;
int ret; int ret;

View File

@@ -0,0 +1,46 @@
/* $Id$ */
/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
This file is part of the Gnome Top Library.
Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
The Gnome Top Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The Gnome Top Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#ifndef __GLIBTOP_SERVER_H__
#define __GLIBTOP_SERVER_H__
__BEGIN_DECLS
#define GLIBTOP_SUID_CPU 0
#define GLIBTOP_SUID_MEM 0
#define GLIBTOP_SUID_SWAP 0
#define GLIBTOP_SUID_UPTIME 0
#define GLIBTOP_SUID_LOADAVG 0
#define GLIBTOP_SUID_SHM_LIMITS 0
#define GLIBTOP_SUID_MSG_LIMITS 0
#define GLIBTOP_SUID_SEM_LIMITS 0
#define GLIBTOP_SUID_PROCLIST (GLIBTOP_SYSDEPS_PROCLIST+1)
#define GLIBTOP_SUID_PROC_STATE (GLIBTOP_SYSDEPS_PROC_STATE+1)
#define GLIBTOP_SUID_PROC_UID (GLIBTOP_SYSDEPS_PROC_UID+1)
#define GLIBTOP_SUID_PROC_MEM (GLIBTOP_SYSDEPS_PROC_MEM+1)
#define GLIBTOP_SUID_PROC_TIME (GLIBTOP_SYSDEPS_PROC_TIME+1)
#define GLIBTOP_SUID_PROC_SIGNAL (GLIBTOP_SYSDEPS_PROC_SIGNAL+1)
#define GLIBTOP_SUID_PROC_KERNEL (GLIBTOP_SYSDEPS_PROC_KERNEL+1)
#define GLIBTOP_SUID_PROC_SEGMENT (GLIBTOP_SYSDEPS_PROC_SEGMENT+1)
__END_DECLS
#endif

View File

@@ -29,7 +29,7 @@ static const unsigned long _glibtop_sysdeps_loadavg =
/* Provides load averange. */ /* Provides load averange. */
void void
glibtop_get_loadavg__r (glibtop *server, glibtop_loadavg *buf) glibtop_get_loadavg__s (glibtop *server, glibtop_loadavg *buf)
{ {
struct tbl_loadavg loadavg; struct tbl_loadavg loadavg;
int ret; int ret;

View File

@@ -36,7 +36,7 @@ static const unsigned long _glibtop_sysdeps_mem =
/* Provides information about memory usage. */ /* Provides information about memory usage. */
void void
glibtop_get_mem__r (glibtop *server, glibtop_mem *buf) glibtop_get_mem__s (glibtop *server, glibtop_mem *buf)
{ {
vm_statistics_data_t vmstats; vm_statistics_data_t vmstats;

View File

@@ -31,7 +31,7 @@ static const unsigned long _glibtop_sysdeps_msg_limits =
/* Provides information about sysv ipc limits. */ /* Provides information about sysv ipc limits. */
void void
glibtop_get_msg_limits__r (glibtop *server, glibtop_msg_limits *buf) glibtop_get_msg_limits__s (glibtop *server, glibtop_msg_limits *buf)
{ {
int ret, value; int ret, value;

View File

@@ -31,7 +31,7 @@ static unsigned long _glibtop_sysdeps_sem_limits =
/* Provides information about sysv sem limits. */ /* Provides information about sysv sem limits. */
void void
glibtop_get_sem_limits__r (glibtop *server, glibtop_sem_limits *buf) glibtop_get_sem_limits__s (glibtop *server, glibtop_sem_limits *buf)
{ {
int ret, value; int ret, value;

View File

@@ -30,7 +30,7 @@ static unsigned long _glibtop_sysdeps_shm_limits =
/* Provides information about sysv ipc limits. */ /* Provides information about sysv ipc limits. */
void void
glibtop_get_shm_limits__r (glibtop *server, glibtop_shm_limits *buf) glibtop_get_shm_limits__s (glibtop *server, glibtop_shm_limits *buf)
{ {
int ret, value; int ret, value;

View File

@@ -30,7 +30,7 @@ static unsigned long _glibtop_sysdeps_swap =
/* Provides information about swap usage. */ /* Provides information about swap usage. */
void void
glibtop_get_swap__r (glibtop *server, glibtop_swap *buf) glibtop_get_swap__s (glibtop *server, glibtop_swap *buf)
{ {
struct tbl_swapinfo swapinfo; struct tbl_swapinfo swapinfo;
int i; int i;

View File

@@ -31,7 +31,7 @@ static unsigned long _glibtop_sysdeps_uptime =
/* Provides uptime and idle time. */ /* Provides uptime and idle time. */
void void
glibtop_get_uptime__r (glibtop *server, glibtop_uptime *buf) glibtop_get_uptime__s (glibtop *server, glibtop_uptime *buf)
{ {
struct tbl_sysinfo sysinfo; struct tbl_sysinfo sysinfo;
int ret; int ret;