aboutsummaryrefslogtreecommitdiffstats
path: root/src/security.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/security.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/security.h b/src/security.h
index 3e12af4..bbc0c4e 100644
--- a/src/security.h
+++ b/src/security.h
@@ -24,8 +24,26 @@
#include <signal.h>
+#ifndef TTY_PERM
+#define TTY_PERM 0600
+#endif
+
+#ifndef FAILURE_SLEEP
+#define FAILURE_SLEEP 5
+#endif
+
+
/**
* Secure the TTY from spying
*/
void secure_tty(void);
+/**
+ * Set ownership and mode of the TTY
+ *
+ * @param owner The owner
+ * @param group The group
+ * @param with_fail Abort on failure
+ */
+void chown_tty(int owner, int group, int with_fail);
+