Commit Graph

34 Commits

Author SHA1 Message Date
Martin Baulig
386f66d7e2 *** empty log message *** 2000-01-02 17:15:15 +00:00
Martin Baulig
75ed7287d1 New directory. New directory. New directory.
2000-01-01  Martin Baulig  <martin@home-of-linux.org>

	* backends/: New directory.
	* backends/server/: New directory.
	* backends/sysdeps/: New directory.

	* include/glibtop/backend.h: New file.

	* include/glibtop/call-vector.h.in: New file. Template file
	for `call-vector.h'.
	* include/glibtop/call-vector.pl: New file. Creates 'call-vector.h'
	from `call-vector.h.in'.

	* include/glibtop/errors.h
	(GLIBTOP_ERROR_NO_SUCH_BACKEND): New error constant.
        (GLIBTOP_ERROR_NOT_IMPLEMENTED): New error constant.

	* include/glibtop/limits.h
	(GLIBTOP_BACKEND_NAME_LEN): New constant.

	* glibtop-server-private.h (glibtop_server_private):
	Added `GSList *backend_list' and removed `input', `output',
	`socket' and `pid'.

	* lib/command.c: Removed. Moved to `backends/server/'.
	* lib/read.c: Removed. Moved to `backends/server/'.
	* lib/read_data.c: Removed. Moved to `backends/server/'.
	* lib/write.c: Removed. Moved to `backends/server/'.
2000-01-01 20:56:53 +00:00
Martin Baulig
f1a6e1ead8 The indentation in LibGTop was done with the following command:
find . -name \*.[ch] | xargs -i emacs -batch {} \
		-l /gnome/compile/libgtop/misc/format.el -f save-buffer

December 26, 1999
Martin
1999-12-26 14:05:32 +00:00
Martin Baulig
d4b712db86 New file. This is a private header file which defines `struct
1999-12-19  Martin Baulig  <martin@home-of-linux.org>

	* glibtop-server-private.h: New file. This is a private header
	file which defines `struct _glibtop_server_private'.

	* glibtop.h (glibtop): Added `glibtop_server_private *_priv' field
	and moved some private fields there.
1999-12-19 15:07:13 +00:00
Martin Baulig
507f171b63 Use `retval' for the default retval.
1999-10-24  Martin Baulig  <martin@home-of-linux.org>

	* features.def: Use `retval' for the default retval.

	* include/glibtop/command.h (glibtop_command_h): Added
	`int *retval_ptr' parameter to return the retval from the
	sysdeps functions.
1999-10-24 20:04:37 +00:00
Martin Baulig
cf611f9157 Set the copyright of LibGTop to the GNU General Public License.
1999-02-22  Martin Baulig  <martin@home-of-linux.org>

	Set the copyright of LibGTop to the GNU General Public License.

	* copyright.txt: Set the year to 1998-99 and pretty-format it a
	little bit. Same in all C source and header files.
1999-02-23 11:47:35 +00:00
Martin Baulig
ce4f660965 Include a copy of the GNU Library General Public License here.
1999-02-22  Martin Baulig  <martin@home-of-linux.org>

	* COPYING.LIB: Include a copy of the GNU Library General
	Public License here.

	* copyright.txt: Set the year to 1998-99 and pretty-format it a
	little bit. Same in all C source and header files.
1999-02-22 16:19:36 +00:00
Martin Baulig
3c9b2e3d9f Reverted my last brain-dead commit.
Logical error:

we need to check whether the server runs on the system it was
compiled on and not whether the client uses a server that was
compiled on the clients system.
1999-02-19 22:34:52 +00:00
Martin Baulig
35995577ca For suid/sgid servers the operating system version must match the one the
1999-02-19  Martin Baulig  <martin@home-of-linux.org>

	* lib/open.c, src/daemon/version.c: For suid/sgid servers the
	operating system version must match the one the server was
	compiled on.
1999-02-19 22:30:34 +00:00
Martin Baulig
9146d53ecc Small fix for 64bit systems. 1999-02-19 21:33:37 +00:00
Martin Baulig
92f1bf261c We need to set argv[0] in call to execl () to avoid a core dump in _init
1998-11-18  Martin Baulig  <martin@home-of-linux.org>

	* lib/open.c (glibtop_open_l): We need to set argv[0] in call
	to execl () to avoid a core dump in _init () on FreeBSD 3.0.
1998-11-17 23:12:35 +00:00
Martin Baulig
be63bf2d42 Enclosed some debugging statements in `#ifdef DEBUG'. 1998-10-03 03:01:22 +00:00
Martin Baulig
4e25a1dbd5 Now using correct default server. 1998-08-09 17:04:46 +00:00
Martin Baulig
c0641998cf Minor server/daemon cleanups; reading sysdeps from server now working. 1998-08-08 20:04:43 +00:00
Martin Baulig
82daee6f29 Call glibtop_init_s' instead of glibtop_open_s'. 1998-08-08 16:33:17 +00:00
Martin Baulig
a510ed1271 Removed. New files. Added `libgtop_server'; this has been moved here from
1998-08-07  Martin Baulig  <martin@home-of-linux.org>

	* src/server: Removed.
	* src/daemon/{server, version}.c: New files.
	* src/daemon/Makefile.am: Added `libgtop_server'; this has been
	moved here from `src/server' since it shares some source code files
	with the `libgtop_daemon'.

	* LIBGTOP-VERSION: Added `LIBGTOP_SERVER_VERSION'.
	* src/daemon/gnuserv.c, lib/open.c: Improved version check between
	client and server.

	* include/glibtop/output.h: Removed.

	* sysdeps/stub_suid: New directory. This is mainly used as example
	for people porting libgtop to other systems.

	* sysdeps/common/sysdeps_suid.c: New file.
	Defines `glibtop_init_hook_p'.

	* sysdeps/osf1/*.c (glibtop_init_<no-suid-feature>_s): New functions.
	(glibtop_init_<suid-feature>_p): New functions.
1998-08-07 12:59:00 +00:00
Martin Baulig
4b3fcf149a New fields error_method', sysdeps' and `required'. I added an improved
1998-08-07  Martin Baulig  <martin@home-of-linux.org>

	* glibtop.h (_glibtop): New fields `error_method', `sysdeps' and
	`required'. I added an improved error handling: the client can tell
	the libraries which fields are absolutely required for each features
	and if it fails to set one of them, this will create an error which
	is handled depending upon the `error_method'.

	* include/glibtop/open.h: Define some constants for `error_method'.

	* lib/sysdeps.c (glibtop_get_sysdeps_r): No longer actually call any
	sysdeps function, it now simply copies `server->sysdeps'.
	(_glibtop_init_hook_s): Added. List of functions to be called during
	`glibtop_init_s' set to `glibtop_init_<no-suid-feature>_s'.

	* include/glibtop/sysdeps.h (<glibtop/union.h>): Removed.
	(glibtop_init_func_t): New typedef.
	(_glibtop_init_hook_s): Added.

	* sysdeps/linux/*.c (glibtop_init_<feature>_s): New functions.
	(glibtop_get_proc_*): Zero is now a valid pid.

	* sysdeps/kernel/*.c (glibtop_init_<feature>_s): New functions.
	(glibtop_get_proc_*): Zero is now a valid pid.

1998-08-06  Martin Baulig  <martin@home-of-linux.org>
1998-08-07 10:01:55 +00:00
Martin Baulig
0a7bd78704 Using GLIBTOP_GUILE' instead of HAVE_GUILE' so one should be able to use
1998-08-06  Martin Baulig  <martin@home-of-linux.org>

	* include/glibtop/*.h: Using `GLIBTOP_GUILE' instead of `HAVE_GUILE'
	so one should be able to use libgtop without guile in an application
	even if guile is installed.

	* sysdeps/common/mountlist.c: Fixed some `xstrdup' problems.

	* lib/open.c: Now correctly reading server features for
	`GLIBTOP_METHOD_PIPE'.

	* sysdeps/freebsd: New directory.
1998-08-06 21:57:45 +00:00
Martin Baulig
902b6a8f16 Using u_int64_t' instead of unsigned long' and `long' to avoid problems
1998-07-30  Martin Baulig  <martin@home-of-linux.org>

	* include/glibtop/*.h: Using `u_int64_t' instead of `unsigned long'
	and `long' to avoid problems when client is on a 32bit system and
	the server on a 64bit system.
1998-07-30 14:24:19 +00:00
Martin Baulig
f07551a43d New file.
1998-07-29  Martin Baulig  <martin@home-of-linux.org>

	* guile/ChangeLog: New file.

	* features.def: New format - now includes type of return value
	and parameters.

	* lib/lib.awk: Changed to use new `features.def'.
	* sysdeps/guile/guile.awk: Dito;
	* sysdeps/guile/names/guile-names.awk: Dito.

	* libgtopConf.sh.in: Added
	`LIBGTOP_NAMES_LIBS', `LIBGTOP_NAMES_INCS',
	`LIBGTOP_GUILE_NAMES_LIBS', `LIBGTOP_GUILE_NAMES_INCS',
	`LIBGTOP_MAJOR_VERSION', `LIBGTOP_MINOR_VERSION'
	`LIBGTOP_VERSION', `libgtop_sysdeps_dir'.

	* acinclude.m4 (AC_LC_SYSDEPS): Removed since this has been
	replaced with `GNOME_LIBGTOP_SYSDEPS' long ago.

	* LIBGTOP-VERSION: New file.

	* */Makefile.am (INCLUDES): Removed; now defined in `configure.in'.

	* sysdeps/names/mountlist.c: New file.

	* lib/{init, open}.c (GTOP_SERVER): Renamed to `LIBGTOP_SERVER'.

	* configure.in (INCLUDES): Added definition.
	(libgtop_want_names): Always true; `libgtop_names.la' is now
	always created since some other programs rely upon it - but
	have to use `LIBGTOP_NAMES_LIBS' and `LIBGTOP_NAMES_INCS' to
	use it in your application.
	(libgtop_want_guile_names): Always true; but you have to use
	`LIBGTOP_GUILE_NAMES_LIBS' and `LIBGTOP_GUILE_NAMES_INCS' to
	use it in your application.
	(LIBGTOP_LIBS): Removed `-lgtop_names' and `-lgtop_guile_names'.
	(LIBGTOP_NAMES_LIBS): New variable. Use it to link your
	application with the names interface.
	(LIBGTOP_NAMES_INCS): New variable. Also #defines `GLIBTOP_NAMES'
	which is now required if your application wants to use the names
	interface.
	(LIBGTOP_GUILE_NAMES_LIBS): New variable. Use it to link your
	application with the guile names interface.
	(LIBGTOP_GUILE_NAMES_INCS): New variable. Also #defines
	`GLIBTOP_NAMES' and `GLIBTOP_GUILE_NAMES' which are now required
	if your application wants to use the guile names interface.
1998-07-29 22:01:31 +00:00
Martin Baulig
6bf243c901 New file.
1998-07-22  Martin Baulig  <martin@home-of-linux.org>

	* include/glibtop/mountlist.h: New file.

	* features.def: Added new feature `mountlist'.

	* sysdeps/common/mountlist.c (glibtop_get_mountlist_s): New function.
	(read_filesystem_list): Declared as `static'.
1998-07-22 20:52:42 +00:00
Martin Baulig
5e97af535f Summary of this long ChangeLog:
* Splitted `libgtop_sysdeps.la' into `libgtop_sysdeps.la' and
   `libgtop_sysdeps_suid.la'.

   Everything that needs to be suid/sgid is in `libgtop_sysdeps_suid.la'
   and the rest in `libgtop_sysdeps.la'.

   The functions from `libgtop_sysdeps_suid.la' have the `_p' prefix and
   the ones from `libgtop_sysdeps.la' the `_s' prefix.

   The suid library uses `glibtop_open_p' and `glibtop_close_p', the
   normal one `glibtop_init_s' (found in lib/init.c), `glibtop_open_s'
   and `glibtop_close_s'.

 * Added `libgtop_suid_common.la' containing stuff from sysdeps/common
   that is required from the suid server (currently everything from
   error.c and xmalloc.c).

   This means, we can add some more stuff to `libgtop_common.la' without
   the risk that it may be dangerous in the suid server.

 * The ``library order'' is much clearer now:

   -> `libgtop.la' (from lib/) contains user-level stuff;
      all functions except `glibtop_init_r' have the `_l'
      suffix.

   -> `libgtop_common.la' (from sysdeps/common/) contains stuff
      that is common among the sysdeps directories.
      use anything from `libgtop_sysdeps.la' and
      `libgtop_sysdeps_suid.la'.

   -> `libgtop_sysdeps.la' (from sysdeps/<sysdeps_dir>/) contains
      everything from the sysdeps directory that doesn't need to
      be suid/sgid.

   -> `libgtop_suid_common.la' (from sysdeps/common/) is used from
      the suid server instead of `libgtop_common.la'.

   -> `libgtop_sysdeps_suid.la' (from sysdeps/<sysdeps_dir>/) contains
      everything from the sysdeps directory that needs to be in the
      suid server.

 * To summarize: the server is linked only with functions that need
   to be suid and everything else is linked only with functions that
   do not need to be suid.

Martin

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

	* lib/init.c (glibtop_init_s): Added this init function of
	the sysdeps directory `libgtop_sysdeps.la'.

	* lib/open.c (glibtop_open_l): Unconditionally calling
	`glibtop_init_s' after server initialization.

	* lib/lib.awk: Removed references to functions from
	`libgtop_sysdeps_suid.la' to avoid undefined symbols.

	* sysdeps/stub/open.c (glibtop_open_s): Renamed this
	function from `glibtop_open_r'.

	* sysdeps/stub/close.c (glibtop_close_s): Renamed this
	function from `glibtop_close_l'.

	* sysdeps/kernel/open.c (glibtop_open_s): Renamed this
	function from `glibtop_open_r'.

	* sysdeps/kernel/close.c (glibtop_close_s): Renamed this
	function from `glibtop_close_l'.

	* sysdeps/linux/open.c (glibtop_open_s): Renamed this
	function from `glibtop_open_r'.

	* sysdeps/linux/close.c (glibtop_close_s): Renamed this
	function from `glibtop_close_l'.

	* sysdeps/osf1/Makefile.am (lib_LTLIBRARIES): Added
	`libgtop_sysdeps_suid.la' for the suid server.

	* sysdeps/osf1/open_suid.c (glibtop_open_p): New file.
	Contains all stuff that was formerly in `open.c'.

	* sysdeps/osf1/open.c: Moved everything from here into
	the new file `open_suid.c'.

	* sysdeps/osf1/open.c (glibtop_open_s): New function.

	* sysdeps/osf1/close_suid.c (glibtop_close_p): New file.

	* sysdeps/osf1/close.c (glibtop_close_s): New function.

	* sysdeps/osf1/*.c: Using the new init, open and close
	functions.

	* sysdeps/sun4/Makefile.am (lib_LTLIBRARIES): Added
	`libgtop_sysdeps_suid.la' for the suid server.

	* sysdeps/sun4/nosuid.c (glibtop_open_s, glibtop_close_s): New file

	* sysdeps/sun4/*.c: All functions now have the `_p' suffix.

	* sysdeps/common/Makefile.am (lib_LTLIBRARIES): Added
	`libgtop_suid_common.la' which only contains stuff that is
	needed in the suid parts.

	* sysdeps/common/xmalloc.c: Using `glibtop_error_io_r' instead
	of `glibtop_error_r'.

	* sysdeps/{kernel, linux, osf1, sun4, stub}/init.c: Removed.
	`glibtop_init_s' has been moved into `lib/init.c' since it's the
	same in all the sysdeps directories.

	* src/server/main.c: It is now an error to request a feature that
	does not need the suid server.

	* src/proxy: Removed.
1998-07-22 09:26:43 +00:00
Martin Baulig
0e086aef25 Added `GLIBTOP_METHOD_PIPE' again.
1998-07-18  Martin Baulig  <martin@home-of-linux.org>

	* lib/{init, open}.c: Added `GLIBTOP_METHOD_PIPE' again.

	* src/server/main.c: Removed gettext stuff.
1998-07-18 16:09:42 +00:00
Martin Baulig
ef693a93bc Doing correct server initialization using `glibtop_set_parameter_l' and
1998-07-14  Martin Baulig  <martin@home-of-linux.org>

	* src/daemon/gnuserv.c: Doing correct server initialization
	using `glibtop_set_parameter_l' and `glibtop_init_r'.

	* src/daemon/main.c: Removed call to `glibtop_init_r'.

	* lib/open.c (glibtop_open_l): We now call the open function
	of the sysdeps directory (glibtop_open_r) for server method
	`GLIBTOP_METHOD_DIRECT'.

	* sysdeps/{linux, sun4, stub}/open.c: No longer `memset'
	server to zero.
1998-07-14 08:36:23 +00:00
Martin Baulig
3477d30dc5 Basically did some work on the new daemon. Things are still unstable.
1998-07-13  Martin Baulig  <martin@home-of-linux.org>

	* glibtop.h: Fixed invocation of `glibtop_close_r'.

	* sysdeps/linux/procstate.c: Added missing `fclose'.

	* include/glibtop/gnuserv.h (UNIX_DOMAIN_SOCKETS): Defining.

	* include/glibtop/open.h (GLIBTOP_METHOD_UNIX): Added.

	* lib/init.c: Added new method `GLIBTOP_METHOD_UNIX'.

	* lib/open.c: Added support for Unix Domain Sockets.

	* lib/close.c: Now closing inet and unix connections.

	* lib/parameter.c (glibtop_set_parameter_l): You can now
	set the `method' and `features' fields.

	* src/daemon/server_config.h: New file.

	* src/daemon/{gnuserv.c, main.c}: More work on the server.
1998-07-13 00:39:46 +00:00
Martin baulig
9532dadc2e No longer use `glibtop_machine.h' for Linux.
1998-07-03  Martin baulig  <martin@home-of-linux.org>

	* macros/gnome-libgtop-sysdeps.m4: No longer use
	`glibtop_machine.h' for Linux.

	* sysdeps/linux/glibtop_machine.h: Removed.

	* sysdeps/guile/guile.awk: Using `scm_append'
	instead of `gh_append'.

	* sysdeps/guile/names/guile-names.awk: dito.

	* sysdeps/linux/*.c: Using code from stable branch again.

	* include/glibtop/parameter.h: New file.

	* lib/parameter.c: New file.

	* lib/{open, init}.c: Done some more work on server
	initialization
1998-07-03 17:19:25 +00:00
Martin Baulig
71187a5e51 Some more daemon stuff. 1998-06-18 19:06:55 +00:00
Martin Baulig
8d78559597 Did some more work on the daemon. 1998-06-14 21:32:00 +00:00
Martin Baulig
c84923132a Using single underscore instead of two underscores for function prefixes
1998-06-07  Martin Baulig  <martin@home-of-linux.org>

	* *.[ch]: Using single underscore instead of two underscores
	for function prefixes (regexp: ``s,__([rspl])\b,_$1,g'') to
	avoid ambiguity with mangled C++ names.
1998-06-07 13:57:45 +00:00
Martin Baulig
b96843a960 renamed to `glibtop_open__l'.
* lib/open.c (glibtop_open): renamed to `glibtop_open__l'.
1998-06-02 19:40:53 +00:00
Martin Baulig
7f39d62371 tells `glibtop_open' to use the default server and not to check the
* include/glibtop/open.h (GLIBTOP_OPEN_NO_OVERRIDE):
tells `glibtop_open' to use the default server and not
to check the environment variables.

* include/glibtop/sysdeps.h (_glibtop_sysdeps):
renamed 'dummy' member to 'features'.

* include/glibtop/command.h (GLIBTOP_CMND_SYSDEPS):
added definition here.
1998-06-02 16:20:15 +00:00
Martin Baulig
67798e0d7d removed #if's - we now decide at runtime whether to use the server or to
* lib/*.c: removed #if's - we now decide at runtime
whether to use the server or to call the appropriate
function for the sysdeps directory.
1998-06-01 15:09:03 +00:00
Martin Baulig
7dd0c2eac3 renamed all functions that implementing features to '__l'; we only emit
* lib/*.c: renamed all functions that implementing features
to '__l'; we only emit code for those functions if the
corresponding 'GLIBTOP_SUID_<feature>' has a positive value.
1998-05-28 19:22:48 +00:00
Martin Baulig
33cdc01c1d Initial revision 1998-05-19 18:19:50 +00:00