Commit Graph

26 Commits

Author SHA1 Message Date
Roland Illig
fe6f6ab57e * cons.saver.c (die): Declare as "static" to avoid gcc warning.
(send_contents): Likewise.
2004-10-21 23:08:28 +00:00
Andrew V. Samoilov
919aa12d7d * cons.saver.c: Partly rewritten cons.saver.c. 2004-10-05 07:14:09 +00:00
Pavel Roskin
ff82223a35 Remove references to the archaic "linux" preprocessor definition.
Only __linux__ should be used.
2003-02-27 05:09:35 +00:00
Pavel Roskin
b8f676ec41 * cons.saver.c: Use SEEK_SET instead of 0 in lseek().
* view.c: Likewise.
2002-07-29 21:18:51 +00:00
Pavel Roskin
7bab33656b * cons.saver.c: Eliminate some global variables. Further
cleanup.  Make sure that console_fd is always closed.
2002-07-29 05:59:07 +00:00
Pavel Roskin
edebd94750 * cons.saver.c: Remove support for Linux kernels before 2.0.
Massive cleanup.
(send_contents): Remove incorrect optimization - restore even
empty lines because they may be touched by the viewer.
From Denis Vlasenko <vda_unique@iname.com>
2002-07-28 08:52:27 +00:00
Pavel Roskin
d816549ab9 * cons.saver.c: Define LINUX_CONS_SAVER_C so that some parts
of cons.saver.h can be omitted.
* cons.saver.h: Declare nothing but constants if
LINUX_CONS_SAVER_C is defined.
2001-11-29 20:28:48 +00:00
Pavel Roskin
91a799e3c0 * cons.saver.c: New variable console_minor. Eliminate variables
len and vcs_name.
(check_file): Set console_minor to the minor device number of
the console. Disallow /dev/tty0.
(detect_console): Don't parse tty_name, instead make sure that
it corresponds to console_minor. Check console first. Fallback
to /dev/vcc/a* if /dev/vcsa* cannot be opened.
(save_console): Use console_minor.
(restore_console): Likewise.
2001-07-06 19:24:27 +00:00
Pavel Roskin
a44f9422d2 * cons.saver.c (check_file): Eliminate using text messages to
indicate errors. Improve debug messages.
(detect_console): Likewise.
(main): Adjust call to detect_console.
2001-07-06 17:49:27 +00:00
Pavel Roskin
bec643d103 * achown.c: Eliminate untyped declarations.
* boxes.c: Likewise.
* cons.saver.c: Likewise.
* hotlist.c: Likewise.
* panelize.c: Likewise.
* rxvt.c: Likewise.
* main.c: Likewise. Make undeclared functions static.
* treestore.c: Make undeclared functions static.
* view.c: Likewise.
* widget.c: Likewise.
2001-06-14 22:33:00 +00:00
Pavel Roskin
b504500f49 * text.c [HAVE_X]: Remove useless #error.
* cons.saver.c: Indent #error to hide it from old compilers.
2001-06-14 15:59:52 +00:00
Pavel Roskin
c4c5f40a87 * cons.saver.c: Make all functions except main() static.
* mfmt.c (omain): Remove, it's unused.
2001-06-07 19:28:03 +00:00
Andrew V. Samoilov
1cc4f6be7a * cons.saver.c (check_file): close fd on error. There was a bug, which
allowed luser to write '\0' char to any symlinkable file in Linux
system which don't ensure that fd's 0, 1, and 2 are open on startup
of a SUID/SGID binary.

Based on patch from bugtrack by Maurycy Prodeus <z33d@ETH-SECURITY.NET>.
2000-11-16 17:09:08 +00:00
Pavel Roskin
e828211662 Updated address of Free Software Foundation 2000-08-22 22:50:00 +00:00
Pavel Machek
ce6e42f45a Support linux with devfs 2000-06-16 11:40:23 +00:00
Pavel Machek
bfe05cff74 Make cons.saver runable by non-root users. 1999-05-12 11:48:11 +00:00
Miguel de Icaza
606c833f93 1999-04-05 Federico Mena Quintero <federico@nuclecu.unam.mx>
* cons.saver.c (main): dup2() may be interrupted; take this into
	account.  Do we need to fcntl() stderr, or is it enough to close()
	it before recreating it?
1999-04-05 20:18:16 +00:00
Miguel de Icaza
430894d530 Pass two at the fix 1999-01-27 02:20:28 +00:00
Miguel de Icaza
09d44c9f4e 1999-01-26 Miguel de Icaza <miguel@nuclecu.unam.mx>
* cons.saver.c: Removed glib from the suid app
1999-01-27 01:40:33 +00:00
Timur Bakeyev
a39568367e Glibing..... (2)
Wed Jan 27 03:17:44 1999  Timur Bakeyev <mc@bat.ru>

	* Converted memory managment to Glib. Now we use g_new()/g_malloc()/
	g_strdup()/g_free() routings. Also, copy_strings() replaced by
	g_strconcat(), strcasecmp() -> g_strcasecmp(),and sprintf() by
	g_snprintf().

	* Some sequences of malloc()/sprintf() changed to g_strdup_printf().

	* mad.[ch]: Modified, to work with new GLib's memory managment. Fixed
	a missing #undef for tempnam, which caused dead loop. Add several new
	functions to emulate GLib memory managment.

	*main.c, mad.[ch]: Add a new switch  "-M", which allows to redirect MAD
	messages to the file.

	* util.[ch], utilunix.c: Modified, deleted our variants of strcasecmp()
	and strdup() - we have g_ equivalences. Remove get_full_name() - it is
	similar to concat_dir_and_file(). Some other tricks with g_* functions.

	* global.h: Modified, extended. Now it is main memory mangment include -
	i.e. all inclusions of <stdlib.h>, <malloc.h>, <glib.h>, "fs.h", "mem.h",
	"util.h" and "mad.h" done there. This elimanates problem with proper or-
	der of #include's.

	* All around the source - changed order of #include's, most of them gone
	to global.h (see above), minor changes, like "0" -> NULL in string func-
	tions.
1999-01-27 01:08:30 +00:00
Miguel de Icaza
301e7fbfc3 Many changes:
- Beginning of the CORBA support for the file manager.
	- Tk and XView code dropped.

Miguel
1998-12-02 23:44:06 +00:00
Miguel de Icaza
b20b135eba Define stderr_fd 1998-12-01 05:06:15 +00:00
Miguel de Icaza
90007df586 Further checks 1998-11-26 23:47:38 +00:00
Miguel de Icaza
c387c466ee 1998-11-26 Miguel de Icaza <miguel@nuclecu.unam.mx>
* cons.saver.c (main): Make sure stderr is always valid.
1998-11-26 23:44:45 +00:00
Miguel de Icaza
7ca312db48 Jakub's fix to cons.saver 1998-10-01 16:42:33 +00:00
Miguel de Icaza
eb6b3842ab Initial revision 1998-02-27 04:54:42 +00:00