aboutsummaryrefslogtreecommitdiffstats
path: root/gotrc-examples/revoke-access
diff options
context:
space:
mode:
Diffstat (limited to 'gotrc-examples/revoke-access')
-rw-r--r--gotrc-examples/revoke-access16
1 files changed, 16 insertions, 0 deletions
diff --git a/gotrc-examples/revoke-access b/gotrc-examples/revoke-access
new file mode 100644
index 0000000..5ac9b27
--- /dev/null
+++ b/gotrc-examples/revoke-access
@@ -0,0 +1,16 @@
+# -*- shell-script -*-
+
+# This module removes access to the TTY after
+# the user logs out.
+
+
+display_function_revoke_access=$display_function
+display_function=_display_revoke_access
+
+_display_revoke_access ()
+{
+ chmod 640 "$(tty)"
+ chown 0:0 "$(tty)"
+ $display_function_revoke_access
+}
+