Re: sandbox window size

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I modified /usr/bin/sandbox and /usr/share/sandboxX.sh to add a new windowsize option (-w).

example:
sandbox -X -H p-home -t sandbox_net_t -w 400x600 pidgin

The parameter is not be validated and gets directly used as the -screen option when executing Xephyr. If -w is not specified it defaults to 1000x700.

If someone finds it usefull diff's are attached.

kind regards,
Christoph

diff's are against:
policycoreutils-python-2.0.82-18.fc13.x86_64
policycoreutils-sandbox-2.0.82-18.fc13.x86_64
6,7c6,7
< [-l level ] [[-M | -X]  -H homedir -T tempdir ] [-I includefile ] [ -W windowmanager ] [[-i file ]...] [ -t type ] cmd
< [-l level ] [[-M | -X]  -H homedir -T tempdir ] [-I includefile ] [ -W windowmanager ] [[-i file ]...] [ -t type ] -S
---
> [-l level ] [[-M | -X]  -H homedir -T tempdir ] [-I includefile ] [ -W windowmanager ] [ -w windowsize ] [[-i file ]...] [ -t type ] cmd
> [-l level ] [[-M | -X]  -H homedir -T tempdir ] [-I includefile ] [ -W windowmanager ] [ -w windowsize ] [[-i file ]...] [ -t type ] -S
49a50,52
> \fB\-w windowsize\fR
> Specifies the windowsize when creating an X based Sandbox. The default windowsize is 1000x700. 
> .TP
4,5c4
< export SCREENSIZE="1000x700"
< #export SCREENSIZE=`xdpyinfo | awk  '/dimensions/ {  print $2 }'`
---
> [ $# -eq 1 ] && export SCREENSIZE="$1" || export SCREENSIZE="1000x700"
46a47
> DEFAULT_WINDOWSIZE = "1000x700"
158a160
> 	self.__windowsize = None
234c236
< sandbox [-h] [-[X|M] [-l level ] [-H homedir] [-T tempdir]] [-I includefile ] [-W windowmanager ] [[-i file ] ...] [ -t type ] command
---
> sandbox [-h] [-[X|M] [-l level ] [-H homedir] [-T tempdir]] [-I includefile ] [-W windowmanager ] [ -w windowsize ] [[-i file ] ...] [ -t type ] command
236c238
< sandbox [-h] [-[X|M] [-l level ] [-H homedir] [-T tempdir]] [-I includefile ] [-W windowmanager ] [[-i file ] ...] [ -t type ] -S
---
> sandbox [-h] [-[X|M] [-l level ] [-H homedir] [-T tempdir]] [-I includefile ] [-W windowmanager ] [ -w windowsize ] [[-i file ] ...] [ -t type ] -S
279a282,285
> 	parser.add_option("-w", "--windowsize", dest="windowsize",
>                           type="string", default=DEFAULT_WINDOWSIZE,
>                           help="size of the sandbox window")		
> 
284a291
>                self.__windowsize = self.__options.windowsize
365,366c372,373
<                          
<                          cmds =  ("/usr/sbin/seunshare -t %s -h %s -- %s /usr/share/sandbox/sandboxX.sh" % (self.__tmpdir, self.__homedir, self.__execcon)).split()
---
>                           
>                          cmds =  ("/usr/sbin/seunshare -t %s -h %s -- %s /usr/share/sandbox/sandboxX.sh %s" % (self.__tmpdir, self.__homedir, self.__execcon, self.__windowsize)).split()
--
selinux mailing list
selinux@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/selinux

[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux