[paketler-commits] r23764 - in devel/desktop/freedesktop/zorg: . files
paketler-commits at pardus.org.tr
paketler-commits at pardus.org.tr
24 Nis 2007 Sal 10:32:53 EEST
Author: onur
Date: Tue Apr 24 10:32:53 2007
New Revision: 23764
Modified:
devel/desktop/freedesktop/zorg/files/zorg
devel/desktop/freedesktop/zorg/pspec.xml
Log:
Added jail support for X
Modified: devel/desktop/freedesktop/zorg/files/zorg
=================================================================
--- devel/desktop/freedesktop/zorg/files/zorg (original)
+++ devel/desktop/freedesktop/zorg/files/zorg Tue Apr 24 10:32:53 2007
@@ -137,6 +137,11 @@
EndSection
"""
+template_jail = """ # Prevent virtual terminal switching
+ Option "DontVTSwitch" "true"
+ # Prevent killing X
+ Option "DontZap" "true"
+"""
template_main = """
Section "Module"
Load "dbe" # Double buffer extension
@@ -184,6 +189,7 @@
Option "StandbyTime" "0"
Option "SuspendTime" "0"
Option "OffTime" "0"
+%(SEC_JAIL)s
EndSection
Section "InputDevice"
@@ -545,11 +551,11 @@
run(*cmd)
-def parseCmdline():
- cmds = "".join(loadFile("/proc/cmdline"))
- for opt in cmds.split():
- if opt.startswith("xorg="):
- return opt[5:]
+def getKernelOpt(cmdopt):
+ for cmd in "".join(loadFile("/proc/cmdline")).split():
+ if cmd.startswith("%s=" % cmdopt):
+ return cmd[len(cmdopt)+1:]
+
return ""
def xisrunning():
@@ -832,6 +838,12 @@
return True
return False
+def getJail():
+ if "thin" in getKernelOpt("mudur").split(","):
+ return template_jail
+ else:
+ return ""
+
# om call
def autoConfigure():
@@ -878,6 +890,9 @@
querySynaptics(keys_main)
keys_main["KEYMAP"] = queryKeymap()
+ # check if we are in jail
+ keys_main["SEC_JAIL"] = getJail()
+
write_tmpl(template_main, keys_main, xorg_conf)
def safeConfigure(_driver = "vesa"):
@@ -920,6 +935,9 @@
keys_main["SEC_SYNAPTICS"] = ""
keys_main["SYNAPTICS_LAY"] = ""
+ # check if we are in jail
+ keys_main["SEC_JAIL"] = getJail()
+
write_tmpl(template_main, keys_main, xorg_conf)
def checkActiveCard():
@@ -955,7 +973,7 @@
safeConfigure("fbdev")
def boot():
- cmd = parseCmdline()
+ cmd = getKernelOpt("xorg")
if cmd == "off":
sys.exit(1)
elif cmd == "probe":
Modified: devel/desktop/freedesktop/zorg/pspec.xml
=================================================================
--- devel/desktop/freedesktop/zorg/pspec.xml (original)
+++ devel/desktop/freedesktop/zorg/pspec.xml Tue Apr 24 10:32:53 2007
@@ -37,6 +37,13 @@
</Package>
<History>
+ <Update release="26">
+ <Date>2007-04-24</Date>
+ <Version>0.4</Version>
+ <Comment>Added jail support for thin clients</Comment>
+ <Name>Onur Küçük</Name>
+ <Email>onur at pardus.org.tr</Email>
+ </Update>
<Update release="25">
<Date>2007-03-27</Date>
<Version>0.4</Version>
Paketler-commits mesaj listesiyle ilgili
daha fazla bilgi