Commit graph

2158 commits

Author SHA1 Message Date
Jamie Strandboge
c92491621b utils/apparmor/sandbox.py:
- add --with-clipboard for use with xpra
- check for incompatible options
2012-08-28 07:41:23 -05:00
Jamie Strandboge
091bcd72fd adjust title to include the display 2012-08-27 20:13:41 -05:00
Jamie Strandboge
981188e17a utils/apparmor/sandbox.py: use a 3840x2560 server size to reduce memory usage 2012-08-27 17:18:21 -05:00
Jamie Strandboge
72995c5bcb utils/easyprof/templates/sandbox-x: add explicit deny rule to deny
@{HOME}/.Xauthority
utils/apparmor/sandbox.py: verify the above rule is any any dynamic templates
 that use -X
utils/aa-sandbox.pod: update man page to warn about /.Xauthority access
2012-08-27 16:43:20 -05:00
Jamie Strandboge
cb3d73424b utils/apparmor/sandbox.py: add --read-path=x.xauth to opt 2012-08-27 16:16:04 -05:00
Jamie Strandboge
392b5e07c0 various fixes based on feedback from James Troup. 2012-08-27 16:11:01 -05:00
Jamie Strandboge
ea6b1568b4 utils/apparmor/sandbox.py:
- use signal.<signal> instead of hardcoding a number
- add --with-xauthority option
- remove '-r' and '--with-geometry' and use --with-xephyr-geometry instead
- allow passing arguments to the application when using aa-exec
- kill with SIGTERM, then try again with SIGKILL
- always use os.execv() in forks. Using cmd() when not specifying '-d' created
  different behaviors between debug and non-debug mode
- better cleanup Xpra when aa-exec command fails
- use the full dummy.xorg.conf, which gives us the correct modelines for large
  displays. This fixes the issue "Server's virtual screen is too small .... You
  may see strange behavior." which should up when the window's size was bigger
  than the 'current server resolution'
2012-08-27 15:27:30 -05:00
Jamie Strandboge
3ad2820ebd utils/apparmor/sandbox.py:
- cleanup environment handling
- refactor cleanup code
- verify Xsecurity is setup correctly (ie, interpret output of xhost)
- add generation of .Xauthority-sandbox...
- explitly use SECURITY extension
2012-08-27 10:54:26 -05:00
Jamie Strandboge
fd4986e726 manpage updates 2012-08-24 12:16:20 -05:00
Jamie Strandboge
bb58f40ae3 add utils/aa-sandbox.pod 2012-08-24 12:07:19 -05:00
Jamie Strandboge
ec5973a3e6 utils/apparmor/sandbox.py: change 'resolution' to 'geometry' 2012-08-24 12:06:54 -05:00
Jamie Strandboge
72dbf597cc utils/apparmor/sandbox.py: use pkexec if '--with-x' is specified 2012-08-24 11:21:21 -05:00
Jamie Strandboge
c062a8a841 utils/apparmor/sandbox.py:
- fix detection of xdummy driver
- update comments
- add '--no-tray' to 'xpra attach'
2012-08-24 11:09:35 -05:00
Jamie Strandboge
056e642d2b utils/apparmor/sandbox.py: bail if we don't have xdummy 2012-08-24 10:57:28 -05:00
Jamie Strandboge
3fe45e4a9b utils/apparmor/sandbox.py: sleep for 0.5 seconds initially, then poll every
second
2012-08-24 10:52:22 -05:00
Jamie Strandboge
064887dfbd catch exception for x.start() 2012-08-24 10:49:24 -05:00
Jamie Strandboge
a13efcfe0a utils/apparmor/sandbox.py: detect if xpra is running before attach 2012-08-24 10:47:01 -05:00
Jamie Strandboge
cf24f21a77 utils/apparmor/sandbox.py: fix up arg validation for --with-xserver 2012-08-24 10:34:14 -05:00
Jamie Strandboge
5ce539c432 utils/apparmor/sandbox.py:
- add xpra3d server option which uses Xdummy
- update debugging output
2012-08-24 10:21:48 -05:00
Jamie Strandboge
7756e48197 utils/apparmor/sandbox.py:
- add --profile option
- small cleanups
2012-08-23 21:52:52 -05:00
Jamie Strandboge
ed0f41c650 utils/apparmor/sandbox.py:
- whitespace cleanups
- move setting DISPLAY into the start() method
- add extra options to xpra attach
2012-08-23 21:19:37 -05:00
Jamie Strandboge
80a59da4b8 adjust sandbox code:
- for python3
- to add xpra support
- refactoring
- cleanups
2012-08-23 20:49:12 -05:00
Jamie Strandboge
cafd8c9b3e drop globalmenu support for now 2012-08-23 20:47:58 -05:00
Jamie Strandboge
d7b2cb6a50 small cleanups for prettier output 2012-08-23 20:39:19 -05:00
Jamie Strandboge
c0821032fb remove and add some comments 2012-08-23 20:25:29 -05:00
Jamie Strandboge
51256d8fe7 move X server search code into classes 2012-08-23 19:56:18 -05:00
Jamie Strandboge
1fdc3a5e99 utils/apparmor/sandbox.py:
- add --xserver option and support both xephyr and xpra
- refactoring
2012-08-23 19:36:25 -05:00
Jamie Strandboge
7157a62d2b utils/apparmor/sandbox.py: detect next DISPLAY to use 2012-08-23 17:37:31 -05:00
Jamie Strandboge
354486e326 utils/apparmor/sandbox.py: slightly cleanup the gen_policy_name 2012-08-23 17:15:51 -05:00
Jamie Strandboge
f826be087d utils/aa-sandbox: use msq() instead of print
utils/apparmor/common.py: adjust for python3 (ie, make bi-lingual)
utils/apparmor/sandbox.py:
- set reasonable default template
- gen_policy_name() uses full pathname
- adjust for python3
2012-08-23 17:12:14 -05:00
Jamie Strandboge
a995c08356 fix up debug handling
add required binaries
2012-08-23 16:29:48 -05:00
Jamie Strandboge
1e80b85296 merge from trunk 2012-08-23 15:53:33 -05:00
Jamie Strandboge
175120fdd7 Gnome applications are now quite interested in reading
/usr/share/poppler/cMap/**. These files are included in the poppler-data
package on Ubuntu, and their 'r' denials create quite a bit of noise.
Apparently they are needed to display PDF documents containing CJK
characters with libpoppler. I added it to the gnome abstraction because
several applications not linked against poppler are consulting this
data.

Acked-By: Jamie Strandboge <jamie@canonical.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2012-08-14 14:31:58 -05:00
Jamie Strandboge
bf2eebd54d CAP_EPOLLWAKEUP was renamed to CAP_BLOCK_SUSPEND. Update severity.db for that.
Acked-By: Jamie Strandboge <jamie@canonical.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2012-08-14 13:46:10 -05:00
Jamie Strandboge
19a6b9673e update fonts abstraction for new fontconfig paths
Acked-By: Jamie Strandboge <jamie@canonical.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2012-08-14 13:40:58 -05:00
John Johansen
9c42360b34 apparmor: correct apparmor_parser -N command privilege
Fix the apparmor_parsers -N command (which dumps the list of profile
names found in a policy file) to be available without privilege and
also make it be recognized as a command instead of an option so that
it can conflict with -a -r -R -S and -o.

Currently it can be specified with these commands but will cause the
parser to short circuit just dumping the names and not doing the actual
profile compile or load.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2012-08-13 16:59:00 -07:00
John Johansen
8eb069cce5 apparmor: update apparmor_parser man page
Rework and update the apparmor_parser man page. It reworks some of the
text but mostly just reorganizes the commands and options into logical
grouping to make it easier to sort out how the various commands and
options work.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2012-08-13 16:58:46 -07:00
John Johansen
55d6f869fc apparmor: add clearing the profile cache when inconsistent
Add the ability to clear out the binary profile cache. This removes the
need to have a separate script to handle the logic of checking and
removing the cache if it is out of date.

The parser already does all the checking to determine cache validity
so it makes sense to allow the parser to clear out inconsistent cache
when it has been instructed to update the cache.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2012-08-13 16:58:33 -07:00
Christian Boltz
aa4f2813e4 /bin/ping moved to /usr/bin/ping on openSUSE (usrMerge)
Update the profile to make sure it's still used.

Acked-by: John Johansen <john.johansen@canonical.com>
2012-08-10 00:51:40 +02:00
Christian Boltz
ee71bf3b71 ls moved from /bin/ to /usr/bin/ on openSUSE (usrMove)
Acked-by: John Johansen <john.johansen@canonical.com>
2012-08-06 13:56:31 +02:00
John Johansen
d64d860c93 The previous patch to fix policy compilation around the network flag had a
serious flaw. The test for the network flag was being applied against both
the kernel flags and the cache flags. This means that if either the kernel
or the cache did not have the flag set then network mediation would be
turned off.

Thus if a kernel was booted without the flag, and a cache was generated
based on that kernel and then the system was rebooted into a kernel with
the network flag present, the parser on generating the new policy would
detect the old cache did not support network and turn it off for the
new policy as well.

This can be fixed by either removing the old cache first or regenerating
the cache twice. As the first generation will write that networking is
supported in the cache (even though the policy will have it disabled), and
the second generation will generate the correct policy.

The following patch moves the test so that it is only applied to the kernel
flags set.

Signed-off-by: John Johansen <john.johansen@canonical.com>
2012-07-17 16:03:32 -07:00
Jamie Strandboge
83a48dd395 Author: Mark Ramsell <mramsell@qazonline.net>
Description: ubuntu-integration does not work properly with exo-open
Bug-Ubuntu: https://launchpad.net/bugs/987578

Acked-By: Jamie Strandboge <jamie@canonical.com>
2012-07-05 12:37:03 -05:00
Jamie Strandboge
58646ebf20 Description: let sanitized-helper also allow access to /usr/local. Patch based
on work by Reuben Thomas
Bug-Ubuntu: https://launchpad.net/bugs/1013887

Acked-By: Jamie Strandboge <jamie@canonical.com>
2012-07-05 12:36:01 -05:00
Jamie Strandboge
f7d1df0aab Description: update ubuntu-browsers.d/java for IcedTea 7
Bug-Ubuntu: https://launchpad.net/bugs/1003856

Acked-By: Jamie Strandboge <jamie@canonical.com>
2012-07-05 12:34:45 -05:00
Jamie Strandboge
e7da3d81d1 use PYTHON in utils/python-tools-setup.py if it is defined
Acked-By: Jamie Strandboge <jamie@canonical.com>
Acked-by: John Johansen <john.johansen@canonical.com>
2012-07-01 09:12:29 -05:00
John Johansen
3d4a98bed9 Fix the parser so it checks for the presence of the network feature in the
compatibility interface. Previously it was assuming that if the compatibility
interface was present that network rules where also present, this is not
necessarily true and causes apparmor to break when only the compatibility
patch is applied.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Kees Cook <kees@ubuntu.com>
2012-07-01 01:36:37 -07:00
John Johansen
a465a211c2 Have build check for presence of awk and fail with a sensible error message
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2012-06-29 16:54:12 -07:00
Jamie Strandboge
09ab5e4d65 CAP_EPOLLWAKEUP was added to the 3.5 series in:
http://thread.gmane.org/gmane.linux.kernel/1289986

This allows for drivers that support poll to prevent suspend. Adjust
utils/severity.db for this.

Acked-By: Jamie Strandboge <jamie@canonical.com>
Acked-by: John Johansen <john.johansen@canonical.com>
2012-06-29 13:48:28 -05:00
Jamie Strandboge
87d912e4db Initial port to python3 for utilities. Thanks to Dmitrijs Ledkovs
Acked-By: Jamie Strandboge <jamie@canonical.com>
2012-06-29 13:35:57 -05:00
Dmitrijs Ledkovs
18ea588e5c typo 2012-06-12 14:30:57 +01:00