summaryrefslogtreecommitdiffstats
path: root/src/consaver/cons.saver.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 17:44:12 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 17:44:12 +0000
commit8ccb487c21368a7fdc8c7c72315325bf0aa06147 (patch)
treeb2056fae01d325924508a41731edfbd4c3cddd23 /src/consaver/cons.saver.h
parentInitial commit. (diff)
downloadmc-upstream/3%4.8.29.tar.xz
mc-upstream/3%4.8.29.zip
Adding upstream version 3:4.8.29.upstream/3%4.8.29upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/consaver/cons.saver.h')
-rw-r--r--src/consaver/cons.saver.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/consaver/cons.saver.h b/src/consaver/cons.saver.h
new file mode 100644
index 0000000..56319ad
--- /dev/null
+++ b/src/consaver/cons.saver.h
@@ -0,0 +1,46 @@
+/** \file cons.saver.h
+ * \brief Header: general purpose Linux console screen save/restore server
+ *
+ * This code does _not_ need to be setuid root. However, it needs
+ * read/write access to /dev/vcsa* (which is priviledged
+ * operation). You should create user vcsa, make cons.saver setuid
+ * user vcsa, and make all vcsa's owned by user vcsa.
+ * Seeing other peoples consoles is bad thing, but believe me, full
+ * root is even worse.
+ */
+
+#ifndef MC__CONS_SAVER_H
+#define MC__CONS_SAVER_H
+
+/*** typedefs(not structures) and defined constants **********************************************/
+
+/*** enums ***************************************************************************************/
+
+typedef enum
+{
+ CONSOLE_INIT = '1',
+ CONSOLE_DONE,
+ CONSOLE_SAVE,
+ CONSOLE_RESTORE,
+ CONSOLE_CONTENTS
+} console_action_t;
+
+/*** structures declarations (and typedefs of structures)*****************************************/
+
+/*** global variables defined in .c file *********************************************************/
+
+#ifndef LINUX_CONS_SAVER_C
+/* Used only in mc, not in cons.saver */
+extern int cons_saver_pid;
+#endif /* !LINUX_CONS_SAVER_C */
+
+/*** declarations of public functions ************************************************************/
+
+#ifndef LINUX_CONS_SAVER_C
+/* Used only in mc, not in cons.saver */
+void show_console_contents (int starty, unsigned char begin_line, unsigned char end_line);
+void handle_console (console_action_t action);
+#endif /* !LINUX_CONS_SAVER_C */
+
+/*** inline functions ****************************************************************************/
+#endif /* MC__CONS_SAVER_H */