aboutsummaryrefslogtreecommitdiffstats
path: root/src/security.h
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2013-11-18 17:46:37 +0100
committerMattias Andrée <maandree@operamail.com>2013-11-18 17:46:37 +0100
commitebf990469b79e97bf7046e9a96f20dcf7bec5d78 (patch)
tree1ec52a54cf10f852b3167cd77d5982f215b048f9 /src/security.h
parentm (diff)
downloadlibpassphrase-ebf990469b79e97bf7046e9a96f20dcf7bec5d78.tar.gz
libpassphrase-ebf990469b79e97bf7046e9a96f20dcf7bec5d78.tar.bz2
libpassphrase-ebf990469b79e97bf7046e9a96f20dcf7bec5d78.tar.xz
m + take ownership of and chmod /dev/vcs and /dev/vcsa
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src/security.h')
-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);
+