mirror of
https://github.com/SELinuxProject/selinux
synced 2025-01-05 21:19:41 +00:00
d6848ea77d
Email: dwalsh@redhat.com Subject: Updated sandbox patch. Date: Wed, 19 May 2010 15:59:28 -0400 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Fixed patch that handles Spaces in homedir. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/ iEYEARECAAYFAkv0QyAACgkQrlYvE4MpobNBXQCgmUu92HsN5PiksOTZoGxSp0W+ 1noAoKoCujFPLHduJ9BP3hrveeXvGKXO =iqC+ -----END PGP SIGNATURE----- Signed-off-by: Chad Sellers <csellers@tresys.com>
16 lines
550 B
Bash
16 lines
550 B
Bash
#!/bin/bash
|
|
context=`id -Z | secon -t -l -P`
|
|
export TITLE="Sandbox $context -- `grep ^#TITLE: ~/.sandboxrc | /usr/bin/cut -b8-80`"
|
|
export SCREENSIZE="1000x700"
|
|
#export SCREENSIZE=`xdpyinfo | awk '/dimensions/ { print $2 }'`
|
|
trap "exit 0" HUP
|
|
|
|
(/usr/bin/Xephyr -title "$TITLE" -terminate -screen $SCREENSIZE -displayfd 5 5>&1 2>/dev/null) | while read D; do
|
|
export DISPLAY=:$D
|
|
python -c 'import gtk, os, commands; commands.getstatusoutput("%s/.sandboxrc" % os.environ["HOME"])'
|
|
export EXITCODE=$?
|
|
kill -HUP 0
|
|
break
|
|
done
|
|
exit 0
|