summaryrefslogtreecommitdiff
path: root/packages/keylaunch/files/80chvt-SUID
diff options
context:
space:
mode:
authorMichael Lauer <mickey@vanille-media.de>2006-05-29 09:17:50 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2006-05-29 09:17:50 +0000
commitba33bb7c0a4af155d0efe0f5b72b75254b0cb91e (patch)
tree471c63adfcd5e24af5dad870950ccbf04f433443 /packages/keylaunch/files/80chvt-SUID
parent130a448a3293d3918a26c573c3317315c5d8187a (diff)
parent38da3ad2a494bd7d15de59ffea5a1909def1b39f (diff)
merge of a615f71806dc9ceee0102ed403b1e7fe4f948b5d
and aac02cf2eb8931c6f1e4df467cc5ff36a36a2051
Diffstat (limited to 'packages/keylaunch/files/80chvt-SUID')
-rw-r--r--packages/keylaunch/files/80chvt-SUID25
1 files changed, 25 insertions, 0 deletions
diff --git a/packages/keylaunch/files/80chvt-SUID b/packages/keylaunch/files/80chvt-SUID
new file mode 100644
index 0000000000..e3b4efef5d
--- /dev/null
+++ b/packages/keylaunch/files/80chvt-SUID
@@ -0,0 +1,25 @@
+#! /bin/sh
+#
+# Copyright Matthias Hentges <devel@hentges.net> (c) 2006
+# License: GPL (see http://www.gnu.org/licenses/gpl.txt for a copy of the license)
+#
+# Filename: chvt-SUID.sh
+# Date: 28-May-06
+
+
+#
+# Sets the SUID bit on chvt to allow changing to the VT from inside X by
+# any user. Since a SUID binary still is a security risk, we chmod only
+# when keylaunch is used and not by default.
+#
+
+for target in /usr/bin/chvt.console-tools
+do
+ if test "`ls -l "$target" | awk '{print $1}'|cut -c 2-4`" != "rws"
+ then
+ echo "Making [$target] SUID root..."
+ chmod u+s "$target"
+ else
+ echo "Ignoring [$target]"
+ fi
+done