2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-08-31 14:25:52 +00:00

Compare commits

...

750 Commits

Author SHA1 Message Date
Steve Beattie
3158465820 Bump libapparmor's AA_LIB_REVISION in preparation for 2.8.1 release. 2013-01-09 16:23:51 -08:00
Steve Beattie
a27cd136b6 prepare for 2.8.1 release 2013-01-09 15:36:12 -08:00
Steve Beattie
e7e6aa9ed2 Subject: profiles - adjust pulseaudio in abstraction
Merge from trunk commit 2102

Original message:
  I was testing out a profile for pulseaudio and hit an issue where my
  pulseaudio process was getting the firefox profile applied to it. This
  is because in abstractions/ubuntu-browsers.d/multimedia the rule for
  pulseaudio is /usr/bin/pulseaudio ixr; attached is a patch to change it
  to Pixr, so as to use a global pulseaudio policy if it exists.

Signed-off-by: Steve Beattie <sbeattie@ubuntu.com>
Acked-by: John Johansen <john.johansen@canonical.com>
2013-01-09 15:15:59 -08:00
John Johansen
e478b9b37d The following patch extends the libraries log parsing to support more date
time formats. As this is causing failures on some systems

currently the only supported format is
  <Month> ## hh:mm:ss

extend this to
  <Month> ## hh:mm:ss(.ms)?((+|-)timezone)?

  yyyy-mm-dd hh:mm:ss(.ms)?((+|-)timezone)?

  yyyy-mm-ddThh:mm:ss(.ms)?((+|-)timezone)?
2013-01-08 12:51:07 -08:00
Steve Beattie
98a1594e88 Subject: aa-decode test script
Merge from trunk commit 2077

Original message:
  Subject: aa-decode test script v3
  
  This patch adds a test script/driver for the aa-decode utility. The only
  change from the previous versions is to support overriding the location
  of the aa-decode to test via the APPARMOR_DECODE environment variable
  and documenting the utils/ tests in the top level README.
  
  The aa-decode test can be run directly from the commandline in the utils
  directory like so:
  
    test/test-aa-decode.py -v
  
  Signed-off-by: Steve Beattie <sbeattie@ubuntu.com>
  Acked-By: Christian Boltz <apparmor@cboltz.de>

Nominated-by: Steve Beattie <sbeattie@ubuntu.com>
Acked-By: Christian Boltz <apparmor@cboltz.de>
2013-01-04 15:06:47 -08:00
Steve Beattie
e6614df4a5 Backported merge of various fixes from trunk in preparation of the 2.8.1
release. In this merge are the following trunk commits:

2050 - parser - network rules debugging statements
2057 - update ubuntu-browsers.d/java for IcedTea 7
2058 - let sanitized-helper also allow access to /usr/local
2059 - ubuntu-integration does not work properly with exo-open
2062 - support alternate ping install location in /usr
2064 - parser - update apparmor_parser man page
2065 - parser - correct apparmor_parser -N command privilege
2066 - parser - *just* the updated caching test message from this commit
2065.1.1 - profiles update fonts abstraction for new fontconfig paths
2065.1.{3,4} - profiles - Gnome applications are now quite interested
       in reading /usr/share/poppler/cMap/**
2069 - profiles - update extras README with mail list info
2074 - tests - fix clone test on arm
2076 - parser tests - fix test driver for exec() failure
2079 - libapparmor - add pkgconfig support
2083 - parser tests - fix fine grained timestamp detection in caching tests
2090 - nvidia abstractions cleanups
2092 - update skype profile
2093 - add XCompose to abstractions/X
2096 - dnsmasq network-manager integration
2013-01-04 10:11:00 -08:00
Steve Beattie
701537325e Subject: dnsmasq network-manager integration
Merge from trunk commit 2096

Original message:
  Subject: profiles - dnsmasq: allow writes to
   /{,var/}run/sendsigs.omit.d/*dnsmasq.pid for network manager
   integration
  
  Author: Jamie Strandboge <jamie@canonical.com>
  Description: allow writes to /{,var/}run/sendsigs.omit.d/*dnsmasq.pid
   for network manager integration
  Bug-Ubuntu: https://launchpad.net/bugs/941808
  
  Acked-by: Steve Beattie <sbeattie@ubuntu.com>

Nominated-by: Christian Boltz <apparmor@cboltz.de>
Acked-by: Steve Beattie <sbeattie@ubuntu.com>
2013-01-04 09:46:39 -08:00
Steve Beattie
dca6359ad5 Subject: add XCompose to abstractions/X
Merge from trunk commit 2093

Original message:
  Subject: profiles - add user's XCompose file to X abstraction
  
  In testing the skype profile, I found access to my @{HOME}/.XCompose
  was being rejected. This patch updates the X abstraction to take a
  user's defined XCompose key shortcuts into account.
  
  Signed-off-by: Steve Beattie <sbeattie@ubuntu.com>
  Acked-By: Jamie Strandboge <jamie@canonical.com>

Nominated-by: Christian Boltz <apparmor@cboltz.de>
Acked-by: Steve Beattie <sbeattie@ubuntu.com>
2013-01-04 09:45:19 -08:00
Steve Beattie
6e02694f6f Subject: update skype profile
Merge from trunk commit 2092 (w/ dropping the last modified timestamp
entirely)

Original message:
  Subject: profiles - update skype profile
  
  Author: Jamie Strandboge <jamie@canonical.com>
  Bug-Ubuntu: https://launchpad.net/bugs/933440 Forwarded: yes
  
  This is a very slightly updated version of the skype profile
  update that Jamie Strandboge submitted, but did not get a review.
  The only addition over the previously submitted version is rw access
  to @{HOME}/.config/Skype/Skype.conf.
  
  (This commit incorporates the additional @{HOME}/.kde4 change proposed
  by Christian Boltz <apparmor@cboltz.de>)
  
  Signed-off-by: Steve Beattie <sbeattie@ubuntu.com>
  Acked-By: Jamie Strandboge <jamie@canonical.com>

Nominated-by: Christian Boltz <apparmor@cboltz.de>
Acked-by: Steve Beattie <sbeattie@ubuntu.com>
2013-01-04 09:38:29 -08:00
Steve Beattie
fc6889ae8e Subject: nvidia abstractions cleanups
Merge from trunk commit 2090

Original message:
  Subject: profiles - nvidia abstraction cleanups
  
  This patch modifies the nvidia abstraction to add the livdpau wrapper
  config file for nvidia workarounds. It also converts the /proc/
  rules to use the @{PROC} tunable. And finally, it converts the
  ubuntu-browsers.d/multimedia abstraction to use the nvidia abstraction.
  
  Signed-off-by: Steve Beattie <sbeattie@ubuntu.com>
  Acked-By: Jamie Strandboge <jamie@canonical.com>

Nominated-by: Christian Boltz <apparmor@cboltz.de>
Acked-by: Steve Beattie <sbeattie@ubuntu.com>
2013-01-04 09:34:43 -08:00
Steve Beattie
0a97828f30 Subject: parser tests - fix fine grained timestamp detection in
caching tests

Merge from trunk commit 2083

Original message:
  This patch modifies the parser's caching test to more accurately detect
  whether or not the filesystem has a fine enough timestamp resolution.
  Occasionally even on filesystems like ext3, the two files' creation
  dates would differ when created less than a second apart, which would
  typically cause the 'Cache is used when cache is newer' test to fail
  because the cached file would have the same timestamp as the profile.
  
  The fix creates 10 files 0.1 seconds apart and ensures that all ten
  have distinct timestamps.
  
  (The occasional failure was caught in testing runs like
   https://bugs.launchpad.net/qa-regression-testing/+bug/1087061/ )
  
  Signed-off-by: Steve Beattie <sbeattie@ubuntu.com>
  Acked-by: John Johansen <john.johansen@canonical.com>

Nominated-by: Steve Beattie <sbeattie@ubuntu.com>
Acked-by: John Johansen <john.johansen@canonical.com>
2013-01-03 17:28:44 -08:00
Steve Beattie
84e7cdb5ee Subject: libapparmor - add pkgconfig support
Merge from trunk commit 2079

Original message:
  Given that we want to do more apparmor things in user space (dbus
  mediation, file picker, etc.), making it easier for other source bases
  to detect the presence of libapparmor would be beneficial. This patch
  adds pkg-config support to the build infrastructure for libapparmor.
  
  Signed-off-by: Steve Beattie <sbeattie@ubuntu.com>
  Acked-by: Kees Cook <kees@ubuntu.com>

Nominated-by: Steve Beattie <sbeattie@ubuntu.com>
Acked-by: John Johansen <john.johansen@canonical.com>
2013-01-03 17:26:27 -08:00
Steve Beattie
6654dfe251 Subject: parser tests - fix test driver for exec() failure
Merge from trunk commit 2076

Original message:
  Subject: two fixes to the parser's simple test driver
  
  This patch fixes two issue with the simple test driver. The first is
  that child exec that actually ran the parser was located inside the
  eval statement. This meant that if the exec failed for some reason
  (like the parser didn't exist), the child wouldn't actually die,
  but would pop out of the eval and continue running through the loop
  of test profiles (while the parent process does the same). This meant
  that if the script ran on the full testsuite with a misconfiguration,
  it would explode creating O(n^2) processes, where n is the number of
  testcase files -- with over 25k testcases, that's a lot. The fis is to
  lift the child exec outside the eval{}, then an exec() failure causes
  the child process to die correctly.
  
  The second fix is that several of the testcases were added with the
  DESCRIPTION field added in lower case (i.e. #=Description blah blah).
  This fix makes the regex that pulls out the description not be
  case-sensitive.
  
  Signed-off-by: Steve Beattie <sbeattie@ubuntu.com>
  Acked-By: John Johansen <john.johansen@canonical.com>

Nominated-by: Steve Beattie <sbeattie@ubuntu.com>
Acked-by: John Johansen <john.johansen@canonical.com>
2013-01-03 17:22:00 -08:00
Steve Beattie
a99e93c412 Subject: tests - fix clone test on arm
Merge from trunk commit 2074.

Original message:
  apparmor: Fix clone test on quantal arm omap-4
  
  It turns out that PAGE_SIZE isn't defined on all architectures.
  
  This fixes a regression test failure happening on Ubuntu quantal
  on the arm ti-omap4 architecture.
  
  Signed-off-by: John Johansen <john.johansen@canonical.com>
  Acked-By: Steve Beattie <sbeattie@ubuntu.com>

Nominated-by: Steve Beattie <sbeattie@ubuntu.com>
Acked-by: John Johansen <john.johansen@canonical.com>
2013-01-03 16:47:10 -08:00
Steve Beattie
ae12cc8e42 Subject: update mailing list address in extras README
Merge mailing list update from profiles/apparmor/profiles/extras/README
in trunk commit 2069.

Nominated-by: Christian Boltz <apparmor@cboltz.de>
Acked-by: Steve Beattie <sbeattie@ubuntu.com>
2013-01-03 16:43:41 -08:00
Steve Beattie
590a39e194 Subject: update gnome abstraction to allow reading
/usr/share/poppler/cMap/**

Merge from trunk commit 2065.1.3

Original message:
  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>

Nominated-by: Christian Boltz <apparmor@cboltz.de>
Acked-by: Steve Beattie <sbeattie@ubuntu.com>
2013-01-03 16:34:57 -08:00
Steve Beattie
0da19a9474 Subject: update fonts abstraction for new fontconfig paths
Merge from trunk commit 2065.1.1.

Original message:
  update fonts abstraction for new fontconfig paths
  
  Acked-By: Jamie Strandboge <jamie@canonical.com>
  Acked-By: Steve Beattie <sbeattie@ubuntu.com>

Nominated-by: Christian Boltz <apparmor@cboltz.de>
Acked-by: Steve Beattie <sbeattie@ubuntu.com>
2013-01-03 16:27:15 -08:00
Steve Beattie
06aa9b0a54 Subject: update caching test message
Merge from just the parser/tst/caching.sh portion of trunk commit 2066.

Original message:
  apparmor: abstract out the directory walking routine
  
  The apparmor_parser has 3 different directory walking routines.
Abstract
  them out and use a single common routine.
  
  Signed-off-by: John Johansen <john.johansen@canonical.com>
  Acked-By: Steve Beattie <sbeattie@ubuntu.com>
 
Nominated-by: Steve Beattie <sbeattie@ubuntu.com>
Acked-by: John Johansen <john.johansen@canonical.com>
2013-01-03 16:20:14 -08:00
Steve Beattie
76925a236c Merge from trunk commit 2065:
Original message:
  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>

Nominated-by: Steve Beattie <sbeattie@ubuntu.com>
Acked-by: John Johansen <john.johansen@canonical.com>
2013-01-03 16:12:20 -08:00
Steve Beattie
626b9a9d36 Merge from trunk commit 2064:
Original message:
  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>

Nominated-by: Steve Beattie <sbeattie@ubuntu.com>
Acked-by: John Johansen <john.johansen@canonical.com>
2013-01-03 15:58:28 -08:00
Steve Beattie
4fdb2dd24e Merge from trunk commit 2062:
Original message:
  /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>

Nominated-by: Steve Beattie <sbeattie@ubuntu.com>
Acked-by: John Johansen <john.johansen@canonical.com>
2013-01-03 15:55:57 -08:00
Steve Beattie
6e0996981b Merge from trunk commit 2059:
Original message:
  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>

Nominated-by: Steve Beattie <sbeattie@ubuntu.com>
Acked-by: John Johansen <john.johansen@canonical.com>
2013-01-03 15:54:16 -08:00
Steve Beattie
8e33b4a173 Merge from trunk commit 2058:
Original message:
  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>

Nominated-by: Steve Beattie <sbeattie@ubuntu.com>
Acked-by: John Johansen <john.johansen@canonical.com>
2013-01-03 15:44:14 -08:00
Steve Beattie
3e18698c78 Merge from trunk commit 2057:
Original message:
  Description: update ubuntu-browsers.d/java for IcedTea 7
  Bug-Ubuntu: https://launchpad.net/bugs/1003856

  Acked-By: Jamie Strandboge <jamie@canonical.com>

Nominated-by: Steve Beattie <sbeattie@ubuntu.com>
Acked-by: John Johansen <john.johansen@canonical.com>
2013-01-03 15:37:41 -08:00
Steve Beattie
0fc26d7c47 Merge from trunk commit 2050:
Original Message:
  While integrating 3.4-rc1, I ran into a problem where network rules
  weren't being processed. It ultimately boiled down to a kernel
  issue but I found it useful to see what the parser thought it was
  working with. Since the parser already has a debugging mode that
  will show things like capabilities, it was an obvious extension to
  add network rules.

  Signed-off-by: Jeff Mahoney <jeffm@suse.com>
  Acked-by: John Johansen <john.johansen@canonical.com>

Nominated-by: Steve Beattie <sbeattie@ubuntu.com>
Acked-by: John Johansen <john.johansen@canonical.com>
2013-01-03 14:38:38 -08:00
Christian Boltz
78cd88c56d fix aa-decode by backporting all changes from trunk to 2.8 branch
Acked-By: John Johansen (up to r2072)
Acked-by: Steve Beattie <sbeattie@ubuntu.com> (including r2088)


In detail, the changes are (bzr log from trunk):
------------------------------------------------------------
revno: 2088
committer: Christian Boltz <apparmor@cboltz.de>
branch nick: apparmor
timestamp: Tue 2013-01-01 20:15:04 +0100
message:
  speed up aa-decode by using a bash regex matching instead of calling egrep for each line.

  Acked-by: Steve Beattie <sbeattie@ubuntu.com>

  (Patch sent 2012-11-01, Acked-by from 2013-01-01)
------------------------------------------------------------
revno: 2072
committer: Christian Boltz <apparmor@cboltz.de>
branch nick: apparmor
timestamp: Tue 2012-10-16 00:19:49 +0200
message:
  Fix aa-decode handling of stdin

  Handling stdin was totally broken (= no output) with the current log
  format because aa-decode expected name= to be the last entry in the
  log line.

  This patch for stdin handling
  - fixes the pattern to match the current log format (name= is NOT the
    last part in the log entry)
  - uses bash replacement to avoid some sed calls (which also means the
    script now needs an explicit "#!/bin/bash")
  - prints decoded filenames in double instead of single quotes to be
    consistent with filenames that were not encoded
  - also prints lines that do not contain an encoded filename (instead of
    grepping them away)
  - replace tr calls by perl's uc() (also for non-stdin mode)
  - also handle encoded profile names (introduced by Steve)
  - don't fail if a file or profile name contains a '

  In other words: you can pipe your audit.log through aa-decode, and the
  only difference to the raw audit.log is that filenames are decoded.


  Acked-By: Steve Beattie <sbeattie@ubuntu.com>
------------------------------------------------------------
revno: 2068
committer: Christian Boltz <apparmor@cboltz.de>
branch nick: apparmor
timestamp: Mon 2012-09-17 23:55:28 +0200
message:
  fix error handling in aa-decode

  Acked-By: Steve Beattie <sbeattie@ubuntu.com>

  Looks-Good-By: ;-)  Seth Arnold <seth.arnold@gmail.com>
------------------------------------------------------------
2013-01-01 20:26:19 +01:00
John Johansen
c48e4a76d3 Add a small sleep call to the onexec test to give the forked process a
chance to run before verifying it's current and future confinement
state. In testing the combined sleeps added roughly a second to
onexec.sh's total time on relatively reasonable hardware.

Signed-off-by: Steve Beattie <sbeattie@ubuntu.com>
Acked-By: John Johansen <john.johansen@canonical.com> (via IRC)
2012-12-19 05:38:49 -08:00
Christian Boltz
bbaa1fa6d1 add CAP_BLOCK_SUSPEND to severity.db
(backported from trunk)

Acked-by: John Johansen <john.johansen@canonical.com>
2012-12-17 13:34:41 +01:00
Steve Beattie
ecd14e46b9 Add a testcase for the issue fixed in commit 2059.
Signed-off-by: Steve Beattie <sbeattie@ubuntu.com>
Acked-by: John Johansen <john.johansen@canonical.com>
2012-12-10 17:01:24 -08:00
John Johansen
e0c94c9039 fix a nasty little bug that can surface in apparmor 2.8 when
Hats/children profiles are used.

the matchflags in the dfa backend are not getting properly reset, which
results in a previously processed profiles match flags being used. This is
not a problem for most permissions but can result in x conflict errors.

Note: this should not result in profiles with the wrong x transitions loaded
as it causes compilation to file with an x conflict.

This is a minimal patch targeted at the 2.8 release. As such I have just
updated the delete_ruleset routine to clear the flags as it is already
being properly called for every rule set.

Apparmor 2.9/3.0 will have a different approach where it is not possible
to reuse the flags.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Steve Beattie <sbeattie@ubuntu.com>
2012-12-10 15:12:22 -08:00
John Johansen
b5c6e11aca Add kernel patches for 3.5 and 3.6 kernels 2012-11-20 17:00:59 -08:00
John Johansen
fd6a33f89e Update documentation of change_hat and change_profile apis
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Seth Arnold <seth.arnold@gmail.com>
2012-11-20 16:52:43 -08:00
John Johansen
276ef3facf So the library version has not been being correctly bumped.
Make this a little bit easier to follow

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2012-10-12 11:41:51 -07:00
John Johansen
4a42d74351 The apparmor coredump regression test was broken.
- It failed to remove coredump files named "core"
- It failed to properly detect "core.<pid>" files
- And it would fail if the coredump_pattern had been modified to
  a different location.

This lead one of the tests to report it was passing when it
wasn't because it was detecting the previous tests core file.

- Fix the test to set the coredump_pattern, to dump into the
  tmpdir used for the test.
- Make it so it will only detect the core file for the pid of
  the last test run.
- And extend the test to have a couple of extra test cases.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Kees Cook <kees@ubuntu.com>
2012-10-01 10:57:11 -07:00
John Johansen
00bf73f7c2 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 Johnansen <john.johansen@canonical.com>
2012-08-09 00:37:25 -07:00
Christian Boltz
b0a05c5b3d ls moved from /bin/ to /usr/bin/ on openSUSE (usrMove)
Acked-by: John Johansen <john.johansen@canonical.com>
2012-08-06 13:57:22 +02:00
John Johansen
563a49adc4 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:00:53 -07:00
John Johansen
107b5113bd 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:35:05 -07:00
John Johansen
c1c1b229c1 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:42:39 -07:00
John Johansen
9fbfa4c7e0 Original Author: mancha@mancha.user.oftc.net
create-apparmor.vim.py was failing on systems with python 2.5, fix that
    
Acked-by: John Johansen <john.johansen@canonical.com>
Acked-by: Steve Beattie <sbeattie@ubuntu.com>
2012-06-08 14:27:05 -07:00
Steve Beattie
77de4e26cd update REPO_URL for 2.8 branch 2012-05-31 11:32:33 -07:00
John Johansen
1fd88819be Set apparmor_2.8.0 release tag 2012-05-31 10:29:35 -07:00
John Johansen
7b98d8a227 Bump version to apparmor 2.8.0 2012-05-31 10:27:48 -07:00
John Johansen
b0443467aa Bump version number to 2.8.0 2012-05-31 10:25:02 -07:00
John Johansen
41b454f2e5 Older C++ compilers complain about the use of a class with a non trivial
constructor in a union.  Change the ProtoState class to use an init fn
instead of a constructor.
2012-05-30 14:31:41 -07:00
John Johansen
2347b6628d Kernel patches for v3.2, v3.3, v3.4 kernels 2012-05-21 20:23:15 -07:00
Jamie Strandboge
64a8698a5f Adjust path for thunderbird to include non-versioned path
Bug-Ubuntu: https://launchpad.net/bugs/990931

Acked-By: Jamie Strandboge <jamie@canonical.com>
2012-05-18 15:30:22 -05:00
Jamie Strandboge
d418a16703 mark easyprof and easyprof test scripts as executable 2012-05-09 11:05:07 -07:00
Christian Boltz
440e9c3d5d various changes in building techdoc.tex:
- make table of contents, footnotes etc. clickable hyperlinks
- use timestamp of techdoc.tex (instead of build time) as creationdate
  in the PDF metadata
- don't include build date on first page of the PDF
- make clean:
  - delete techdoc.out (created by pdftex)
  - fix deletion of techdoc.txt (was techdo_r_.txt)

The initial target was to get reproduceable PDF builds (therefore the 
timestamp-related changes), the other things came up during discussing
this patch with David Haller.

The only remaining difference in the PDF from build to build is the /ID
line.  This line can't be controlled in pdflatex and is now filtered 
out by build-compare in the openSUSE build service (bnc#760867).

Credits go to David Haller for writing large parts of this patch
(but he didn't notice the techdo_r_.txt ;-)


Signed-Off-By: Christian Boltz <apparmor@cboltz.de>
2012-05-09 00:41:06 +02:00
Jamie Strandboge
1db463f4de This patchset is broken into 4 parts:
* the application, library, documentation and installation script
* the initial templates and policy groups. This will undoubtedly need
  refinement as we get feedback from users. Initial policy is based on Ubuntu's
  Application Review Board (ARB) requirements[2].
* tests for the library
* Makefile integration

Templates are stored in /usr/share/apparmor/easyprof/templates and policy
groups in /usr/share/apparmor/easyprof/policygroups. This can be adjusted via
/etc/apparmor/easyprof.conf.

The aa-easyprof.pod has complete documentation on usage with some
additional information in utils/easyprof/README (mostly duplicated
here).

Testing can be performed in a number of ways:
$ cd utils ; make check # runs unit tests and pyflakes

Unit tests manually:
$ ./test/test-aa-easyprof.py

In source manual testing:
$ ./aa-easyprof --templates-dir=./easyprof/templates \
                --policy-groups-dir=./easyprof/policygroups \
                ... \
                /opt/foo/bin/foo

Post-install manual testing:
$ make DESTDIR=/tmp/test PERLDIR=/tmp/test/usr/share/perl5/Immunix install
$ cd /tmp/test
$ PYTHONPATH=/tmp/test/usr/local/.../dist-packages ./usr/bin/aa-easyprof \
    --templates-dir=/tmp/test/usr/share/apparmor/easyprof/templates \
    --policy-groups-dir=/tmp/test/usr/share/apparmor/easyprof/policygroups \
    /opt/bin/foo

(you may also adjust /tmp/test/etc/apparmor/easyprof.conf to avoid
specifying --templates-dir and --policy-groups-dir).

Committing this now based on conversation with John and Steve.

Acked-By: Jamie Strandboge <jamie@canonical.com>
2012-05-07 22:37:48 -07:00
Jamie Strandboge
279b5945cb Allow Google Chrome and chromium-browser to work under sanitized helper. While
the chromium and chrome sandboxes are setuid root, they only link in limited
libraries so glibc's secure execution should be enough to not require the
santized_helper (ie, LD_PRELOAD will only use standard system paths (man
ld.so)). Also allow some paths in /opt for Chrome.

Ubuntu-Bug: https://launchpad.net/bugs/964510

Acked-By: Jamie Strandboge <jamie@canonical.com>
2012-05-02 07:44:55 -05:00
Jamie Strandboge
d2bcf440e8 Allow software center to work again from browsers. It was blocked by
sanitized_helper. For now this only allows software-center scripts in
/usr/share, but we may need to increase what is allowed in /usr/share if more
things are denied when they shouldn't be.

Ubuntu-Bug: https://launchpad.net/bugs/972367

Acked-By: Jamie Strandboge <jamie@canonical.com>
2012-05-02 07:43:30 -05:00
Kees Cook
33557e22ed The m4 shipped to handle Python was incorrectly clearing
$CPPFLAGS. Additionally, do not repeat compiler flags for automake
targets that already include them, and pass more flags to the Perl build.

Signed-off-by: Kees Cook <kees@ubuntu.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2012-04-25 12:15:19 -07:00
Kees Cook
67ce4c3bd9 Include IceWeasel in ubuntu-browsers abstraction.
Author: Intrigeri <intrigeri@debian.org>
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=661176

Signed-off-by: Kees Cook <kees@ubuntu.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
Acked-By: Jamie Strandboge <jamie@canonical.com>
2012-04-25 12:13:15 -07:00
Kees Cook
dd91c7791b Updates the X abstraction to include gdm3 path.
Author: Intrigeri <intrigeri@debian.org>
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=660079

Signed-off-by: Kees Cook <kees@ubuntu.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2012-04-25 11:36:51 -07:00
Steve Beattie
fc6b59e8b1 Subject: fix aa-logprof rewrite of PUx modes.
When writing out a profile, aa-logprof incorrectly converts PUx execute
permission modes to the syntactically invalid UPx mode, because the
function that converts the internal representation of permissions to
a string emits the U(nconfined) mode bit before the P bit.

This patch corrects this by reordering the way the exec permissions
are emitted, so that P and C modes come before U and i. Based on
http://wiki.apparmor.net/index.php/AppArmor_Core_Policy_Reference#Execute_rules
this should emit the modes correctly in all combined exec modes.
Other approaches to fixing this would require adjusting the data
structure that contains the permission modes, resulting in a more
invasive patch.

Bug: https://launchpad.net/bugs/982619
2012-04-24 11:00:18 -07:00
Christian Boltz
ebe8803e80 If tftp server for dnsmasq is configured it won't serve the boot
file. This patch adds read permissions for /srv/tftpboot/

References: https://bugzilla.novell.com/show_bug.cgi?id=738905

Somehow ;-) [1] Acked-By: John Johansen

[1] see mailinglist for details ;-)
2012-04-16 23:10:43 +02:00
Steve Beattie
a078c1feb5 With the fixing of the change_profile rules to automatically allow
access to /proc/*/attr/{current,exec}, the onexec testcase that
attempted to do things without explicit access granted to
/proc/*/attr/exec in the testsuite passes instead of fails. This commit
takes that into account.
2012-04-11 23:17:52 -07:00
John Johansen
b6c08d74a6 bump version tag for apparmor 2.8 beta-5 2012-04-11 17:24:07 -07:00
John Johansen
68297d9398 Fix change_profile to grant access to api
http://bugs.launchpad.net/bugs/979135

Currently a change_profile rule does not grant access to the
/proc/<pid>/attr/{current,exec} interfaces that are needed to perform
a change_profile or change_onexec, requiring that an explicit rule allowing
access to the interface be granted.

Make it so change_profile implies the necessary
  /proc/@{PID}/attr/{current,exec} w,

rule just like the presence of hats does for change_hat


Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2012-04-11 16:04:33 -07:00
John Johansen
6f27ba3abb Fix protocol error when loading policy to kernels without compat patches
http://bugs.launchpad.net/bugs/968956

The parser is incorrectly generating network rules for kernels that can
not support them.  This occurs on kernels with the new features directory
but not the compatibility patches applied.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2012-04-11 16:03:21 -07:00
John Johansen
7afa066be3 Fix change_onexec for profiles without attachment specification
This fix is needed for the userspace portion of both 
BugLink: http://bugs.launchpad.net/bugs/963756
BugLink: http://bugs.launchpad.net/bugs/978038

change_onexec fails for profiles that don't have an attachment specification
  eg. unconfined

This is because change_onexec goes through 2 permission checks.  The first
at the api call point, which is a straight match of the profile name

  eg.
    /bin/foo
    unconfined

and a second test at exec time, tying the profile to change to to the
exec.  This allows restricting the transition to specific execs.  This
is mapped as a two entry check

  /executable/name\x00profile_name

where the executable name must be marked with the change_onexec permission
and the subsequent profile name as well.

The previous "fix" only covered adding onexec to executable names and
also works for the initial change_onexec request when the profile is
an executable.

However it does not fix the case for when the profile being transitioned
to is not an executable.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2012-04-11 16:02:13 -07:00
John Johansen
562eb63964 expand automated profile generation to to allow profile generation from stdin
This extends the auto-profile generation so that it can take profiles formated
in standard profile language augemented by a few special variables for
the automatically generated rules.  This will all extended the regression
tests in ways that are not currently supported, because mkprofile format
does not match of the profile language.

the special apparmorish variables are
@{gen_elf name} - generate rules for elf binaries
@{gen_bin name} - generate rules for a binary
@{gen_def} - generate default rules
@{gen name} - do @{gen_def} @{gen_bin name}

To generate a profile you do

genprofile --stdin <<EOF
/profile/name {
@{gen /profile/name}
}
EOF

eg. to generate the equivalent of
  genprofile
you would do
  genprofile --stdin <<EOF
  $test {
  @{gen $test}
  }
EOF

and the equiv of
  genprofile $file:rw
would be
  genprofile --stdin <<EOF
  $test {
  @{gen $test}
  $file rw,
  }


while it takes a little more to generate a base profile than the old syntax, it
use the actual profile language (augmented with the special variables), it is a
lot more flexible, and a lot easier to expand when new rule types are added.

eg. of something not possible with the current auto generation
    Generate a profile with a child profile and hat and a trailing profile

genprofile --stdin <<EOF
$test {
@{gen $test}

  profile $bin/open {
@{gen $bin/open}
  }

  ^hatfoo {
     $file rw,
  }
}
profile $bin/exec {
@{gen $bin/exec}
}
EOF

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2012-04-11 15:55:54 -07:00
Jamie Strandboge
852907e1cc clarifications for mount rules
Acked-By: Jamie Strandboge <jamie@canonical.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
Acked-by: John Johansen <john.johansen@canonical.com>
2012-04-11 16:34:22 -05:00
Jamie Strandboge
50aa2335eb remove unintended comma from parser/apparmor.d.pod
Acked-By: Jamie Strandboge <jamie@canonical.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2012-04-11 11:53:16 -05:00
Jamie Strandboge
3ff29d2e4b Attached is a patch to add --stderr to the common rules for generating
manpages (and adjust it so that it's one rule instead of eight). It
also fixes the above problem and a similar problem in the aa-exec
manpage.

Acked-By: Steve Beattie <sbeattie@ubuntu.com>
Acked-By: Jamie Strandboge <jamie@canonical.com>
2012-04-11 11:16:47 -05:00
Jamie Strandboge
24e46508d5 parser/apparmor.d.pod: add mount rule syntax and usage. Refinements and
clarifications thanks to Steve Beattie.

Acked-By: Jamie Strandboge <jamie@canonical.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2012-04-11 11:10:29 -05:00
Steve Beattie
f7ce93b27c libapparmor: add support for ip addresses and ports
Bugs: https://bugs.launchpad.net/ubuntu/+source/apparmor/+bug/800826
  https://bugzilla.novell.com/show_bug.cgi?id=755923

This patch modifies the libapparmor log parsing code to add support
for the additional ip address and port keywords that can occur in
network rejection rules. The laddr and faddr keywords stand for local
address and foreign address respectively.

The regex used to match an ip address is not very strict, to hopefully
catch the formats that the kernel emits for ipv6 addresses; however,
because this is in a context triggered by the addr keywords, it should
not over-eagerly consume non-ip addresses. Said addresses are returned
as strings in the struct to be processed by the calling application.

Bug: https://launchpad.net/bugs/800826
2012-04-06 15:59:04 -07:00
Christian Boltz
f67168cf2d the usr.lib.dovecot.imap-login profile should allow inet6 in addition to inet
References: https://bugzilla.novell.com/show_bug.cgi?id=755923 

Acked-By: Jamie Strandboge <jamie@canonical.com>
2012-04-05 23:51:17 +02:00
Steve Beattie
c80254eb3f Restructure the apparmor.vim creation script a bit to do a bit of
re-use and to structure things to make understanding clearer.
2012-04-05 14:39:57 -07:00
Steve Beattie
01fe7f42a0 Subject: call autodep when creating a child profile
This patch calls autodep on the 'exec'ed binary when the user selects
to place that execution in a child profile. Previously, logprof would
create an entirely empty child profile in complain mode (this fix
still leaves the child profile in complain mode).
2012-03-27 17:21:22 -07:00
Steve Beattie
f37f59f47b Subject: fix autodep profile construction
This patch fixes a couple of issue with autodep:

  1) The initial profile construction had not been adjusted to include
     the 'allow' or 'deny' hash prefixing the path elements. This
     fixes it by eliminating the path portion entirely and pushing
     the path based accesses to the later analysis section of code.

  2) the mode of the original binary was accidentally getting reset
     to 0, when it was intended to initialize the audit field to 0.
2012-03-27 17:18:44 -07:00
Steve Beattie
521b237e8b Subject: autodep - add bash abstraction when using dash script
On Ubuntu and Debian, by default /bin/sh is a symlink to /bin/dash. When
autodep'ing a shell script, the bash abstraction was not being included.
2012-03-27 17:17:25 -07:00
Steve Beattie
daa5b9f496 Subject: aa-logprof - fix handling of 'exec' events (LP: #872446)
Bug: https://bugs.launchpad.net/ubuntu/+source/apparmor/+bug/872446

Due to logging changes for 'exec' events, 'exec' events in aa-logprof
were being skipped when a profile is in enforcing mode. This patch
addresses the issue.

Bug: https://launchpad.net/bugs/872446
2012-03-27 17:15:50 -07:00
John Johansen
18ddf78dbe Make mount operations aware of 'in' keyword so they can affect the flags build list
Bug #959560 - part 2/3 of fix

Signed-off-by: John Johansen <john.johansen@canonical.com>
2012-03-26 06:19:21 -07:00
John Johansen
3356dc4edd Update the parser to support the 'in' keyword for value lists
Bug #959560 Part 1/3 of fix

Signed-off-by: John Johansen <john.johansen@canonical.com>
2012-03-26 06:17:40 -07:00
John Johansen
c1722cdfdb Fix permission mapping for change_profile onexec
Bug #963756

The kernel has an extended test for change_profile when used with
onexec, that allows it to only work against set executables.

The parser is not correctly mapping change_profile for this test
update the mapping so change_onexec will work when confined.

Note: the parser does not currently support the extended syntax
that the kernel test allows for, this just enables it to work
for the generic case.

Signed-off-by: John Johansen <john.johansen@canonical.com>
2012-03-26 06:11:16 -07:00
John Johansen
5c09f44f8b Fix the changehat_wrapper regression test
The capabilities tests where failing in the changehat_wrapper test.  This was because
they could not the changehat_wrapper sub executable, which trying to exec a binary
in the tmpdir.

Specifically if the test was for syscall_ptrace.  It would generate a profile with
a hat for ^syscall_ptrace and attempt to execute ./syscall_ptrace.  However this
was failing in some situations, including when trying to debug from the tmpdir,
as the syscall_XXX binary is no longer local.

Instead use the fully qualified path for the hat name, and the exec path.

Signed-off-by: John Johansen <john.johansen@canonical.com>
2012-03-26 06:10:18 -07:00
John Johansen
40588d182a Modifify regression test infrastructure to stop on failure when retainingtmpdir
The retaining of the tmpdir is used during debugging of test failures, but currently
when a test fails, the next test is run overwritting the previous tmpdir value. This
is a problem even when manually running individual test shell scripts if the failure
is not the last test in the script.

Instead cause testing to about when retaintmpdir is true, which will cover the debugging
needs for the majority of failure cases.

Signed-off-by: John Johansen <john.johansen@canonical.com>
2012-03-26 06:09:04 -07:00
Jamie Strandboge
83ead1217f clean up utils/vim/common symlink on clean
Acked-By: Jamie Strandboge <jamie@canonical.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2012-03-23 11:02:20 -05:00
Jamie Strandboge
4a89f974f6 utils/aa-exec: update copyright year to be 2011-2012 since it was committed
in 2012
2012-03-22 18:07:07 -05:00
Jamie Strandboge
93308e4a29 Use linux/capability.h instead of sys/capability.h
Acked-By: Jamie Strandboge <jamie@canonical.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2012-03-22 16:41:08 -05:00
John Johansen
593cb59d38 bump revision and set tag for apparmor_2.8-beta4 2012-03-22 13:29:46 -07:00
Steve Beattie
1439d006cd Subject: add apparmor.vim install target to utils/ install
This patch adds a make install target for the generated apparmor.vim
file, installing by default into /usr/share/apparmor based on IRC
discussions; alternate suggestions welcome. (Installing directly
into the vim syntax tree is difficult as the system path by default
contains the vim version number.)
2012-03-22 13:27:29 -07:00
Steve Beattie
b4feb99841 Subject: rewrite apparmor.vim generation and integrate into build
This patch replaces the apparmor.vim generating script with a python
version that eliminates the need for using the replace tool from the
mysql-server package. It makes use of the automatically generated
lists of capabilities and network protocols provided by the build
infrastructure. I did not capture all the notes and TODOs that
Christian had in the shell script; I can do so if desired.

It also hooks the generation of the apparmor.vim file into the utils/
build and clean stages.
2012-03-22 13:26:20 -07:00
Steve Beattie
63c43ae9f5 Subject: add missing capabilities to severity.db
This patch adds several missing capabilities to the utils/
severity.db file as detected by the newly added make check target,
along with corresponding severity levels that I believe :re appropriate
(discussion welcome):

  CAP_MAC_ADMIN 10
  CAP_MAC_OVERRIDE 10
  CAP_SETFCAP 9
  CAP_SYSLOG 8
  CAP_WAKE_ALARM 8

The latter two are undocumented in the capabilities(7) man page
provided in Ubuntu 12.04; the syslog one is the separation out of
accessing the dmesg buffer from CAP_SYSADMIN, and the CAP_WAKE_ALARM
allows setting alarms that would wake a system from a suspended state,
if my reading is correct.

This also fixes a trailing whitespace on CAP_CHOWN, moves
CAP_DAC_READ_SEARCH to the end of the section of capabilities it's
in due to its lower priority level (7).
2012-03-22 13:24:12 -07:00
Steve Beattie
a31e1349ce Subject: utils/: add check to ensure severity.db contains all
capabilities

This patch adds a new make target, check_severity_db, to the
utils/Makefile. It greps the severity.db for the presence of each
capability, as computed by the newly abstracted out variable in
common/Make.rules, and issues a build time error if it finds any
missing.

It also silences the check targets, so that only the output from them
will be emitted.
2012-03-22 13:23:19 -07:00
John Johansen
f4240fcc74 Rename and invert logic of is_null to is_accept to better reflect its use
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2012-03-22 13:21:55 -07:00
Steve Beattie
8eaeb44f56 Subject: abstract out cap and net proto generation to common/Make.rules
This patch abstracts out the generation of the lists of capabilities
and network protocol names to the common Make.rules file that is
included in most locations in the build tree, to allow it to be
re-used in the utils/ tree and possibly elsewhere.

It provides the lists in both make variables and as make targets.

It also sorts the resulting lists, which causes it to output differently
than the before case. I did confirm that the results for the generated
files used in the parser build were the same after taking the sorting
into account.
2012-03-22 13:19:27 -07:00
Steve Beattie
bfc1032fc1 Subject: toplevel makefile: correct location of libapparmor
This patch fixes an issue with the toplevel make clean target that did
not take into account where the libapparmor tree had been moved to.
2012-03-22 13:17:48 -07:00
Jamie Strandboge
65f90c0942 fix distro-specific apparmor.vim man page
Acked-By: Jamie Strandboge <jamie@canonical.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
Acked-by: Kees Cook <kees@ubuntu.com>
2012-03-22 15:15:20 -05:00
John Johansen
4fcd1f33dc Fix aa-exec file mode to be 751 so that it can be exec'd 2012-03-22 12:52:58 -07:00
John Johansen
86527a2f4c Fix the return size of aa_getprocattr
aa_getprocattr is returning the size of the buffer not the size of the
data read that it is supposed to return.  Also update the man page to
reflect the return value as documented in the functions, and update
the test cases to check the return value.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Steve Beattie <sbeattie@ubuntu.com>
2012-03-22 07:58:18 -07:00
John Johansen
648166ecca Fix error case of aa_getprocattr to set buffers to NULL
While aa_getprocattr does return the documented error code on failure
the **buf and **mode parameters can point into the buffer that was
allocated and then discarded on failure.

Set them to null on failure so that even if the error code is ignored
they do not point to heap data.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2012-03-22 07:57:18 -07:00
John Johansen
2e3b5ff134 Fix mnt_flags passed for remount
Remount should not be screening off the set of flags it is.  They are
the set of flags that the kernel is masking out for make_type and
should not be used on remount. Instead just screen off the other cmds
that can have their own rules generated.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2012-03-22 07:55:58 -07:00
John Johansen
3c9cdfb841 rework the is_null test to not include deny
The deny information is not used as valid accept state information,
so remove it from the is_null test.  This does not change the dfa
generated but does result in the dumped information changing,
as states that don't have any accept information are no longer
reported as accepting. This is what changes the number of states
reported in the minimize tests.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2012-03-22 07:55:00 -07:00
John Johansen
e7f6e0f9f1 Fix dfa minimization around the nonmatching state
The same mappings routine had two bugs in it, that in practice haven't
manifested because of partition ordering during minimization.  The
result is that some states may fail comparison and split, resulting
in them not being eliminated when they could be.

The first is that direct comparison to the nonmatching state should
not be done as it is a candiate for elimination, instead its partion
should be compared against.  This simplifies the first test


The other error is the comparison
  if (rep->otherwise != nonmatching)

again this is wrong because nomatching should not be directly
compared against.  And again can result in the current rep->otherwise
not being eliminated/replaced by the partion.  Again resulting in
extra trap states.

These tests where original done the way they were because
 ->otherwise could be null, which was used to represent nonmatching.
The code was cleaned up a while ago to remove this, ->otherwise is
always a valid pointer now.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2012-03-22 07:50:35 -07:00
John Johansen
7fcbd543d7 Factor all the permissions dump code into a single perms method
Also make sure the perms method properly switches to hex and back to dec
as some of the previous perm dump code did not.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2012-03-22 07:49:43 -07:00
John Johansen
2f603cc73e Add the aa-exec command line utility
The aa-exec command can be used to launch an application under a specified
confinement, which may be different for what regular profile attachment
would apply.

Signed-off-by: John Johansen <john.johansen@canonical.com>
2012-03-20 11:45:13 -07:00
Steve Beattie
69dc13efdf This patch adds testcases that confirm that using a bare
file,

rule will allow access to both the '/' directory and other directories.
2012-03-15 16:46:50 -07:00
John Johansen
456220db56 Bump revision and tag for 2.8-beta3 2012-03-15 12:57:13 -07:00
John Johansen
c50858a877 Update permission mapping for changes made to the upstream kernel patch.
The changes are around how user data is handled.

1. permissions are mapped before data is matched
2. If data is to be mapped a AA_CONT_MATCH flag is set in the permissions
   which allows data matching to continue.
3. If data auditing is to occur the AA_AUDIT_MNT_DATA flag is set

This allows better control over matching and auditing of data which can
be binary and should not be matched or audited

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2012-03-15 12:54:34 -07:00
John Johansen
a11efe838a Fix the bare file rule so that it grants access to to root
file, should grant access to all files paths on the system but it does
not currently allow access to /

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2012-03-15 12:16:56 -07:00
John Johansen
d6dc04d737 Fix pivot_root to support named transitions correctly
Rename the pivotroot rule to pivot_root to match the command and the fn
and fix it to support named transition correctly leveraging the parsing
action used for exec transitions.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2012-03-15 12:14:15 -07:00
John Johansen
feeea88a58 Fix the case where no flags match
Currently the backend doesn't like it (blows up) when the a vector entry is
empty.  For the case where no flags match build_mnt_flags generates an
alternation of an impossible entry and nothing

  (impossible|)

This provides the effect of a null entry without having an empty vector
entry.  Unfortunately the impossible entry is not correct.

Note: how this is done needs to be changed and fixed in the next release
this is just a minimal patch to get it working for 2.8


Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2012-03-15 12:10:35 -07:00
John Johansen
36d44a3b25 Fix the mount flags set generated by the parser
When generating the flag set the parser was not generating the complete
set when flags where not consecutive.  This is because the len value
was not being reset for each flag considered, so once it was set for
a flag, then the next flag would have to be set to reset it else the
output string was still incremented by the old len value.

  Eg.
  echo "/t { mount options=rbind, }" | apparmor_parser -QT -D rule-exprs

  results in
  rule: \x07[^\000]*\x00[^\000]*\x00[^\000]*\x00\x0d  ->

  however \x0d only covers the bind and not the recursive flag

This is fixed by adding a continue to the flags generation loop for the
else case.

  resulting the dump from above generating

  rule: \x07[^\000]*\x00[^\000]*\x00[^\000]*\x00\x0d\x0f  ->

  \x0d\x0f covers both of the required flags

Also fix the flags output to allow for the allow any flags case.  This
was being screened out.  By masking the flags even when no flags where
specified.

  this results in a difference of

  echo "/t { mount, }" | apparmor_parser -QT -D rule-exprs

    rule: \x07[^\000]*\x00[^\000]*\x00[^\000]*\x00(\x01|)(\x02|)(\x03|)(\x04|)(\x05|)\x00[^\000]*

  becoming
    \x07[^\000]*\x00[^\000]*\x00[^\000]*\x00[^\000]*\x00[^\000]*

  which is simplified and covers all permissions vs. the first rule output

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2012-03-15 09:03:48 -07:00
John Johansen
fc5f4dc86f Revert commit: -r 1955 Default profiles to be chroot relative
This commit causes policy problems because we do not have chroot rules
and policy extension to support it.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2012-03-15 08:59:56 -07:00
John Johansen
59c0bb0f46 Fix minimize.sh test to screen out more parser error messages by grepping
closer to the expected -O dfa-states output
2012-03-09 06:48:03 -08:00
John Johansen
fae11e12cf Mark the minimize test as executable 2012-03-09 05:54:54 -08:00
John Johansen
e0a74881bf Bump version for 2.8-beta2 2012-03-09 04:44:37 -08:00
John Johansen
ce38857061 tag apparmor_2.8-beta2 2012-03-09 04:27:47 -08:00
John Johansen
c8e134930f Fix the "Kernel features are written to cache:" test
the cache test is failing because it assumes that kernel features are
stored in a file instead of a directory

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2012-03-09 04:25:03 -08:00
John Johansen
3876299fa0 Fix caching when used with a newer kernel with the feature directory
On newer kernels the features directory causes the creation of a
cache/.feature file that contains newline characters.  This causes the
feature comparison to fail, because get_flags_string() uses fgets
which stop reading in the feature file after the first newline.

This caches the features comparision to compare a single line of the
file against the full kernel feature directory resulting in caching
failure.

Worse this also means the cache won't get updated as the parser doesn't
change what set gets caches after the .feature file gets created.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2012-03-09 04:24:20 -08:00
John Johansen
b0b2bde160 Fix permissions attached to the bare file keyword
file,

was not given the correct permissions.  It was only being given the owner
set of permissions.  This would result in rejects when trying look at
files owned by other users

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2012-03-09 04:23:25 -08:00
John Johansen
3a1b7bb54c Fix infinite loop bug in normalization.
There are some rare occassions, when lots of alternations are used that
tree simplification can result in an expression of
  (E | (E | E)) or (E . (E . E))   where E is the epsnode

both of these expressions will lead to an inifinite loop in normalize_tree
as the epsnode test
       if ((&epsnode == t->child[dir]) &&
       	        (&epsnode != t->child[!dir]) &&
		      	         dynamic_cast<TwoChildNode *>(t)) {

and the tree node rotation test
    	} else if ((dynamic_cast<AltNode *>(t) &&
	           dynamic_cast<AltNode *>(t->child[dir])) ||
		   			   (dynamic_cast<CatNode *>(t) &&
					   			    dynamic_cast<CatNode *>(t->child[dir]))) {

end up undoing each others work, ie.

                eps flip                 rotate
  (E | (E | E)) --------> ((E | E) | E) -------> (E | (E | E))

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2012-03-09 04:22:42 -08:00
John Johansen
04ef92ca94 Fix a couple build warnings in mount.c
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2012-03-09 04:21:54 -08:00
John Johansen
d7a6860a23 Fix Make file for mount.c so that warnings are emitted during a build
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2012-03-09 04:21:06 -08:00
John Johansen
5e361a4a05 Fix dfa minimization to deal with exec conflicts
Minimization was failing because it was too agressive.  It was minimizing
as if there was only 1 accept condition.  This allowed it to remove more
states but at the cost of loosing unique permission sets, they where
being combined into single commulative perms.  This means that audit,
deny, xtrans, ... info on one path would be applied to all other paths
that it was combined with during minimization.

This means that we need to retain the unique accept states, not allowing
them to be combined into a single state.  To do this we put each unique
permission set into its own partition at the start of minimization.

The states within a partition have the  same permissions and can be combined
within the other states in the partition as the loss of unique path
information is will not result in a conflict.

This is similar to what perm hashing used to do but deny information is
still being correctly applied and carried.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2012-03-09 04:20:19 -08:00
John Johansen
cf5f7ef9c2 Fix the x intersection consistency test
The in x intersection consistency test for minimization was failing because
it was screening off the AA_MAY_EXEC permission before passing the exec
information to the consistency test fn.  This resulted in the consistency
test fn not testing the consistency because it treated the permission set
as not having x permissions.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2012-03-09 04:19:24 -08:00
John Johansen
811d8aefa3 Fix transition character reporting of dfa dumps
Make them report a hex value strings instead of the default C++
\vvvvv

Make them consistent,
- Dump to report the default transition and what isn't transitioned
  on it.


Signed-off-by: John Johansen <john.johansen@canonical.com>
2012-03-09 04:18:35 -08:00
John Johansen
37f446dd79 Fix/cleanup the permission reporting for the dfa dumps
The permission reporting was not reporting the full set of permission
flags and was inconsistent between the dump routines.

Report permissions as the quad (allow/deny/audit/quiet) in hex.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2012-03-09 04:17:47 -08:00
John Johansen
1a01b5c296 Fix/cleanup the dfa dump routines output to provide state label
Fix the transitions states output so that they output the state label
instead of the state address.  That is
  {1} -> 0x10831a0:  /
now becomes
  {1} -> {2}:  /

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2012-03-09 04:14:34 -08:00
Jamie Strandboge
b47197b881 allow read access to ~/.drirc
Bug-Ubuntu: https://launchpad.net/bugs/941506

Acked-By: Jamie Strandboge <jamie@canonical.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2012-03-02 15:09:21 -06:00
Jamie Strandboge
3e5ae57164 Description: allow read access to /usr/share/texmf/fonts
Bug-Ubuntu: https://launchpad.net/bugs/941503

Acked-By: Jamie Strandboge <jamie@canonical.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2012-03-02 15:08:03 -06:00
Jamie Strandboge
a0048ec064 ubuntu-browsers.d/java: update to fix LP: #945019 2012-03-02 13:03:04 -06:00
Jamie Strandboge
c35e10f875 fix path to java in ubuntu-browsers.d/java
Bug-Ubuntu: https://launchpad.net/bugs/943161

Acked-By: Jamie Strandboge <jamie@canonical.com>
2012-03-02 11:18:11 -06:00
Jamie Strandboge
46d9aae952 include /etc/drirc in the X abstraction
Bug-Ubuntu: https://launchpad.net/bugs/918879

Acked-By: Jamie Strandboge <jamie@canonical.com>
Signed-off-by: Kees Cook <kees@ubuntu.com>
2012-02-28 12:50:20 -06:00
John Johansen
bd67bb909a tag apparmor 2.8 beta1 release as 2.7.99 2012-02-24 04:38:24 -08:00
John Johansen
c454964e5b Update current mount tests to reflect how they should behave with mount rules
Signed-off-by: John Johansen <john.johansen@canonical.com>
2012-02-24 04:29:08 -08:00
John Johansen
e61b7b9241 Update the copyright dates for the apparmor_parser
Signed-off-by: John Johansen <john.johansen@canonical.com>
2012-02-24 04:21:59 -08:00
John Johansen
954dc6f694 Fix hexdigit conversion in the pcre parser
The pcre parser in the dfa backend is not correctly converting escaped
hex string like 
  \0x0d

This is the minimal patch to fix, and we should investigate just using
the C/C++ conversion routines here.

I also I nominated for the 2.7 series.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Seth Arnold <seth.arnold@gmail.com>
2012-02-24 04:20:46 -08:00
John Johansen
c9e31b7fbd Add mount rules
Add the ability to control mounting and unmounting

The basic form of the rules are.

  [audit] [deny] mount [conds]* [device] [ -> [conds] path],
  [audit] [deny] remount [conds]* [path],
  [audit] [deny] umount [conds]* [path],
  [audit] [deny] pivotroot [oldroot=<value>] <path> -> <profile>

  remount is just a short cut for mount options=remount

  where [conds] can be
    fstype=<expr>
    options=<expr>


  conds follow the extended conditional syntax of allowing either:

  * a single value after the equals, which has the same character range as
    regular IDS (ie most anything but it can't be terminated with a , (comma)
    and if spaces or other characters are needed it can be quoted

    eg.
       options=foo
       options = foo
       options="foo bar"

  * a list of values after the equals, the list of values is enclosed within
    parenthesis () and its has a slightly reduced character set but again
    elements can be quoted.

    the separation between elements is whitespace and commas.

    eg.
      options=(foo bar)
      options=(foo, bar)
      options=(foo , bar)
      options=(foo,bar)


The rules are flexible and follow a similar pattern as network, capability,
etc.

  mount,	# allow all mounts, but not umount or pivotroot

  mount fstype=procfs,  # allow mounting procfs anywhere

  mount options=(bind, ro) /foo -> /bar,  # readonly bind mount

  mount /dev/sda -> /mnt,

  mount /dev/sd** -> /mnt/**,

  mount fstype=overlayfs options=(rw,upperdir=/tmp/upper/,lowerdir=/) overlay -> /mnt/

  umount,

  umount /m*,


Currently variables and regexs are are supported on the device and mount
point. ie.
  mount <devince> -> <mount point>,

Regexes are supported in fstype and options.  The options have a further
caveat that regexs only work if the option is fs specific option.

  eg. options=(upperdir=/tmp/*,lowerdir=/)

regex's will not currently work against the standard options like ro, rw
nosuid


Conditionals (fstype) can only be applied to the device (source) at this
time and will be disregarded in situations where the mount is manipulating
an existing mount (bind, remount).

Options can be specified multiple times
  mount option=rw option=(nosuid,upperdir=/foo),

and will be combined together into a single set of values

The ordering of the standard mount options (rw,ro, ...) does not matter
but the ordering of fs specific options does.

Specifying that the value of a particular option does not matter can be
acheived by providing both the positive and negative forms of and option
  option=(rw,ro) options=(suid,nosuid)

For the fs specific options specifying that a particular value does not
matter is achieve using a regex with alternations.

Improvements to the syntax and order restrictions are planned for the
future.

Signed-off-by: John Johansen <john.johansen@canonical.com>
2012-02-24 04:19:38 -08:00
John Johansen
df46234c55 Generate the features list from the features directory
Newer versions of AppArmor use a features directory instead of a file
update the parser to use this to determine features and match string

This is just a first pass at this to get things up quickly.  A much
more comprehensive rework that can parse and use the full information
set is needed.

Signed-off-by: John Johansen <john.johansen@canonical.com>
2012-02-24 04:18:45 -08:00
John Johansen
662ad60cd7 Extend the information dumped by -D rule-exprs to include permissions
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Kees Cook <kees@ubuntu.com>
2012-02-24 04:17:19 -08:00
John Johansen
a5640ec89c Default profiles to be chroot relative
Due to changes in path looks and the work going forward default profiles
to resolve relative to the chroot instead of the namespace.

This will only affect profiles that are used on tasks within a chroot.
For now it will be possible to get the old default namespace relative
behavior by passing the namespace_relative flag to the profile

eg.
  profile /example (namespace_relative) { .. }

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Kees Cook <kees@ubuntu.com>
2012-02-24 04:14:00 -08:00
John Johansen
93cd01d7e6 Add const to yyerror parameter to get rid of compile warning
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Kees Cook <kees@ubuntu.com>
2012-02-16 08:17:41 -08:00
John Johansen
ca9b813aea Add missing ifdefs in parser.h
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Kees Cook <kees@ubuntu.com>
2012-02-16 08:16:18 -08:00
John Johansen
cbe3f33daf Add Basic infrastructure support for the policydb
policydb is the new matching format, that combines the matching portions
of different rules into a single dfa/hfa.  This patch only lays some ground
work it does not add encoding of any rules into the policydb

Signed-off-by: John Johansen <john.johansen@canonical.com>
2012-02-16 08:14:46 -08:00
John Johansen
b8f36df713 Make value_list generic so it can be reused.
value_list can be reused by conditionals and list values, so pull it out
and abstract it some more.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Kees Cook <kees@ubuntu.com>
2012-02-16 08:07:28 -08:00
John Johansen
e087db57b2 Allow the 'file' keyword to be optionally used on file rules.
Add the optional 'file' keyword to the language/grammer.  The main reason
for doing this is to support false token injection.  Which is needed
to move towards the parser being broken out into an api that can be
used to parse individual rule types, separate from parsing the whole file.

Since we are adding the token to the grammar expose it to userspace with
the 'file' keyword.  While not needed it helps bring consistency, as all
the other rule types start with a keyword (capability, network, rlimit, ...).

Also allow the bare keyword to be used to represent allowing all file
operations, just as with network and capability.  Domain transitions are
defaulted to ix.  Thus

  file,

is equivalent to

  /** rwlkmix,

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Kees Cook <kees@ubuntu.com>
2012-02-16 08:06:04 -08:00
John Johansen
dd7427d1eb Remove setting of capabilities from the syntax
The ability to set capabilities from a profile has been removed from the
kernel for several releases.  Remove it from the parser as well.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Kees Cook <kees@ubuntu.com>
2012-02-16 08:04:04 -08:00
John Johansen
4a4ec1c54a Make expressing all capabilities easier
Allow the capability rule to be bare to represent all capabilities similar
to how network, and other rule types work.

  capability,

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Kees Cook <kees@ubuntu.com>
2012-02-16 08:01:47 -08:00
John Johansen
18c87e98bf Enable the parser to pass the next token to be returned to the lexer
Currently the parser can not directly influence the lexer output.  This
limits the grammar and also how the parser can be invoked.  Allow the
parser to pass the next TOKEN that the lexer will return.

This is has two uses:  It allows us to trick the bison parser into having
multiple start symbols, allowing us to say invoke the parser on an
individual network or file rule.  It also allows the semantic analysis of
the parser to change the language recognized.  This can be leveraged to
overcome some of the limitation of bison's LALR parse generator.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Kees Cook <kees@ubuntu.com>
2012-02-16 07:59:23 -08:00
John Johansen
8a3edd677c Require matched mode strings to terminate
mode strings overlap with other potential commands, or strings, and as
currently written can be match as a leading substring of an ID.  Eliminate
the leading substring case by requiring that for a mode string to be
recognized it must be terminated by whitespace, eol, eof, or
comma (end of rule).

The other cases where modes string overlap are ambiguous and the ID should
be quoted to remove the ambiguity.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Kees Cook <kees@ubuntu.com>
2012-02-16 07:56:53 -08:00
John Johansen
def8c20168 Instead of using a special flags= token and keyword use TOK_CONDID
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Kees Cook <kees@ubuntu.com>
2012-02-16 07:53:04 -08:00
John Johansen
613997fd7e Add generic support extended conditional syntax
extended conditionals use a syntax of
    cond=value
    cond=(value1 value2)
    cond=(value1,value2)
  where the comma is optional and supported as such because the
  flags syntax used them

  The mount patch extends, and improves on this patch, the changes probably
  should have been separated out but ...

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Kees Cook <kees@ubuntu.com>
2012-02-16 07:51:33 -08:00
John Johansen
eabeb4f7b3 Convert FLAGS_MODE start condition to a generic list of values start cond
Signed-off-by: John Johansen <john.johansen@canonical.com>
jj@ortho:~/apparmor/aa-test/parser$ guilt header
Convert FLAGS_MODE start condition to a generic list of values start cond

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Kees Cook <kees@ubuntu.com>
2012-02-16 07:49:12 -08:00
John Johansen
ac6c7dd37f Rework the definition of ID and POST_VAR_ID to use a define for the charset
ID and POST_VAR_ID define a set of characters that is reused, pull this
out to avoid making mistakes when updating the character set.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Kees Cook <kees@ubuntu.com>
2012-02-16 07:46:43 -08:00
John Johansen
e7c550243c Make second minimization pass optional
The removal of deny information is a one way operation, that can result
in a smaller dfa, but also results in a dfa that should not be used in
future operations because the deny rules from the precomputed dfa would
not get applied.

For now default filtering out of deny information to off, as it takes
extra time and seldom results in further state reduction.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Kees Cook <kees@ubuntu.com>
2012-02-16 07:43:02 -08:00
John Johansen
6f95ff5637 Track full permission set through all stages of DFA construction.
Previously permission information was thrown away early and permissions
where packed to their CHFA form at the start of DFA construction.  Because
of this permissions hashing to setup the initial DFA partitions was
required as x transition conflicts, etc. could not be resolved.

Move the mapping of permissions to CHFA construction, and track the full
permission set through DFA construction.  This allows removal of the
perm_hashing hack, which prevented a full minimization from happening
in some DFAs.  It also could result in x conflicts not being correctly
detected, and deny rules not being fully applied in some situations.

Eg.
 pre full minimization
   Created dfa: states 33451
   Minimized dfa: final partitions 17033

 with full minimization
   Created dfa: states 33451
   Minimized dfa: final partitions 9550
   Dfa minimization no states removed: partitions 9550

The tracking of deny rules through to the completed DFA construction creates
a new class of states.  That is states that are marked as being accepting
(carry permission information) but infact are non-accepting as they
only carry deny information.  We add a second minimization pass where such
states have their permission information cleared and are thus moved into the
non-accepting partion.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Kees Cook <kees@ubuntu.com>
2012-02-16 07:41:40 -08:00
John Johansen
82a20d9bb8 Track deny and quiet perms during DFA construction
Delay the packing of audit and quiet permissions until chfa construction,
and track deny and quiet perms during DFA construction, so that we will
be able to do full minimization.  Also delay the packing of audit and

Signed-off-by: John Johansen <john.johansen@canonical.com>
2012-02-16 07:40:21 -08:00
Steve Beattie
fb55e9cddc Two patches in one:
From: Kees Cook <kees@ubuntu.com>
This is a trivial manpage fix that makes pod2man stop yelling at me.
Acked-By: Steve Beattie <sbeattie@ubuntu.com>

From: Steve Beattie <sbeattie@ubuntu.com>
This patch adds --stderr to pod2man to make it report errors, as well as
fixes a few other minor text issues I noticed.
Acked-by: Kees Cook <kees@ubuntu.com>
2012-02-15 16:34:03 -08:00
Christian Boltz
4d406621ee update apparmor.vim to support "capability," (which allows all
capabilities). The rule will be marked in the "dangerous capability"
color.

Additionally, the patch removes the (already commented out) code for 
"set capability".

Acked-by: Kees Cook <kees@ubuntu.com>
2012-02-15 23:44:39 +01:00
Christian Boltz
e074def743 Add the missing k permission for /etc/.pwd.lock to the userdel profile.
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2012-02-13 10:50:37 +01:00
Jamie Strandboge
13e959f8c0 Author: Jamie Strandboge <jamie@canonical.com>
Description: glibc's __get_nprocs() now checks /sys/devices/system/cpu/online
 in addition to /proc/stat for the number of processors. This is used in the
 _SC_NPROCESSORS_ONLN implementation, a part of sysconf. This was introduced in
 upstream glibc commit:
 84e2a551a7
Bug-Ubuntu: https://launchpad.net/bugs/929531

Acked-By: Jamie Strandboge <jamie@canonical.com>
Acked-By: Christian Boltz <apparmor@cboltz.de>
2012-02-09 21:06:24 -06:00
Jamie Strandboge
5151168071 abstractions/ubuntu-helpers: use Pixr instead of Pix in case we have an
interpreted file
2012-01-24 09:00:32 -06:00
Christian Boltz
77f37e84eb Update abstractios for KDE4
(At least) openSUSE uses ~/.kde4 to store KDE4 settings.
This patch changes ~/.kde/ to ~/.kde{,4} in all abstractions.

The patch is mostly from Velery Valery, I only fixed a merge conflict 
and added the kmail{,2} part in private-files-strict.

References: https://bugzilla.novell.com/show_bug.cgi?id=741592

Acked-By: Steve Beattie <sbeattie@ubuntu.com> for both trunk and 2.7.
2012-01-19 15:20:28 +01:00
Jamie Strandboge
8e3b75c40a update p11-kit to allow mmap of libraries in pkcs directories
Acked-by: Jamie Strandboge <jamie@canonical.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2012-01-18 16:22:08 -06:00
Jamie Strandboge
4037c3ae65 Adjust dnsmasq profile for read access to /{,var/}run/nm-dns-dnsmasq.conf
which is needed by NetworkManager integration in Ubuntu. (LP: #917628)

Acked-by: Jamie Strandboge <jamie@canonical.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2012-01-18 16:20:43 -06:00
Steve Beattie
c817e01774 Bug: https://bugs.launchpad.net/bugs/917859
A bug in Ubuntu reported that the aspell abstraction does
not allow write access to the user customizable dictionaries, the
personal dictionary (~/.aspell.$LANG.pws) and the personal replacement
dictionary (~/.aspell.$LANG.prepl). It also adjusts the abstraction
to add the owner modifier to the personal dictionaries.

Signed-off-by: Steve Beattie <sbeattie@ubuntu.com>
Acked-by: John Johansen <john.johansen@canonical.com>

Bug: https://launchpad.net/bugs/917859
2012-01-18 10:15:57 -08:00
Jamie Strandboge
8d1e8c9c2e ubuntu-browsers.d/plugins-common: include the ubuntu-helpers profile here as
it is needed by pretty much all of the browser abstractions. aa-update-browser
unconditionally adds the plugins-common abstraction, so this should be
sufficient.
2012-01-17 08:22:11 -06:00
Jamie Strandboge
b0ad1303ac update ubuntu-integration abstraction for multiarch with gst-plugin-scanner
(LP: #917641)

Acked-by: Jamie Strandboge <jamie@canonical.com>
2012-01-17 08:00:56 -06:00
Jamie Strandboge
e4e173233c update ubuntu-browsers.d/text-editors to work with emacs2[2-9] 2012-01-17 07:10:33 -06:00
Jamie Strandboge
dd1756ba9e profiles/apparmor.d/abstractions/ubuntu-helpers: add inet6 too 2012-01-13 11:19:55 +01:00
Steve Beattie
cec0d50cfd Regression testsuite: remove a bit more code that's no longer needed
in prologue.inc.

Signed-off-by: Steve Beattie <sbeattie@ubuntu.com>
Acked-by: John Johansen <john.johansen@canonical.com>
2012-01-12 12:37:24 +01:00
Steve Beattie
1ef2d7e757 Regression testsuite: the coredump checkcorefile() function did not
properly quote the _known variable (set when the tests are marked as
expected failures) when the expectation was that the testcase would
produce a corefile. This would result in a failed testcase reporting
XFAIL incorrectly.

Signed-off-by: Steve Beattie <sbeattie@ubuntu.com>
Acked-by: John Johansen <john.johansen@canonical.com>
2012-01-12 12:32:32 +01:00
Steve Beattie
03976a038e Regression testsuite: remove unneeded parsing of permissions on the
suffix of an image= flag, as it's no longer needed. It also eliminates
code that emitted the permissions based on the result of the parse.

Signed-off-by: Steve Beattie <sbeattie@ubuntu.com>
Acked-by: John Johansen@canonical.com
2012-01-12 12:31:25 +01:00
Steve Beattie
83a3de91f8 Regression testsuite: add a flag to mkprofile.pl to not automatically
add 'rix' permissions on executable images (but still auto-generate
ldd dependencies), for use when specifying alternate permissions
on executables.

Where appropriate, it also converts a few testcases to make use of
the option.

Signed-off-by: Steve Beattie <sbeattie@ubuntu.com>
Acked-by: John Johansen <john.johansen@canonical.com>
2012-01-12 12:29:10 +01:00
Steve Beattie
e7cc3e2094 Regression testsuite: add the ability to add multiple binaries to a
generated profile and have the ldd auto-generation of rules occur on
it. It also kills all testcase usage of $dynlibs, which had stopped
being generated by prologue.inc in a prior patch.

Signed-off-by: Steve Beattie <sbeattie@ubuntu.com>
Acked-by: John Johansen <john.johansen@canonical.com>
2012-01-12 12:23:51 +01:00
Steve Beattie
4fa434a3d0 Regression testsuite: move the ldd analysis of binaries to the
mkprofile.pl helper and take the convoluted code out of the bash
prologue.inc. It also detects if the binary is a script and performs
ldd analysis on the interpreter.

Signed-off-by: Steve Beattie <sbeattie@ubuntu.com>
Acked-by: John Johansen <john.johansen@canonical.com>
2012-01-12 12:20:22 +01:00
Steve Beattie
44ca1c0f11 Regression testsuite: rename the emit_ functions to gen_ which reflects
their purpose a little more accurately; renames the dump_flags to
emit_flags for the same reason, and also adds a modicum a function
prototype information to the function declarations.

Signed-off-by: Steve Beattie <sbeattie@ubuntu.com>
Acked-by: John Johansen <john.johansen@canonical.com>
2012-01-12 11:49:32 +01:00
Steve Beattie
a0fbc1f26c Regression testsuite: move the generation of the rules that grant
write access to /proc/*/attr/current to mkprofile.pl from prologue.inc.

Signed-Off-By: Steve Beattie <sbeattie@ubuntu.com>
Acked-by: John Johansen <john.johansen@canonical.com>
2012-01-12 11:39:57 +01:00
John Johansen
62a7934ea6 Disable caching when a namespace is specified
Profile loads when specifying namespaces currently conflict with caching.
If the profile (ignoring the specified namespace) is in the cache, then
the cached profile will be loaded, replacing the profile in the current
namespace instead of loading the profile to the new namespace.

Fix this by disabling caching when a namespace is specified, forcing the
profile to be compiled.

NOTE: this will not affect profiles loaded from within a namespace using
      either the same or a separate directory as the base to load a namespac
      from.  This only affects loading profiles directly into a child
      namespace.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Kees Cook <kees@ubuntu.com>
2012-01-11 17:26:51 +01:00
John Johansen
5fdf33c689 Add an option to allow setting the cache's location.
Currently the cache location is fixed and links are needed to move it.
Add an option that can be set in the apparmor_parser.conf file so distros
can locate the cache where ever makes sense for them.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Kees Cook <kees@ubuntu.com>
2012-01-11 17:25:18 +01:00
John Johansen
7031a91aec Disable revalidation/revocation tests
The behavior for revalidation/revocation of open files has changed
with the current kernel code, resulting in these tests being reported
as failing even though they are showing expected behavior.

Under the current kernel module this form of revalidation/revocation
can not be tested reliably, so just changing the expected result is
not enough, completely disable the tests for now.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2012-01-11 16:50:34 +01:00
Jamie Strandboge
39a3f5b08d Add profiles/apparmor.d/abstractions/ubuntu-helpers:
Lenient profile that is intended to be used when 'Ux' is desired but
does not provide enough environment sanitizing. This effectively is an
open profile that blacklists certain known dangerous files and also
does not allow any capabilities. For example, it will not allow 'm' on files
owned be the user invoking the program. While this provides some additional
protection, please use with care as applications running under this profile
are effectively running without any AppArmor protection. Use this profile
only if the process absolutely must be run (effectively) unconfined.

Limitations:
1. This does not work for root owned processes, because of the way we use
   owner matching in the sanitized helper. We could do a better job with
   this to support root, but it would make the policy harder to understand
   and going unconfined as root is not desirable anyway.

2. For this sanitized_helper to work, the program running in the sanitized
   environment must open symlinks directly in order for AppArmor to mediate
   it. This is confirmed to work with:
    - compiled code which can load shared libraries
    - python imports
   It is known not to work with:
    - perl includes

3. Going forward it might be useful to try sanitizing ruby and java

Use at your own risk. This profile was developed as an interim workaround for
LP: #851986 until AppArmor implements proper environment filtering.

Acked-by: Jamie Strandboge <jamie@canonical.com>



Adjust ubuntu abstractions to use sanitized_helper instead of (P)Ux.

Acked-by: Jamie Strandboge <jamie@canonical.com>



Update launchpad-integration to use a sanitized helper in a similar manner
as that in ubuntu-helpers.

Acked-by: Jamie Strandboge <jamie@canonical.com>
2012-01-11 15:20:42 +01:00
Jamie Strandboge
7eee94290b add xdg-desktop abstraction to gnome and kde. Acked via discussions 2012-01-11 14:17:32 +01:00
Jamie Strandboge
45e7265c82 Create an xdg-desktop abstraction based on the upstream documentation for
creating owner writes on things like ~/.cache and ~/.config

Acked-by: Jamie Strandboge <jamie@canonical.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2012-01-11 13:00:34 +01:00
Jamie Strandboge
3c2684b674 merge from trunk 2012-01-11 09:48:22 +01:00
Jamie Strandboge
b1a8e7cf44 fix up comments in launchpad-integration 2012-01-11 09:27:22 +01:00
Jamie Strandboge
7887d5906d don't #include ubuntu-helpers in the abstractions. This can only be included
once in policy, otherwise you will get an error regarding multiple definitions
for sanitized_helper
2012-01-11 09:00:35 +01:00
Jamie Strandboge
b0ef4d2b6a add note to ubuntu-helpers regarding needing to only include it once 2012-01-11 08:50:47 +01:00
Jamie Strandboge
c626e62da6 fix missing '}' in ubuntu-helpers 2012-01-11 08:48:07 +01:00
Jamie Strandboge
b93c49974c update ubuntu-browsers to also Cx the firefox.sh in /usr/lib 2012-01-11 00:59:38 +01:00
Jamie Strandboge
d045d609be update launchpad-integration to use a sanitized helper 2012-01-10 20:54:57 +01:00
Jamie Strandboge
333cd41d33 update ubuntu abstractions to use the sanitized helper 2012-01-10 20:54:38 +01:00
Jamie Strandboge
2526933747 ubuntu-helpers: account for lib32 and lib64 2012-01-10 19:57:58 +01:00
Christian Boltz
a33c5822a9 when using smbldap-useradd using this smb.conf entry
add machine script = /usr/sbin/smbldap-useradd -t 5 -w "%u"
smbd obviously needs x permissions for smbldap-useradd.

The commit also adds a new profile for usr.sbin.smbldap-useradd (based on 
the audit.log from Alexis Pellicier).

Additionally, I moved the "/etc/samba/* rwk" rule next to the other 
/etc-related rules in the smbd profile.

References: https://bugzilla.novell.com/show_bug.cgi?id=738041
2012-01-10 19:06:24 +01:00
Jamie Strandboge
d6c4f56da8 add profiles/apparmor.d/abstractions/ubuntu-helpers:
Lenient profile that is intended to be used when 'Ux' is desired but
does not provide enough environment sanitizing. This effectively is an
open profile that blacklists certain known dangerous files and also
does not allow any capabilities. For example, it will not allow 'm' on files
owned be the user invoking the program. While this provides some additional
protection, please use with care as applications running under this profile
are effectively running without any AppArmor protection. Use this profile
only if the process absolutely must be run (effectively) unconfined.

Limitations:
1. This does not work for root owned processes, because of the way we use
   owner matching in the sanitized helper. We could do a better job with
   this to support root, but it would make the policy harder to understand
   and going unconfined as root is not desirable any way.

2. For this sanitized_helper to work, the program running in the sanitized
   environment must open symlinks directly in order for AppArmor to mediate
   it. This is confirmed to work with:
    - compiled code which can load shared libraries
    - python imports
   It is known not to work with:
    - perl includes

3. Going forward it might be useful to try sanitizing ruby and java

Use at your own risk. This profile was developed as an interim workaround for
LP: #851986 until AppArmor implements proper environment filtering.
2012-01-10 18:36:14 +01:00
Steve Beattie
25f800ac7d Fix from Felix Geyer: block write access to ~/.kde/env because KDE
automatically sources scripts in that folder on startup.

Bug: https://launchpad.net/bugs/914190
2012-01-10 11:54:12 +01:00
Steve Beattie
ad0f942bb5 Fix from Felix Geyer: in the enchant abstraction, allow the creation of
enchant .config directory.

Bug: https://launchpad.net/bugs/914184
2012-01-10 11:37:54 +01:00
Steve Beattie
1ff5a08f60 utils/Immunix/AppArmor.pm: fixes the profile autogeneration code to
include read access to the script itself for interpreted scripts.
2012-01-09 17:42:55 +01:00
Steve Beattie
8a223ce3d5 utils/Immunix/AppArmor.pm: update the initial profile generation
for python and ruby scripts to include the respective abstractions.
2012-01-09 17:39:31 +01:00
Christian Boltz
2f85e0b7d2 according to Peter Czanik, the openSUSE syslog-ng maintainer, syslog-ng
needs capability dac_read_search.

References: https://bugzilla.novell.com/show_bug.cgi?id=731876

ACKed-by: Steve Beattie <steve@nxnw.org>
2012-01-09 13:28:25 +01:00
Jamie Strandboge
6d55882b4a add p11-kit abstraction (LP: #912754, LP: #912752)
From the README in the toplevel source:
"[P11-KIT] Provides a way to load and enumerate PKCS#11 modules. Provides a
standard configuration setup for installing PKCS#11 modules in such a way that
they're discoverable."

File locatations are described in [1]. There is a global configuration file in
/etc/pkcs11/pkcs11.conf. Per module configuration happens in
/etc/pkcs11/<module name>. There is also user configuration in ~/.pkcs11, but
IMO this should not be allowed in the abstraction. Example configuration can be
seen in the upstream documentation[2].

This will likely need to be refined as more applications use p11-kit.

[1]http://p11-glue.freedesktop.org/doc/p11-kit/config-locations.html
[2]http://p11-glue.freedesktop.org/doc/p11-kit/config-example.html

Acked-by: Jamie Strandboge <jamie@canonical.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>


Also add p11-kit to authentication abstraction

Acked-by: Jamie Strandboge <jamie@canonical.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2012-01-06 17:01:39 -06:00
Jamie Strandboge
c5ccbb50d2 add p11-kit to authentication abstraction
Acked-by: Jamie Strandboge <jamie@canonical.com>
2012-01-06 11:46:52 -06:00
Jamie Strandboge
572bab7e84 add p11-kit abstraction (LP: #912754, LP: #912752)
From the README in the toplevel source:
"[P11-KIT] Provides a way to load and enumerate PKCS#11 modules. Provides a
standard configuration setup for installing PKCS#11 modules in such a way that
they're discoverable."

File locatations are described in [1]. There is a global configuration file in
/etc/pkcs11/pkcs11.conf. Per module configuration happens in
/etc/pkcs11/<module name>. There is also user configuration in ~/.pkcs11, but
IMO this should not be allowed in the abstraction. Example configuration can be
seen in the upstream documentation[2].

This will likely need to be refined as more applications use p11-kit.

[1]http://p11-glue.freedesktop.org/doc/p11-kit/config-locations.html
[2]http://p11-glue.freedesktop.org/doc/p11-kit/config-example.html

Acked-by: Jamie Strandboge <jamie@canonical.com>
2012-01-06 11:45:44 -06:00
John Johansen
f561b8cdfe Make hfa::match not need to walk a string twice
Currently hfa::match calls hfa::match_len to do matching.  However this
requires walking the input string twice.  Instead provide a match routine
for input that is supposed to terminate at a given input character.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2012-01-06 09:04:36 -08:00
John Johansen
3ff8b4d19a Add basic string matching to the hfa
Add the ability to match strings directly from the hfa instead of needing
to build a cfha.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2012-01-06 09:03:20 -08:00
Jamie Strandboge
47280bb483 Description: allow read of @{HOME}/.cups/client.conf and
@{HOME}/.cups/lpoptions
Bug-Ubuntu: https://launchpad.net/bugs/887992

Added owner match per Steve Beattie and lpoptions per Steve and Christian Boltz
2012-01-06 10:45:34 -06:00
Jamie Strandboge
2b4e235ffd Description: allow read access of /etc/python{2,3}.[0-7]*/sitecustomize.py
in python abstraction. This script is used by apport aware python applications
Bug-Ubuntu: https://launchpad.net/bugs/860856

Acked-by: Jamie Strandboge <jamie@canonical.com>
Acked-by: Kees Cook <kees@ubuntu.com>
2012-01-06 10:38:06 -06:00
Jamie Strandboge
27dacf2eca Description: update dovecot deliver profile to access various .conf files for
dovecot
Bug-Ubuntu: https://launchpad.net/bugs/458922

Acked-by: Jamie Strandboge <jamie@canonical.com>
Acked-by: Kees Cook <kees@ubuntu.com>
2012-01-06 10:34:44 -06:00
Jamie Strandboge
15e4f8a05f Description: updates for usr.bin.sshd example profile to work with zsh4, dash
and systems where /var/run moved to /run. Also allows read of
 /etc/default/locale.
Bug-Ubuntu: https://launchpad.net/bugs/817956

Acked-by: Jamie Strandboge <jamie@canonical.com>
Acked-by: Kees Cook <kees@ubuntu.com>
2012-01-06 10:33:10 -06:00
Jamie Strandboge
0cb4e48344 Description: Disallow writing and linking to @{HOME}/.pki/nssdb/ .so files
Bug-Ubuntu: https://launchpad.net/bugs/911847

Acked-by: Jamie Strandboge <jamie@canonical.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2012-01-06 10:29:32 -06:00
John Johansen
f29c0cc377 Remove asprintf warning and fix invalid test
asprintf is marked with warn_unused_result and its return value should
not be ignored, even casting to (void) will not remove this warning.

The current code ignored the result and used the value of newfmt to
make a decision.  This is however not correct in that according to the
asprintf man page newfmt is undefined if asprintf returns an error.

Fix the warning and error by using the return value of asprintf

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2012-01-06 07:09:12 -08:00
Christian Boltz
960d19b6cb according to Lars Müller (a samba developer) smbd needs access to some
more files in /usr/lib*/samba/ in some cases.

References: https://bugzilla.novell.com/show_bug.cgi?id=725967#c5

Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2012-01-05 23:47:03 +01:00
Christian Boltz
4b34c77a39 Split off various permissions from the httpd2-prefork profile to
abstractions/apache2-common. Additionally, add read permissions
for /**/.htaccess and /dev/urandom to apache2-common.

The patch is based on a profile abstraction from darix. I made some 
things more strict (compared to darix' profile), and OTOH added some 
things that are needed on my servers.

*** BACKWARDS-INCOMPATIBLE CHANGES ***

^HANDLING_UNTRUSTED_INPUT
- don't allow /.htaccess (.htaccess files in subdirectories are still allowed)
- don't allow *.htaccess files (the old /**.htaccess rule was too generous)
2012-01-05 23:28:17 +01:00
Jamie Strandboge
61b614543c add audacity to the ubuntu-media-players abstraction (LP: #899963) 2012-01-04 11:45:43 -06:00
Jamie Strandboge
30c8dfe12c allow software-center in the ubuntu-integration abstraction for
apt: URLs (LP: #662906)
2012-01-04 09:36:21 -06:00
Jamie Strandboge
3d42221ba8 allow fireclam plugin to work in Ubuntu multimedia abstraction
(LP: #562831)
2012-01-03 17:50:00 -06:00
Jamie Strandboge
bd56500d03 Author: James Troup
Description: fix typo when adding multiarch lines for gconv
Bug-Ubuntu: https://launchpad.net/bugs/904548

Acked-by: Jamie Strandboge <jamie@canonical.com>
2012-01-03 17:27:26 -06:00
Jamie Strandboge
401363854a Author: Felix Geyer
Description: allow avahi to do dbus introspection
Bug-Ubuntu: https://launchpad.net/bugs/769148

Acked-by: Jamie Strandboge <jamie@canonical.com>
2012-01-03 17:26:00 -06:00
Jamie Strandboge
a6d274dcb0 Author: Felix Geyer
Description: abstractions/fonts should allow access to ~/.fonts.conf.d
Bug-Ubuntu: https://launchpad.net/bugs/870992

Acked-by: Jamie Strandboge <jamie@canonical.com>
2012-01-03 17:25:10 -06:00
Jamie Strandboge
9d20afa95c Nvidia users need access to /dev/nvidia* files for various plugins
to work right. Since these are all focused around multimedia, add the
accesses to ubuntu-browsers.d/multimedia
2012-01-03 17:24:04 -06:00
Jamie Strandboge
32362d2f79 allow access to Thunar as well as thunar in ubuntu-integration abstraction
(LP: #890894)
2012-01-03 17:23:23 -06:00
Jamie Strandboge
3a201bf72b allow ixr access to exo-open in Ubuntu integration abstraction
(LP: #890894)
2012-01-03 17:22:27 -06:00
Jamie Strandboge
d15fcb69ab update binaries for for transmission in ubuntu-bittorrent-clients
(LP: #852062)
2012-01-03 17:21:40 -06:00
Jamie Strandboge
c1850f9855 add kate to Ubuntu text editors browser abstraction
fix for LP: #884748
2012-01-03 17:20:54 -06:00
Christian Boltz
b9bbcdc45c Create /etc/apparmor.d/tunables/multiarch.d directory in profiles/Makefile
(otherwise it's created as a file, which is wrong)

Acked-by: John Johansen <john.johansen@canonical.com>
2012-01-03 23:41:07 +01:00
John Johansen
ff98d79963 Rework how the lexer identifies hat names following a ^
Reworking this code is a step to getting rid of the SUB_NAME2 start
condition.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Kees Cook <kees@ubuntu.com>
2012-01-02 16:49:31 -08:00
John Johansen
6ef6f605b0 Update parsing of the 'hat' and 'profile' keyword to use SUB_NAME
Change how we handle the parsing of the hat and profile keywords this allows
us to get rid of the SUB_NAME2 start condition because the the whitespace
that is allowed by these rules are now consumed by matching the keyword

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Kees Cook <kees@ubuntu.com>
2012-01-02 16:48:53 -08:00
John Johansen
7f9c79e345 Add new processid fn that handles both quoted and unquoted ids
There is a lot of duplication of code calling processqunquoted and
processquoted.  Move all this code to use the new processid fn.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Kees Cook <kees@ubuntu.com>
2012-01-02 16:48:44 -08:00
John Johansen
37e2975d4d Simple rename to reflect the ( ) are not always used by flags (in the future)
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Kees Cook <kees@ubuntu.com>
2012-01-02 16:48:34 -08:00
John Johansen
49142c74a5 Update the flex scanner to use a stack for its start conditions
This is the first step in reducing the number of shared rules between the
different start conditions.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Kees Cook <kees@ubuntu.com>
2012-01-02 16:48:24 -08:00
John Johansen
98f196506a Remove extaneous BEGIN(INITIAL) from comment rule.
The affected comment rule is already in the INITIAL start condition
so BEGIN(INITIAL) is extraneous and will cause problems when switching
to a stack of start conditions.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Kees Cook <kees@ubuntu.com>
2012-01-02 16:48:14 -08:00
John Johansen
c52f417406 Move rlimit start condition and rules up to be with other start conditions.
The rlimit start condition was separating different rules of the base
set making the lexer grammer harder to read than necessary.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Kees Cook <kees@ubuntu.com>
2012-01-02 16:47:32 -08:00
Christian Boltz
ec68828a30 Fix a syntax error in abstractions/python introduced in r1854.
According to https://launchpad.net/bugs/840734 pyconfig.h should have r 
permissions.

Acked-by: John Johansen <john.johansen@canonical.com>
2012-01-03 00:51:12 +01:00
John Johansen
c259deb5b2 Fix apparmor_parser when removing a profile from an alternate namespace
The module interface calls for names with namespaces to be in the format of

  :namespace:profile or :namespace://profile

but the parser was generating
  namespace:profile

causing profile lookup to fail, or removal of the wrong profile as it was
done against the current namespace, instead of the specified namespace

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Kees Cook <kees@ubuntu.com>
2012-01-02 15:35:21 -08:00
John Johansen
f0f520eeff Update the documented error codes for aa_change_profile() and aa_change_onexe()
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Kees Cook <kees@ubuntu.com>
2012-01-02 15:34:23 -08:00
John Johansen
a9697cec28 Fix apparmor_parser when removing a profile from an alternate namespace
The module interface calls for names with namespaces to be in the format of

  :namespace:profile or :namespace://profile

but the parser was generating
  namespace:profile

causing profile lookup to fail, or removal of the wrong profile as it was
done against the current namespace, instead of the specified namespace
    
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Kees Cook <kees@ubuntu.com>
2012-01-02 15:32:36 -08:00
Christian Boltz
9e6a13fa78 smbd needs read access to /etc/netgroup.
References: https://bugzilla.novell.com/show_bug.cgi?id=738041
2011-12-29 17:34:01 +01:00
Jamie Strandboge
95015dae9f Merge from Simon Deziel for TFTP read-only access for dnsmasq. Fixes
LP: #905412

Acked-by: Jamie Strandboge <jamie@canonical.com>
2011-12-21 12:45:59 -06:00
Simon Deziel
cba77b26a5 dnsmasq's TFTP server provides read-only access. 2011-12-17 12:20:53 -05:00
Simon Deziel
0069bf82a6 Allow dnsmasq's profile to read and write to /var/tftp (configurable) 2011-12-16 12:15:12 -05:00
John Johansen
9e9a7ff572 update version number to indicate we are in a dev version, using the
proposed .99 versioning to fix the version problem we had with using
alpha, beta, etc. because apt and rpm have different version comparisons
2011-12-15 10:08:13 -08:00
John Johansen
18821b079b To reduce memory overhead of dfa creation convert to using a Node Vector
instead of a NodeSet.

We need to store sets of Nodes, to compute the dfa but the C++ set is
not the most efficient way to do this as, it has a has a lot of overhead
just to store a single pointer.

Instead we can use an array of tightly packed pointers + a some header
information.  We can do this because once the Set is finalized it will
not change, we just need to be able to reference and compare to it.

We don't use C++ Vectors as they have more overhead than a plain array
and we don't need their additional functionality.

We only replace the use of hashedNodeSets for non-accepting states as
these sets are only used in the dfa construction, and dominate the memory
usage.  The accepting states still may need to be modified during
minimization and there are only a small number of entries (20-30), so
it does not make sense to convert them.

Also introduce a NodeVec cache that serves the same purpose as the NodeSet
cache that was introduced earlier.

This is not abstracted this out as nicely as might be desired but avoiding
the use of a custom iterator and directly iterating on the Node array
allows for a small performance gain, on larger sets.

This patch reduces the amount of heap memory used by dfa creation by about
4x - overhead.  So for small dfas the savings is only 2-3x but on larger
dfas the savings become more and more pronounced.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Kees Cook <kees@ubuntu.com>
2011-12-15 05:16:03 -08:00
John Johansen
2674a8b708 Split the nodeset used in computing the dfa into two sets, accepting and
non-accepting, and have the proto-state use them.

To reduce memory overhead each set gains its own "cache" that make sure
there is only a single instance of each NodeSet generated.  And since
we have a cache abstraction, move relavent stats into it.

Also refactor code slightly to make caches and work_queue etc, DFA member
variables instead of passing them as parameters.

The split + caching results in a small reduction in memory use as the
cost of ProtoState + Caching is less than the redundancy that is eliminated.
However this results in a small decrease in performance.

Sorry I know this really should have been split into multiple patches
but the patch evolved and I got lazy and decided to just not bother
splitting it.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Kees Cook <kees@ubuntu.com>
2011-12-15 05:14:37 -08:00
John Johansen
8bc30c8851 Replace usage of NodeSet with ProtoState in dfa creation.
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Kees Cook <kees@ubuntu.com>
2011-12-15 05:12:30 -08:00
John Johansen
bd10235397 Add a new class hashedNodeSet.
It is the functional equivalent of ProtoState.  We do this to provide a
new level of abstraction that ProtoState can leverage, when the node types
are split.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Kees Cook <kees@ubuntu.com>
2011-12-15 05:11:09 -08:00
John Johansen
35b7ee91eb Now that we have a proper class we don't need a functor to do comparisons,
we can fold it into the classes operator<.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Kees Cook <kees@ubuntu.com>
2011-12-15 05:09:47 -08:00
John Johansen
d452f53576 Begin preparing to split accept nodes and non-accept nodes.
Create a new ProtoState class that will encapsulate the split, but for
this patch it will just contain what was done previously with NodeSet

Signed-off-by: John Johansen <john.johansen@canonical.com>
2011-12-15 05:08:31 -08:00
John Johansen
9d374d4726 Rename compressed_hfa.{c,h} and TransitionTable within them to chfa. This
is done to be clear what TransitionTable is, as we will then add matching
capabilities.  Renaming the files is just to make them consistent with
the class in the file.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Kees Cook <kees@ubuntu.com>
2011-12-15 05:06:32 -08:00
John Johansen
4beee46c52 Make sure that state always has otherwise set
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Kees Cook <kees@ubuntu.com>
2011-12-15 05:01:35 -08:00
John Johansen
319cd6c038 Now that State Cases have been renamed, rename NodeCases back to Cases.
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Kees Cook <kees@ubuntu.com>
2011-12-15 04:59:55 -08:00
John Johansen
bd66fba55f This helps make the meaning of things a little clearer and provides a clear
distinction betwen NodeCases, and State transitions

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Kees Cook <kees@ubuntu.com>
2011-12-15 04:58:33 -08:00
John Johansen
3c11c66ff2 AppArmor 2.7 tag 2011-12-15 04:39:29 -08:00
John Johansen
c52cf4d537 AppArmor 2.7 2011-12-15 04:20:50 -08:00
Steve Beattie
1e8dc4f375 This fixes the libapparmor log parsing library to properly parse log
entries where the comm entry has been hex-encoded. This occurs when the
binary being confined contains a space or other problematic character in
its filename. A test case is included.
2011-11-30 11:07:48 -08:00
Steve Beattie
7988124de5 Add a testcase for libapparmor for encoded profiles to ensure that
https://bugs.launchpad.net/apparmor/+bug/897957/ is in the utils and not
the parsing library itself.
2011-11-30 09:53:04 -08:00
Steve Beattie
f0aa65c832 abstractions/python: for some reason, the python runtimes need access
to pyconfig.h

Bug: https://launchpad.net/bugs/840734
2011-11-30 08:56:45 -08:00
Christian Boltz
1c96c09ec9 /usr/sbin/traceroute6 is a symlink to /usr/sbin/traceroute.
This patch allows "network inet6 raw" in addition to the ipv4 rule.

References: https://bugzilla.novell.com/show_bug.cgi?id=733312

Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2011-11-30 13:15:21 +01:00
Christian Boltz
9685aae967 rpmlint complains about an outdated FSF address in parser/COPYING.GPL.
This commit upgrades the COPYING.GPL file to the latest version from
http://www.gnu.org/licenses/gpl-2.0.txt - which means some small text 
and whitespace changes and of course the correct address.

Acked-by: John Johansen <john.johansen@canonical.com>
2011-11-27 13:52:06 +01:00
John Johansen
c7a6608777 bzr tag apparmor_2.7.0-rc2 2011-11-10 09:59:36 -08:00
John Johansen
bca67d3d27 apparmor-2.7~rc2 2011-11-10 09:51:18 -08:00
John Johansen
9c39909a9c Author: Michael (kensington)
When executing apparmor_status from rc functions and utils are not installed, this message is received:

AppArmor is enabled,
Install the apparmor-utils package to receive more detailed
status information here (or examine directly).

Signed-off-by: John Johansen <john.johansen@canonical.com>
2011-11-10 09:43:10 -08:00
John Johansen
f278505db2 Author: Michael (kensington)
parser/Makefile has a number of issues.

* Some warnings are produced: "make[1]: warning: jobserver unavailable: using -j1. Add `+' to parent make rule."
* CXX is not always respected
* LDFLAGS are not always respected

modified to apply and retain $(Q) by John Johansen

Signed-off-by: John Johansen <john.johansen@canoncial.com>
2011-11-10 09:36:52 -08:00
John Johansen
e91cc118df Author: Michael (kensington)
When running installing apparmor-utils from Makefile, some warnings are
generated: make[1]: warning: jobserver unavailable: using -j1. Add
 `+' to parent make rule.

Use $(MAKE) instead of make

Signed-off-by: John Johansen <john.johansen@canonical.com>
2011-11-10 09:27:29 -08:00
John Johansen
e1763ba13c Auther: Michael (kensington)
libapparmor python bindings fail to build with python-3.

Signed-off-by: John Johansen <john.johansen@canonical.com>
2011-11-10 09:22:09 -08:00
Seth Arnold
cad0c3c8a9 Include mknod in file operations aa-logprof / aa-genprof processing 2011-11-08 19:06:49 -08:00
Christian Boltz
49103b30f2 Make abstractions/winbind work on 64bit systems (valid.dat etc. are in
/usr/lib64/samba/ in openSUSE 64bit installations)

Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2011-11-01 18:35:29 +01:00
Christian Boltz
df47a59ecb Allow loading the libraries used for Samba "vfs objects = ..."
References: https://bugzilla.novell.com/show_bug.cgi?id=725967

Signed-off-by: Christian Boltz <apparmor@cboltz.de>

Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2011-11-01 18:28:49 +01:00
Christian Boltz
091ec763f9 split off abstractions/ldapclient from abstractions/nameservice
Original openSUSE changelog entry:

Thu Jan  6 16:23:19 UTC 2011 - rhafer@suse.de

- Splitted ldap related things from nameservice into separate
  profile and added some missing paths (bnc#662761)
2011-11-01 17:08:37 +01:00
Christian Boltz
33b7c5316f create the directory /etc/apparmor.d/disable which is required by aa-disable
Acked-by: John Johansen <john.johansen@canonical.com>
2011-10-20 00:23:19 +02:00
Christian Boltz
986093cf8d More helpful error message for "aa-notify -p" if a user is not member of
the group configured in notify.conf / use_group=...

Acked-by: John Johansen <john.johansen@canonical.com>
2011-10-20 00:20:02 +02:00
John Johansen
33c62acc5c Update version to 2.7~rc1 2011-10-12 16:45:45 -07:00
Christian Boltz
8b671f013a add the option --display to set the $DISPLAY environment variable in aa-notify.
If $DISPLAY is not set and --display is not used, aa-notify prints a 
warning that notifications won't be shown (exact warning text depends if 
using sudo or not).

Acked-by: John Johansen <john.johansen@canonical.com>
2011-10-12 13:08:25 +02:00
Christian Boltz
5789ab84a6 allow read access for /proc/*/mounts in the dovecot profile
Reported by Tim Edwards in the opensuse-factory	mailinglist.


Acked-by: John Johansen <john.johansen@canonical.com>
2011-10-12 13:05:00 +02:00
Christian Boltz
6d6e04dc12 fix a syntax error in remove_profiles() in rc.apparmor.functions by
adding a forgotten pipe.

Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2011-10-12 00:45:11 +02:00
John Johansen
7a7c99f3a1 Commit the example parser.conf file that was supposed to be part of
commit r1834

Signed-off-by: John Johansen <john.johansen@canonical.com>
2011-10-09 20:15:03 -07:00
John Johansen
9896f5edbd Add an example parser.conf file
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Kees Cook <kees@ubuntu.com>
2011-10-07 14:43:54 -07:00
John Johansen
12a98135bf Provide a more user friendly error message when cache is
requested and fails to be created.  Also don't make the
warning output conditional on the showcache flag as we
should be showing warning/errors by default.

Signed-off-by: John Johansen <john.johansen@canonical.com>
2011-10-07 14:42:55 -07:00
Jamie Strandboge
a30dfb6b19 utils/aa-notify:
- set HOME (and DISPLAY) only once on startup to avoid NSS lookups

Acked-by: Jamie Strandboge <jamie@canonical.com>
Acked-by: John Johansen <john.johansen@canonical.com>
Acked-by: Christian Boltz <opensuse@cboltz.de>
2011-09-30 18:00:52 -05:00
Christian Boltz
a4d4eddd92 while aa-eventd is deprecated and no longer installed, parser/Makefile
happily continued to install the initscript for aa-eventd.

This was reported by Jiri Srain as part of 
https://bugzilla.novell.com/show_bug.cgi?id=720617

This commit removes the lines that install the aaeventd initscript
from parser/Makefile.

Acked-by: John Johansen <john.johansen@canonical.com>
2011-10-01 00:23:39 +02:00
Christian Boltz
b393893c7a sudo resets the environment variable $HOME and removes $DISPLAY on
openSUSE, which results in non-working desktop notifications in aa-notify
because $notify_exe is unable to connect to DBUS to display the message.

This patch sets the correct value for $HOME.

The code for setting $DISPLAY is still under discussion, therefore only
a TODO note is included in this commit for $DISPLAY.

Acked-By: John Johansen <john.johansen@canonical.com>
2011-09-24 13:19:10 +02:00
John Johansen
572fb7e943 AppArmor_2.7-beta2
Signed-off-by: John Johansen@canonical.com
2011-09-15 13:55:48 -07:00
John Johansen
7173d7a6a5 Remove extra space insert at from of ${TAG_VERSION} when doing the ~ to -
substitution.

Signed-off-by: John Johansen <john.johansen@canonical.com>
2011-09-15 13:28:01 -07:00
John Johansen
7b577d72b5 Remove ~ based tags again
Signed-off-by: John Johansen <john.johansen@canonical.com>
2011-09-15 12:50:10 -07:00
Christian Boltz
5a140c2e5c while debugging the issue in rc.apparmor.suse (see patch for
rc.apparmor.suse), I noticed that "rcapparmor restart" is
totally silent.

The attached patch prints a message in __apparmor_restart().

It also replaces the hardcoded "return 0" with $?. I'm quite sure this
won't catch all errors, but it's still better than the hardcoded success
message.

Acked-by: John Johansen <john.johansen@canonical.com>
2011-09-15 21:23:25 +02:00
Christian Boltz
e922cdb113 sbin.syslog-ng profile:
- fix permissions for additional-log-sockets.conf (the comma in {var/,} 
  was at the wrong place, which broke the /var/run/ case)
- add read permissions for /sys/devices/system/cpu/online
  (that was even new for Peter, but I trust him not to post faked 
  audit.log lines ;-)

Acked-by: John Johansen <john.johansen@canonical.com>
2011-09-15 21:21:57 +02:00
Christian Boltz
189da8236c the last patch to the usr.sbin.dnsmasq profile (r1758) contained a wrong
filename.

References: https://bugzilla.novell.com/show_bug.cgi?id=678749#c11

Acked-by: John Johansen <john.johansen@canonical.com>
2011-09-15 20:58:54 +02:00
Christian Boltz
2c62d802b6 It looks like rc.apparmor.functions renamed "aa_log_action_begin()" to
"aa_log_action_start()" (probably for 2.6), but the rc.apparmor.suse 
initscript was not updated.

This patch fixes the function name in the rc.apparmor.suse initscript.

References: https://bugzilla.novell.com/show_bug.cgi?id=717707

Acked-by: John Johansen <john.johansen@canonical.com>
2011-09-15 20:20:23 +02:00
Christian Boltz
23df761b70 Make the VENDOR_PERL directoy autodetected in utils/Makefile instead of
hardcoding it.

Acked-by: Kees Cook <kees@ubuntu.com>
2011-09-15 20:17:58 +02:00
Christian Boltz
6a80641ee2 perl modules don't need execute permissions.
This patch installs the perl modules with mode 644 instead of 755.

Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2011-09-13 20:58:24 +02:00
Christian Boltz
02e1e94ab9 add a missing "make install" call to README in the libapparmor section.
Acked-by: John Johansen <john.johansen@canonical.com>
2011-09-12 22:30:17 +02:00
Jamie Strandboge
f28b91b8cf add gwenview to abstractions/ubuntu-browsers.d/multimedia. This is the
default image viewer in Kubuntu (LP: #840973)
2011-09-07 15:00:45 -05:00
Jamie Strandboge
6849615de6 adjust ubuntu-email abstraction for thunderbird rapid release process 2011-09-02 13:21:06 -05:00
John Johansen
743f84099d Allow passing of DEBUG from make into the compile
Fix the build so
    
  make DEBUG=1
    
results in a compile with DEBUG turned on.
    
Also fix build errors in the compile with DEBUG is defined
    
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Kees Cook <kees.cook@canonical.com>
2011-09-01 11:57:54 -07:00
John Johansen
a041b1738c Remove apparmor_2.6.0~rc1 and apparmor_2.6.0~rc1 tags so git can sync
yet again!

Signed-off-by: John Johansen <john.johansen@canonical.com>
2011-08-31 16:15:44 -07:00
John Johansen
1056ef8418 Add missing documentation updates for aa_is_confined and aa_get_con.
This documentation should have been checked in as part of the patches
that added aa_is_confined and aa_get_con.

Signed-off-by: John Johansen <john.johansen@canonical.com>
2011-08-31 16:07:55 -07:00
John Johansen
ac77e10a0f Fix missing pid_t dependency in apparmor.h
The define for pid_t is missing in apparmor.h so that if it is included
in programs that don't also include sys/types.h the compile will break.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Kees Cook <kees.cook@canonical.com>
2011-08-31 16:01:54 -07:00
John Johansen
eae6f0525c Add missing introspection regression test that should have been checked in
with the introspection patches.

Signed-off-by: John Johansen <john.johansen@canonical.com>
2011-08-31 15:58:27 -07:00
John Johansen
341b7e61da Add compatibility patches for linux kernel 3.1 2011-08-27 12:56:53 -07:00
John Johansen
eb6d2224bd Updated kernel compatibilty patches for linux 3.0 2011-08-27 12:25:22 -07:00
Christian Boltz
bb1b5f986b Add permissions needed for Active Directory authentification to Samba
profiles.

References: https://bugzilla.novell.com/show_bug.cgi?id=713728

Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2011-08-27 20:50:42 +02:00
Steve Beattie
1c1cc65cbd Update useradd and userdel profiles to use wutmp abstraction. 2011-08-26 18:58:31 -07:00
Steve Beattie
5dedd16bf5 Cleanup no longer necessary wutmp permission now that it's covered by
the wutmp abstraction.
2011-08-26 18:51:03 -07:00
Christian Boltz
66d51b575d From: Jeff Mahoney <jeffm@suse.com>
Subject: apparmor-profiles: Add samba config files
References: bnc#679182 bnc#666450

Signed-off-by: Jeff Mahoney <jeffm@suse.com>

- updated to match trunk
- added changed path to nmbd profile (/var/cache/samba has moved to 
  /var/lib/samba on (at least) openSUSE 11.4), bnc#679182#c8
  For backward compability, it also allows /var/spool/samba.
- Note: The smbd profile already contains both locations.
by Christian Boltz <apparmor@cboltz.de>

updated according to the comments from Steve Beattie
by Christian Boltz <apparmor@cboltz.de>

Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2011-08-27 01:52:27 +02:00
Christian Boltz
f26df713c0 Dovecot profile update:
- allow /var/spool/mail, not only the /var/mail symlink
- allow @{HOME}/Mail/
- allow capability fsetid, read access to /etc/lsb-release and 
  SuSE-release and k for /var/{lib,run}/dovecot in usr.bin.dovecot

References:
- dovecot: Added support for /var/spool/mail (bnc#691072)
- Updated dovecot profile (bnc#681267).

Patch taken from openSUSE:11.4:Update:Test, file apparmor-profiles-dovecot
updated to match trunk by Christian Boltz <apparmor@cboltz.de>

Change compared to the patch posted to the ML:
- link rule instead of adding l permissions for /var/lib/dovecot and 
  /var/run/dovecot (as proposed by John Johansen)

Acked-By: John Johansen <john.johansen@canonical.com> on IRC
2011-08-27 01:12:10 +02:00
Steve Beattie
b8f486dee9 Attached is a patch to make the initscript not fail if /tmp is full
by converting the comm(1) usage on temporary files to an embedded
awk script. On both Ubuntu and OpenSUSE, a version of awk (mawk in
Ubuntu, gawk in OpenSUSE) is either a direct or indirect dependency
on the minimal or base package set, and the original reporter also
mentioned that an awk-based solution would be palatable in a way that
converting to bash, or using perl or python here would not be.

In the embedded awk script, I've tried to avoid gawk or mawk specific
behaviors or extensions; e.g. this is the reason for the call to sort
on the output of the awk script, rather than using gawk's asort(). But
please let me know if you see anything that shouldn't be portable
across awk implementations.

An additional issue that is fixed in both scripts is handling child
profiles (e.g. hats) during reload. If child profiles are filtered
out (via grep -v '//') of the list to consider, then on reloading
a profile where a child profile has been removed or renamed, that
child profile will continue to stick around. However, if the profile
containing child profiles is removed entirely, if the initscript
attempts to unload the child profiles after the parent is removed,
this will fail because they were unloaded when the parent was unloaded.
Thus I removed any filtering of child profiles out, but do a post-awk
reverse sort which guarantees that any child profiles will be removed
before their parent is. I also added the LC_COLLATE=C (based on the
Ubuntu version) to the sort call to ensure a consistent sort order.

To restate, the problem with the existing code is that it creates
temporary files in $TMPDIR (by default /tmp) and if that partition
is full, problems with the reload action ensue. Alternate solutions
include switching the initscript to use bash and its <$() extension
or setting TMPDIR to /dev/shm/. The former is unpalatable to some
(particularly for an initscript), and for the latter, /dev/shm is
only guaranteed to exist on GNU libc based systems (glibc apparently
expects /dev/shm to exist for its POSIX shared memory implementation;
see shm_overview(7)).  So to me, awk (sans GNU extensions) looks to
be the least bad option here.

Bug: https://launchpad.net/bugs/775785
2011-08-26 15:55:43 -07:00
Christian Boltz
ac7e66684c Add various capabilities to smbd that are needed for the way powerpoint
handles files. See bnc#705319 for details.

References: https://bugzilla.novell.com/show_bug.cgi?id=705319

Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2011-08-26 23:19:30 +02:00
Steve Beattie
be3d2bc1a4 Update traceroute profile to include installed path on Ubuntu/Debian. 2011-08-25 15:36:30 -07:00
Christian Boltz
8f28eebe5a Add capability setuid and setgid to nscd profile. Needed by unscd
to switch to a non-root user. unscd is installed as /usr/sbin/nscd
at least at openSUSE.

Original changelog entry from unscd package:
Mon Sep  7 17:30:36 CEST 2009 - pbaudis[at]suse.cz
- Provide the /etc/apparmor.d/usr.sbin.nscd file and make it allow
  for change to the nobody user [bnc#535467]

Currently the nscd package from glibc and the unscd package both contain
a usr.sbin.nscd profile which needs to maintained/updated manually.
With this patch, the profile could be moved back to the
apparmor-profiles package.


Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2011-08-24 00:57:42 +02:00
Christian Boltz
d17a87bd28 bnc#685674 - The "-I" flag of traceroute is blocked by apparmor
* Do Apr 07 2011 jeffm@suse.de
- Add raw network access to traceroute profile (bnc#685674).

Acked-By: Steve Beattie <steve@nxnw.org>
2011-08-23 02:10:14 +02:00
Christian Boltz
59eb0af705 nscd: allow mkdir for /var/run/nscd/
References: https://bugzilla.novell.com/show_bug.cgi?id=647718

Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2011-08-23 01:22:41 +02:00
Christian Boltz
7d5840d449 apparmor.vim:
- allow "deny [filename] x" rules
- add support for "make clean"

Acked-by: John Johansen <john.johansen@canonical.com>
2011-08-21 23:49:25 +02:00
John Johansen
fb7f0ddaaa Remove tags
apparmor_2.6.0~rc1
  apparmor_2.6.1~rc1

that have crept in yet again!!!
2011-08-19 16:57:30 -07:00
John Johansen
4bdc7ea51a From: Jeff Mahoney <jeffm@suse.com>
Subject: apparmor-utils: Add support for creds and path operations
References: bnc#564316

 2.6.29 introduced the path security_operations and credentials

 This patch adds support for those operations to the log parser.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>

Resolved merge conflict and removal operation already supported by
the log parser.
Acked-by: John Johansen <john.johansen@canonical.com>
2011-08-18 16:29:48 -07:00
Kees Cook
3ac9f7e676 Due to the Ubuntu multiarch project, internal paths to things keep
changing. Since we arguably shouldn't be hardcoding this kind of
thing, this changes a path around to use the C preprocessor to do the
work of finding the kernel definitions.

Signed-off-by: Kees Cook <kees.cook@canonical.com>
Acked-by: John Johansen <john.johansen@canonical.com>
2011-08-18 18:26:02 -05:00
Kees Cook
843ef93202 As /var/log/messages has been phased out, start preferring syslog
instead.

Needed at least on upgraded Ubuntu machines that went from messages to
syslog recently. If this causes problems, we can easily revert it.

Signed-off-by: Kees Cook <kees.cook@canonical.com>
Acked-by: John Johansen <john.johansen@canonical.com>
2011-08-18 18:17:22 -05:00
Kees Cook
00726ed51a The printk ratelimit needs to be disabled when running genprof via
syslog, otherwise audit events will get dropped.

This runs the risk of having the kernel log wrap around, but that
is a less common case that what this solves. This is a work-around
that will go away when complain info takes a different path in the
future.
2011-08-18 18:15:41 -05:00
Christian Boltz
0cbad5b99b Allow pux and PUx permissions in apparmor.vim
I intentionally don't allow pUx and Pux since the behaviour of those is 
very unexpected (the first letter decides if the environment is cleaned 
up or not - at least that's the result of the discussion in April) and 
the average user won't know this.

Acked-by: John Johansen <john.johansen@canonical.com>
2011-08-19 00:28:10 +02:00
Christian Boltz
d180252c52 This commit adds "capability syslog" to the syslogd and syslog-ng
profiles.

It also adds a comment to the klogd profile that capability sys_admin is 
only needed for backward compatibility with older kernels.

Acked-by: John Johansen <john.johansen@canonical.com>
2011-08-19 00:27:03 +02:00
Christian Boltz
ca5cd28d48 add syslog capability to apparmor.vim
Acked-by: John Johansen <john.johansen@canonical.com>
2011-08-19 00:24:48 +02:00
Christian Boltz
12e0d064cd openSUSE patch klog-needs-CAP_SYSLOG
This patch adds the syslog capability to parser/parser_misc.c
and to the sbin.klogd profile.
2011-08-18 23:54:24 +02:00
Steve Beattie
386a5abc7d logprof and genprof were creating Px and Cx execute permissions with
the modifiers as lowercase (meaning to pass on sensitive environment
variables to the exec'ed process) even if the user told them not to
when prompted. This patch fixes the issue.
2011-08-17 16:26:41 -07:00
Jamie Strandboge
084233a207 utils/aa-notify:
aa-notify would abort if it could not stat the logfile, as can happen
when using auditd and the directory perms for the logfile do not allow access
(x). Add raise_privileges() and drop_privileges() helper functions and adjust
get_logfile_size() and get_logfile_inode() to raise then drop privileges if the
logfile parent directory is not executable. Also adjust reopen_logfile() to use
these helpers.

When error checking in these helpers, use '$> == ...' instead of '$> = ... or
die...' since perl always dies when raising privs in this manner even though
the euid did change (and $!, $@, $^E, and $? are all the same). Not sure why
this is happening but the '==' check should be sufficient.
2011-08-17 13:47:52 -05:00
Jamie Strandboge
94e665b3fa utils/aa-notify:
aa-notify would abort if it could not stat the logfile, as can happen
when using auditd and the directory perms for the logfile do not allow access
(x). Add raise_privileges() and drop_privileges() helper functions and adjust
get_logfile_size() and get_logfile_inode() to raise then drop privileges if the
logfile parent directory is not executable. Also adjust reopen_logfile() to use
these helpers.

When error checking, use '$> == ...' instead of '$> = ... or die...' since perl
always dies when raising privs in this manner even though the euid did change
(and $!, $@, $^E, and $? are all the same). Not sure why this is happening but
the '==' check should be sufficient.
2011-08-17 09:48:12 -05:00
Jamie Strandboge
0a5c4fa159 utils/aa-notify:
- drop supplemental group privileges too. While POSIX::setgid() works nice in
  that it will set both the real uid and euid, it doesn't do anything with the
  supplemental groups (sigh). Instead, assign to $( and $) in a manner that
  clears the supplemental groups.
2011-08-17 08:35:52 -05:00
Jamie Strandboge
9fddd7a716 utils/aa-notify.pod: update to clarify '-u' argument when using '-p' 2011-08-17 07:49:00 -05:00
Steve Beattie
92473dfc46 This patch adds multiarch support for the X DRI paths.
Bug: https://launchpad.net/bugs/826914
2011-08-16 22:47:34 -07:00
Steve Beattie
8ee0292d8e This patch fixes up a conflicting execute permission that was added
in merging in the opensuse fixes to the dhclient profile. It does so
by merging them, using the profile for dhclient-script if it exists
and inheriting dhclient's profile if it does not.
2011-08-16 16:35:57 -07:00
Christian Boltz
174105b9fa From: Jeff Mahoney <jeffm@suse.com>
Subject: apparmor-utils: Fix handling of files in /
References: bnc#397883

 The separate handling of files and directories with realpath is broken.

 For files e.g. /foo, $dir ends up being empty since the / is eaten by
 the regex. realpath resolves an empty argument as the current directory,
 resulting in an incorrect path.

 There's no explanation of why the separate handling was used in the
 first place.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>

Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2011-08-17 00:06:07 +02:00
Christian Boltz
7f45708c86 Merge k permission for /var/log/lastlog into abstractions/wutmp
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2011-08-16 12:26:44 +02:00
Christian Boltz
015229d551 From: Jeff Mahoney <jeffm@suse.com>
Subject: Fix for sshd profile
References: bnc#457072

 Without this patch, sshd won't work in enforce mode.

 libselinux accesses /proc/filesystems to determine if it's enabled
 bash won't execute
 audit_control is probably from libselinux too

Updated by Christian Boltz <apparmor@cboltz.de>:
- add /proc/*/oom_adj and oom_score_adj rw
- add /var/log/btmp r
- add /var/log/lastlog k
- removed capability sys_ptrace - doesn't seem to be needed
- changed all login shells to rUx, not only bash
- removed /proc/filesystems (already part of abstractions/base)

Acked-By: John Johansen <john.johansen@canonical.com>
with the following note:
 ACK because I don't see a choice right now but for the 3.0 release
 (next year) I'll ask you to retest and add newer audit controls.
2011-08-13 22:43:33 +02:00
Christian Boltz
267e9610c7 openSUSE patch to remove the "-f" parameter from startproc in rc.aaeventd.suse /
start_aa_event().

Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2011-08-13 14:22:35 +02:00
Christian Boltz
32797f5780 openSUSE patch to add systemd support to rc.apparmor.functions
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2011-08-13 14:15:58 +02:00
Christian Boltz
ce85512673 openSUSE patch with some changes in the initscripts.
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2011-08-13 14:13:49 +02:00
Christian Boltz
5f630f2c5d From: Jeff Mahoney <jeffm@suse.com>
Subject: apparmor-utils: Add check_for_apparmor helper.

 This should be an alias but those get complicated quickly in perl.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2011-08-13 14:11:20 +02:00
Christian Boltz
4fc9106d37 From: Jeff Mahoney <jeffm@suse.com>
Subject: apparmor-utils: setprofileflags() drops leading whitespace
References: bnc#480795

 setprofileflags() drops leading whitespace for subprofiles. writeheader()
 properly indents subprofiles 2 spaces per nesting level but when
 genprof sets the profile to enforce mode at completion, the whitespace
 is removed.

 This patch adds the whitespace globbing to the regexp and uses it to
 prefix the sub-profile with the correct spacing.

 Reported at: https://bugzilla.novell.com/show_bug.cgi?id=480795

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2011-08-13 14:09:53 +02:00
Christian Boltz
614c051a71 moved rules for /var/lib/libvirt/dnsmasq/ in dnsmasq profile to one place
Pre-Acked by Steve Beattie <sbeattie@ubuntu.com>
2011-08-12 22:14:00 +02:00
Kees Cook
94f06d23c0 add missing libraries/libapparmor/doc/aa_find_mountpoint.pod from https://lists.ubuntu.com/archives/apparmor/2011-July/001280.html 2011-08-10 22:52:05 -07:00
Kees Cook
a8e0b0d0a3 add missed libraries/libapparmor/doc/aa_getcon.pod from https://lists.ubuntu.com/archives/apparmor/2011-July/001282.html 2011-08-10 22:49:16 -07:00
John Johansen
0f3263f710 Gah really make it beta1 instead of RC1 2011-08-10 15:56:17 -07:00
John Johansen
2a81cadd27 Update version to 2.7-beta1. No new feature except maybe pending
feature freeze exception for dbus mediation.
2011-08-10 15:54:51 -07:00
John Johansen
f69822107f Update apparmor's handling of rlimits for cpu limit and more natural units
Allow for rlimit cpu to specified which is now supported by the kernel.

Previously the rlimit units where limited to K, M, G and would fail when
KB, MB, GB where used.  Allow for both, also allow for units on lengths
of time, by specifying "seconds", "minutes", "hours".. or any unique subset
eg. "s", "sec", "m", "min", "h", "hour" ..

NOTE:
This patch does not extend rlimits to be able to handle setting of tasks
that are confined by other profiles.

 Signed-off-by: John Johansen <john.johansen@canonical.com>
2011-08-10 15:53:39 -07:00
John Johansen
4dec6cab65 Add the ability for the parser to have a basic conf file, that defaults
to /etc/apparmor/parser.conf (NOTE option to allow changing this is not
provided currently).

Signed-off-by: John Johansen <john.johansen@canonical.com>
2011-08-09 06:52:43 -07:00
John Johansen
0287ce0c9d Function to test if apparmor support is enabled.
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Kees Cook <kees.cook@canonical.com>
2011-08-09 06:48:56 -07:00
John Johansen
aae597bfde Library function to find the apparmorfs filesystem mount point
Signed-off-by: John Johansen <john.johansen@canonical.com>
2011-08-09 06:48:17 -07:00
John Johansen
8347fb69c2 Library interface for tasks introspecting confinement.
Signed-off-by: John Johansen <john.johansen@canonical.com>
2011-08-09 06:47:40 -07:00
John Johansen
685632db0c Add the ability to read proc attr interfaces
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Kees Cook <kees.cook@canonical.com>
2011-08-09 06:45:51 -07:00
Christian Boltz
5169b4556a Replace the last occurrence of /var/run with /{,var/}run/
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2011-08-09 12:20:50 +02:00
Steve Beattie
3f099da257 .bzrignore: ignore the generated testfiles in the parser testsuite, all
25000+ of them. I swore we used to have this already.
2011-08-09 01:17:42 -07:00
Steve Beattie
d4c4cbe62b It's possible that git doesn't like to create empty directories, so
create the generated_* directories themselves if they don't exist before
running the script to generate them.

Also modify the default invocation of prove to add -f, which reports the
details of failing test cases.
2011-08-09 01:10:19 -07:00
Steve Beattie
c66975ffc5 Make parser's 'tests' target depend on the apparmor_parser binary having
been generated first; otherwise, 'make clean tests' fails.
2011-08-09 00:54:14 -07:00
Christian Boltz
c35ac067b2 My last commit (r1759) accidently did not include
/{,var/}run/cups/ rw,
Adding it now.
2011-08-09 00:42:38 +02:00
Christian Boltz
851a8c8b3a Various cupsd profile fixes/additions
Changed /var/run/cups/** rw, to
  /{,var/}run/cups/ rw,
  /{,var/}run/cups/** rw,
as requested by Steve Beattie

With this change:
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2011-08-08 23:18:54 +02:00
Christian Boltz
d081f7cb85 From: Jeff Mahoney <jeffm@suse.com>
Subject: dnsmasq: Profile fixes
References: bnc#666090 bnc#678749

Signed-off-by: Jeff Mahoney <jeffm@suse.com>

Updated to match master by
Christian Boltz <apparmor@cboltz.de>

Updated for systemd (/{,var/},run/ instead of /var/run/) by
Christian Boltz <apparmor@cboltz.de> as requested by Steve Beattie

With this change:
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
(final confirmation on IRC in #apparmor)
2011-08-08 23:13:15 +02:00
Christian Boltz
2c5534ca18 syslog-ng profile fixes/additions
updated to match master by
Christian Boltz <apparmor@cboltz.de>

updated to work with systemd (/{,var/}run/ instead of /var/run)
Christian Boltz <apparmor@cboltz.de> as requested by Steve Beattie

With this change:
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2011-08-08 22:59:28 +02:00
Christian Boltz
08fb58e10d From: Jeff Mahoney <jeffm@suse.com>
Subject: profiles: update dhclient
References: bnc#561152

Signed-off-by: Jeff Mahoney <jeffm@suse.com>

Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2011-08-08 22:54:23 +02:00
Christian Boltz
13c3e40044 From: Jeff Mahoney <jeffm@suse.com>
Subject: dhcpd: Fix apparmor profile
References: bnc#692428

 This patch adds the network rules needed, corrects the path to dhcpd.leases,
 and adds the path for TSIG DNS keys.

Reported-by: Andrew Beames <suseforum@roocomputing.co.uk>
Signed-off-by: Jeff Mahoney <jeffm@suse.com>

updated to match trunk by
Christian Boltz <apparmor@cboltz.de>

updated to use
    /var/lib/dhcp/{db/,}dhcpd.leases*    rwl,
(instead of just /var/lib/dhcp/db/dhcpd.leases* rwl) to keep the profile
Ubuntu-compatible as requested by Steve Beattie.

With this change:
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2011-08-08 22:29:45 +02:00
Christian Boltz
b5e525b251 From: Jeff Mahoney <jeffm@suse.com>
Subject: profiles: Add openssl abstraction
References: bnc#623886

 Profiles that use openssl have been adding the openssl files piecemeal.

 This patch creates a new openssl abstraction that can be inherited by
 all profiles that use it.


Signed-off-by: Jeff Mahoney <jeffm@suse.com>

Patch for 
- profiles/apparmor.d/abstractions/ssl_certs 
- profiles/apparmor/profiles/extras/usr.sbin.httpd2-prefork (second chunk)
updated by Christian Boltz <apparmor@cboltz.de>
(didn't apply to trunk)

Acked-By: Steve Beattie <sbeattie@ubuntu.com>

Copyright header in profiles/apparmor.d/abstractions/openssl added by
Christian Boltz <apparmor@cboltz.de>
2011-08-08 22:22:03 +02:00
Christian Boltz
663698c7a6 From: Jeff Mahoney <jeffm@suse.com>
Subject: profile: ntpd -N needs sys_nice
References: bnc#657054

 ntpd -N allows the administrator to increase or decrease priority of the
 ntp server. Since the profile doesn't allow it, the operation is denied.

 This patch adds support for that operation.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2011-08-08 22:16:06 +02:00
Christian Boltz
957f1ae00f Fix syntax error (introduced in r1751) 2011-08-06 01:35:37 +02:00
Steve Beattie
763855fe9e From: Christian Boltz <apparmor@cboltz.de>
Based on https://bugzilla.novell.com/show_bug.cgi?id=643387

Update man profile and abstraction.
2011-08-05 13:12:35 -07:00
Steve Beattie
e6880f9584 Bug: https://bugs.launchpad.net/bugs/794974
Add openal config support to abstractions/audio.

Bug: https://launchpad.net/bugs/794974
2011-08-04 16:52:45 -07:00
Steve Beattie
786f592d7e From: Arkadiusz Miskiewicz <arekm@maven.pl>
Actually skip loading profiles that we report we're skipping.
2011-08-04 16:20:26 -07:00
Jamie Strandboge
38d83c3c76 fix LP: #815883 2011-07-27 09:30:18 -05:00
Jamie Strandboge
7897ba2293 fix LP: #815883
- update dnsmasq profile for new libvirt lease file path
2011-07-25 08:28:04 -05:00
John Johansen
a43931e987 Update the man page for change_hat/change_profile
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Kees Cook <kees.cook@canonical.com>
2011-07-22 05:20:06 -07:00
John Johansen
2fec4eb2b4 Make setprocattr more abstract so it will work for any pid
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Kees Cook <kees.cook@canonical.com>
2011-07-21 11:10:35 -07:00
John Johansen
3f59259dec Abstract out the construction of proc path generation more.
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Kees Cook <kees.cook@canonical.com>
2011-07-21 11:09:22 -07:00
John Johansen
2c110ed3d5 Abstract the libraries getting of the tid
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Kees Cook <kees.cook@canonical.com>
2011-07-21 11:06:57 -07:00
Marc Deslauriers
0d9a39bd26 This adds a blurb about the new profiles repository to aa-genprof,
along with a link to the wiki page. This helps users locate profiles
that possibly already exist for the application they are attempting to
confine, and suggests they contribute the profile when they're done.
2011-07-18 10:34:49 -04:00
Jamie Strandboge
5e273b0892 update profiles/apparmor.d/abstractions/audio to fixup shm patch from
yesterday. Thanks to Christian Boltz.
2011-07-15 13:53:35 -05:00
Jamie Strandboge
e91c83964a adjustments for /var/run -> /run, /var/lock -> /run/lock and /dev/shm ->
/run/shm transition (LP: #810270)
2011-07-14 11:29:54 -05:00
Jamie Strandboge
35acee98d5 and last one for /dev/shm to /run/shm 2011-07-14 08:21:01 -05:00
Jamie Strandboge
8434463621 make a similar change for /var/lock 2011-07-14 08:09:19 -05:00
Jamie Strandboge
20f117500f update for /var/run -> /run udev transition. For compatibility, distributions
(eg Ubuntu) are providing a symlink from /var/run to /run, so our profiles
should handle both situations.
2011-07-14 07:57:57 -05:00
Jamie Strandboge
850bce2754 Add /usr/share/gnome/applications/mimeinfo.cache to gnome abstraction 2011-07-12 15:24:52 -05:00
Jamie Strandboge
7c05b9ed91 profiles/apparmor.d/abstractions/gnome: add read access to
/usr/share/gnome/applications/mimeinfo.cache, which is now needed by
 Gnome applications.
2011-07-12 07:38:17 -05:00
John Johansen
5abb79d5be Add documentation directory and start of the dfa variables documentation
Signed-off-by: John Johansen <john.johansen@canonical.com>
2011-06-27 10:32:04 +01:00
John Johansen
70a06835b8 Remove tags with ~ in them
Signed-off-by: John Johansen <john.johansen@canonical.com>
2011-06-27 10:24:08 +01:00
Jamie Strandboge
2e73225586 allow owner read access to /var/run/lightdm/authority/[0-9]* in the X
abstraction
2011-06-22 22:26:14 -05:00
Jamie Strandboge
65c7473407 profiles/apparmor.d/abstractions/ssl_certs: allow access to
/usr/local/share/ca-certificates
2011-06-22 16:42:22 -05:00
John Johansen
901e67a83f Rename tags
apparmor_2.6.1~rc1 to apparmor_2.6.1-rc1
  apparmor_2.6.0~rc1 to apparmor_2.6.0-rc1

to be consistent with the new format and to enable mirroring to a git
repository
2011-06-02 21:08:42 -07:00
Steve Beattie
33c615e5f9 This patch adjusts the tag make target to use a separate version with
'~' replaced by '-'. This is needed for mirroring to git as git can't
handle '~'s embedded in tag or branch names.

Tested by setting up a separate tag_version target like so:

tag_version:
	echo ${TAG_VERSION}
2011-06-02 18:54:56 -07:00
Steve Beattie
fdae9784f4 Bug: https://bugs.launchpad.net/apparmor/+bug/788616
This patch fixes the init scripts helper functions file to
filter out the hat/child process separator as currently used
by the parser, '//' rather than what used to be used, the '^'
symbol. This fixes bugs where profiles that covered regexs (e.g.
'/usr/lib/firefox-4.0.1/firefox{,*[^s][^h]}') and thus were being
improperly filtered away and unloaded when reloading apparmor policy.
2011-06-01 07:52:35 -07:00
Kees Cook
25f7aa6621 adjust documentation "release" name to match other manpages.
Signed-off-by: Kees Cook <kees.cook@canonical.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2011-05-27 15:04:42 -07:00
Kees Cook
156a980c30 In some cases, it is desirable to build the parser without building the
binary portions (Hurd). This patch splits up the build targets so this is
possible:

"main" becomes "arch"

"indep" is created and depends on "docs"
po building is moved from "main" to "indep"

"all" has "tests" removed (standard build practices are to "make" then
"make check" so I think "tests"/"check" should stay separate from "all").

redundant chunk is removed (this exists twice in the Makefile):
-.SILENT: check
-check: tests

"install" is split into "install-indep" and "install-arch"

"install-arch" requires "arch" and only installs the binaries

"install-indep" requires "indep" and only install non-binaries

Additionally, update the README to mention the "check" target both for the
parser and the utils.

Signed-off-by: Kees Cook <kees.cook@canonical.com>
Acked-by: Steve Beattie <steve@nxnw.org>
2011-05-27 14:57:43 -07:00
Kees Cook
e9d5d491b8 define PATH_MAX when missing from limits.h
Some non-Linux systems do not define PATH_MAX (Hurd). Since I have no
interest in supporting a fully dynamic PATH_MAX in AppArmor, work around
this by just defining a static value that matches Linux's limits.h value.

Signed-off-by: Kees Cook <kees.cook@canonical.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2011-05-27 14:20:03 -07:00
Marc Deslauriers
b9bfc10d0f - added new aa-status tool rewritten in Python
- moved old Perl aa-status tool to the deprecated directory
2011-05-27 15:08:50 -04:00
Steve Beattie
12876afa07 This patch fixes up a bit that leaked into kees' commit rev 1727
to support a top level make clean target.
2011-05-23 16:05:10 -07:00
Kees Cook
e66e56b020 Add pending local commits. 2011-05-23 11:30:11 -07:00
Kees Cook
6a7a20da88 include explicit parser_common.o rule, thanks to Steve Beattie 2011-05-23 11:29:41 -07:00
Kees Cook
35cdeebe19 fix sprintf arguments 2011-05-23 11:28:26 -07:00
Steve Beattie
c2fdcf7d39 This patch makes it possible to override the default set of language
translations to be built via the LANGS make argument whitelist. For
example:

  cd parser; make all install "LANGS=en_US fr"

will build and install the en_US and fr .mo files for the parser.
2011-05-20 13:34:29 -07:00
John Johansen
627638a6cf Add debugging dump for DFA partition minimization
Allow dumping out which states where dropped during partition minimization
and which state became the partitions representative state.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2011-05-20 09:26:44 -07:00
John Johansen
414e5bf560 Fix the dfa-graph dump
The dfa graph dump was broken by previous dfa cleanups so that the graph
transition target is the output of a pointer instead of the dfa state
number.
    
Signed-off-by: John Johansen <john.johansen@canonical.com>
2011-05-20 09:24:40 -07:00
John Johansen
343749dc26 Add kernel patches for 2.6.39 2011-05-19 10:57:20 -07:00
Kees Cook
6a68aa2ecb [v2: added clean-ups, backed off on some of the build silencing]
This is a rather large rearrangement of how a subset of the parser global
variables are defined. Right now, there are unit tests built without
linking against parser_main.c. As a result, none of the globals defined in
parser_main.c could be used in the code that is built for unit tests
(misc, regex, symtab, variable). To get a clean build, either stubs needed
to be added to "#ifdef UNIT_TEST" blocks in each .c file, or we had to
depend on link-time optimizations that would throw out the unused routines.

First, this is a problem because all the compile-time warnings had to be
explicitly silenced, so reviewing the build logs becomes difficult on
failures, and we can potentially (in really unlucky situations) test
something that isn't actually part of the "real" parser.

Second, not all compilers will allow this kind of linking (e.g. mips gcc),
and the missing symbols at link time will fail the entire build even though
they're technically not needed.

To solve all of this, I've moved all of the global variables used in lex,
yacc, and main to parser_common.c, and adjusted the .h files. On top of
this, I made sure to fully link the tst builds so all symbols are resolved
(including aare lib) and removedonly  tst build-log silencing (for now,
deferring to another future patchset to consolidate the build silencing).

Signed-off-by: Kees Cook <kees.cook@canonical.com>
2011-05-13 02:12:49 -07:00
Jamie Strandboge
70bb296a70 profiles/apparmor.d/abstractions/dbus-session: Per discussion with John
Johansen, use 'ix' instead of 'Pix' for dbus-launch since if someone happens to
define a profile for dbus-launch and it is loosely confined, then users of this
abstraction could end up launching a program via dbus-launch in a less confined
manner than intended. This sort of thing should not be possible via an
abstraction (and people are always free to profile using Pix if they prefer).
2011-05-09 18:09:24 +02:00
Kees Cook
a25a2ec0d9 On Hurd and kfreebsd under Debian, I have disabled the build of the parser
since things go extremely badly when capabilities disappear. If someone
wants to work on it, I have some initial patch attempts, but it was getting
too time-consuming, so I back-burnered the parser. A very small change was
needed to get the libraries to build, and this is it.

Description: Workaround non-Linux environments to build everything but the
 parser.
Author: Kees Cook <kees@debian.org>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2011-05-02 13:38:12 -07:00
Kees Cook
1644ce31e7 Description: Improve generated test readability and build-time cleanup.
Author: Kees Cook <kees@debian.org>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2011-05-02 13:36:55 -07:00
Kees Cook
abcf66292d Description: adjust for missing or incorrect includes.
Author: Kees Cook <kees@ubuntu.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2011-05-02 13:34:58 -07:00
Kees Cook
42a5483ba9 Description: fix minor manpage type pointed out by lintian.
Author: Kees Cook <kees@debian.org>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2011-05-02 13:33:31 -07:00
Jamie Strandboge
83282f8700 add kwallet to ubuntu-browsers.d/user-files 2011-04-19 06:03:35 -05:00
Jamie Strandboge
8485c8e417 profiles/apparmor.d/abstractions/private-files:
- add zsh files (LP: #761217)
- add .inputrc (bash)
- add .login and .logout (csh, tcsh, etc)
2011-04-19 05:55:32 -05:00
Kees Cook
4670afee7c Nothing in deprecated/ should be built any more, much less shipped in the
tarball. Let's drop this from future tarball creation.

Signed-off-by: Kees Cook <kees.cook@canonical.com>
Acked-by: John Johansen <john.johansen@canonical.com>
2011-04-18 18:09:29 -07:00
Jamie Strandboge
e946b88d82 ubuntu-browsers.d/multimedia: add f-spot, shotwell and digikam to image viewers
since they are invoked when using sites such as Facebook
2011-04-18 09:32:14 -05:00
Jamie Strandboge
780ae4663d profiles/apparmor.d/abstractions/private-files:
- add zsh files (LP: #761217)
- add .inputrc (bash)
- add .login and .logout (csh, tcsh, etc)
2011-04-18 08:55:50 -05:00
Christian Boltz
34676334b6 added some missing permissions to profiles/extra
ACKed by Kees Cook
2011-04-12 00:10:41 +02:00
Christian Boltz
d799edbcc6 create-apparmor.vim.sh:
- move cap_sys_module and cap_sys_rawio to "dangerous" capabilities
- sorted sdKapKeyDanger

Proposed by Seth Arnold,
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2011-04-09 18:47:42 +02:00
Jamie Strandboge
00f32d555d adjust ubuntu-media-players abstraction to allow (LP: #750381):
- reading of configs required by gnash
- owner writing of @{HOME}/.gnash
2011-04-07 09:50:20 -05:00
Steve Beattie
b7a8a01ac7 This patch fixes a compilation warning that was trying to tell us
about an actual bug in the parser; namely that when handling strings
encapsulated in quotes, that our handling of octals is busted. It
fixes this by fixing the case entries so that 3 digit octals will
get parsed correctly, rather than dropped.

It also adds a bunch of unit tests for the processquoted() function.
2011-04-05 20:55:19 -07:00
Steve Beattie
3a8546732a This patch fixes warnings emitted by the compiler when compiling on a
32bit arch, due to size_t objects being passed to fprintf with format
strings expecting longs. It does this by adjusting the fprintf rules
to expect size_t objects.
2011-04-05 20:53:35 -07:00
Steve Beattie
d656afa1d5 This patch fixes the parser's dfa generation library makefile to use
the default compilation rules when compiling C++ files, so that things
like CFLAGS et al will be honored. Without this, doing 'make DEBUG=y'
in the parser/ tree will not have its added -pg flag honored, breaking
profiling of the parser.
2011-04-05 20:51:02 -07:00
Christian Boltz
5b3190d39c Add files to generate apparmor.vim to bzr.
Basically the files will generate apparmor.vim as included in openSUSE 
11.4 (and posted here before at the end of january). The only difference 
is that the patch that Steve posted some days ago is already included 
(patch summary: sdGlob: first character of variable name has to be 
 :alpha:, followed by any number of :alnum: or _)
2011-04-05 23:56:14 +02:00
Christian Boltz
c5dca95504 apparmor.d.pod:
- fix ALPHANUMERIC to include 0...9 instead of 1...9
- enforce linebreaks for network example rules

Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2011-04-01 20:35:14 +02:00
Steve Beattie
dce1d5d5e6 Bah, fix up screwed up testcase. 2011-03-29 02:46:09 -07:00
Steve Beattie
bb31faff1b This patch extends the stress profile generator to add variable
definition and references.
2011-03-28 21:07:44 -07:00
Steve Beattie
162b49b417 This patch attempts to address the over-aggressive behavior of the
stress tests on the parser, by dropping the maximum number of rules
each profile can have, as well as reducing the number of profiles to
generate by default to 50. It also cleans up the emitted profiles
a little, creates the profile names with the suffix .sd [1], fixes
stress.sh to actually honor the -p (alternate parser) argument, fixes
the profile flags generation to not generate duplicates flags, and
fixes the file rules to always start with a constant randomly-generated
prefix element (rather than a regex or variable) to greatly reduce
the possibility of X dominance collisions in the parser
2011-03-28 20:48:30 -07:00
Steve Beattie
f8b43d5ba9 The parser's lexer supports variables defined matching the regex
'[[:alpha:]][[:alnum:]_]*' (i.e. a single alpha followed by any number
of alphanumerics or underscores). Unfortunately, the code that expends
variables inside a profile does not match this, it incorrectly matched
'([[:alpha:]]|_)+' (one or more alphas or underscores). This patch
corrects the behavior there as well as synchronizing the expected
variable names in the apparmor.d manpage and apparmor.vim syntax file.

It also adds unit tests and testcases to verify the behavior.

Signed-off-by: Steve Beattie <sbeattie@ubuntu.com>
2011-03-28 10:52:02 -07:00
Steve Beattie
e8f297db5a Fix up the profiles make install target for the tunables/multiarch.d/
change.
2011-03-23 16:10:33 -07:00
Steve Beattie
4d332ff241 Fix multi-arch comment tyop, thanks to Kees for pointing it out. 2011-03-23 13:44:51 -07:00
Steve Beattie
83007d7600 Author: Jamie Strandboge <jamie@canonical.com>,
Steve Langasek <steve.langasek@linaro.org>,
 Steve Beattie <sbeattie@ubuntu.com>
Description: add multiarch support to abstractions
Bug-Ubuntu: https://bugs.launchpad.net/bugs/736870

This patch add multiarch support for common shared library locations, as
well as a tunables file and directory to ease adding addiotional
multiarch paths.

Bug: https://launchpad.net/bugs/736870
2011-03-23 12:24:11 -07:00
Steve Beattie
5f72ae98eb Update the toplevel README file to discuss the needed apparmor
compatibility patches, mention the profile consistency check, and
remove some variables that no longer need to be set at build time.
2011-03-18 23:13:58 -07:00
Steve Beattie
940ead1fb8 disable the local include in the extras firefox profile; the build
process does not generate local files for things in extras, and even if
it did, this one is named in a non-standard fashion (usr.bin.firefox vs.
usr.lib.firefox.firefox).
2011-03-18 22:38:55 -07:00
Steve Beattie
bb28ca5371 profiles/Makefile: fix 'check' target to iterate over the profiles in
the extras directory as intended and fail the make if a parse failure
occurs. Also, set the default parser and logprof to be the intree ones;
the system ones can still be used by setting environment variables.
Finally, have the 'all' target generate the local files. Also, set the
parser base directory to the apparmor.d directory (rather than as an
added include, to avoid outside contamination from system profiles and
includes).

With these changes, make && make check should verify the profile set is
compilable and mostly consistent. (Alas, the current profiles are not
quite consistent).
2011-03-18 22:31:26 -07:00
Steve Beattie
0edae73a9a This fixes the apparmor apache2 module to link correctly against the
built libapparmor, as well as working around libtool so that the
libapparmor library build directory does not get added as an rpath to
the module.

Bug: https://launchpad.net/bugs/737074
2011-03-17 23:32:34 -07:00
Steve Beattie
19a2d6d169 Reduce the number of network protocols filtered from the parser.
https://bugs.launchpad.net/bugs/732837

Bug: https://launchpad.net/bugs/732837
2011-03-17 10:50:53 -07:00
Steve Beattie
f3b847c4b0 Fix from PLD/Arkadiusz Miskiewicz <arekm@maven.pl> to the initscript
helper functions to correct some log messages and to unload hats first,
before their parents.
2011-03-17 10:21:06 -07:00
John Johansen
1a2484e5bc Finish renaming regexp to regex
Signed-off-by: John Johansen <john.johansen@canonical.com>
2011-03-13 06:01:21 -07:00
John Johansen
6ed55cb1d5 Update Makefile dependencies
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2011-03-13 06:00:31 -07:00
John Johansen
099f19f99c Update the licence for apparmor_re.h
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2011-03-13 05:59:48 -07:00
John Johansen
7d2a6b53d4 Lindent parse + hand cleanups
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Seth Arnold <seth.arnold@gmail.com>
2011-03-13 05:58:54 -07:00
John Johansen
6f0c68a4d4 Lindent + some hand cleanups expr-tree
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Seth Arnold <seth.arnold@gmail.com>
2011-03-13 05:57:39 -07:00
John Johansen
9a377bb9da Lindent + some hand cleanups hfa
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Seth Arnold <seth.arnold@gmail.com>
2011-03-13 05:55:25 -07:00
John Johansen
3cfe47d3f0 Lindent + hand cleanups compressed-dfa
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2011-03-13 05:54:18 -07:00
John Johansen
84c0bba1ef Lindent + hand cleanups aare_rules
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2011-03-13 05:53:08 -07:00
John Johansen
6aad970d1c Split out compressed dfa "transition table" compression
Split hfa into hfa and compressed_hfa files.  The hfa portion focuses on
creating an manipulating hfas, while compressed_hfa is used for creating
compressed hfas that can be used/reused at run time with much less memory
usage than the full blown hfa.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2011-03-13 05:50:34 -07:00
John Johansen
298a36bffb Split out aare_rules which are used to encapsulate creating the dfa
Split out the aare_rule bits that encapsulate the convertion of apparmor
rules into the final compressed dfa.

This patch will not compile because of the it needs hfa to export an interface
but hfa is going to be split so just delay until hfa and transtable are
split and they can each export their own interface.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2011-03-13 05:49:15 -07:00
John Johansen
846cee5066 Split out parsing and expression trees from regexp.y
Start of splitting regexp.y into logical components instead of the mess
it is today.  Split out the expr-tree and parsing components from regexp.y
int expr-tree.x and parse.y and since regexp.y no longer does parsing
rename it to hfa.cc

Some code cleanups snuck their way into this patch and since I am to
lazy to redo it, I have left them in.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2011-03-13 05:46:29 -07:00
Steve Beattie
50760ef05b Adjust version to indicate that 2.6 has branched off and that trunk is
working towards a 2.7.0 or 3.0.0 release.
2011-03-10 10:25:55 -08:00
John Johansen
0b383ad769 Add tests to ensure parser is checking its own time stamp wrt profile cache
Signed-off-by: Steve Beattie <steve@nxnw.org>
Acked-by: John Johansen <john.johansen@canonical.com>
2011-03-08 14:52:32 -08:00
John Johansen
55bad42088 apparmor_parser doesn't use its time stamp when determining if cache is stale
If the apparmor_parser is updated (outside of current packaging), when
doing profile loads it will use the existing cache of compiled profiles,
instead of forcing a recompile on profiles.

This can cause apparmor to load bad policy if the parser contains a bug
fix for the previous version of the parser.

This can be worked around in packaging by invalidating the cache and
forcing a profile reload when the parser is upgraded.

Signed-off-by: John Johansen <john.johansen@canonical.com>
2011-03-08 14:49:03 -08:00
John Johansen
258c39d4a5 Profiles that specify a name and attachment specification fail to attach when the
attachment specification doesn't contain globbing.

eg.
   # profile name and attachment the same - attaches as expected
   profile /usr/lib/chromium-browser/chromium-browser

   # profile without attachment specification - does not attach as expected
  profile chromium-browser

  # profile with name and attachment specification where the attachment specification uses globbing - attaches as expected
  profile chromium-browser /usr/lib/chromium-browser/chromium-broswer*

  # profile with name and attachment specification without globbing - FAILS to attach when it should
  profile chromium-browser /usr/lib/chromium-browser/chromium-browser


This occurs because the xmatch_len is not set correctly for the profiles that specify
a name and an attachment specification, where the attachment specification does not
contain globbing characters.

In this situation the correct length for the xmatch_len is the length of the name, as
the shortest possible unambiguous match is the name length.

This patch does not fix a related bug where an attachment specification of ** will not
match (/**) will.
2011-03-08 10:12:09 -08:00
John Johansen
9819bf5df0 Ensure that the buffer read from /proc/sys/kernel/osrelease is null terminated
Signed-off-by: Jamie Strandboge <jamie@canonical.com>
Acked-by: John Johansen <john.johansen@canonical.com>
2011-03-03 15:53:23 -08:00
John Johansen
174c89f772 override AF_MAX for kernels that don't support proper masking
Older versions of the apparmor kernel patches didn't handle receiving
network tables of a larger size than expected.

Allow the parser to detect the kernel version and override the AF_MAX
value for those kernels.

This also replaces the hack using a hardcoded limit of 36 for kernels
missing the features flag.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Kees Cook <kees.cook@canonical.com>
2011-03-03 15:45:10 -08:00
Steve Beattie
52e14b5c93 merged:
Kees Cook 2011-03-02 update AA url in README
2011-03-02 20:12:27 -08:00
Kees Cook
83ef426514 update AA url in README 2011-03-02 12:19:35 -08:00
Steve Beattie
e14c6c39f1 Make tcp test support current network syntax, reanable tcp test 2011-03-02 05:02:45 -08:00
Steve Beattie
d1789d1469 Merge fix from 2.5 branch to leave timestamps alone when exporting
tarball.
2011-02-24 01:32:08 -08:00
Steve Beattie
2fed7cdb61 Adjust the python setup to actually match what swig expects so it will work 2011-02-23 23:34:36 -08:00
Steve Beattie
cd97402779 Update project info in libapparmor's setup.py.in. 2011-02-23 21:10:20 -08:00
Steve Beattie
ca4906c0a3 Fix list email typo 2011-02-23 15:57:36 -08:00
Steve Beattie
a28e39cd06 Prep for 2.6.0 release 2011-02-23 15:55:03 -08:00
Steve Beattie
3768096308 Fix compilation errors that slipped in. Yes, I realize this breaks the
one translation string that was intended for regexp.y, sorry.
2011-02-23 14:40:07 -08:00
Steve Beattie
3dde3d5322 libraries/libapparmor/: more license cleanups, adjust my email address
in the AUTHORS file.
2011-02-23 14:02:45 -08:00
John Johansen
9df0a29e9e Update the copyright message in apparmor_parser --version 2011-02-22 14:58:49 -08:00
Jamie Strandboge
da1e958eb9 parser/rc.apparmor.functions: Don't unload libvirt's dynamic profiles on
reload. For now just special-case libvirt's profiles. If more applications
use dynamic profiles, this should be generalized in some way to flag profiles
as dynamic. (LP: #702774)
2011-02-22 16:24:29 -06:00
John Johansen
52ca88141a Fix previously committed translation patch that didn't correctly add the
new apparmor-parser.pot file
2011-02-22 11:36:14 -08:00
Jamie Strandboge
4cd73b7a93 parser/rc.apparmor.functions: Don't unload libvirt's dynamic profiles on
reload. For now just special-case libvirt's profiles. If more applications
use dynamic profiles, this should be generalized in some way to flag profiles
as dynamic. (LP: #702774)
2011-02-22 11:29:33 -06:00
Jamie Strandboge
fb188972dc parser/rc.apparmor.functions: Don't unload libvirt's dynamic profiles on
reload. For now just special-case libvirt's profiles. If more applications
 use dynamic profiles, this should be generalized in some way to flag profiles
 as dynamic.
2011-02-22 11:14:34 -06:00
John Johansen
6e6b57fbd1 Sync apparmor.vim to the latest version from Christian Boltz
Signed-off-by: John Johansen <john.johansen@canonical.com>
2011-02-22 03:57:37 -08:00
John Johansen
ee0d5b7d50 Update documentation for change_hatv, change_hat_varags and change_onexec
Signed-off-by: John Johansen <john.johansen@canonical.com>
2011-02-22 03:55:53 -08:00
John Johansen
6d62a3634e Update change_hatv and change_hat_vargs prototypes to use long
Signed-off-by: John Johansen <john.johansen@canonical.com>
2011-02-22 03:55:16 -08:00
John Johansen
54fd453d35 Update swig to export all current interface fns
Signed-off-by: John Johansen <john.johansen@canonical.com>
2011-02-22 03:54:35 -08:00
John Johansen
18537e6c38 Rename change_hat.c to kernel_interface.c
Rename change_hat.c to kernel_interface.c to better reflect that it
is providing multiple kernel_interfaces.

Signed-off-by: John Johansen <john.johansen@canonical.com>
2011-02-22 03:53:39 -08:00
John Johansen
7e78ee6363 Update licencing in libapparmor
Signed-off-by: John Johansen <john.johansen@canonical.com>
2011-02-22 03:51:16 -08:00
John Johansen
d788969c25 Update apparmor_parser translation files
The apparmor_parser translation files where using the old subdomain_parser
domain, but the parser was binding to apparmor-parser.  Create a new
apparmor-parser.pot file and remove the subdomain_parser.pot file.

Signed-off-by: John Johansen <john.johansen@canonical.com>
2011-02-22 03:48:03 -08:00
John Johansen
db70a37621 Update x conflict failure message
Output a better failure message when a conflict of x permissions cause
policy compilation to fail.  We don't have enough information available
to output which rules during the dfa compilation so just improve the
message to let people know that it means there are conflicting x modifiers
in the rules.

Signed-off-by: John Johansen <john.johansen@canonical.com>
2011-02-22 03:47:03 -08:00
Steve Beattie
b8be715227 Remove deprecated kernel patches, no longer needed as the kernel
portion of apparmor has gone upstream. These patches had already been
dropped from the 2.5.x tree.

The compatibility kernel patches are still provided.
2011-02-18 10:42:08 -08:00
Steve Beattie
24a47e2faa Update version to prepare for impending 2.6.0 release. 2011-02-16 10:38:28 -08:00
Steve Beattie
c56ec9eea7 top-level Makefile:
- adjust snapshot versioning to be less than the upcoming version yet
  still embed the bzr repo version
2011-02-16 09:41:14 -08:00
Steve Beattie
a39d6e36e8 From: Jeff Mahoney <jeffm@suse.com>
Subject: apparmor-utils: Inherit flags in sub-profiles when generating profiles
References: bnc#496204

 When creating profiles with cx subprofiles, genprof will set the
 sub-profile in enforce mode. When genprof cycles multiple times, it
 prohibits the sub-profile from working correctly.

 e.g.

 # Last Modified: Mon Jan 24 13:52:26 2011
 #include <tunables/global>

 /home/jeffm/mycat flags=(complain) {
   #include <abstractions/base>
   #include <abstractions/bash>
   #include <abstractions/consoles>

   /bin/bash ix,
   /bin/cat cx,
   /home/jeffm/mycat r,

 profile /bin/cat {
     #include <abstractions/base>

     /bin/cat r,
     /home/jeffm/mycat r,

   }
 }

 This patch allows sub-profiles to inherit the flags from the parent
 profile, which allows it to be created in complain mode (if appropriate).
 The temporary complain flags are cleaned up at genprof completion as
 expected.

 This issue was reported at: https://bugzilla.novell.com/show_bug.cgi?id=496204

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>

Bug: https://launchpad.net/bugs/707092
2011-02-15 16:26:05 -08:00
Steve Beattie
4e01f55a81 From: Jeff Mahoney <jeffm@suse.com>
Subject: Subdomain.pm: Fix for null path
References: bnc#407959

When handling the following log entry, logprof will spew perl errors and
ultimately generate an invalid config: "r,"

Since there is nothing to do with a null path, just skip to the next entry.

type=APPARMOR_DENIED msg=audit(1214497030.421:39): operation="inode_permission" info="Failed name resolution - object not a valid entry" requested_mask="r" denied_mask="r" pid=31367 profile="/usr/sbin/httpd2-worker

Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2011-02-15 14:45:04 -08:00
Jamie Strandboge
6c7492af89 dd LibreOffice to ubuntu-browsers.d/productivity abstraction 2011-02-15 15:54:48 -06:00
Steve Beattie
4c8d4490cb From: Jeff Mahoney <jeffm@suse.com>
Subject: apparmor: Subdomain.pm: Fix handling of audits of unconfined processes

 The version of AppArmor that was accepted into the mainline kernel
 issues audit events for things like change_hat while unconfined.
 Previous versions just returned -EPERM without the audit.

 This results in logprof and friends spewing uninitialized value errors
 when it hits events like:
 type=AVC msg=audit(1291742101.899:220): apparmor="DENIED" operation="change_hat" info="unconfined" error=-1 pid=28005 comm="cron

 ... which happen any time an unconfined process does something with pam
 when pam_apparmor is installed.

 This patch skips those events.

[Note that the second half of the OpenSUSE patch had already been applied.]

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2011-02-15 11:16:28 -08:00
Steve Beattie
5a56604f99 From: Jeff Mahoney <jeffm@suse.com>
Subject: apparmor: Fix incorrect /proc/*/sys usage in usr.sbin.ntpd
References: bnc#634801

 /proc/sys/kernel exists, but /proc/*/sys/kernel doesn't. This patch
 fixes the profile.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2011-02-15 10:54:30 -08:00
Steve Beattie
f471bc4018 Author: Jamie Strandboge <jamie@canonical.com>
Description: the Ubuntu buildds do not have the AppArmor securityfs mounted, so
the cache tests fail. This patch skips these tests if the introspection
directory is not mounted, but runs them if it is. This should allow testing of
local builds while still allowing builds on the official buildds.

Acked-By: Steve Beattie <sbeattie@ubuntu.com> - both Ubuntu and
OpenSUSE were carrying patches that disabled the caching test,
though OpenSUSE's disabled it completely rather than checking. The
parser builds need to complete even when the kernel it's building on
doesn't support AppArmor or all the extensions that the parser needs
at runtime.
2011-02-15 10:41:29 -08:00
Steve Beattie
596cba37e8 From: Jeff Mahoney <jeffm@suse.com>
Subject: apparmor-docs: Fix grammar error in techdoc.pdf
References: bnc#588235

This patch fixes a grammar error in techdoc.pdf.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2011-02-09 14:29:05 -08:00
Steve Beattie
3c8538c0c6 From: Jeff Mahoney <jeffm@suse.com>
Subject: apparmor-utils: Translation unification
References: bnc#586072

 This patch removes small inconsistencies between identical strings to
 allow for easier translation.

Reported-by: Isis Binder <isis.binder@gmail.com>
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2011-02-08 16:29:59 -08:00
Steve Beattie
4df8c4c09c Purge utils/severity.pl due to incorrect license/copyright statement. It
should have been covered under both the Immunix acquisition by Novell
Inc and by the open sourcing of the apparmor tree by Novell Inc.
2011-02-08 15:50:51 -08:00
Steve Beattie
bf9a559dcc From: Jeff Mahoney <jeffm@suse.com>
Subject: [PATCH] apparmor-utils: cleanup after abort in genprof
References: bnc#307067

 The initial generation of the base profile is required to be written out
 to put the process in complain mode for observation. If the user
 decides to abort the profiling session, that base profile is left
 behind.

 This patch removes all profiles created during the run up to an abort.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
2011-02-08 14:50:43 -08:00
Steve Beattie
974d0a33b0 Remove obsolete rc.sd-event-dispatch.suse; was replaced by not nearly
but almost as obsolete aa-eventd and controlled by the main apparmor
initscript.

Acked-by: John Johansen <john.johansen@canonical.com>
2011-02-08 14:21:51 -08:00
Steve Beattie
b5cd93aa2f Purge deprecated gnome apparmor applet, aa-notify is the preferred
notification mechanism nowadays.

Acked-by: John Johansen <john.johansen@canonical.com>
2011-02-08 14:18:39 -08:00
Steve Beattie
ef2fa2c895 From: Jeff Mahoney <jeffm@suse.com>
utils/Immunix/Reports.pm: s/SubDomain/AppArmor/ in header comment
2011-02-08 13:58:52 -08:00
Steve Beattie
4ff5b80ee8 From: Jeff Mahoney <jeffm@suse.com>
Fix compilation in deprecated gnome apparmor applet.
2011-02-08 12:52:26 -08:00
Steve Beattie
fb8d5d05dc From: Jeff Mahoney <jeffm@suse.com>
utils/Makefile: abstract out the perl vendor location for distros to
override if necessary
2011-02-08 10:39:44 -08:00
Steve Beattie
cef7289d75 From: Jeff Mahoney <jeffm@suse.com>
Fix grammar in in utils UI text.
2011-02-08 10:25:05 -08:00
Steve Beattie
94dfe15b28 From: Jeff Mahoney <jeffm@suse.com>
libapparmor: remove LD_RUN_PATH from swig generated makefile as it
results in an rpath binding in the library.
2011-02-08 09:27:32 -08:00
Steve Beattie
788bdcafb9 From: Jeff Mahoney <jeffm@suse.com>
Fix up tomcat build, also use in-tree libapparmor.
2011-02-08 08:22:46 -08:00
Steve Beattie
0cfa2b2cf8 From: Jeff Mahoney <jeffm@suse.com>
Rip out a little bit of crufty old compatibility code with immunix.h and
support directly building with in-tree libapparmor.
2011-02-08 08:18:36 -08:00
Steve Beattie
37ac8ede4f From: Jeff Mahoney <jeffm@suse.com>
Subject: adjust includes for pam_apparmor to point at the intree version
of libapparmor, rather than depend on an external version to be
installed.
2011-02-08 07:21:20 -08:00
Steve Beattie
09edd269aa Makefile: make setup target work independently 2011-02-08 07:05:39 -08:00
Jamie Strandboge
61e7aac455 make aa-disable executable 2011-02-07 21:02:57 -06:00
Jamie Strandboge
bf02536fa3 Description: add aa-disable
aa-enforce and aa-complain exist to put a profile into enforce or
 complain mode respectively. The /etc/apparmor.d/disable directory
 already exists to drop files into it to disable profile load via
 apparmor_parser (and therefore via the apparmor initscript). What
 doesn't exist is aa-disable to add a file to the disable/ directory and
 unload the profile. This patch does that. This version of aa-disable is
 based on aa-complain (in fact doing a diff between aa-complain and
 aa-disable might make review easier) and works as well as aa-enforce and
 aa-complain. In other words, aa-disable has the same limitations of not
 handling the specified binary properly if the specified attachment does
 not match the path naming scheme (eg, the profile doesn't use the
 conventional path.to.binary naming scheme, globbing is used for
 attachment within the profile, etc). Also adjust documentation to
 reference aa-disable.
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2011-02-07 20:48:50 -06:00
Jamie Strandboge
74b2fdc52c update documentation for aa-disable 2011-02-07 17:39:54 -06:00
Jamie Strandboge
1459c9eb20 add aa-disable 2011-02-07 17:39:36 -06:00
Steve Beattie
1005bfdf7e Subject: logprof - variable definitions should not have trailing commas.
This patch fixes a logprof bug where when profiles with variable
declarations at the top level (not hidden in an include) were written
back to a file, a trailing comma was being added to the declaration
statement, which is invalid apparmor policy syntax. This patch corrects
this and no longer adds the trailing comma.
2011-02-04 21:20:58 -08:00
John Johansen
52453313c1 Update to latest version of apparmor.vim from Chritian Boltz 2011-01-26 06:43:39 -08:00
Steve Beattie
6f620e9247 From: Jeff Mahoney <jeffm@suse.com>
Subject: apparmor: Fix network event parsing
References: bnc#665483

 The upstream version of AppArmor had network mediation but it was
 removed. There's a compability patch floating around that both openSUSE
 and Ubuntu have applied to their kernels. Unfortunately, one part was
 overlooked. The socket operation event names where changed from the
 socket_ prefixed names they had when AppArmor was out-of-tree and
 utils/SubDomain.pm was never updated to understand them.

 This patch adds an operation-type table so that the code can just
 do a optype($operation) call to discover what type of operation a
 particular name refers to. It then uses this in place of the socket_
 checks to decide whether an event is a network operation.

 This allows genprof and logprof to work with networking rules again.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>

Bug: https://launchpad.net/bugs/706733
2011-01-24 15:49:46 -08:00
Steve Beattie
1c2591de1e This patch removes all of the old log parsing code from libapparmor.
The testcases that were in place for the old style log messages have
had their expected output modified such that they are expected to
return invalid results, rather than deleting the testcases outright.
2011-01-21 11:47:54 -08:00
Steve Beattie
93ae7808cb From: Jeff Mahoney <jeffm@suse.com>
Subject: apparmor-parser: Fix up translations
References: bnc#586070

Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2011-01-14 17:44:51 -06:00
Kees Cook
14d8bac7b2 Here's an update to rename another chunk of things that still used
"SubDomain" in some way. This leaves only "subdomain.conf" and the
function names internally.

Additionally, I added a "make check" rule to the utils/Makefile to do a
simple "perl -c" sanity check just for good measure.
2011-01-13 13:58:26 -08:00
Kees Cook
dd3a964249 drop /var/log/apparmor, stop installing Reports.pm, use LOGPROF_DEBUG as the debugging target instead of /var/log/apparmor 2011-01-13 09:13:34 -08:00
Steve Beattie
d088727bdf Support newer auditd formatted messages. Patch from mancha on irc.
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2011-01-12 13:57:19 -06:00
Jamie Strandboge
0807a74490 The example firefox profile in extras has been pretty out of date. Also, it
allows write to the ~/Desktop directory, which could conceivably allow writing
of .desktop files which could be clicked on and executed by the user. This is
based on the firefox base profile as included in Ubuntu. Notable features:
- allows for using the browser to navigate through directories
- allows reads from @{HOME}/Public/**
- allows writes to @{HOME}/Downloads/**

The intent of this profile is to restrict code execution, writes to $HOME
and information leaks while allowing basic web browsing and reading of
system documentation. It does not allow for plugins, extensions or other
helpers (but these can be added via the local/ mechanism).
2011-01-12 11:51:22 -06:00
Jamie Strandboge
b12d93a739 Attached is an updated dnsmasq profile that fixes the following:
- allow net_admin capability for DHCP server
- allow net_raw and network inet raw for ICMP pings when used as a DHCP
server
- allow read and write access to libvirt pid files for dnsmasq

See the FAQ in the dnsmasq source for details. This fixes
https://launchpad.net/bugs/697239
2011-01-12 11:47:04 -06:00
John Johansen
2796c58eca Refresh kernel compatibility patches for 2.6.36.2 and 2.6.37 2011-01-09 21:03:19 -08:00
Jamie Strandboge
22f912b9f1 abstractions/private-files: don't allow wl to autostart directories
abstractions/private-files-strict: don't allow access to:
  - chromium
  - thunderbird
  - evolution
  - kmail
  - kwallet
2011-01-07 21:05:59 -06:00
Steve Beattie
0e87acb318 Change the compilation ordering in the regression testsuite as the
toolchain has gotten stricter about linking order; in short, linked
libraries need to come after the objects referring to them. Adding to
LDLIBS is the correct solution for this.

See https://wiki.ubuntu.com/NattyNarwhal/ToolchainTransition for more
details.
2011-01-07 10:35:47 -08:00
Jamie Strandboge
f7c6a848bb abstractions/private-files: don't allow wl to autostart directories
abstractions/private-files-strict: don't allow access to:
- chromium
- thunderbird
- evolution
- kmail
- kwallet
2011-01-07 10:44:47 -06:00
Steve Beattie
cb96345f21 From: Jeff Mahoney <jeffm@suse.com>
dynamically link in libapparmor library in libapparmor's testsuite.
2011-01-05 14:41:11 -08:00
Jamie Strandboge
d03c2e681f abstractions/freedesktop.org updates:
- require owner match for files in @{HOME}
- add new path for @{HOME}/.local/share/recently-used.xbel*
- add the following, confirmed via specifications:
  /usr/share/applications/mimeinfo.cache r,
  /usr/share/applications/*.desktop r,
  owner @{HOME}/.local/share/applications/defaults.list r,
  owner @{HOME}/.local/share/applications/mimeinfo.cache r,
  owner @{HOME}/.local/share/applications/mimeapps.list r,
  owner @{HOME}/.local/share/applications/*.desktop r,

References:
http://standards.freedesktop.org/basedir-spec/basedir-spec-0.6.html
http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-0.9.4.html
http://www.freedesktop.org/wiki/Specifications/mime-actions-spec
2010-12-23 18:39:28 -06:00
Jamie Strandboge
73c1283e98 abstractions/X: allow access to /usr/lib32 and /usr/lib64 for dri modules
(LP: #658135)
2010-12-23 18:39:02 -06:00
Jamie Strandboge
e400b296d8 abstractions/freedesktop.org updates:
- require owner match for files in @{HOME}
- add new path for @{HOME}/.local/share/recently-used.xbel*
- add the following, confirmed via specifications:
  /usr/share/applications/mimeinfo.cache r,
  /usr/share/applications/*.desktop r,
  owner @{HOME}/.local/share/applications/defaults.list r,
  owner @{HOME}/.local/share/applications/mimeinfo.cache r,
  owner @{HOME}/.local/share/applications/mimeapps.list r,
  owner @{HOME}/.local/share/applications/*.desktop r,

References:
http://standards.freedesktop.org/basedir-spec/basedir-spec-0.6.html
http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-0.9.4.html
http://www.freedesktop.org/wiki/Specifications/mime-actions-spec
2010-12-23 07:52:47 -06:00
Jamie Strandboge
8180aa0bd3 abstractions/base: allow access to /usr/lib32 and /usr/lib64 for dri modules
(LP: #658135)
2010-12-23 07:46:55 -06:00
Jamie Strandboge
e356c4b19e add enchant abstraction. Enchant is a frontend for spellcheckers and in
use by more and more applications, including empathy and evolution. It
is listed on freedesktop.org. See:
http://www.abisource.com/projects/enchant/

This abstraction gives access to enchant itself, files in the user's home
directory for enchant and various dictionaries for:
- aspell
- ispell
- hunspell
- myspell
- hspell
- zemberek
- voikko
2010-12-22 16:59:44 -06:00
Jamie Strandboge
5c040c6149 allow 'rw' to /var/log/samba/cores/ (LP: #652562) 2010-12-22 16:58:23 -06:00
Jamie Strandboge
d097df8226 add preliminary ibus abstraction. Will likely need more once more ibus users
start to use it. Additionally, the 'rw' on the @{HOME}/.config/ibus/bus/
probably only needs 'create' and 'chmod', so that could be tightened up once
those are exposed in the tools. LP: #649497.
2010-12-22 16:57:35 -06:00
Jamie Strandboge
add5d47fc3 abstractions/user-manpages: require owner match for files in @{HOME} and /tmp 2010-12-22 16:55:50 -06:00
Jamie Strandboge
2227de709b abstractions/user-mail:
- use character globbing
- require owner match for files in @{HOME}
2010-12-22 16:55:18 -06:00
Jamie Strandboge
84b5f6e441 abstractions/user-write:
- require owner match
- add @{HOME}/Public/
2010-12-22 16:54:40 -06:00
Jamie Strandboge
1f2b4a5a19 abstractions/user-download:
- fix typo for Desktop (should be Desktop/)
- require owner match
- allow writes to @{HOME}/[dD]ownload{,s}
2010-12-22 16:52:13 -06:00
Jamie Strandboge
1b78752db6 utils/Config.pm: disable the repository by explicitly setting
$config->{repository}{enabled} = "no" (LP: #692406). We need to do this
since opensuse's site is down and there is no current alternative. Can
reenable once we have an alternative.
2010-12-21 22:08:28 -06:00
Jamie Strandboge
ca30e18692 utils/Config.pm: disable the repository by explicitly setting
$config->{repository}{enabled} = "no" (LP: #692406). We need to do this
since opensuse's site is down and there is no current alternative. Can
reenable once we have an alternative.
2010-12-21 16:56:21 -06:00
Jamie Strandboge
36f6da62aa update ubuntu abstractions to use '# vim:syntax=apparmor' 2010-12-21 12:54:57 -06:00
Jamie Strandboge
046cfe305f update ubuntu abstractions to use '# vim:syntax=apparmor' 2010-12-21 12:53:33 -06:00
Jamie Strandboge
5272c9ef0a utils/apparmor.vim: update comments on how to use 2010-12-21 10:55:24 -06:00
Jamie Strandboge
aa7304f01e utils/apparmor.vim: remove trailing whitespace 2010-12-21 10:45:33 -06:00
Kees Cook
acfcdfe750 ignore generated manpages 2010-12-20 14:02:03 -08:00
Kees Cook
39b5240966 mark parser/tst/simple_tests/xtrans/minimize-x-conflict.sd as "TODO" and hook up parser/tst/Makefile "clean" to parser/Makefile "clean" rule 2010-12-20 13:44:14 -08:00
Kees Cook
b11fd82d96 make gen-xtrans executable 2010-12-20 13:25:54 -08:00
John Johansen
3973387295 Add missing files from my last 11 patches as I forgot to do bzr add before
committing.

Signed-off-by: John Johansen <john.johansen@canonical.com>
2010-12-20 13:18:36 -08:00
Kees Cook
a6dc414f57 adjust line offset now that $Id$ was removed 2010-12-20 13:06:54 -08:00
Kees Cook
723a20ba7d as ACKed on IRC, drop the unused $Id$ tags everywhere 2010-12-20 12:29:10 -08:00
Kees Cook
46e96476d8 add python2.7 to python abstraction, LP: #644983
Bug: https://launchpad.net/bugs/644983
2010-12-20 12:10:52 -08:00
Jamie Strandboge
b3c6ec3ded add aa_change_profile.pod manpage and reference it in aa_change_hat.pod 2010-12-20 14:01:58 -06:00
Kees Cook
319777962b update RPM spec, thanks to Christian Boltz. See https://bugzilla.novell.com/show_bug.cgi?id=619893 2010-12-20 12:01:23 -08:00
John Johansen
283abda83c Default permission-hashing for dfa creation to on, to fix a bug
When doing permission merging in the dfa minimization phase the information
about whether a rule is dominant or not has been lost so the merge of
xtransitions can not be handled correctly.

When two conflicting x transitions are merged the results are unpredicitable
and not currently detected.  So default dfa minimization to set up its
initial partitions with permission hashing, this ensures that dfa states
that have different xtransitions in the minimization stage will never
be merged thus will not result in a conflict.

x permission checking is still enforced at the dfa creation phase where
the originial information is available to check whether the conflicting
permissions came from exact match or re rules so that conflict resolution
can be properly applied.

The end result is that dfa minimization does not result in a truely minimal
dfa (the minimization phase is also slightly faster).

Signed-off-by: John Johansen <john.johansen@canonical.com>
2010-12-20 11:58:44 -08:00
John Johansen
77be2c450f Add the safe xtransition key word
Currently apparmor provides the unsafe keyword to indicate an xtransition
is not scrubbing its environment variables.  This can be used to be
explicit about which transition are unsafe instead of relying on people
remembering which of px Px is safe or unsafe.

Add the orthogonal keyword safe to allow specifying a transition is
safe.

Signed-off-by: John Johansen <john.johansen@canonical.com>
2010-12-20 11:58:05 -08:00
John Johansen
4eea3ae073 Make meaning of leading permissions consistent with trailing permissions
x Permissions when specified as a the start of the rule had a differnt
meaning than when they appeared at the tail of a rule.

Specifically px,cx,ux were not treated as unsafe when they appeared at
the start of the rule.
  px /foo,
instead of at the tail of the rule
  /foo px,

the keyword unsafe had to be used to force the rule to cause the x transitio
to be its unsafe variant.

Fix leading permissions so that they are consistent with file rules that
use trailing permissions.

Signed-off-by: John Johansen <john.johansen@canonical.com>
2010-12-20 11:56:57 -08:00
John Johansen
c059224811 Merge parsing of file rules with leading permissions into a single rule
Signed-off-by: John Johansen <john.johansen@canonical.com>
2010-12-20 11:56:30 -08:00
John Johansen
a29078ac04 Add auto generation of tests to verify leading and trailing perms for xrules
Test the leading permission form of an xrule against its trailing permission
form, to verify that they are generating the same xtransition and thus
don't conflict (assumes xtransition conflict checking is working).
  eg.
    px /foo,
    /foo px,

should generate the same rule and thus not result in any conflicts

Signed-off-by: John Johansen <john.johansen@canonical.com>
2010-12-20 11:54:27 -08:00
John Johansen
851b7655c1 Add auto generation of xtransition conflict tests
All the combiniation of xtransition conflics where not well represented in
the regression test suite.  Instead of relying on multiple static test
files, automatically generate all possible conflicts.

Signed-off-by: John Johansen <john.johansen@canonical.com>
2010-12-20 11:53:52 -08:00
John Johansen
bdea9e5678 Fix two x transition conflict bugs.
The is_merged_x_consistend macro was incorrect in that is tested for
USER_EXEC_TYPE to determine if there was an x transition.  This fails
for unconfined execs so an unconfined exec would not correctly conflict
with another exec type.

The dfa match flag table for xtransitions was not large enough and not
indexed properly for pux, and cux transitions.  The index calculation did
not take into account the pux flag so that pux and px aliased to the same
location and cux and cx aliased to the same location.

This would result in the first rule being processed defining what the
transition type was for all following rules of the type following.  So
if a px transition was processed first all pux, transitions in the profile
would be treated pux.

Signed-off-by: John Johansen <john.johansen@canonical.com>
2010-12-20 11:52:53 -08:00
John Johansen
6d6df2a16b Make libaare built depend on immunix.h
The dfa engine uses the defines from immunix.h for permission conflict
checking, so make the build depend on it.

Signed-off-by: John Johansen <john.johansen@canonical.com>
2010-12-20 11:52:10 -08:00
John Johansen
240c4e3674 Fix error checking of conflicting x-trans during dfa construction.
During some of the dfa cleanups, the checks for conflicting xtransition
was removed.  This adds the conflict checking back in and makes it part
of dfa creation.

Signed-off-by: John Johansen <john.johansen@canonical.com>
2010-12-20 11:51:20 -08:00
John Johansen
fb61ea7635 Fix xtrans tests
Several of the x-trans tests where failing because of the include file was
bad.  This kept the test from testing what it was supposed as the test
was expected to fail.  Thus hidding a bug :(

Signed-off-by: John Johansen <john.johansen@canonical.com>
2010-12-20 11:50:31 -08:00
John Johansen
d4ca9f3ba0 Add profile names that are independent of attachment specification
Add the ability to specify the name and attachment of the profile
separately. It does not allow for the attachment specification to
begin with a variable however since variables in profile names is not
currently support this shouldn't be and issue.

Signed-off-by: John Johansen <john.johansen@canonical.com>
2010-12-20 11:49:42 -08:00
Jamie Strandboge
49f27414e0 update the man pages to:
* add Canonical to the headers of the pod files touched
  * use aa_change_hat() instead of change_hat() (LP: #692216)
  * use http://wiki.apparmor.net in the SEE ALSO
  * use http://https://bugs.launchpad.net/apparmor/+filebug for bugs
  * prefix 'aa-' in SEE ALSO section for utilities (eg, 'aa-complain' for
    'complain')
2010-12-20 13:47:09 -06:00
Jamie Strandboge
77b864527a changehat/mod_apparmor/mod_apparmor.pod: make several clarifications and
add a summary for the order of operations
2010-12-20 13:45:56 -06:00
Jamie Strandboge
e5f4aa4140 parser/apparmor.d.pod: more fully document child profiles, including:
- cx and Cx
  - change_profile()
2010-12-20 13:40:59 -06:00
Jamie Strandboge
289dcfb492 add [^] 2010-12-20 12:50:53 -06:00
Jamie Strandboge
79828d1f10 LP: #349049: document audit, deny and owner rule qualifiers 2010-12-20 12:48:26 -06:00
Jamie Strandboge
7296af3f39 mod_apparmor.pod: adjust for Canonical, launchpad and Ubuntu binaries and tools 2010-12-20 08:35:00 -06:00
Jamie Strandboge
2ade2782d4 parser/apparmor.d.pod: clarify alias rules 2010-12-20 08:34:12 -06:00
John Johansen
34c78d34b1 Combine hat and local profile parsing into the same base rule as profile
parsing.
2010-12-13 16:29:16 -08:00
John Johansen
7c1f5fd932 Merge profile and :namespace:profile parsing into a single rule.
clean up profile parsing by merging profile and :namespace:profile parsing
into a single rule.

This also fixes a bug where the profile	keyword was not allowed to proceed
profiles with a namespace declaration.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-By: Steve Beattie <sbeattie@ubuntu.com>
2010-12-13 16:26:38 -08:00
Steve Beattie
810f54ffdd Bug: https://bugzilla.novell.com/show_bug.cgi?id=510740
Short summary: Unloading of profiles with a space in the name fails,
therefore "rcapparmor stop" (or restart) causes a funny message - and
the profile is still loaded.

Thanks to Christian Boltz <apparmor@cboltz.de>
2010-11-29 13:40:45 -08:00
Steve Beattie
8740fd517d This patch fixes the parser's lexer to not passthrough other invalid
characters in variable declarations. It also adds testcases
demonstrating the issue.
2010-11-19 02:27:33 -08:00
Steve Beattie
7ef28d9fdc This patch fixes the parser to return an error when variable declaration
statements contain trailing commas, instead of passing them through to
STDOUT. It also adds parser testcases demonstrating the issue.
2010-11-19 01:42:04 -08:00
Steve Beattie
83c4a5132e This minor patch updates the compilation dependencies for bits of the
parser that interact with the regex DFA generation library, and thus
need to be recompiled when the header file changes.

(This patch isn't particularly of interest to distros, as they
typically won't be doing incremental compilation.)
2010-11-12 13:38:21 -08:00
John Johansen
85c133cd84 Rework the code so that update for nodes is now a function
The other changes have made it so that using a macro really isn't justified
so rework the code to get rid of the hiddeous update_for_nodes macro.

Signed-off-by: John Johansen <john.johansen@canonical.com>
2010-11-11 16:20:32 -08:00
John Johansen
d551a1a9ab Make the work_queue be a work_queue of states that need finished computing
With the addition of the nodes field to the state we can make the work
queue, be based off of the state instead of the node, and avoid doing
the node to map lookup to get back to the state.

This means that the NodeMap is now only used for duplicate elimination.

Signed-off-by: John Johansen <john.johansen@canonical.com>
2010-11-11 16:19:47 -08:00
John Johansen
e87e45c0a2 Factor updating the state transitions into its own fn
Factoring the updating of the state transitions doesn't save on any code
but it provides a nice logical seperation and makes the dfa work_queue
loop and the updating of the state transitions easier to understand as
units.

Signed-off-by: John Johansen <john.johansen@canonical.com>
2010-11-11 16:18:48 -08:00
John Johansen
72aa490e49 Factor adding a new state to the dfa the map into its own function
Signed-off-by: John Johansen <john.johansen@canonical.com>
2010-11-11 16:16:38 -08:00
John Johansen
35d55fce81 Move state label, nodes, and permission setting into the State constructor
Signed-off-by: John Johansen <john.johansen@canonical.com>
2010-11-11 16:14:12 -08:00
John Johansen
5578299445 Group dfa stats into a single structure.
Move the dfa stats into a structure to provide a single access point to
them.

Signed-off-by: John Johansen <john.johansen@canonical.com>
2010-11-11 16:12:50 -08:00
John Johansen
99a7991664 Rename the match_count variable to duplicates
The match_count variable is a sum of the number of duplicates node sets
that have been encountered and discarded.  Rename it to better reflect what
it is doing.

Signed-off-by: John Johansen <john.johansen@canonical.com>
2010-11-11 16:09:05 -08:00
John Johansen
15567a55dc Embedded the temporary computed nodes as part of the state
Embedding the nodes are part of the state gives fast back reference from
the state to the nodes that created it.  This is useful for the state to
nodes mapping dump as it lets us output the states in order.  It will also
let us avoid certain nodemap lookup in the future.

Overlay the nodes field (used only in dfa construction) with the partition
field which is only used during dfa minimization to avoid making the state
any larger.

Signed-off-by: John Johansen <john.johansen@canonical.com>
2010-11-11 16:08:02 -08:00
John Johansen
5b68e0f7c4 Fix comment about what state information is being dumped
Signed-off-by: John Johansen <john.johansen@canonical.com>
2010-11-11 16:06:52 -08:00
Kees Cook
eaa6a3c297 This cleans up a number of warnings that appeared after the parser rework
commits were made (as well as a few other minor warnings elsewhere).

The Makefile change is to avoid passing -Wstrict-prototypes and
-Wnested-externs to the C++ compiler, which the compiler yells about and
then ignores.

Since we compile with -Wmissing-field-initializers I dropped the
unreferenced zero-width fields in the header structs, and then explicitly
initialized the remaining fields.

I tagged several unused function parameters to silence those warnings.

And finally, I dropped the unused filter_escapes() too.
2010-11-09 13:39:18 -08:00
John Johansen
d53bb7f811 Embedded the State to partition mapping into the State.
Embedding the the partition mapping into the State structure significantly
speeds up dfa minimization, by converting rbtree finds to straight direct
references when checking for same mappings.

The overall time improvement is small but it can half the time spent in
minimization.
2010-11-09 11:57:43 -08:00
John Johansen
29c6f7e3ac Re-enable the ability to invoke remove-unreachable-states.
Now that removing unreachable states is not on by default re-enable the
ability to turn it on.
2010-11-09 11:56:58 -08:00
John Johansen
14e7d94701 Add ability to dump unique permission sets 2010-11-09 11:56:28 -08:00
John Johansen
318351376c Add the ability to dump NodeSet to dfa state mapping 2010-11-09 11:55:40 -08:00
John Johansen
af8b3b84ef Use nodemap.size() to label state node
The nodemap.size() increases by one with each node added, every time we
add a state we label it so this provides the proper labeling without needing
a separate variable.
2010-11-09 11:55:05 -08:00
John Johansen
b64921a5ec Add tracking of the node set (proto state) max, and average size 2010-11-09 11:54:20 -08:00
John Johansen
f1a3f66515 Add -D stats and -D progress options
add short options to turn on all stats, and all progress indicators,
also allow adding "no-" prefix to dump options to allow subtracting
individual options when short options are used.

eg.
  -D stats -D no-expr-simplify
2010-11-09 11:53:38 -08:00
John Johansen
6b4dff4bee Move -O and -D options and documentation into tables
Move the -O and -D options into tables, that keep the option and its
description.  This will help keep the options consistent and the description
up to date, as all information is now in one place.

Previously the options, and descriptions kept getting out of sync as all
relavent parts were spread out.
2010-11-09 11:52:38 -08:00
John Johansen
de2dec2bec Reduce the number of -O flag options by factoring our no- prefix
Factor out the "no-" prefix so that optimization flags and their no-
counter parts are handled by the same code.
2010-11-09 11:50:13 -08:00
John Johansen
fae7cac15c Rename trans-XXXX transition to compress- compression
trans- isn't a very good name for this phase of compilation.  It is the
compression phase, rename to trans- to compress- to reflect this.
2010-11-09 11:49:18 -08:00
John Johansen
8972e4f577 Generic cleanup pass of -D and -O options 2010-11-09 11:48:53 -08:00
John Johansen
0ad84d93f9 Factor out expr tree rotation into its own function 2010-11-09 11:48:29 -08:00
John Johansen
ac9553de19 Rework tests against Epsnodes to compare to the singleton
Dynamic casts are slower than plain comparisons so rework epsnode comparison
to use comparisons to the singleton epsnode instead of dynamic_casts.
2010-11-09 11:47:37 -08:00
John Johansen
6801346b81 Add cnode class as a base class of all expr nodes that contain character info 2010-11-09 11:46:05 -08:00
John Johansen
04d6c727e1 Add a leafnode class to clearly indicate what node types are leaf nodes 2010-11-09 11:44:26 -08:00
John Johansen
aec77cecde Move nodes around to put one child node together and two child nodes together 2010-11-09 11:38:20 -08:00
John Johansen
0f26d8f097 Further split up innernode, to be able to better identify the types of
inner nodes.

This is part of a serious of patches to cleanup expr nodes, by separating
out functionality and reducing the number of dynamic casts.
2010-11-09 11:36:14 -08:00
John Johansen
cb2ebc3102 Rework the depth first traversal of expr trees, to remove the use of the
unneeded visited table, and give a little speed up and cleanup.
2010-11-09 11:35:38 -08:00
John Johansen
d2581332db This is part of a serious of patches to cleanup expr nodes, by separating
out functionality and reducing the number of dynamic casts.
2010-11-09 11:34:59 -08:00
John Johansen
adb0973d61 Update Makefile to pass CFLAGS into libapparmor_re 2010-11-09 11:33:40 -08:00
John Johansen
7f987f93d1 As from a library pov they should be seperately callable fns, and this will
help reduce peak memory usage in some cases.

Also disbale remove_unreachable, as the current dfa code isn't generating
unreachable states, and minimization removes any states that are connected
but redundant.
2010-11-09 11:28:56 -08:00
John Johansen
c5fa0e98b3 Reference counting of Nodes exists to shared the special accept nodes that
hold permission information.  We currently keep them in a table with a
refcount so that they don't go away, until we delete the table.

We can simulate this by getting rid of the refcount, and making dup and release
virtual, and overriding it for the special accept nodes.
2010-11-09 11:28:22 -08:00
John Johansen
a84844cea5 Do not use permission hashing for minimization by default. While this
improves minimization performance, it can slow down total creation time and
result in larger compressed dfas.

This is because it results in the dfa not being completely minimized which
with the current O(n2) dfa table compression algorithm can result in slower
compressed dfa generation.
2010-11-09 11:27:36 -08:00
John Johansen
51f443c7b6 Update state progress/stats output to dump the number of accepting
states/partitions occur in the minimized dfa.
2010-11-09 11:26:50 -08:00
John Johansen
c2601dbd30 Cleanup the perm_map as soon as it is no longer needed. Cleaning up the map
before the end of the functions reduces the peak memory of the function
2010-11-09 11:26:18 -08:00
John Johansen
2fb64fa85e When hashing Nodes ensure that cases.otherwise == NULL is treated the same
as pointing to the nonmatching state.  Having this mix shouldn't currently
exist but adding the extra check makes the code more robust.
2010-11-09 11:25:44 -08:00
John Johansen
4e80416a4f Do permission accumulation in dfa minimization. This is necessary if accept
states with different permissions are to ever share a partition.
2010-11-09 11:24:51 -08:00
John Johansen
a949b075b4 The dfa flags currently are a weird mix of position and negative assertions.
Its cleaner just to have them all assert one way and let the cmd line
options apply them correctly.
2010-11-09 11:23:45 -08:00
John Johansen
36e99af7fb Split dfa minimizing hashing into two seperately controllable hashes. The
first hash does hashing on state just state transitions, which always results
in a performance improvement.

The second does hashing based off of accept permissions, which can create
more initial states but can result in not being able to achieve a true
minimum dfa.  This can also lead to slowing down total dfa creation because
while minimization, compression can take longer if the dfa isn't completely
minimized.

permission hashing is currently required, as minimization does not accumulate
redundant Node permissions.
2010-11-09 11:22:54 -08:00
John Johansen
9b99039fdb Convert Nodemap comparision to use a hash value. This uses a little more
memory than just using the NodeSet size to short circuit comparison but it
improves on the case where compared sets have the same size.  It is possible
that this will slow down small dfa generation slightly but the trade off for
large dfa's (which are the slow ones to generate) is worth it.

This results in another performance bump over using the NodeSize is NodeSet
comparison, and the amount of improvement increases with larger dfas
2010-11-09 11:20:08 -08:00
John Johansen
344e11a539 Use set size as part of set comparison, short circuiting comparing sets
of pointers when it isn't necessary.  This results in a nice little
performance increase in dfa creation.

This is more of a proof of concept patch, and is replaced by the next
patch which does better short circuiting via hashing
2010-11-09 11:18:46 -08:00
John Johansen
ca1d891799 This patch reworks the internal structures used to compute the dfa. It is on
the large side, and I experimented with different ways to split this up but in
the end, anything I could do would result in a series of dependent patches
that would require all of them to be applied to get meaningful functional
changes.

The patch structural reworks the dfa so that
- there is a new State class, it takes the place of sets of nodes in the
  dfa, and allows storing state information within the state
- removes the dfa transition table, which mapped sets of nodes to a
  transition table, by moving the transition into the new state class
- computes dfa state permissions once (stored in the state)
- expression tree nodes are independent from a created dfa.  This allows
  computed expression trees, and sets of Nodes (used as protostates when
  computing the dfa).  To be managed independent of the dfa life time.
  This will allow reducing the amount of memory used, in the future,
  and will also allow separating the expression tree logic out into
  its own file.


The patch has some effect on reducing peak memory usage, and computation
time.  The actual amount of reduction is dependent on the number of states
in the dfa with larger saving being achieved on larger dfas.  Eg. for
the test evince profile I was using it makes the parser about 7% faster with a
peak memory usage about 12% less.

This patch changes the initial partition hashing of minimization resulting
in slightly smaller dfas.
2010-11-09 11:14:55 -08:00
Kees Cook
485df894ab This fixes a few typos in documentation that lintian noticed. 2010-11-04 14:27:30 -07:00
Kees Cook
38cefc358a add symlink for manpage as well 2010-11-04 13:36:38 -07:00
Kees Cook
6d2d55057c retain one backward compat symlink for the heavily-documented "apparmor_status" command 2010-11-04 11:52:33 -07:00
Kees Cook
4b9a2683ed include release version in manpage 2010-11-04 11:32:06 -07:00
Kees Cook
06b4d7db0d Make the manpage release distro agnostic though configurable. 2010-11-03 23:49:41 -07:00
Kees Cook
225c779225 This patch cleans up the testsuite output harder, and removes a bashism in
another clean target.
2010-11-03 17:04:43 -07:00
Kees Cook
6717e29909 Here is a patch to standardize on all utils using the "aa-" prefix instead
of a mix of symlinks to non-prefixed comands, and "apparmor_" prefixed
commands.

This also refactors the manpage generation slightly since we no longer
need special cases for the manpages, and drops aa-eventd from the default
list of tools to install (it also lacks a manpage).
2010-11-03 17:03:52 -07:00
Jamie Strandboge
7f1b117675 abstractions/ubuntu-browsers: adjust sensible browser to use Pixr 2010-10-22 07:43:23 -05:00
John Johansen
632b6aaf1f Add the compatibility patches for the 2.6.36 upstream kernel version of
AppArmor.
2010-10-21 10:58:18 -07:00
John Johansen
3e8a61d626 Move kernel patches for old versions of the module to deprecated 2010-10-21 10:56:01 -07:00
Jamie Strandboge
fb418015e3 add /usr/bin/emacs-snapshot-gtk PUxr to ubuntu-browsers.d/text-editors 2010-10-21 09:03:09 -05:00
Steve Beattie
db30c2bc19 This patch fixes the common/Make.rules file to not do bzr versioninfo
on every make invocation; instead it defines a command as a variable
that then is evaluated into shell variables when needed.
2010-10-18 12:12:37 -07:00
Steve Beattie
f6b043b434 Bump version up to prevent confusion at the request of jjohansen. 2010-10-18 11:18:03 -07:00
Steve Beattie
abcd1f2975 This patch makes the parser's makefile honor CFLAGS that have been
exported in the environment. Without it, merely setting the CFLAGS
environment variable would not affect the compilation of the parser,
though it was still possible to override it by passing the variable
as an argument (e.g. make all CFLAGS="-Oinsane -Wextra-special").

It also makes the default CFLAGS for the parser consistent with
the default for the C++ dfa library, and passes the flags on to
the library.

An audit of the other bits of C showed that they either supported
CFLAGS during configure or were otherwise honoring CFLAGS when set
as environment variable.
2010-10-09 14:15:59 -07:00
Steve Beattie
5849c7ab78 This patch removes a bunch of crufty old stuff, including some
subversion deritrus, the slackware tarball build support as well as
the aborted attempt to make auto building debian packages.
2010-10-07 15:42:36 -07:00
Steve Beattie
19fa8a3ed9 This patch takes the revision info from the stamp file if things are
being built outside of a working bzr tree.
2010-10-07 15:39:55 -07:00
Steve Beattie
875a06b9d7 This corrects a couple of build issues on openSUSE, as the version
of rpm there no longer defines %{_host_vendor}.
2010-10-07 15:38:31 -07:00
Steve Beattie
c90b199488 This patch moves the overall version definition of the software out of
the common/Make.rules file into common/Version so that libapparmor's
configure.in can make use of it, meaning there's one less thing to
adjust when updating the version. It also bumps the trunk version
from 2.5 to 2.5.90 in (perhaps excessively long) preparation for the
2.6.0 release, and to indicate that it's newer than the 2.5.x branch.
2010-10-07 15:37:30 -07:00
Steve Beattie
0e1158c71d This patch adds a toplevel target to add a bzr tag in a consistent
format.
2010-10-07 15:33:11 -07:00
Steve Beattie
b19f77d5c7 This patch adds toplevel support for creating release and snapshot
tarballs and converts some of the common/Make.rules targets to get
version information from bzr. As part of this, the tarball generation
creates a .stamp_rev file in the common directory which contains both
the name of the bzr repo exported from as well as the revision.
2010-10-07 15:25:21 -07:00
Steve Beattie
7e0969bf82 From: Jesse Michael <jesse@lonelyrhinoceros.com>
This just adds prototypes to all functions to make further cleanup
slightly easier by getting perl to complain if not enough args are
passed to a function.  Perl doesn't appear to complain about this in
every case even with prototypes, which is kind of annoying.
2010-10-06 13:06:05 -07:00
Steve Beattie
8e51a7b31e From: Jesse Michael <jesse@lonelyrhinoceros.com>
One of the uses of eval { } wasn't checking $@ for errors, so if
something bad happened, it'd be silently ignored.  This just adds in
an extra check to die if we hit a failure.
2010-10-06 12:21:56 -07:00
Steve Beattie
317197a6b5 This patch modifies the xattr regression test to use a separate
loopback mounted filesystem to operate on, to guarantee that the mount
option user_xattr is enabled (it's disabled by default on Ubuntu).

With this change, a number of the user xattr testcases that were
expected to pass but weren't started working; however, some of the
ones that were failing as expected are now passing. I've touched up
the expectations as well.
2010-09-30 10:49:26 -07:00
Jamie Strandboge
39902eff28 abstractions/ubuntu-email: adjustment for ever-changing path of thunderbird
(LP: #648900)
2010-09-27 08:47:08 -05:00
Jamie Strandboge
2cb3463cc8 add ubuntu-integration-xul for firefox-notify 2010-09-23 08:16:56 -05:00
Steve Beattie
60b014667a When loading without the 2.4 compatibility patch, the parser needs the
following patch or it will explode when it can't find the "features"
file.

Bug: https://bugs.launchpad.net/ubuntu/+source/apparmor/+bug/626984
From: Kees Cook <kees@ubuntu.com>
2010-09-16 10:24:50 -07:00
Steve Beattie
d7fde9d109 Reorders the timstamp check to move it to the beginning of the
script and add an additional sleep before the parser invocation that
generates the cache file for the first time, to avoid failures in the
"Profiles are cached when requested:" test on ext3 and other filesystems
without fine-grained enough timestamps.
2010-09-15 14:28:35 -07:00
Kees Cook
72701bd2a0 drop duplicate extern from rev 1496 2010-09-15 12:24:12 -07:00
Jamie Strandboge
6b81b50d36 ubuntu-browsers.d/multimedia: allow lpr and lpstat for printing from flash
plugin
2010-09-15 08:20:21 -05:00
Kees Cook
862836548d Fix write_cache to not be a privileged operation so that the caching tests
can be added to the build. Update caching tests to detect non-ns-resolution
filesystems and back off on the timing test.
2010-09-14 12:45:34 -07:00
Kees Cook
feb70284bc Effectively revert revno 1471, and fix the misdetected error condition
so that caching will work again without needing kernel_load.
2010-09-14 12:38:38 -07:00
Kees Cook
3a1fbb49f4 fix up typo and add extern for update_mru_tstamp 2010-09-14 12:37:59 -07:00
John Johansen
02e86864da This patch changes how cache validation is done, by moving it post
parsing, and precompilation of policy.  This allows finding the most
recent text time stamp during parsing and this is then compared to
the cache file time stamp.

While this is slightly slower than the cache file check that only
validated against the profile file it fixes the bug where abstraction
updates do not cause the cache file to become invalid.
2010-09-14 12:22:02 -07:00
Jamie Strandboge
b465b91ec9 exported smbd files need to have 'k' to work properly with certain applications 2010-09-14 14:12:49 -05:00
Jamie Strandboge
7aac7a23a3 profiles/apparmor.d/local/README: use commented text since aa-genprof is pretty
grumpy without it
2010-09-10 09:39:29 -05:00
Steve Beattie
8fd1f15ae7 Add testcases for trunk commits 1486-1490. 2010-09-09 17:14:25 -07:00
John Johansen
5c43890b31 Change the second key_capability entry into a comment and document why
its there and what to do with it once the old entry types are cleaned up.
2010-09-09 16:51:44 -07:00
John Johansen
073064bdb0 The new apparmor module uses has added a target key that is used to report
the target of an operation instead of name2 used in previous kernels
2010-09-09 12:22:02 -07:00
John Johansen
59597775e5 Status messages have and offset field used to debug why and where a policy
load failed.  For now just ignore it.
2010-09-09 12:21:19 -07:00
John Johansen
4c666b4d2f The kernel can return negative error codes for error= 2010-09-09 12:20:30 -07:00
John Johansen
1e098b5928 The capability operation picked up the capability and capname fields.
capability is reported by LSM_AUDIT and is just the capability number.
capname is reported by the apparmor module and is the name the kernel
knows the capability as.

For now just use capname and silently drop capability when it is found.
2010-09-09 12:19:08 -07:00
John Johansen
4fcd7e94f5 If encountered the scanner will dump unmatched text from <audit_id>. 2010-09-09 12:17:03 -07:00
John Johansen
513611ff92 Fix memory leak where apparmor_notify is not freeing up messages that
are not reported.
2010-09-09 10:40:38 -07:00
John Johansen
fe3cce7828 Default apparmor_notify to report messages, when it is installed and
started.  Since apparmor_notify is not installed by default and not started
by default, the act of installing and starting it implies the desire to
get messages.
2010-09-09 10:31:45 -07:00
Jamie Strandboge
edb1ae1798 allow mmap of font cache files in @{HOME}/.fontconfig/ for sun-java6 2010-09-08 13:56:19 -05:00
Jamie Strandboge
85c20fb564 update ubuntu-browsers.d/java for latest sun-java6 (LP: #633369) 2010-09-08 12:27:09 -05:00
Jamie Strandboge
834efc7b2c fix LP: #626451 (GoogleTalk in ubuntu-browsers.d/multimedia) 2010-09-08 08:51:06 -05:00
Jamie Strandboge
d2c61794ea update fonts abstraction to add '/var/lib/ghostscript/** r,' 2010-09-03 08:38:14 -05:00
Jamie Strandboge
b56e654f26 abstractions/ubuntu-browsers: add '/usr/bin/sensible-browser PUxr' 2010-08-30 07:52:20 -05:00
John Johansen
d256e1f9c0 The upstream 2.6.36 kernel is missing the /sys/kernel/security/apparmor/profiles file, so introspection of which profiles are loaded is not possible.
Make testing of profiles loaded conditional on introspection being present.
2010-08-26 10:38:27 -07:00
John Johansen
8762c1dcfb The upstream 2.6.36 version of apparmor doesn't support network rules.
Add a flag to the parser controlling the output of network rules,
and warn per profile when network rules are not going to be enforced.
2010-08-26 10:37:46 -07:00
John Johansen
1f1a303457 The upstream 2.6.36 version of apparmor is missing the match file,
so the parser doesn't set matching options correctly.

Set minimal defaults with that will allow the parser to load policy,
on 2.6.36 kernels.
2010-08-26 10:36:45 -07:00
Steve Beattie
046e1fb215 This is an incomplete fix for bug
https://bugs.launchpad.net/apparmor/+bug/623467

This patch adds some additional testcases to the log parsing
testsuite, to cover rejections for operations that aren't covered by
other testcase (truncate, rename_src, rename_dest, mkdir) as well
as fixing SubDomain.pm to take those operations into account when
parsing log files.

The operations link, unlink, and possibly setattr still need to be
covered by SubDomain.pm
2010-08-25 09:53:39 -07:00
Steve Beattie
341877416e Creating lame empty error files that dejagnu needs for its tests.
Apologies for not getting an ACK on this commit.
2010-08-23 22:34:51 -07:00
Steve Beattie
6c31d0d894 This commit teaches pam_apparmor about the current errno returned by the
kernel when the hat that was passed does not exist in the profile (but
other hats exist). It also removes the very old EPERM case, which hasn't
been accurate for a while. (LP: #619521)
2010-08-19 08:24:41 -07:00
Jamie Strandboge
40751c2ed3 abstractions/ubuntu-browsers.d/ubuntu-integration: update for kmozillahelper
and gnome-appearance-properties (LP: #514356, LP: #573344)
abstractions/ubuntu-browsers.d/user-files: update for /net (LP: #593413)
2010-08-18 10:06:40 -05:00
John Johansen
d72422b369 When doing debugging/building dfa graphs, generally I use -QT however
this results in

Unable to open output file - Success

to be output to standard error.

This occurs because despite specifying kernel_load = 0, the kernel load
parts are still being done, and failing.
2010-08-17 08:03:07 -07:00
John Johansen
291066dcbd On certain graphs the dfa graph dump output can become messed up as it isn't properly handling non-printing characters in the case of single character
output.  Drop the cast to signed character which messes up the output.
2010-08-17 08:02:27 -07:00
Jamie Strandboge
c96c8a391f profiles/apparmor.d/abstractions/ubuntu-browsers.d/java: generalize names
of child profiles
2010-08-11 14:10:16 -05:00
Jamie Strandboge
7536899894 create ubuntu-feed-readers abstraction and have ubuntu-browsers.d/multimedia
use it instead of specifying liferea directly
2010-08-11 09:58:34 -05:00
Jamie Strandboge
44f2e73d1b update X abstraction for gdm's new placement of XAUTHORITY (LP: #601583) 2010-08-11 09:57:54 -05:00
Jamie Strandboge
9e99dfc8b2 add ca-certificates to ssl_certs abstraction (LP: #605835) 2010-08-11 09:15:56 -05:00
Jamie Strandboge
42cd946ff2 update ubuntu-browsers.d/kde to use PUx for kde4-config 2010-08-10 17:57:42 -05:00
Jamie Strandboge
cbbf3ea75e update abstractions/ubuntu-browsers.d/java for icedtea 2010-08-10 16:45:23 -05:00
Jamie Strandboge
23a77d70e8 adjust profiles/Makefile for abstractions/ubuntu-browsers.d 2010-08-10 16:42:00 -05:00
Jamie Strandboge
e1e85f285c remove kde4-config from the kde abstraction 2010-08-10 15:38:58 -05:00
Jamie Strandboge
6988cd07a0 adjust profiles/apparmor.d/local/README to codify the intended usage of local/ 2010-08-10 14:28:10 -05:00
Jamie Strandboge
1bdb6069da fix whitespace abstractions/ubuntu-browsers.d/*
add 'owner' match to abstractions/ubuntu-browsers.d/java
2010-08-10 14:18:21 -05:00
Jamie Strandboge
0978a1ad8a update ubuntu-* abstractions to use PUx instead of Ux 2010-08-10 14:11:04 -05:00
John Johansen
350520a650 Add check to the regression tests that verifies the expected profiles
are loaded.
2010-08-10 09:24:41 -04:00
Jamie Strandboge
2a3aae6d57 'owner' match in commit 1406 too strict for /tmp/ and /var/tmp/ 2010-08-09 09:56:31 -05:00
Jamie Strandboge
d472cf13b1 add Ubuntu-specific profiles/apparmor.d/abstractions/ubuntu-browsers.d/*
for use with browser profiles
2010-08-06 16:01:57 -05:00
Jamie Strandboge
eace04e2e7 profiles/Makefile: use LOCAL_ADDITIONS using filter-out in clean target, which
is much cleaner.
2010-08-05 16:00:23 -05:00
Jamie Strandboge
f9187ac661 profiles/Makefile: use same logic in 'clean' target as we did in 'local' 2010-08-05 15:53:07 -05:00
Jamie Strandboge
9c3fb960e8 implement 'local/' mechanism to aid in packaging:
- create profiles/apparmor.d/local/README to explain it all
- adjust shipped profiles in profiles/apparmor.d to include the local changes
- adjust profiles/Makefile for local files
2010-08-05 15:30:43 -05:00
Jamie Strandboge
b550fa291c adjust profiles/Makefile for local files 2010-08-05 15:10:33 -05:00
Jamie Strandboge
6fb3f5c4a6 move profiles/local to profiles/apparmor.d/local 2010-08-05 14:15:56 -05:00
Jamie Strandboge
f25949cf84 start on 'local/' mechanism to aid in packaging:
- add profiles/local/README
- adjust profiles/apparmor.d/{bin,sbin,usr}* to include a file from local/
- adjust profiles/apparmor.d/{bin,sbin,usr}* for for copyright, some whitespace
  and svn conventions
2010-08-05 14:00:02 -05:00
Kees Cook
cc434a1c7f Fixes "deleted" test case to match the documentation for the expected
outcome. Adds additional positive test, fixes spelling.
2010-08-04 12:22:48 -07:00
John Johansen
5c8581a345 Update the regression test suite to test chmod, chown and chgrp on directories. 2010-08-04 10:25:44 -07:00
John Johansen
6259edac38 Update and expand comments on regex tree normalization 2010-08-04 10:23:22 -07:00
John Johansen
f0220611aa Epsnodes carry no information beyond the node type. Convert to using
a single static node, which will reduce allocations and peak memory
use slightly.
2010-08-04 09:53:46 -07:00
John Johansen
5c8051994b Make -q quiet can not update cache warnings 2010-08-04 09:52:54 -07:00
Jamie Strandboge
62f2e7f06e fix for LP: #611248 (gdk pixbug loaders)
tighten up the dbus abstractions
2010-08-03 12:06:29 -05:00
Jamie Strandboge
24e3b5296e tighten up the dbus abstractions 2010-08-03 12:04:37 -05:00
Jamie Strandboge
9533ac3405 fix for LP: #611248 2010-08-03 09:13:34 -05:00
John Johansen
b5c780d2a1 Remove pcre and update tests where necessary 2010-07-31 16:00:52 -07:00
Kees Cook
06ebb0b6d6 use wildcards correctly for utils subdirectory ignores 2010-07-26 11:02:42 -07:00
Kees Cook
5f76ba2ae3 Cleanups in libapparmor that should have been part of commit 1437. These
were part of the ACKed patch on the mailing list.
2010-07-26 10:58:07 -07:00
Kees Cook
32d899eb6d The coredump regression test existed in the tree, but was not hooked up to
the testsuite. It looks like coredump mediation may have been removed,
since it is rather a corner-case, so I have currently marked it as XFAIL.

In hooking it back up, the "prologue.inc" was reviewed, dead code dropped,
and the "image=" argument changed to correctly handle the imageperms
syntax used elsewhere. It was working in other tests out of coincidence.
2010-07-26 10:55:00 -07:00
Kees Cook
b30b4c1877 Fixes several warnings, typos, clarifies a subtest description and starts
to try to get rid of programmatic use of $Id$ in kernel regression tests.
2010-07-26 10:50:33 -07:00
Kees Cook
0d357a892b Actually fail "make tests" if any of the tests fail to run. 2010-07-26 10:46:03 -07:00
Kees Cook
e180ed4ccb There didn't seem to be a way to see individual test successes, so I added
a check for "VERBOSE=1" in the kernel regression testsuite.
2010-07-26 09:30:36 -07:00
Kees Cook
27ce962708 Rename "subdomain" to "apparmor" in kernel regression tests.
Includes spelling fixes, drops of old documentation, and removal of notes on
tests that no longer fail.
2010-07-26 09:26:26 -07:00
Kees Cook
084f975d5e Drop unused file descriptor. 2010-07-26 09:25:00 -07:00
Kees Cook
624aee531a Fix many compile-time warnings.
Start replacing RPM with lsb-release.
Drop old references to CVE.
Remove unused code.
2010-07-26 09:22:45 -07:00
Kees Cook
a92f9e67b3 Add "comm" string to the parser structure and testsuite runner. Update
testsuite output to include "comm" report.
2010-07-26 09:20:02 -07:00
Kees Cook
5649f5237b Add testcases for new LSM-audit log messages.
Update log parser grammar to handle new LSM-audit log messages.
2010-07-26 09:16:23 -07:00
Kees Cook
24a05b0bf5 add kernel regression test build-time by-products to ignore list 2010-07-25 19:00:51 -07:00
Kees Cook
359514432f add more build-time by-products to the ignore list 2010-07-25 18:59:58 -07:00
Kees Cook
cf706a37f0 add build-time by-products to the .bzrignore for libapparmor 2010-07-25 18:52:19 -07:00
John Johansen
4be07c3265 This adds a basic debug dump for the conversion of each rule in a profile to its expression
tree.  It is limited in that it doesn't currently handle the permissions of a rule.

conversion output presents an aare -> prce conversion followed by 1 or more expression
tree rules, governed by what the rule does.
eg.
  aare: /**   ->   /[^/\x00][^\x00]*
  rule: /[^/\x00][^\x00]*  ->  /[^\0000/]([^\0000])*

eg.
echo "/foo { /** rwlkmix, } " | ./apparmor_parser -QT -D rule-exprs -D expr-tree

aare: /foo   ->   /foo
aare: /**   ->   /[^/\x00][^\x00]*
rule: /[^/\x00][^\x00]*  ->  /[^\0000/]([^\0000])*

rule: /[^/\x00][^\x00]*\x00/[^/].*  ->  /[^\0000/]([^\0000])*\0000/[^/](.)*


DFA: Expression Tree
(/[^\0000/]([^\0000])*(((((((((((((<513>|<2>)|<4>)|<8>)|<16>)|<32>)|<64>)|<8404992>)|<32768>)|<65536>)|<131072>)|<262144>)|<524288>)|<1048576>)|/[^\0000/]([^\0000])*\0000/[^/](.)*((<16>|<32>)|<262144>))


This simple example shows many things
1. The profile name under goes pcre conversion.  But since no regular expressions where found
   it doesn't generate any expr rules
2. /** is converted into the pcre expression /[^\0000/]([^\0000])*
3. The pcre expression /[^\0000/]([^\0000])* is converted into two rules that are then
   converted into expression trees.

   The reason for this can not be seen by the output as this is actually triggered by
   permissions separation for the rule.  In this case the link permission is separated
   into what is shown as the second rule: statement.
4. DFA: Expression Tree dump shows how these rules are combined together

You will notice that the rule conversion statement is fairly redundant currently as it just
show pcre to expression tree pcre.  This will change when direct aare parsing occurs,
but currently serves to verify the pcre conversion step.


It is not the prettiest patch, as its touching some ugly code that is schedule to be cleaned
up/replaced. eg. convert_aaregex_to_pcre is going to replaced with native parse conversion
from an aare straight to the expression tree, and dfaflag passing will become part of the
rule set.
2010-07-23 13:29:35 +02:00
John Johansen
837f47c921 This is the user space fix for launchpad.net/busgs/599450
It changes the table resizing so that there is always sufficient
high entries in the table, preventing bounds violations from
occurring.

Previously the resize allocation was always based on the character
set range for a state, which could be more or less than actually
required, and packing would waste some space when over allocation
was done.

As a result this patch in general results in slightly smaller
transition tables even though it enforcing the minimum required
padding to avoid bounds violations.
2010-07-23 04:30:31 +02:00
John Johansen
bfb96638f6 This is a preparatory patch for the fix to launchpad.net/bugs/599450.
It combines the two separate table resize code segments into a single
functionally equivalent segment.  It does not fix the bug.
2010-07-23 04:29:54 +02:00
John Johansen
6453a41a28 Add extra transition table labeling to help with interpretation of the
dump output.
2010-07-23 04:29:29 +02:00
Steve Beattie
1d9ca54cec Minor touchups to the README. 2010-07-22 17:07:10 +02:00
Jamie Strandboge
1cc6ef54d0 added README file 2010-07-22 15:29:07 +02:00
John Johansen
af3476afb9 The templatization of deref_less_than is unnecessary and complicates the code
replace it with its none templatized version.
2010-07-10 17:53:04 -07:00
John Johansen
4f8e01ff36 expression tree node labeling is used during debugging dumps. Currently the node labels
are computed and stored in a map, that is not cleaned up.  This means that the labeling
is retained across different dfas.

Move the labeling into expr node as this takes less memory than using a map and will
also separates node labeling so its per dfa instead of global.  In addition this means
the labeling is cleanedup/freed when the expr tree is freed without any extra work.
2010-07-10 17:52:13 -07:00
John Johansen
d0dcab10f1 Make the transition table dump easier to understand by labeling each entry with its
index.
2010-07-10 17:49:32 -07:00
John Johansen
1004f039ec When creating the dfa the sets firstpos, lastpos, and followpos are computed for
each expression tree node and then used as input to create the dfa states.

Currently they are not being freed until the nodes are destroyed, but the information
is no longer needed once the dfa has been created.  Cleaning them up early reduces
peak memory usage.
2010-07-10 17:47:25 -07:00
John Johansen
da6df9fdc5 The apparmor parser applies the disabled and complain mode directories even when just
dumping the preprocessor output to stdout.

Add a flag to test whether to skip forcing the mode and use it with -p (dump preprocessed
profile).
2010-07-10 17:46:06 -07:00
John Johansen
a30ecbfe3c Add the -o flag to allow specifying the output file instead of loading
to the kernel.

Signed-off-by: John Johansen <john.johansen@canonical.com>
2010-06-26 13:14:56 -07:00
John Johansen
49530d5fe5 This patch adds back in the -p flag, allowing the dumping of a
flattened profile to stdout.

It currently does not do anymore than flattening the include
files.  The expansions of variables etc can be added later.
2010-06-26 13:13:52 -07:00
Steve Beattie
2d2897f426 This patch adds a couple of additional lineno reporting testcases:
* a non-include related syntax error (errors/modefail.sd)
  * multiple successful includes followed by a failed include
    (errors/multi_include.sd)

It also fixes two issues with the parser's line counting:

  * the count began at 0 (demonstrated by the first testcase's error
    being reporting on one line less than it should be), and

  * an extra line increment when includes were detected (demonstrated
    by the second testcase's error being reported at a line beyond the
    correct linenumber.

The existing testcases did not catch these because they were all
based on the first include in the file failing and so the start of
the count from 0 counteracted the extra counted line.
2010-06-25 12:43:48 -07:00
Jamie Strandboge
d744377f4a abstractions/dbus-session: use Pix instead of Ux for dbus-launch since in
addition to setting up a dbus session it can be used to launch applications
2010-06-22 11:50:31 -05:00
Jamie Strandboge
23bc2980c6 ubuntu-media-players: add gmplayer 2010-06-08 14:33:31 -05:00
Jamie Strandboge
f8c7cee59c allow thunderbird 3 in abstractions/ubuntu-email 2010-06-07 08:30:34 -05:00
Kees Cook
6737031eb9 hrm, since I added code, I need to update the copyright details. 2010-06-04 18:57:01 -07:00
Kees Cook
7cfc7e1133 add correct line number and filename tracking for error conditions (LP: #588014)
Bug: https://launchpad.net/bugs/588014
2010-06-04 18:47:44 -07:00
Kees Cook
67bd489ba8 add generated files from parser/ to ignore list 2010-06-04 18:39:20 -07:00
Kees Cook
34f5510faf network interface enumeration 2010-06-04 17:44:59 -07:00
Kees Cook
0e07298340 update for font/icon/mime locations in current gnome 2010-06-04 17:44:30 -07:00
Kees Cook
a7fd5abe37 statvfs allowed by default 2010-06-04 17:43:11 -07:00
Jamie Strandboge
a029b16066 apparmor_notify:
- verify $opt_s is initialized (LP: #582075)
- don't show summary if $opt_s < 1
2010-05-27 09:08:12 -05:00
Jamie Strandboge
ea4756a802 ##rmor_notify: show last date when using -s # -v 2010-05-14 00:08:31 +02:00
Jamie Strandboge
7d76eea05a apparmor_notify: show last date when using -s # -v 2010-05-14 00:07:32 +02:00
Jamie Strandboge
7d22b5bdce abstractions/user-tmp: require 'owner' matching 2010-05-12 10:52:23 +02:00
Jamie Strandboge
8e97e4a405 apparmor_notify: add long options. Your welcome Steve ;) 2010-05-12 10:46:22 +02:00
Steve Beattie
d6713e49cd First, readlink is in /bin/ on ubuntu, not /usr/bin - checked both
paths. Secondly, the /lib64 -> /lib symlink would mean the
/lib64/ld-linux symlink would incorrectly be generated as
/lib64/ld-N.NN.so which still has a symlink in its path, and thus
apparmor wouldn't permit the access. Fixing by having readlink
canonicalize the entire path.

ack thppt.
2010-04-27 02:37:30 -07:00
Jamie Strandboge
369e18202f add dbus-session abstraction 2010-04-19 12:38:17 -05:00
Jamie Strandboge
96b1328967 apparmor_notify: adjust '(3 total)' to '(3 found)' 2010-04-08 23:00:52 -05:00
Jamie Strandboge
0254d63fdc apparmor_notify: group like entries together when using -v with -s. Eg:
$ sudo apparmor_notify -s 1 -v
 Profile: /usr/lib/firefox-3.6.3/firefox-*bin
 Operation: exec
 Name: /usr/bin/apturl
 Denied: ::x
 Logfile: /var/log/audit/audit.log

 Profile: /usr/sbin/ntpd
 Operation: open
 Name: /var/lib/ntp/ntp.conf.dhcp
 Denied: r::
 Logfile: /var/log/audit/audit.log
 (3 total)

 AppArmor denials: 4 (since Wed Apr  7 22:57:56 2010)
 For more information, please see: https://wiki.ubuntu.com/DebuggingApparmor
2010-04-08 22:57:04 -05:00
John Johansen
b0a9f46bb7 Update parser man page to include dump and optimize flags 2010-04-03 16:24:06 -07:00
John Johansen
d295e3b444 Update several flags to not preclude there using with writing the cache,
they will however still skip reading the cache.
2010-04-03 15:41:40 -07:00
Jamie Strandboge
6186118aa0 adjust cgi path for php5 abstraction (LP: #538661) 2010-03-30 12:34:32 -05:00
Jamie Strandboge
98d20bf257 adjust path to extensions in php5 abstraction, since the extensions directory
is more free-form than once thought
2010-03-30 12:31:26 -05:00
Jamie Strandboge
c38f0f22bc apparmor_notify: remove stray print 2010-03-30 12:26:32 -05:00
Jamie Strandboge
24446dd1d0 apparmor_notify.pod: add -u and -w options 2010-03-30 10:48:51 -05:00
Jamie Strandboge
cd90674f37 apparmor_notify: fix reopening logfile after dropping privileges (ie, notice
when auditd logs get rotated)
- use getgrnam() with setgid when dropping to nobody_group
- add '-u USER' option to drop to this user when running priviliged but
  not under sudo. Useful for starting when logged in as root.
- add a read access check before get_logfile_inode() so we don't have to
  wait for the timeout in get_logfile_inode()
- set euid only when dropping privileges, instead of using POSIX::setuid()
  which sets uid, euid and saved id when starting privileged
- create send_message() function which fork/execs so that we can set the
  real uid before calling notify-send (notify-send looks at the real uid
  when trying to connect to dbus)
- adjust reopen_logfile() to raise privileges (via euid) before accessing
  logfile when $< != $>. Drop them again after open().
2010-03-30 10:31:23 -05:00
Jamie Strandboge
4cfe8e9d48 apparmor_notify.pod: update for -f 2010-03-27 09:16:38 -05:00
Jamie Strandboge
5ceb1fa1c9 apparmor_notify:
- also check for inode change
- update size to use stat
- treat logfile_size like logfile_inode
- update logfile_size and logfile_inode in reopen_logfile()
2010-03-27 09:14:33 -05:00
Jamie Strandboge
4fb9a702f0 apparmor_notify:
- add -f option to optionally specify the logfile
- when polling, check to see if the logfile size decreased, and if so, reopen
  it. Currently this only works if you can read the file after dropping
  privileges
2010-03-27 08:28:07 -05:00
Marc Deslauriers
daffe30e47 - utils/SubDomain.pm: get rid of warnings 2010-03-26 09:51:21 -04:00
Jamie Strandboge
f0b380fe5e add 'k' to /var/lib/samba/**.tdb in the samba abstraction 2010-03-25 18:13:00 -05:00
Steve Beattie
4e039d07f3 - Break out make targets so that distributors that don't want full docs
can pick targets they want. Patch from Arkadiusz Miskiewicz <arekm at
  maven.pl>.

- Comment out debug dump of generate af_names.h
2010-03-16 15:18:55 -07:00
Steve Beattie
b403bbdf82 Fix perl swig bindings so that libapparmor can be built when configured
without perl. Thanks to Arkadiusz Miskiewicz <arekm at maven.pl>.
2010-03-16 15:00:26 -07:00
Steve Beattie
8c7fea39d4 Expand parser stress test to included regexs and rlimit rules. 2010-03-15 11:31:38 -07:00
John Johansen
9efd526f6f Fix memory leak during dfa minimization.
Dfa minimization wasn't deleting the states it eliminated during the
minimization process, and hence leaking memory.
2010-03-13 02:23:23 -08:00
Steve Beattie
4ab92b62f5 Fix debug options so they don't go through the dfa engine, significantly
speeding up the time to emit debugging information.
2010-03-12 15:26:32 -08:00
Steve Beattie
bd1b72ad42 *whimper* last portiong of the strict-aliasing fix. 2010-03-12 15:20:22 -08:00
Steve Beattie
bccd45a22e Bah, managed to forget part of the last commit. The other half of fixing
the strict-aliasing bit, the portion that I don't like.
2010-03-12 15:16:06 -08:00
Steve Beattie
3b9b2158c1 Fix strict aliasing issue that triggered a bug in the parser_symtab unit
tests. I don't like the solution because it exposes a data structure
definition outside of the only file that should know it's layout.

Also, fixed the Makefile to fail the build when one of the unit test
programs fails. :-(
2010-03-12 14:41:58 -08:00
Steve Beattie
2a0df39961 Ease memory usage by collating rules in string form rather than as Rule
objects. Add randomly generating profile flags.
2010-03-12 03:05:25 -08:00
1459 changed files with 41847 additions and 101323 deletions

167
.bzrignore Normal file
View File

@@ -0,0 +1,167 @@
apparmor-*
parser/po/*.mo
parser/af_names.h
parser/cap_names.h
parser/tst_misc
parser/tst_regex
parser/tst_symtab
parser/tst_variable
parser/tst/simple_tests/generated_*/*
parser/parser_lex.c
parser/parser_version.h
parser/parser_yacc.c
parser/parser_yacc.h
parser/pod2htm*.tmp
parser/*.7
parser/*.5
parser/*.8
parser/*.7.html
parser/*.5.html
parser/*.8.html
parser/common
parser/apparmor_parser
parser/libapparmor_re/regexp.cc
parser/techdoc.aux
parser/techdoc.log
parser/techdoc.pdf
parser/techdoc.toc
libraries/libapparmor/Makefile
libraries/libapparmor/Makefile.in
libraries/libapparmor/aclocal.m4
libraries/libapparmor/audit.log
libraries/libapparmor/autom4te.cache
libraries/libapparmor/compile
libraries/libapparmor/config.guess
libraries/libapparmor/config.log
libraries/libapparmor/config.status
libraries/libapparmor/config.sub
libraries/libapparmor/configure
libraries/libapparmor/depcomp
libraries/libapparmor/install-sh
libraries/libapparmor/libtool
libraries/libapparmor/ltmain.sh
libraries/libapparmor/missing
libraries/libapparmor/ylwrap
libraries/libapparmor/doc/Makefile
libraries/libapparmor/doc/Makefile.in
libraries/libapparmor/doc/*.2
libraries/libapparmor/src/.deps
libraries/libapparmor/src/.libs
libraries/libapparmor/src/Makefile
libraries/libapparmor/src/Makefile.in
libraries/libapparmor/src/af_protos.h
libraries/libapparmor/src/change_hat.lo
libraries/libapparmor/src/grammar.lo
libraries/libapparmor/src/libaalogparse.lo
libraries/libapparmor/src/libimmunix_warning.lo
libraries/libapparmor/src/scanner.lo
libraries/libapparmor/src/libapparmor.la
libraries/libapparmor/src/libimmunix.la
libraries/libapparmor/src/grammar.c
libraries/libapparmor/src/grammar.h
libraries/libapparmor/src/scanner.c
libraries/libapparmor/src/scanner.h
libraries/libapparmor/src/tst_aalogmisc
libraries/libapparmor/swig/Makefile
libraries/libapparmor/swig/Makefile.in
libraries/libapparmor/swig/perl/LibAppArmor.bs
libraries/libapparmor/swig/perl/LibAppArmor.pm
libraries/libapparmor/swig/perl/Makefile
libraries/libapparmor/swig/perl/Makefile.PL
libraries/libapparmor/swig/perl/Makefile.in
libraries/libapparmor/swig/perl/Makefile.perl
libraries/libapparmor/swig/perl/blib
libraries/libapparmor/swig/perl/libapparmor_wrap.c
libraries/libapparmor/swig/perl/pm_to_blib
libraries/libapparmor/swig/python/Makefile
libraries/libapparmor/swig/python/Makefile.in
libraries/libapparmor/swig/python/setup.py
libraries/libapparmor/swig/ruby/Makefile
libraries/libapparmor/swig/ruby/Makefile.in
libraries/libapparmor/testsuite/.deps
libraries/libapparmor/testsuite/.libs
libraries/libapparmor/testsuite/Makefile
libraries/libapparmor/testsuite/Makefile.in
libraries/libapparmor/testsuite/libaalogparse.log
libraries/libapparmor/testsuite/libaalogparse.sum
libraries/libapparmor/testsuite/site.exp
libraries/libapparmor/testsuite/test_multi.multi
libraries/libapparmor/testsuite/config/Makefile
libraries/libapparmor/testsuite/config/Makefile.in
libraries/libapparmor/testsuite/lib/Makefile
libraries/libapparmor/testsuite/lib/Makefile.in
libraries/libapparmor/testsuite/libaalogparse.test/Makefile
libraries/libapparmor/testsuite/libaalogparse.test/Makefile.in
libraries/libapparmor/testsuite/test_multi/out
changehat/mod_apparmor/.libs
changehat/mod_apparmor/common
changehat/pam_apparmor/common
changehat/tomcat_apparmor/common
utils/common
utils/*.8
utils/*.8.html
utils/*.5
utils/*.5.html
utils/*.tmp
utils/po/*.mo
tests/regression/apparmor/access
tests/regression/apparmor/changehat
tests/regression/apparmor/changehat_fail
tests/regression/apparmor/changehat_fork
tests/regression/apparmor/changehat_misc
tests/regression/apparmor/changehat_misc2
tests/regression/apparmor/changehat_pthread
tests/regression/apparmor/changehat_twice
tests/regression/apparmor/changehat_wrapper
tests/regression/apparmor/changeprofile
tests/regression/apparmor/chdir
tests/regression/apparmor/chgrp
tests/regression/apparmor/chmod
tests/regression/apparmor/chown
tests/regression/apparmor/clone
tests/regression/apparmor/deleted
tests/regression/apparmor/env_check
tests/regression/apparmor/environ
tests/regression/apparmor/exec
tests/regression/apparmor/exec_qual
tests/regression/apparmor/exec_qual2
tests/regression/apparmor/fchdir
tests/regression/apparmor/fchgrp
tests/regression/apparmor/fchmod
tests/regression/apparmor/fchown
tests/regression/apparmor/fork
tests/regression/apparmor/link
tests/regression/apparmor/link_subset
tests/regression/apparmor/mkdir
tests/regression/apparmor/mmap
tests/regression/apparmor/mount
tests/regression/apparmor/named_pipe
tests/regression/apparmor/net_raw
tests/regression/apparmor/open
tests/regression/apparmor/openat
tests/regression/apparmor/pipe
tests/regression/apparmor/ptrace
tests/regression/apparmor/ptrace_helper
tests/regression/apparmor/pwrite
tests/regression/apparmor/readdir
tests/regression/apparmor/rename
tests/regression/apparmor/rw
tests/regression/apparmor/swap
tests/regression/apparmor/symlink
tests/regression/apparmor/syscall_chroot
tests/regression/apparmor/syscall_mknod
tests/regression/apparmor/syscall_mlockall
tests/regression/apparmor/syscall_ptrace
tests/regression/apparmor/syscall_reboot
tests/regression/apparmor/syscall_setdomainname
tests/regression/apparmor/syscall_sethostname
tests/regression/apparmor/syscall_setpriority
tests/regression/apparmor/syscall_setscheduler
tests/regression/apparmor/syscall_sysctl
tests/regression/apparmor/sysctl_proc
tests/regression/apparmor/tcp
tests/regression/apparmor/unix_fd_client
tests/regression/apparmor/unix_fd_server
tests/regression/apparmor/unlink
tests/regression/apparmor/xattrs
tests/regression/apparmor/coredump

View File

@@ -1,5 +1,4 @@
#
# $Id$
#
OVERRIDE_TARBALL=yes
@@ -8,31 +7,58 @@ include common/Make.rules
DIRS=parser \
profiles \
utils \
changehat/libapparmor \
libraries/libapparmor \
changehat/mod_apparmor \
changehat/pam_apparmor \
management/apparmor-dbus \
management/applets/apparmorapplet-gnome \
management/yastui \
common \
tests
RELEASE_DIR=apparmor-${VERSION}-${REPO_VERSION}
REPO_URL?=lp:apparmor/2.8
# alternate possibilities to export from
#REPO_URL=.
#REPO_URL="bzr+ssh://bazaar.launchpad.net/~sbeattie/+junk/apparmor-dev/"
RELEASE_DIR=apparmor-${VERSION}
__SETUP_DIR?=.
# We create a separate version for tags because git can't handle tags
# with embedded ~s in them. No spaces around '-' or they'll get
# embedded in ${VERSION}
TAG_VERSION=$(subst ~,-,${VERSION})
.PHONY: tarball
tarball: _dist
tar cvzf ${RELEASE_DIR}.tar.gz ${RELEASE_DIR}
tarball: clean
REPO_VERSION=`$(value REPO_VERSION_CMD)` ; \
make export_dir __EXPORT_DIR=${RELEASE_DIR} __REPO_VERSION=$${REPO_VERSION} ; \
make setup __SETUP_DIR=${RELEASE_DIR} ; \
tar --exclude deprecated -cvzf ${RELEASE_DIR}.tar.gz ${RELEASE_DIR}
${RELEASE_DIR}:
mkdir ${RELEASE_DIR}
.PHONY: snapshot
snapshot: clean
REPO_VERSION=`$(value REPO_VERSION_CMD)` ; \
SNAPSHOT_DIR=apparmor-${VERSION}~$${REPO_VERSION} ;\
make export_dir __EXPORT_DIR=$${SNAPSHOT_DIR} __REPO_VERSION=$${REPO_VERSION} ; \
make setup __SETUP_DIR=$${SNAPSHOT_DIR} ; \
tar --exclude deprecated -cvzf $${SNAPSHOT_DIR}.tar.gz $${SNAPSHOT_DIR} ;
.PHONY: _dist
.PHONY: ${DIRS}
_dist: clean ${DIRS}
${DIRS}: ${RELEASE_DIR}
svn export -r $(REPO_VERSION) $(REPO_URL)/$@ $(RELEASE_DIR)/$@ ; \
.PHONY: export_dir
export_dir:
mkdir $(__EXPORT_DIR)
/usr/bin/bzr export --per-file-timestamps -r $(__REPO_VERSION) $(__EXPORT_DIR) $(REPO_URL)
echo "$(REPO_URL) $(__REPO_VERSION)" > $(__EXPORT_DIR)/common/.stamp_rev
.PHONY: clean
clean:
-rm -rf ${RELEASE_DIR}
-rm -rf ${RELEASE_DIR} ./apparmor-${VERSION}~*
for dir in $(DIRS); do \
make -C $$dir clean; \
done
.PHONY: setup
setup:
cd $(__SETUP_DIR)/libraries/libapparmor && ./autogen.sh
.PHONY: tag
tag:
bzr tag apparmor_${TAG_VERSION}

200
README Normal file
View File

@@ -0,0 +1,200 @@
------------
Introduction
------------
AppArmor protects systems from insecure or untrusted processes by
running them in restricted confinement, while still allowing processes
to share files, exercise privilege and communicate with other processes.
AppArmor is a Mandatory Access Control (MAC) mechanism which uses the
Linux Security Module (LSM) framework. The confinement's restrictions
are mandatory and are not bound to identity, group membership, or object
ownership. The protections provided are in addition to the kernel's
regular access control mechanisms (including DAC) and can be used to
restrict the superuser.
The AppArmor kernel module and accompanying user-space tools are
available under the GPL license (the exception is the libapparmor
library, available under the LGPL license, which allows change_hat(2)
and change_profile(2) to be used by non-GPL binaries).
For more information, you can read the techdoc.pdf (available after
building the parser) and by visiting the http://apparmor.net/ web
site.
-------------
Source Layout
-------------
AppArmor consists of several different parts:
changehat/ source for using changehat with Apache, PAM and Tomcat
common/ common makefile rules
desktop/ empty
kernel-patches/ compatibility patches for various kernel versions
libraries/ libapparmor source and language bindings
parser/ source for parser/loader and corresponding documentation
profiles/ configuration files, reference profiles and abstractions
tests/ regression and stress testsuites
utils/ high-level utilities for working with AppArmor
--------------------------------------
Important note on AppArmor kernel code
--------------------------------------
While most of the kernel AppArmor code has been accepted in the
upstream Linux kernel, a few important pieces were not included. These
missing pieces unfortunately are important bits for AppArmor userspace
and kernel interaction; therefore we have included compatibility
patches in the kernel-patches/ subdirectory, versioned by upstream
kernel (2.6.37 patches should apply cleanly to 2.6.38 source).
Without these patches applied to the kernel, the AppArmor userspace
will not function correctly.
------------------------------------------
Building and Installing AppArmor Userspace
------------------------------------------
To build and install AppArmor userspace on your system, build and install in
the following order.
libapparmor:
$ cd ./libraries/libapparmor
$ sh ./autogen.sh
$ sh ./configure --prefix=/usr --with-perl # see below
$ make
$ make check
$ make install
[optional arguments to libapparmor's configure include --with-python
and --with-ruby, to generate python and ruby bindings to libapparmor,
respectively.]
Utilities:
$ cd utils
$ make
$ make check
$ make install
parser:
$ cd parser
$ make
$ make check
$ make install
Apache mod_apparmor:
$ cd changehat/mod_apparmor
$ make # depends on libapparmor having been built first
$ make install
PAM AppArmor:
$ cd changehat/pam_apparmor
$ make # depends on libapparmor having been built first
$ make install
Profiles:
$ cd profiles
$ make
$ make check # depends on the parser having been built first
$ make install
[Note that for the parser and the utils, if you only with to build/use
some of the locale languages, you can override the default by passing
the LANGS arguments to make; e.g. make all install "LANGS=en_US fr".]
-------------------
AppArmor Testsuites
-------------------
A number of testsuites are in the AppArmor sources. Most have documentation on
usage and how to update and add tests. Below is a quick overview of their
location and how to run them.
Regression tests
----------------
For details on structure and adding tests, see
tests/regression/apparmor/README.
To run:
$ cd tests/regression/apparmor (requires root)
$ make
$ sudo make tests
$ sudo bash open.sh -r # runs and saves the last testcase from open.sh
Parser tests
------------
For details on structure and adding tests, see parser/tst/README.
To run:
$ cd parser/tst
$ make
$ make tests
Libapparmor
-----------
For details on structure and adding tests, see libraries/libapparmor/README.
$ cd libraries/libapparmor
$ make check
Utils
-----
There are some simple tests available, including basic perl syntax
checks for the perl modules and executables. There are also minimal
checks on the python utilities and python-based tests in the test/
subdirectory.
$ cd utils
$ make check
The aa-decode utility to be tested can be overridden by
setting up environment variable APPARMOR_DECODE; e.g.:
$ APPARMOR_DECODE=/usr/bin/aa-decode make check
Profile checks
--------------
A basic consistency check to ensure that the parser and aa-logprof parse
successfully the current set of shipped profiles. The system or other
parser and logprof can be passed in by overriding the PARSER and LOGPROF
variables.
$ cd profiles
$ make && make check
Stress Tests
------------
To run AppArmor stress tests:
$ make all
Use these:
$ ./change_hat
$ ./child
$ ./kill.sh
$ ./open
$ ./s.sh
Or run all at once:
$ ./stress.sh
Please note that the above will stress the system so much it may end up
invoking the OOM killer.
To run parser stress tests (requires /usr/bin/ruby):
$ ./stress.sh
(see stress.sh -h for options)
-----------------------------------------------
Building and Installing AppArmor Kernel Patches
-----------------------------------------------
TODO

View File

@@ -1,4 +1,3 @@
# $Id$
# ----------------------------------------------------------------------
# Copyright (c) 2004, 2005 NOVELL (All rights reserved)
#
@@ -42,16 +41,15 @@ APXS:=$(shell if [ -x "/usr/sbin/apxs2" ] ; then \
fi )
APXS_INSTALL_DIR=$(shell ${APXS} -q LIBEXECDIR)
DESTDIR=
LIBAPPARMOR_FLAGS=$(shell if [ -f /usr/lib/libapparmor.so -o -f /usr/lib64/libapparmor.so ] ; then \
echo -lapparmor ; \
else \
echo -DUSE_COMPAT_IMMUNIX_H -limmunix ;\
fi)
# Need to pass -Wl twice here to get past both apxs2 and libtool, as
# libtool will add the path to the RPATH of the library if passed -L/some/path
LIBAPPARMOR_FLAGS=-I../../libraries/libapparmor/src -Wl,-Wl,-L../../libraries/libapparmor/src/.libs
LDLIBS=-lapparmor
all: $(TARGET) ${MANPAGES} ${HTMLMANPAGES}
%.so: %.c
${APXS} ${LIBAPPARMOR_FLAGS} -c $<
${APXS} ${LIBAPPARMOR_FLAGS} -c $< ${LDLIBS}
mv .libs/$@ .
.PHONY: install

View File

@@ -1,4 +1,3 @@
# $Id$
# ----------------------------------------------------------------------
# Copyright (c) 2004, 2005 NOVELL (All rights reserved)
#

View File

@@ -1,6 +1,5 @@
#!/usr/bin/perl -w
#
# $Id$
# ----------------------------------------------------------------------
# Copyright (c) 2004, 2005 NOVELL (All rights reserved)
#

View File

@@ -1,5 +1,4 @@
/* $Id$
*
/*
* Copyright (c) 2004, 2005, 2006 NOVELL (All rights reserved)
*
* The mod_apparmor module is licensed under the terms of the GNU
@@ -24,11 +23,7 @@
#include "apr_strings.h"
#include "apr_lib.h"
#ifndef USE_COMPAT_IMMUNIX_H
#include <sys/apparmor.h>
#else
#include <sys/immunix.h>
#endif
#include <apparmor.h>
#include <unistd.h>
/* #define DEBUG */

View File

@@ -1,96 +1,125 @@
# $Id$
# This publication is intellectual property of Novell Inc. Its contents
# can be duplicated, either in part or in whole, provided that a copyright
# label is visibly located on each copy.
# This publication is intellectual property of Novell Inc. and Canonical
# Ltd. Its contents can be duplicated, either in part or in whole, provided
# that a copyright label is visibly located on each copy.
#
# All information found in this book has been compiled with utmost
# attention to detail. However, this does not guarantee complete accuracy.
# Neither SUSE LINUX GmbH, the authors, nor the translators shall be held
# liable for possible errors or the consequences thereof.
# Neither SUSE LINUX GmbH, Canonical Ltd, the authors, nor the translators
# shall be held liable for possible errors or the consequences thereof.
#
# Many of the software and hardware descriptions cited in this book
# are registered trademarks. All trade names are subject to copyright
# restrictions and may be registered trade marks. SUSE LINUX GmbH
# essentially adheres to the manufacturer's spelling.
# and Canonical Ltd. essentially adhere to the manufacturer's spelling.
#
# Names of products and trademarks appearing in this book (with or without
# specific notation) are likewise subject to trademark and trade protection
# laws and may thus fall under copyright restrictions.
#
# Please direct suggestions and comments to apparmor-general@forge.novell.com.
=pod
=head1 NAME
mod_apparmor - fine-grained AppArmor confinement for apache
mod_apparmor - fine-grained AppArmor confinement for Apache
=head1 DESCRIPTION
An AppArmor profile applies to an executable program; if a portion of
the program needs different access permissions than other portions,
the program can "change hats" via change_hat(2) to a different role,
also known as a subprofile. The mod_apparmor apache module uses the
change_hat(2) mechanism to offer more fine-grained confinement of dynamic
elements within apache such as individual php and perl scripts, while
the program can "change hats" via aa_change_hat(2) to a different role,
also known as a subprofile. The mod_apparmor Apache module uses the
aa_change_hat(2) mechanism to offer more fine-grained confinement of dynamic
elements within Apache such as individual php and perl scripts, while
still allowing the performance benefits of using mod_php and mod_perl.
To use mod_apparmor with apache, ensure that mod_apparmor is configured to
be loaded into apache, either via yast or manual editing of the httpd(8)
configuration files, and restart apache. Make sure that apparmor is also
functioning.
To use mod_apparmor with Apache, ensure that mod_apparmor is configured to
be loaded into Apache, either via a2enmod, yast or manual editing of the
apache2(8)/httpd(8) configuration files, and restart Apache. Make sure that
apparmor is also functioning.
Once mod_apparmor is loaded within apache, all requests to apache will
Once mod_apparmor is loaded within Apache, all requests to Apache will
cause mod_apparmor to attempt to change into a hat named by the URI
(e.g. /app/some.cgi). If no such hat is found, it will fall back to
attempting to use the hat DEFAULT_URI; if that also does not exist,
it will fall back to using the global apache profile. Most static web
it will fall back to using the global Apache profile. Most static web
pages can simply make use of the DEFAULT_URI hat.
However, defining hats for every URI/URL would become tedious, so there
are a couple of configuration options that mod_apparmor supports:
Additionally, before any requests come in to Apache, mod_apparmor
will attempt to change hat into the HANDLING_UNTRUSTED_INPUT hat.
mod_apparmor will attempt to use this hat while Apache is doing the
initial parsing of a given http request, before its given to a specific
handler (like mod_php) for processing.
Because defining hats for every URI/URL often becomes tedious, mod_apparmor
provides the AAHatName and AADefaultHatName Apache configuration options.
=over 4
=item B<AAHatName>
AAHatName allows you to specify a hat to be used for a given apache
directory or location directive (see the apache documenation for more
AAHatName allows you to specify a hat to be used for a given Apache
E<lt>DirectoryE<gt>, E<lt>DirectoryMatch>, E<lt>LocationE<gt> or
E<lt>LocationMatchE<gt> directive (see the Apache documenation for more
details). Note that mod_apparmor behavior can become confused if
directory and location directives are intermingled; it's preferred to
stick to one type of directive. If the hat specified by AAHatName does
not exist in the apache profile, then it falls back to the behavior
above.
E<lt>Directory*E<gt> and E<lt>Location*E<gt> directives are intermingled
and it is recommended to use one type of directive. If the hat specified by
AAHatName does not exist in the Apache profile, then it falls back to the
behavior described above.
=item B<AADefaultHatName>
AADefaultHatName allows you to specify a default hat to be used for
vhosts and other apache server directives, so that you can have
different defaults for different virtual hosts. This can be overridden
by an AAHatName directive. If the AADefaultHatName hat does not exist,
it falls back to the behavior described above.
virtual hosts and other Apache server directives, so that you can have
different defaults for different virtual hosts. This can be overridden by
the AAHatName directive and is checked for only if there isn't a matching
AAHatName or hat named by the URI. If the AADefaultHatName hat does not
exist, it falls back to the DEFAULT_URI hat if it exists (as described
above).
=back
Additionally, before any requests come in to apache, mod_apparmor
will attempt to change hat into the HANDLING_UNTRUSTED_INPUT hat.
mod_apparmor will attempt to use this hat while apache is doing the
initial parsing of a given http request, before its given to a specific
handler (like mod_php) for processing.
=head1 URI REQUEST SUMMARY
When profiling with mod_apparmor, it is helpful to keep the following order
of operations in mind:
On each URI request, mod_apparmor will first aa_change_hat(2) into
^HANDLING_UNTRUSTED_INPUT, if it exists.
Then, after performing the initial parsing of the request, mod_apparmor
will:
=over 2
1. try to aa_change_hat(2) into a matching AAHatName hat if it exists and
applies, otherwise it will
2. try to aa_change_hat(2) into the URI itself, otherwise it will
3. try to aa_change_hat(2) into an AADefaultHatName hat if it has been defined
for the server/vhost, otherwise it will
4. try to aa_change_hat(2) into the DEFAULT_URI hat, if it exists, otherwise it
will
5. fall back to the global Apache policy
=back
=head1 BUGS
mod_apparmor() currently only supports apache2, and has only been tested
with the prefork MPM configuration -- threaded configurations of apache
with the prefork MPM configuration -- threaded configurations of Apache
may not work correctly.
There are likely other bugs lurking about; if you find any, please report
them to bugzilla at L<http://bugzilla.novell.com>.
them at L<http://https://bugs.launchpad.net/apparmor/+filebug>.
=head1 SEE ALSO
apparmor(7), subdomain.conf(5), apparmor_parser(8), and
L<http://forge.novell.com/modules/xfmod/project/?apparmor>.
apparmor(7), subdomain.conf(5), apparmor_parser(8), aa_change_hat(2) and
L<http://wiki.apparmor.net>.
=cut

View File

@@ -1,4 +1,3 @@
# $Id$
# ----------------------------------------------------------------------
# Copyright (c) 1999, 2004, 2005 NOVELL (All rights reserved)
#
@@ -27,8 +26,8 @@ common/Make.rules: $(COMMONDIR)/Make.rules
ln -sf $(COMMONDIR) .
endif
EXTRA_CFLAGS=$(CFLAGS) -fPIC -shared -Wall
LINK_FLAGS=-Xlinker -x
EXTRA_CFLAGS=$(CFLAGS) -fPIC -shared -Wall -I../../libraries/libapparmor/src/
LINK_FLAGS=-Xlinker -x -L../../libraries/libapparmor/src/.libs
LIBS=-lpam -lapparmor
OBJECTS=${NAME}.o get_options.o
@@ -42,7 +41,7 @@ $(NAME).so: ${OBJECTS}
# need some better way of determining this
DESTDIR=/
SECDIR=${DESTDIR}/lib/security
SECDIR ?= ${DESTDIR}/lib/security
.PHONY: install
install: $(NAME).so

View File

@@ -1,6 +1,4 @@
/*
* $Id$
*
* Written by Steve Beattie <sbeattie@suse.de> 2006/10/25
*
* Modeled after the option parsing code in pam_unix2 by:

View File

@@ -1,10 +1,14 @@
/* pam_apparmor module */
/*
* $Id$
* Copyright (c) 2006
* NOVELL (All rights reserved)
*
* Copyright (c) 2010
* Canonical, Ltd. (All rights reserved)
*
* Written by Jesse Michael <jmichael@suse.de> 2006/08/24
* and Steve Beattie <sbeattie@suse.de> 2006/10/25
* and Steve Beattie <sbeattie@ubuntu.com> 2006/10/25
*
* Based off of pam_motd by:
* Ben Collins <bcollins@debian.org> 2005/10/04
@@ -23,7 +27,7 @@
#include <grp.h>
#include <syslog.h>
#include <errno.h>
#include <sys/apparmor.h>
#include <apparmor.h>
#include <security/pam_ext.h>
#include <security/pam_modutil.h>
@@ -165,8 +169,8 @@ int pam_sm_open_session(pam_handle_t *pamh, int flags,
* stop attempting to use change_hat */
goto nodefault;
break;
case EPERM: /* Disable when ECHILD patch gets accepted */
case EACCES:
case ENOENT:
/* failed to change into attempted hat, so we'll
* jump back out and try the next one */
break;

View File

@@ -1,8 +1,6 @@
/* pam_apparmor module */
/*
* $Id$
*
* Written by Jesse Michael <jmichael@suse.de> 2006/08/24
* and Steve Beattie <sbeattie@suse.de> 2006/10/25
*

View File

@@ -1,4 +1,3 @@
# $Id$
# ----------------------------------------------------------------------
# Copyright (c) 1999, 2004, 2005, 2006 NOVELL (All rights reserved)
#
@@ -38,4 +37,4 @@ clean:
rm -f tomcat_apparmor.spec ${NAME}-*.tar.gz Make.rules
install: $(SPECFILE)
ant -Dversion=$(VERSION) -Drelease=$(RELEASE) -Dcatalina_home=${CATALINA_HOME} -Dinstall_lib=${LIB} install_jar install_jni
ant -Dversion=$(VERSION) -Drelease=$(MAN_RELEASE) -Dcatalina_home=${CATALINA_HOME} -Dinstall_lib=${LIB} install_jar install_jni

View File

@@ -1,4 +1,3 @@
# $Id$
# ----------------------------------------------------------------------
# Copyright (c) 2006 NOVELL (All rights reserved)
#

View File

@@ -1,4 +1,3 @@
# $Id$
# ----------------------------------------------------------------------
# Copyright (c) 1999, 2004, 2005, 2006 NOVELL (All rights reserved)
#
@@ -38,4 +37,4 @@ clean:
rm -f tomcat_apparmor.spec ${NAME}-*.tar.gz Make.rules
install: $(SPECFILE)
ant -Dversion=$(VERSION) -Drelease=$(RELEASE) -Dcatalina_home=${CATALINA_HOME} -Dinstall_lib=${LIB} install_jar install_jni
ant -Dversion=$(VERSION) -Drelease=$(MAN_RELEASE) -Dcatalina_home=${CATALINA_HOME} -Dinstall_lib=${LIB} install_jar install_jni

View File

@@ -4,8 +4,8 @@
<property name="jni_src" location="src/jni_src"/>
<property name="build" location="build"/>
<property name="install_root" location="/"/>
<property name="catalina_home" location="/usr/share/tomcat5"/>
<property name="lib" location="lib"/>
<property name="catalina_home" location="/usr/share/tomcat6"/>
<property name="lib" location="/usr/share/tomcat6/bin"/>
<property name="install_lib" value="/lib"/>
<property name="dist" location="dist"/>
<property name="jarfile" location="${dist}/${ant.project.name}.jar"/>
@@ -18,10 +18,11 @@
<include name="**/*.jar"/>
</fileset>
<fileset id="tomcat.jars" dir="${catalina_home}/server/lib">
<fileset id="tomcat.jars" dir="${catalina_home}/lib">
<include name="**/*.jar"/>
</fileset>
<fileset id="servlet.jars" dir="${catalina_home}/common/lib">
<fileset id="servlet.jars" dir="${catalina_home}/lib">
<include name="**/*.jar"/>
</fileset>
@@ -80,9 +81,9 @@
</target>
<target name="install_jar" depends="jni_so" description="Install jar file">
<mkdir dir="${install_root}/${catalina_home}/server/lib/"/>
<copy file="${jarfile}" tofile="${install_root}/${catalina_home}/server/lib/${ant.project.name}.jar"/>
<chmod perm="644" file="${install_root}/${catalina_home}/server/lib/${ant.project.name}.jar"/>
<mkdir dir="${install_root}/${catalina_home}/lib/"/>
<copy file="${jarfile}" tofile="${install_root}/${catalina_home}/lib/${ant.project.name}.jar"/>
<chmod perm="644" file="${install_root}/${catalina_home}/lib/${ant.project.name}.jar"/>
</target>
<target name="clean" description="Remove build and dist directories">

View File

@@ -13,7 +13,7 @@
#include "jni.h"
#include <errno.h>
#include "sys/apparmor.h"
#include <apparmor.h>
#include "com_novell_apparmor_JNIChangeHat.h"
/* c intermediate lib call for Java -> JNI -> c library execution of the change_hat call */

View File

@@ -4,7 +4,7 @@ LIB = lib/
LIBDIR = /usr/${LIB}
INCLUDE = ${LIBDIR}/jvm/java/include
CFLAGS = -g -O2 -Wall -Wstrict-prototypes -Wl,-soname,$@.${SO_VERS} -pipe -fpic -D_REENTRANT
INCLUDES = -I$(INCLUDE) -I$(INCLUDE)/linux
INCLUDES = -I$(INCLUDE) -I$(INCLUDE)/linux -I$(TOP)/../../../libraries/libapparmor/src/
CLASSFILE = ${CLASSPATH}/com/novell/apparmor/${JAVA_CLASSNAME}.class
DESTDIR = ${TOP}/dist
SO_VERS = 1
@@ -20,7 +20,7 @@ ${JAVA_CLASSNAME}.java com_novell_apparmor_${JAVA_CLASSNAME}.h: ${CLASSFILE}
javah -jni -classpath ${CLASSPATH} com.novell.apparmor.${JAVA_CLASSNAME}
${TARGET}.so: ${JAVA_CLASSNAME}.c ${JAVA_CLASSNAME}.java com_novell_apparmor_${JAVA_CLASSNAME}.h
gcc ${INCLUDES} ${CFLAGS} -shared -o ${TARGET}.so ${JAVA_CLASSNAME}.c -lapparmor
gcc ${INCLUDES} ${CFLAGS} -shared -o ${TARGET}.so ${JAVA_CLASSNAME}.c -L$(TOP)/../../../libraries/libapparmor/src/.libs -lapparmor
install: ${TARGET}.so
install -d $(DESTDIR)/${LIB} $(DESTDIR)${LIBDIR}

View File

@@ -1,4 +1,3 @@
# $Id$
# ----------------------------------------------------------------------
# Copyright (c) 2006 NOVELL (All rights reserved)
#

View File

@@ -1,12 +1,19 @@
# $Id$
# ------------------------------------------------------------------
#
# Copyright (C) 2002-2005 Novell/SUSE
# Copyright (c) 1999-2008 NOVELL (All rights reserved)
# Copyright 2009-2010 Canonical Ltd.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of version 2 of the GNU General Public
# License published by the Free Software Foundation.
# This program is free software; you can redistribute it and/or
# modify it under the terms of version 2 of the GNU General Public
# License published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# ------------------------------------------------------------------
#
# The including makefile needs to define LANG, which lists the lang
@@ -14,13 +21,14 @@
# exist
LOCALEDIR=/usr/share/locale
XGETTEXT_ARGS=--copyright-holder="NOVELL, Inc." --msgid-bugs-address=apparmor-general@forge.novell.com -d ${NAME}
XGETTEXT_ARGS=--copyright-holder="NOVELL, Inc." --msgid-bugs-address=apparmor@lists.ubuntu.com -d ${NAME}
# When making the .pot file, it's expected that the parent Makefile will
# pass in the list of sources in the SOURCES variable
PARENT_SOURCES=$(foreach source, ${SOURCES}, ../${source})
LANGS=$(patsubst %.po, %, $(wildcard *.po))
# Can override by passing LANGS=whatever here
LANGS?=$(patsubst %.po, %, $(wildcard *.po))
TARGET_MOS=$(foreach lang, $(filter-out $(DISABLED_LANGS),$(LANGS)), ${lang}.mo)
.PHONY: all

View File

@@ -1,7 +1,7 @@
# $Id$
# ------------------------------------------------------------------
#
# Copyright (C) 2002-2005 Novell/SUSE
# Copyright (C) 2010 Canonical, Ltd.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of version 2 of the GNU General Public
@@ -25,7 +25,12 @@
# directories
DISTRIBUTION=AppArmor
VERSION=2.5
VERSION=$(shell cat common/Version)
AWK:=$(shell which awk)
ifndef AWK
$(error awk utility required for build but not available)
endif
# OVERRIDABLE variables
# Set these variables before including Make.rules to change its behavior
@@ -48,16 +53,21 @@ BUILDDIR=$(shell if [ -d "${TESTBUILDDIR}" ] ; then \
echo "/tmp/${NAME}" ; \
fi ;)
endif
RPMHOSTVENDOR=$(shell rpm --eval "%{_host_vendor}")
ifndef DISTRO
DISTRO=$(shell if [ -f /etc/slackware-version ] ; then \
echo slackware ; \
elif [ -f /etc/debian_version ] ; then \
echo debian ;\
elif [ ${RPMHOSTVENDOR} = "suse" ] ; then \
echo suse ;\
elif [ ${RPMHOSTVENDOR} = "redhat" ] ; then \
echo rhel4 ;\
elif which rpm > /dev/null ; then \
if [ "$(rpm --eval '0%{?suse_version}')" != "0" ] ; then \
echo suse ;\
elif [ "$(rpm --eval '%{_host_vendor}')" = redhat ] ; then \
echo rhel4 ;\
elif [ "$(rpm --eval '0%{?fedora}')" != "0" ] ; then \
echo rhel4 ;\
else \
echo unknown ;\
fi ;\
else \
echo unknown ;\
fi)
@@ -70,20 +80,7 @@ RPMARG=--define "_topdir $(BUILDDIR:/=)" \
$(shell [ -d ${BUILDDIR}/BUILDROOT ] && echo --define \"buildroot $(BUILDDIR:/=)/BUILDROOT\") \
$(shell [ -n "${DISTRO}" ] && echo --define \"distro ${DISTRO}\")
#REPO_VERSION=$(shell if [ -x /usr/bin/svn ] ; then \
# if ! /usr/bin/svn info -r HEAD . 2> /dev/null | grep "^Last Changed Rev:" | sed "s/^Last Changed Rev: //" ; then \
# /usr/bin/svn info . 2> /dev/null | grep "^Last Changed Rev:" | sed "s/^Last Changed Rev: //" ; \
# fi ; \
# fi)
REPO_VERSION=$(shell if [ -x /usr/bin/svn ] ; then \
/usr/bin/svn info . 2> /dev/null | grep "^Last Changed Rev:" | sed "s/^Last Changed Rev: //" ; \
fi)
REPO_URL=$(shell if [ -x /usr/bin/svn ] ; then \
/usr/bin/svn info . 2> /dev/null | grep "^URL:" | sed "s/^URL: //" ; \
fi)
COMMON_REPO_URL=$(shell if [ -x /usr/bin/svn ] ; then \
/usr/bin/svn info $(COMMONDIR) 2> /dev/null | grep "^URL:" | sed "s/^URL: //" ; \
fi)
REPO_VERSION_CMD=([ -x /usr/bin/bzr ] && /usr/bin/bzr version-info . 2> /dev/null || awk '{ print "revno: "$2 }' common/.stamp_rev) | awk '/^revno:/ { print $2 }'
ifdef EXTERNAL_PACKAGE
RPMARG+=--define "_sourcedir $(shell pwd)"
@@ -92,30 +89,14 @@ endif
ifndef SPECFILE
SPECFILE = $(NAME).spec
endif
RELEASE = $(shell rpm -q --specfile --define "_sourcedir ." ${RPMARG} --qf "%{RELEASE}" ${SPECFILE})
RELEASE_DIR = $(NAME)-$(VERSION)
TARBALL = $(NAME)-$(VERSION)-${REPO_VERSION}.tar.gz
TAR = /bin/tar czvp -h --exclude .svn --exclude CVS --exclude .cvsignore --exclude ${TARBALL} --exclude ${RELEASE_DIR}/${RELEASE_DIR} $(shell test -f ${NAME}.exclude && echo "-X ${NAME}.exclude")
TAR = /bin/tar czvp -h --exclude .svn --exclude .bzr --exclude .bzrignore --exclude ${RELEASE_DIR}/${RELEASE_DIR} $(shell test -f ${NAME}.exclude && echo "-X ${NAME}.exclude")
LDCONFIG = /sbin/ldconfig
CVSPKG_VERSION=$(shell rpm -q --specfile --define "_sourcedir ." ${RPMARG} ${SPECFILE} | head -1 | tr "." "_")
RPMSUBDIRS=SOURCES SPECS BUILD BUILDROOT SRPMS RPMS/i386 RPMS/i586 \
RPMS/i686 RPMS/athlon RPMS/noarch RPMS/x86_64
BUILDRPMSUBDIRS=$(foreach subdir, $(RPMSUBDIRS), $(BUILDDIR:/=)/$(subdir))
.PHONY: cvs_tag
cvs_tag:
cvs tag IMMUNIX-${CVSPKG_VERSION}
.PHONY: checkin
checkin:
if cvs -q up -d | grep -q "^\?" ; then echo "Hey! You have" \
"files in the directory you have not added into cvs."; exit 1; \
fi
cvs ci
make cvs_tag
ifdef EXTERNAL_PACKAGE
.PHONY: rpm
rpm: clean $(BUILDRPMSUBDIRS)
@@ -123,21 +104,25 @@ rpm: clean $(BUILDRPMSUBDIRS)
else
.PHONY: rpm
rpm: clean $(TARBALL) $(BUILDRPMSUBDIRS)
cp $(TARBALL) $(BUILDDIR)/SOURCES/
rpm: clean $(BUILDRPMSUBDIRS)
__REPO_VERSION=`$(value REPO_VERSION_CMD)` ; \
__TARBALL=$(NAME)-$(VERSION)-$${__REPO_VERSION}.tar.gz ; \
make $${__TARBALL} ; \
cp $${__TARBALL} $(BUILDDIR)/SOURCES/
cp ${SPECFILE} $(BUILDDIR)/SPECS/
rpmbuild -ba ${RPMARG} ${SPECFILE}
.PHONY: ${SPECFILE}
${SPECFILE}: ${SPECFILE}.in
__REPO_VERSION=`$(value REPO_VERSION_CMD)` ; \
sed -e "s/@@immunix_version@@/${VERSION}/g" \
-e "s/@@repo_version@@/${REPO_VERSION}/g" $< > $@
-e "s/@@repo_version@@/$${__REPO_VERSION}/g" $< > $@
${TARBALL}: clean ${SPECFILE}
%.tar.gz: clean ${SPECFILE}
-rm -rf $(RELEASE_DIR)
mkdir $(RELEASE_DIR)
$(TAR) . | tar xz -C $(RELEASE_DIR)
$(TAR) -f $@ $(RELEASE_DIR)
$(TAR) --exclude $@ . | tar xz -C $(RELEASE_DIR)
$(TAR) --exclude $@ -f $@ $(RELEASE_DIR)
rm -rf $(RELEASE_DIR)
ifndef OVERRIDE_TARBALL
@@ -145,15 +130,6 @@ ifndef OVERRIDE_TARBALL
tarball: clean $(TARBALL)
endif
.PHONY: dist
dist: clean $(SPECFILE)
-rm -rf $(RELEASE_DIR)
svn export -r $(REPO_VERSION) $(REPO_URL) $(RELEASE_DIR)
svn export $(COMMON_REPO_URL) $(RELEASE_DIR)/common
make -C $(RELEASE_DIR) $(SPECFILE) REPO_VERSION=${REPO_VERSION} COMMONDIR_EXISTS=false
$(TAR) -f $(TARBALL) $(RELEASE_DIR)
rm -rf $(RELEASE_DIR)
endif
.PHONY: version
@@ -161,6 +137,12 @@ endif
version:
rpm -q --define "_sourcedir ." ${RPMARG} --specfile ${SPECFILE}
.PHONY: repo_version
.SILENT: repo_version
repo_version:
$(value REPO_VERSION_CMD)
.PHONY: build_dir
build_dir: $(BUILDRPMSUBDIRS)
@@ -173,6 +155,40 @@ _clean:
-rm -f ${NAME}-${VERSION}-*.tar.gz
-rm -f ${MANPAGES} *.[0-9].gz ${HTMLMANPAGES} pod2htm*.tmp
# =====================
# generate list of capabilities based on
# /usr/include/linux/capabilities.h for use in multiple locations in
# the source tree
# =====================
# emits defined capabilities in a simple list, e.g. "CAP_NAME CAP_NAME2"
CAPABILITIES=$(shell echo "\#include <linux/capability.h>" | cpp -dM | LC_ALL=C sed -n -e '/CAP_EMPTY_SET/d' -e 's/^\#define[ \t]\+CAP_\([A-Z0-9_]\+\)[ \t]\+\([0-9xa-f]\+\)\(.*\)$$/CAP_\1/p' | sort)
.PHONY: list_capabilities
list_capabilities: /usr/include/linux/capability.h
@echo "$(CAPABILITIES)"
# =====================
# generate list of network protocols based on
# sys/socket.h for use in multiple locations in
# the source tree
# =====================
# These are the families that it doesn't make sense for apparmor
# to mediate. We use PF_ here since that is what is required in
# bits/socket.h, but we will rewrite these as AF_.
FILTER_FAMILIES=PF_UNSPEC PF_UNIX PF_LOCAL PF_NETLINK
__FILTER=$(shell echo $(strip $(FILTER_FAMILIES)) | sed -e 's/ /\\\|/g')
# emits the AF names in a "AF_NAME NUMBER," pattern
AF_NAMES=$(shell echo "\#include <sys/socket.h>" | cpp -dM | LC_ALL=C sed -n -e '/$(__FILTER)/d' -e 's/^\#define[ \t]\+PF_\([A-Z0-9_]\+\)[ \t]\+\([0-9]\+\).*$$/AF_\1 \2,/p' | sort -n -k2)
.PHONY: list_af_names
list_af_names:
@echo "$(AF_NAMES)"
# =====================
# manpages
# =====================
@@ -191,32 +207,12 @@ install_manpages: $(MANPAGES)
$(foreach dir, ${MANDIRS}, \
install -d ${DESTDIR}/${MANDIR}/man${dir} ; \
install -m 644 $(filter %.${dir}, ${MANPAGES}) ${DESTDIR}/${MANDIR}/man${dir}; \
$(foreach aa_page, $(filter %.${dir}, ${AA_MANPAGES}), \
ln -sf $(aa_page) ${DESTDIR}/${MANDIR}/man${dir}/${aa_page:%=aa-%};))
)
%.1: %.pod
$(POD2MAN) $< --release=NOVELL/SUSE --center=AppArmor --section=1 > $@
MAN_RELEASE="AppArmor ${VERSION}"
%.2: %.pod
$(POD2MAN) $< --release=NOVELL/SUSE --center=AppArmor --section=2 > $@
%.3: %.pod
$(POD2MAN) $< --release=NOVELL/SUSE --center=AppArmor --section=3 > $@
%.4: %.pod
$(POD2MAN) $< --release=NOVELL/SUSE --center=AppArmor --section=4 > $@
%.5: %.pod
$(POD2MAN) $< --release=NOVELL/SUSE --center=AppArmor --section=5 > $@
%.6: %.pod
$(POD2MAN) $< --release=NOVELL/SUSE --center=AppArmor --section=6 > $@
%.7: %.pod
$(POD2MAN) $< --release=NOVELL/SUSE --center=AppArmor --section=7 > $@
%.8: %.pod
$(POD2MAN) $< --release=NOVELL/SUSE --center=AppArmor --section=8 > $@
%.1 %.2 %.3 %.4 %.5 %.6 %.7 %.8: %.pod
$(POD2MAN) $< --release=$(MAN_RELEASE) --center=AppArmor --stderr --section=$(subst .,,$(suffix $@)) > $@
%.1.html: %.pod
$(POD2HTML) --header --css apparmor.css --infile=$< --outfile=$@
@@ -242,43 +238,6 @@ install_manpages: $(MANPAGES)
%.8.html: %.pod
$(POD2HTML) --header --css apparmor.css --infile=$< --outfile=$@
# =====================
# Slackware poo
# =====================
.PHONY: slack
slack:
rm -rf ${BUILDDIR}
mkdir -p ${BUILDDIR}/install
make install DESTDIR=${BUILDDIR} DISTRO=slackware
# comment line is there so grep always has something to match
( echo "# install script pulled from ${SPECFILE}" ; rpm -q --specfile --define "_sourcedir ." ${RPMARG} --qf "%{POSTIN}\n" ${SPECFILE}) | grep -v "^(none)$$" >> ${BUILDDIR}/install/doinst.sh
( cd ${BUILDDIR} && makepkg -l y -c y -p ${PWD}/${NAME}-${VERSION}-${RELEASE}.tgz )
# =====================
# Debian poo
# =====================
.PHONY: deb
deb: ${TARBALL}
rm -rf ${BUILDDIR}
mkdir -p ${BUILDDIR}
tar -xvzf ${TARBALL} -C ${BUILDDIR}
( cd ${BUILDDIR}/${RELEASE_DIR} && sh -c "DEBFULLNAME='NOVELL, Inc' dh_make -e apparmor-general@forge.novell.com --library -f ~/svn/immunix/immunix/libimmunix/libimmunix-2.0.tar.gz << EOM \
\
EOM" )
make ${NAME}-deb -C ${BUILDDIR}/${RELEASE_DIR}
# ( cd ${BUILDDIR}/${RELEASE_DIR} && dpkg-buildpackage -b -sd -rfakeroot)
DEBIAN_DISTRO=stable
DEB_CHANGELOG_OUTPUT="${NAME} (${VERSION}-${RELEASE}) ${DEBIAN_DISTRO}; urgency=low\n\
\n * Automatically generated by the AppArmor Build System.\n\
\n -- AppArmor Development Team <apparmor-general@forge.novell.com> $(shell date -R)"
.PHONY: debian/changelog
debian/changelog:
echo -e ${DEB_CHANGELOG_OUTPUT} > $@
A2PS_ARGS=-Ec -g --line-numbers=1
ENSCRIPT_ARGS=-C -2jGr -f Courier6 -E
%.c.ps: %.c

1
common/Version Normal file
View File

@@ -0,0 +1 @@
2.8.1

View File

@@ -1,25 +0,0 @@
<oaf_info>
<oaf_server iid="OAFIID:AppArmorApplet_Factory" type="exe"
location="@LIBEXECDIR@/apparmorapplet">
<oaf_attribute name="repo_ids" type="stringv">
<item value="IDL:Bonobo/GenericFactory:1.0"/>
<item value="IDL:Bonobo/Unknown:1.0"/>
</oaf_attribute>
<oaf_attribute name="name" type="string" value="AppArmor Monitor Factory"/>
<oaf_attribute name="description" type="string" value="AppArmor Desktop Monitor factory"/>
</oaf_server>
<oaf_server iid="OAFIID:AppArmorApplet" type="factory"
location="OAFIID:AppArmorApplet_Factory">
<oaf_attribute name="repo_ids" type="stringv">
<item value="IDL:GNOME/Vertigo/PanelAppletShell:1.0"/>
<item value="IDL:Bonobo/Control:1.0"/>
<item value="IDL:Bonobo/Unknown:1.0"/>
</oaf_attribute>
<oaf_attribute name="name" type="string" value="AppArmor Desktop Monitor"/>
<oaf_attribute name="description" type="string" value="AppArmor Desktop Monitor"/>
<oaf_attribute name="panel:category" type="string" value="Utilities"/>
<oaf_attribute name="panel:icon" type="string" value="apparmor_default.png"/>
</oaf_server>
</oaf_info>

View File

@@ -1,340 +0,0 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.

View File

@@ -1,236 +0,0 @@
Installation Instructions
*************************
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free
Software Foundation, Inc.
This file is free documentation; the Free Software Foundation gives
unlimited permission to copy, distribute and modify it.
Basic Installation
==================
These are generic installation instructions.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
those values to create a `Makefile' in each directory of the package.
It may also create one or more `.h' files containing system-dependent
definitions. Finally, it creates a shell script `config.status' that
you can run in the future to recreate the current configuration, and a
file `config.log' containing compiler output (useful mainly for
debugging `configure').
It can also use an optional file (typically called `config.cache'
and enabled with `--cache-file=config.cache' or simply `-C') that saves
the results of its tests to speed up reconfiguring. (Caching is
disabled by default to prevent problems with accidental use of stale
cache files.)
If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can
be considered for the next release. If you are using the cache, and at
some point `config.cache' contains results you don't want to keep, you
may remove or edit it.
The file `configure.ac' (or `configure.in') is used to create
`configure' by a program called `autoconf'. You only need
`configure.ac' if you want to change it or regenerate `configure' using
a newer version of `autoconf'.
The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system. If you're
using `csh' on an old version of System V, you might need to type
`sh ./configure' instead to prevent `csh' from trying to execute
`configure' itself.
Running `configure' takes awhile. While running, it prints some
messages telling which features it is checking for.
2. Type `make' to compile the package.
3. Optionally, type `make check' to run any self-tests that come with
the package.
4. Type `make install' to install the programs and any data files and
documentation.
5. You can remove the program binaries and object files from the
source code directory by typing `make clean'. To also remove the
files that `configure' created (so you can compile the package for
a different kind of computer), type `make distclean'. There is
also a `make maintainer-clean' target, but that is intended mainly
for the package's developers. If you use it, you may have to get
all sorts of other programs in order to regenerate files that came
with the distribution.
Compilers and Options
=====================
Some systems require unusual options for compilation or linking that the
`configure' script does not know about. Run `./configure --help' for
details on some of the pertinent environment variables.
You can give `configure' initial values for configuration parameters
by setting variables in the command line or in the environment. Here
is an example:
./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
*Note Defining Variables::, for more details.
Compiling For Multiple Architectures
====================================
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory. To do this, you must use a version of `make' that
supports the `VPATH' variable, such as GNU `make'. `cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'.
If you have to use a `make' that does not support the `VPATH'
variable, you have to compile the package for one architecture at a
time in the source code directory. After you have installed the
package for one architecture, use `make distclean' before reconfiguring
for another architecture.
Installation Names
==================
By default, `make install' installs the package's commands under
`/usr/local/bin', include files under `/usr/local/include', etc. You
can specify an installation prefix other than `/usr/local' by giving
`configure' the option `--prefix=PREFIX'.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
pass the option `--exec-prefix=PREFIX' to `configure', the package uses
PREFIX as the prefix for installing programs and libraries.
Documentation and other data files still use the regular prefix.
In addition, if you use an unusual directory layout you can give
options like `--bindir=DIR' to specify different values for particular
kinds of files. Run `configure --help' for a list of the directories
you can set and what kinds of files go in them.
If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Optional Features
=================
Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The
`README' should mention any `--enable-' and `--with-' options that the
package recognizes.
For packages that use the X Window System, `configure' can usually
find the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.
Specifying the System Type
==========================
There may be some features `configure' cannot figure out automatically,
but needs to determine by the type of machine the package will run on.
Usually, assuming the package is built to be run on the _same_
architectures, `configure' can figure that out, but if it prints a
message saying it cannot guess the machine type, give it the
`--build=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name which has the form:
CPU-COMPANY-SYSTEM
where SYSTEM can have one of these forms:
OS KERNEL-OS
See the file `config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't
need to know the machine type.
If you are _building_ compiler tools for cross-compiling, you should
use the option `--target=TYPE' to select the type of system they will
produce code for.
If you want to _use_ a cross compiler, that generates code for a
platform different from the build platform, you should specify the
"host" platform (i.e., that on which the generated programs will
eventually be run) with `--host=TYPE'.
Sharing Defaults
================
If you want to set default values for `configure' scripts to share, you
can create a site shell script called `config.site' that gives default
values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script.
Defining Variables
==================
Variables not defined in a site shell script can be set in the
environment passed to `configure'. However, some packages may run
configure again during the build, and the customized values of these
variables may be lost. In order to avoid this problem, you should set
them in the `configure' command line, using `VAR=value'. For example:
./configure CC=/usr/local2/bin/gcc
causes the specified `gcc' to be used as the C compiler (unless it is
overridden in the site shell script). Here is a another example:
/bin/bash ./configure CONFIG_SHELL=/bin/bash
Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent
configuration-related scripts to be executed by `/bin/bash'.
`configure' Invocation
======================
`configure' recognizes the following options to control how it operates.
`--help'
`-h'
Print a summary of the options to `configure', and exit.
`--version'
`-V'
Print the version of Autoconf used to generate the `configure'
script, and exit.
`--cache-file=FILE'
Enable the cache: use and save the results of the tests in FILE,
traditionally `config.cache'. FILE defaults to `/dev/null' to
disable caching.
`--config-cache'
`-C'
Alias for `--cache-file=config.cache'.
`--quiet'
`--silent'
`-q'
Do not print messages saying which checks are being made. To
suppress all normal output, redirect it to `/dev/null' (any error
messages will still be shown).
`--srcdir=DIR'
Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically.
`configure' also accepts some other, not widely useful, options. Run
`configure --help' for more details.

View File

@@ -1,14 +0,0 @@
## Process this file with automake to produce Makefile.in
SUBDIRS = po src pixmaps
EXTRA_DIST = \
autogen.sh \
AppArmor_Monitor_Factory.server.in
serverdir = $(libdir)/bonobo/servers
server_in_files = AppArmor_Monitor_Factory.server.in
server_DATA = AppArmor_Monitor_Factory.server
AppArmor_Monitor_Factory.server:
sed -e "s|\@LIBEXECDIR\@|$(libexecdir)|" < AppArmor_Monitor_Factory.server.in > AppArmor_Monitor_Factory.server

View File

@@ -1,48 +0,0 @@
# norootforbuild
Name: apparmorapplet-gnome
Version: 0.9
Release: 1
URL: http://forge.novell.com/modules/xfmod/project/?apparmor
BuildRequires: gnome-common gnome-desktop-devel gnome-panel-devel
%if %suse_version > 1010
BuildRequires: dbus-1-glib-devel
%else
BuildRequires: dbus-1-devel dbus-1-glib
%endif
Group: System/GUI/GNOME
Requires: apparmor-dbus
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source0: %{name}-%{version}.tar.bz2
Summary: An AppArmor event notification applet for GNOME
License: GPL
%description
This taskbar applet receives AppArmor events over DBUS, and notifies
the user when AppArmor prevents an application from functioning.
%prep
%setup -q
%build
autoreconf -f -i
%configure --prefix=%{_prefix} --libexecdir=%{_prefix}/lib/apparmorapplet
make %{?jobs:-j%jobs}
%install
%makeinstall
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr (-, root, root)
%doc AUTHORS COPYING ChangeLog NEWS README
%{_libdir}/bonobo/servers/*.server
%{_prefix}/lib/apparmorapplet
%{_datadir}/pixmaps/*
%changelog
* Wed Jul 25 2007 - mbarringer@suse.de
- Initial package creation

View File

@@ -1,159 +0,0 @@
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
DIE=0
if [ -n "$GNOME2_DIR" ]; then
ACLOCAL_FLAGS="-I $GNOME2_DIR/share/aclocal $ACLOCAL_FLAGS"
LD_LIBRARY_PATH="$GNOME2_DIR/lib:$LD_LIBRARY_PATH"
PATH="$GNOME2_DIR/bin:$PATH"
export PATH
export LD_LIBRARY_PATH
fi
(test -f $srcdir/configure.in) || {
echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
echo " top-level package directory"
exit 1
}
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: You must have \`autoconf' installed."
echo "Download the appropriate package for your distribution,"
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
DIE=1
}
(grep "^AC_PROG_INTLTOOL" $srcdir/configure.in >/dev/null) && {
(intltoolize --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: You must have \`intltool' installed."
echo "You can get it from:"
echo " ftp://ftp.gnome.org/pub/GNOME/"
DIE=1
}
}
(grep "^AM_PROG_XML_I18N_TOOLS" $srcdir/configure.in >/dev/null) && {
(xml-i18n-toolize --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: You must have \`xml-i18n-toolize' installed."
echo "You can get it from:"
echo " ftp://ftp.gnome.org/pub/GNOME/"
DIE=1
}
}
(grep "^AM_PROG_LIBTOOL" $srcdir/configure.in >/dev/null) && {
(libtool --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: You must have \`libtool' installed."
echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/"
DIE=1
}
}
(grep "^AM_GLIB_GNU_GETTEXT" $srcdir/configure.in >/dev/null) && {
(grep "sed.*POTFILES" $srcdir/configure.in) > /dev/null || \
(glib-gettextize --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: You must have \`glib' installed."
echo "You can get it from: ftp://ftp.gtk.org/pub/gtk"
DIE=1
}
}
(automake --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: You must have \`automake' installed."
echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/"
DIE=1
NO_AUTOMAKE=yes
}
# if no automake, don't bother testing for aclocal
test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: Missing \`aclocal'. The version of \`automake'"
echo "installed doesn't appear recent enough."
echo "You can get automake from ftp://ftp.gnu.org/pub/gnu/"
DIE=1
}
if test "$DIE" -eq 1; then
exit 1
fi
if test -z "$*"; then
echo "**Warning**: I am going to run \`configure' with no arguments."
echo "If you wish to pass any to it, please specify them on the"
echo \`$0\'" command line."
echo
fi
case $CC in
xlc )
am_opt=--include-deps;;
esac
for coin in `find $srcdir -name configure.in -print`
do
dr=`dirname $coin`
if test -f $dr/NO-AUTO-GEN; then
echo skipping $dr -- flagged as no auto-gen
else
echo processing $dr
( cd $dr
aclocalinclude="$ACLOCAL_FLAGS"
if grep "^AM_GLIB_GNU_GETTEXT" configure.in >/dev/null; then
echo "Creating $dr/aclocal.m4 ..."
test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
echo "Running glib-gettextize... Ignore non-fatal messages."
echo "no" | glib-gettextize --force --copy
echo "Making $dr/aclocal.m4 writable ..."
test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
fi
if grep "^AC_PROG_INTLTOOL" configure.in >/dev/null; then
echo "Running intltoolize..."
intltoolize --copy --force --automake
fi
if grep "^AM_PROG_XML_I18N_TOOLS" configure.in >/dev/null; then
echo "Running xml-i18n-toolize..."
xml-i18n-toolize --copy --force --automake
fi
if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then
if test -z "$NO_LIBTOOLIZE" ; then
echo "Running libtoolize..."
libtoolize --force --copy
fi
fi
echo "Running aclocal $aclocalinclude ..."
aclocal $aclocalinclude
if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then
echo "Running autoheader..."
autoheader
fi
echo "Running automake --gnu $am_opt ..."
automake --add-missing --gnu $am_opt
echo "Running autoconf ..."
autoconf
)
fi
done
conf_flags="--enable-maintainer-mode"
if test x$NOCONFIGURE = x; then
echo Running $srcdir/configure $conf_flags "$@" ...
$srcdir/configure $conf_flags "$@" \
&& echo Now type \`make\' to compile. || exit 1
else
echo Skipping configure process.
fi

View File

@@ -1,76 +0,0 @@
/* config.h.in. Generated from configure.in by autoheader. */
/* always defined to indicate that i18n is enabled */
#undef ENABLE_NLS
/* Gettext package. */
#undef GETTEXT_PACKAGE
/* Define to 1 if you have the `bind_textdomain_codeset' function. */
#undef HAVE_BIND_TEXTDOMAIN_CODESET
/* Define to 1 if you have the `dcgettext' function. */
#undef HAVE_DCGETTEXT
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
/* Define if the GNU gettext() function is already present or preinstalled. */
#undef HAVE_GETTEXT
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define if your <locale.h> file defines LC_MESSAGES. */
#undef HAVE_LC_MESSAGES
/* Define to 1 if you have the <locale.h> header file. */
#undef HAVE_LOCALE_H
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Name of package */
#undef PACKAGE
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Version number of package */
#undef VERSION

View File

@@ -1,41 +0,0 @@
AC_INIT(configure.in)
AM_INIT_AUTOMAKE(apparmorapplet-gnome, 0.9)
AM_CONFIG_HEADER(config.h)
AM_MAINTAINER_MODE
AC_ISC_POSIX
AC_PROG_CC
AM_PROG_CC_STDC
AC_HEADER_STDC
pkg_modules="gtk+-2.0 >= 2.0.0"
PKG_CHECK_MODULES(PACKAGE, [$pkg_modules])
AC_SUBST(PACKAGE_CFLAGS)
AC_SUBST(PACKAGE_LIBS)
GETTEXT_PACKAGE=apparmorapplet
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package.])
dnl Add the languages which your application supports here.
ALL_LINGUAS=""
AM_GLIB_GNU_GETTEXT
AM_PROG_LIBTOOL
dnl PKG_CHECK_MODULES(PACKAGE, [libgnomeui-2.0 gtk+-2.0])
PKG_CHECK_MODULES(PACKAGE, [libgnomeui-2.0 gtk+-2.0 libpanelapplet-2.0 gnome-vfs-2.0 libgnome-2.0 libglade-2.0 dbus-1.0])
pixmapsdir="${datadir}/pixmaps"
AC_SUBST(pixmapsdir)
AC_SUBST(PACKAGE_CFLAGS)
AC_SUBST(PACKAGE_LIBS)
AC_OUTPUT([
Makefile
po/Makefile.in
src/Makefile
pixmaps/Makefile
])

View File

@@ -1,6 +0,0 @@
apparmor_applet_pixmapsdir = $(pixmapsdir)
apparmor_applet_pixmaps_DATA = \
apparmor_alert.png apparmor_default.png
EXTRA_DIST = $(apparmor_applet_pixmaps_DATA)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

View File

@@ -1,258 +0,0 @@
# Makefile for program source directory in GNU NLS utilities package.
# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
#
# This file file be copied and used freely without restrictions. It can
# be used in projects which are not available under the GNU Public License
# but which still want to provide support for the GNU gettext functionality.
# Please note that the actual code is *not* freely available.
#
# - Modified by Owen Taylor <otaylor@redhat.com> to use GETTEXT_PACKAGE
# instead of PACKAGE and to look for po2tbl in ./ not in intl/
#
# - Modified by jacob berkman <jacob@ximian.com> to install
# Makefile.in.in and po2tbl.sed.in for use with glib-gettextize
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
PACKAGE = @PACKAGE@
VERSION = @VERSION@
SHELL = /bin/sh
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
datarootdir = @datarootdir@
datadir = @datadir@
libdir = @libdir@
localedir = $(libdir)/locale
gnulocaledir = $(datadir)/locale
gettextsrcdir = $(datadir)/glib-2.0/gettext/po
subdir = po
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
CC = @CC@
GENCAT = @GENCAT@
GMSGFMT = @GMSGFMT@
MSGFMT = @MSGFMT@
MSGFMT_OPTS = @MSGFMT_OPTS@
XGETTEXT = @XGETTEXT@
MSGMERGE = msgmerge
DEFS = @DEFS@
CFLAGS = @CFLAGS@
CPPFLAGS = @CPPFLAGS@
INCLUDES = -I.. -I$(top_srcdir)/intl
COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
SOURCES =
POFILES = @POFILES@
GMOFILES = @GMOFILES@
DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(GETTEXT_PACKAGE).pot \
$(POFILES) $(GMOFILES) $(SOURCES)
POTFILES = \
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
INSTOBJEXT = @INSTOBJEXT@
.SUFFIXES:
.SUFFIXES: .c .o .po .pox .gmo .mo .msg .cat
.c.o:
$(COMPILE) $<
.po.pox:
$(MAKE) $(GETTEXT_PACKAGE).pot
$(MSGMERGE) $< $(srcdir)/$(GETTEXT_PACKAGE).pot -o $*.pox
.po.mo:
$(MSGFMT) -o $@ $<
.po.gmo:
file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \
&& rm -f $$file && $(GMSGFMT) $(MSGFMT_OPTS) -o $$file $<
.po.cat:
sed -f ../intl/po2msg.sed < $< > $*.msg \
&& rm -f $@ && $(GENCAT) $@ $*.msg
all: all-@USE_NLS@
all-yes: $(CATALOGS)
all-no:
$(srcdir)/$(GETTEXT_PACKAGE).pot: $(POTFILES)
$(XGETTEXT) --default-domain=$(GETTEXT_PACKAGE) --directory=$(top_srcdir) \
--add-comments --keyword=_ --keyword=N_ \
--flag=g_strdup_printf:1:c-format \
--flag=g_string_printf:2:c-format \
--flag=g_string_append_printf:2:c-format \
--flag=g_error_new:3:c-format \
--flag=g_set_error:4:c-format \
--flag=g_markup_printf_escaped:1:c-format \
--flag=g_log:3:c-format \
--flag=g_print:1:c-format \
--flag=g_printerr:1:c-format \
--flag=g_printf:1:c-format \
--flag=g_fprintf:2:c-format \
--flag=g_sprintf:2:c-format \
--flag=g_snprintf:3:c-format \
--flag=g_scanner_error:2:c-format \
--flag=g_scanner_warn:2:c-format \
--files-from=$(srcdir)/POTFILES.in \
&& test ! -f $(GETTEXT_PACKAGE).po \
|| ( rm -f $(srcdir)/$(GETTEXT_PACKAGE).pot \
&& mv $(GETTEXT_PACKAGE).po $(srcdir)/$(GETTEXT_PACKAGE).pot )
install: install-exec install-data
install-exec:
install-data: install-data-@USE_NLS@
install-data-no: all
install-data-yes: all
@mkdir_p@ $(DESTDIR)$(datadir)
@catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
cat=`basename $$cat`; \
case "$$cat" in \
*.gmo) destdir=$(gnulocaledir);; \
*) destdir=$(localedir);; \
esac; \
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
dir=$(DESTDIR)$$destdir/$$lang/LC_MESSAGES; \
@mkdir_p@ $$dir; \
if test -r $$cat; then \
$(INSTALL_DATA) $$cat $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
echo "installing $$cat as $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT)"; \
else \
$(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
echo "installing $(srcdir)/$$cat as" \
"$$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT)"; \
fi; \
if test -r $$cat.m; then \
$(INSTALL_DATA) $$cat.m $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
echo "installing $$cat.m as $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m"; \
else \
if test -r $(srcdir)/$$cat.m ; then \
$(INSTALL_DATA) $(srcdir)/$$cat.m \
$$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
echo "installing $(srcdir)/$$cat as" \
"$$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m"; \
else \
true; \
fi; \
fi; \
done
if test "$(PACKAGE)" = "glib"; then \
@mkdir_p@ $(DESTDIR)$(gettextsrcdir); \
$(INSTALL_DATA) $(srcdir)/Makefile.in.in \
$(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
else \
: ; \
fi
# Define this as empty until I found a useful application.
installcheck:
uninstall:
catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
cat=`basename $$cat`; \
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
done
if test "$(PACKAGE)" = "glib"; then \
rm -f $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
fi
check: all
dvi info tags TAGS ID:
mostlyclean:
rm -f core core.* *.pox $(GETTEXT_PACKAGE).po *.old.po cat-id-tbl.tmp
rm -fr *.o
clean: mostlyclean
distclean: clean
rm -f Makefile Makefile.in POTFILES *.mo *.msg *.cat *.cat.m
maintainer-clean: distclean
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
rm -f $(GMOFILES)
distdir = ../$(GETTEXT_PACKAGE)-$(VERSION)/$(subdir)
dist distdir: update-po $(DISTFILES)
dists="$(DISTFILES)"; \
for file in $$dists; do \
ln $(srcdir)/$$file $(distdir) 2> /dev/null \
|| cp -p $(srcdir)/$$file $(distdir); \
done
update-po: Makefile
$(MAKE) $(GETTEXT_PACKAGE).pot
tmpdir=`pwd`; \
cd $(srcdir); \
catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
cat=`basename $$cat`; \
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
echo "$$lang:"; \
if $(MSGMERGE) $$lang.po $(GETTEXT_PACKAGE).pot -o $$tmpdir/$$lang.new.po; then \
if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
rm -f $$tmpdir/$$lang.new.po; \
else \
if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
:; \
else \
echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
rm -f $$tmpdir/$$lang.new.po; \
exit 1; \
fi; \
fi; \
else \
echo "msgmerge for $$cat failed!"; \
rm -f $$tmpdir/$$lang.new.po; \
fi; \
done
# POTFILES is created from POTFILES.in by stripping comments, empty lines
# and Intltool tags (enclosed in square brackets), and appending a full
# relative path to them
POTFILES: POTFILES.in
( if test 'x$(srcdir)' != 'x.'; then \
posrcprefix='$(top_srcdir)/'; \
else \
posrcprefix="../"; \
fi; \
rm -f $@-t $@ \
&& (sed -e '/^#/d' \
-e "s/^\[.*\] +//" \
-e '/^[ ]*$$/d' \
-e "s@.*@ $$posrcprefix& \\\\@" < $(srcdir)/$@.in \
| sed -e '$$s/\\$$//') > $@-t \
&& chmod a-w $@-t \
&& mv $@-t $@ )
Makefile: Makefile.in.in ../config.status POTFILES
cd .. \
&& CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \
$(SHELL) ./config.status
# Tell versions [3.59,3.63) of GNU make not to export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View File

@@ -1,6 +0,0 @@
# List of source files containing translatable strings.
src/apparmor-applet.c
src/preferences_dialog.c
src/reject_list.c

View File

@@ -1,48 +0,0 @@
# Copyright (C) 2007 SuSE Linux Products GmbH, Nuernberg
# This file is distributed under the same license as the package.
#
msgid ""
msgstr ""
"Project-Id-Version: installation\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-02-06 14:27-0800\n"
"PO-Revision-Date: 2006-11-03 14:26\n"
"Last-Translator: Novell Language <language@novell.com>\n"
"Language-Team: Novell Language <language@novell.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: src/apparmor-applet.c:244
msgid ""
"AppArmorApplet is free software; you can redistribute it and/or modify\n"
"it under the terms of the GNU General Public License as published by\n"
"the Free Software Foundation; either version 2 of the License, or\n"
"(at your option) any later version."
msgstr ""
#: src/preferences_dialog.c:31
msgid "AppArmor Desktop Preferences"
msgstr ""
#: src/preferences_dialog.c:46
#, fuzzy
msgid "Profile Generation"
msgstr "Profielinstellings"
#: src/preferences_dialog.c:54
msgid "Path"
msgstr "Pad"
#: src/preferences_dialog.c:76
msgid "YAST"
msgstr ""
#: src/preferences_dialog.c:77
msgid "genprof"
msgstr ""
#: src/reject_list.c:58
msgid "AppArmor Rejections"
msgstr ""

View File

@@ -1,49 +0,0 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-02-06 14:27-0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: src/apparmor-applet.c:244
msgid ""
"AppArmorApplet is free software; you can redistribute it and/or modify\n"
"it under the terms of the GNU General Public License as published by\n"
"the Free Software Foundation; either version 2 of the License, or\n"
"(at your option) any later version."
msgstr ""
#: src/preferences_dialog.c:31
msgid "AppArmor Desktop Preferences"
msgstr ""
#: src/preferences_dialog.c:46
msgid "Profile Generation"
msgstr ""
#: src/preferences_dialog.c:54
msgid "Path"
msgstr ""
#: src/preferences_dialog.c:76
msgid "YAST"
msgstr ""
#: src/preferences_dialog.c:77
msgid "genprof"
msgstr ""
#: src/reject_list.c:58
msgid "AppArmor Rejections"
msgstr ""

View File

@@ -1,43 +0,0 @@
# Copyright (C) 2006 SuSE Linux Products GmbH, Nuernberg
# This file is distributed under the same license as the package.
#
msgid ""
msgstr ""
"Project-Id-Version: apparmorapplet\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-02-06 14:27-0800\n"
"PO-Revision-Date: 2009-02-06 08:04\n"
"Last-Translator: Novell Language <language@novell.com>\n"
"Language-Team: Novell Language <language@novell.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: src/apparmor-applet.c:244
msgid "AppArmorApplet is free software; you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation; either version 2 of the License, or\n(at your option) any later version."
msgstr "AppArmorApplet برنامج مجاني؛ يمكنك إعادة توزيعه و/أو تعديله\nبموجب بنود رخصة GNU العمومية الذي\nنشرته مؤسسة البرمجيات الحرة، إما من الإصدار الثاني من الرخصة، أو\n)وفقًا لاختيارك) أي إصدار أحدث."
#: src/preferences_dialog.c:31
msgid "AppArmor Desktop Preferences"
msgstr "تفضيلات سطح مكتب AppArmor"
#: src/preferences_dialog.c:46
msgid "Profile Generation"
msgstr "إنشاء ملف التعريف"
#: src/preferences_dialog.c:54
msgid "Path"
msgstr "المسار"
#: src/preferences_dialog.c:76
msgid "YAST"
msgstr "YaST"
#: src/preferences_dialog.c:77
msgid "genprof"
msgstr "genprof"
#: src/reject_list.c:58
msgid "AppArmor Rejections"
msgstr "حالات رفض AppArmor"

View File

@@ -1,53 +0,0 @@
# translation of apparmorapplet.bg.po to Bulgarian
# Borislav Mitev <morbid_viper@tkzs.org>, 2008.
# Velislav Varbanov <varbanov@bglinux.org>, 2008.
msgid ""
msgstr ""
"Project-Id-Version: apparmorapplet.bg\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-02-06 14:27-0800\n"
"PO-Revision-Date: 2008-05-13 22:02+0300\n"
"Last-Translator: Velislav Varbanov <varbanov@bglinux.org>\n"
"Language-Team: Bulgarian <bg@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: KBabel 1.11.4\n"
#: src/apparmor-applet.c:244
msgid ""
"AppArmorApplet is free software; you can redistribute it and/or modify\n"
"it under the terms of the GNU General Public License as published by\n"
"the Free Software Foundation; either version 2 of the License, or\n"
"(at your option) any later version."
msgstr ""
"AppArmorApplet е свободен софтуер. Можете да го разпространявате\n"
"и/или променяте според условията на Общия публичен лиценз на GNU,\n"
"както е публикуван от Фондацията за свободен софтер, версия 2 на\n"
"лиценза или (по Ваше усмотрение) някоя по-висока версия."
#: src/preferences_dialog.c:31
msgid "AppArmor Desktop Preferences"
msgstr "AppArmor настройки на средата"
#: src/preferences_dialog.c:46
msgid "Profile Generation"
msgstr "Създаване на профил"
#: src/preferences_dialog.c:54
msgid "Path"
msgstr "Път"
#: src/preferences_dialog.c:76
msgid "YAST"
msgstr "YAST"
#: src/preferences_dialog.c:77
msgid "genprof"
msgstr "genprof"
#: src/reject_list.c:58
msgid "AppArmor Rejections"
msgstr "AppArmor откази"

View File

@@ -1,45 +0,0 @@
msgid ""
msgstr ""
"Project-Id-Version: @PACKAGE@\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-02-06 14:27-0800\n"
"PO-Revision-Date: 2004-08-09 10:24+0200\n"
"Last-Translator: xxx <yyy@example.org>\n"
"Language-Team: Bengali <i18n@suse.de>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
#: src/apparmor-applet.c:244
msgid ""
"AppArmorApplet is free software; you can redistribute it and/or modify\n"
"it under the terms of the GNU General Public License as published by\n"
"the Free Software Foundation; either version 2 of the License, or\n"
"(at your option) any later version."
msgstr ""
#: src/preferences_dialog.c:31
msgid "AppArmor Desktop Preferences"
msgstr ""
#: src/preferences_dialog.c:46
#, fuzzy
msgid "Profile Generation"
msgstr "প্রোফাইলের সেটিং"
#: src/preferences_dialog.c:54
msgid "Path"
msgstr "পথ"
#: src/preferences_dialog.c:76
msgid "YAST"
msgstr ""
#: src/preferences_dialog.c:77
msgid "genprof"
msgstr ""
#: src/reject_list.c:58
msgid "AppArmor Rejections"
msgstr ""

View File

@@ -1,44 +0,0 @@
msgid ""
msgstr ""
"Project-Id-Version: @PACKAGE@\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-02-06 14:27-0800\n"
"PO-Revision-Date: 2002-07-23 18:27+0200\n"
"Last-Translator: Damir Bjelobradic <Nagual@lugbih.org>\n"
"Language-Team: Bosnian <i18n@suse.de>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
#: src/apparmor-applet.c:244
msgid ""
"AppArmorApplet is free software; you can redistribute it and/or modify\n"
"it under the terms of the GNU General Public License as published by\n"
"the Free Software Foundation; either version 2 of the License, or\n"
"(at your option) any later version."
msgstr ""
#: src/preferences_dialog.c:31
msgid "AppArmor Desktop Preferences"
msgstr ""
#: src/preferences_dialog.c:46
msgid "Profile Generation"
msgstr ""
#: src/preferences_dialog.c:54
msgid "Path"
msgstr ""
#: src/preferences_dialog.c:76
msgid "YAST"
msgstr ""
#: src/preferences_dialog.c:77
msgid "genprof"
msgstr ""
#: src/reject_list.c:58
msgid "AppArmor Rejections"
msgstr ""

View File

@@ -1,51 +0,0 @@
msgid ""
msgstr ""
"Project-Id-Version: @PACKAGE@\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-02-06 14:27-0800\n"
"PO-Revision-Date: 2002-02-08 15:47+0100\n"
"Last-Translator: Jaume Badiella <myotis@drac.com>\n"
"Language-Team: Catalan\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: src/apparmor-applet.c:244
#, fuzzy
msgid ""
"AppArmorApplet is free software; you can redistribute it and/or modify\n"
"it under the terms of the GNU General Public License as published by\n"
"the Free Software Foundation; either version 2 of the License, or\n"
"(at your option) any later version."
msgstr ""
"El Power Manager és un programari lliure; el podeu redistribuir i/o\n"
"modificar sota els termes de la Llicència pública general del GNU\n"
"publicada per la Free Software Foundation; o bé la versió 2\n"
"de la llicència, o bé (a la vostra opció) qualsevol versió més nova."
#: src/preferences_dialog.c:31
#, fuzzy
msgid "AppArmor Desktop Preferences"
msgstr "Preferències de l'escriptori"
#: src/preferences_dialog.c:46
#, fuzzy
msgid "Profile Generation"
msgstr "Configuració de perfil"
#: src/preferences_dialog.c:54
msgid "Path"
msgstr "Camí"
#: src/preferences_dialog.c:76
msgid "YAST"
msgstr ""
#: src/preferences_dialog.c:77
msgid "genprof"
msgstr ""
#: src/reject_list.c:58
msgid "AppArmor Rejections"
msgstr ""

View File

@@ -1,43 +0,0 @@
# Copyright (C) 2006 SuSE Linux Products GmbH, Nuernberg
# This file is distributed under the same license as the package.
#
msgid ""
msgstr ""
"Project-Id-Version: apparmorapplet\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-02-06 14:27-0800\n"
"PO-Revision-Date: 2009-02-05 14:25\n"
"Last-Translator: Novell Language <language@novell.com>\n"
"Language-Team: Novell Language <language@novell.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: src/apparmor-applet.c:244
msgid "AppArmorApplet is free software; you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation; either version 2 of the License, or\n(at your option) any later version."
msgstr "AppArmorApplet je svobodný software; můžete ho dále šířit a/nebo\nupravit za podmínek stanovených licencí GNU General Public License,\npublikované organizací Free Software Foundation; buď verze 2\ntéto licence, nebo (podle vaší volby) jakékoli pozdější verze."
#: src/preferences_dialog.c:31
msgid "AppArmor Desktop Preferences"
msgstr "Nastavení modulu AppArmor pro pracovní stanici"
#: src/preferences_dialog.c:46
msgid "Profile Generation"
msgstr "Vytváření profilů"
#: src/preferences_dialog.c:54
msgid "Path"
msgstr "Cesta"
#: src/preferences_dialog.c:76
msgid "YAST"
msgstr "YaST"
#: src/preferences_dialog.c:77
msgid "genprof"
msgstr "genprof"
#: src/reject_list.c:58
msgid "AppArmor Rejections"
msgstr "Odmítnutí modulu AppArmor"

View File

@@ -1,44 +0,0 @@
msgid ""
msgstr ""
"Project-Id-Version: @PACKAGE@\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-02-06 14:27-0800\n"
"PO-Revision-Date: 2003-09-23 10:33+0200\n"
"Last-Translator: Kevin Donnelly <kevin@dotmon.com>\n"
"Language-Team: Welsh <i18n@suse.de>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=5; plural=(n == 0 ? 0 : n == 1 ? 1 : n < 6 ? 2 : n == 6 ? 3 : 4);\n"
#: src/apparmor-applet.c:244
msgid ""
"AppArmorApplet is free software; you can redistribute it and/or modify\n"
"it under the terms of the GNU General Public License as published by\n"
"the Free Software Foundation; either version 2 of the License, or\n"
"(at your option) any later version."
msgstr ""
#: src/preferences_dialog.c:31
msgid "AppArmor Desktop Preferences"
msgstr ""
#: src/preferences_dialog.c:46
msgid "Profile Generation"
msgstr ""
#: src/preferences_dialog.c:54
msgid "Path"
msgstr ""
#: src/preferences_dialog.c:76
msgid "YAST"
msgstr ""
#: src/preferences_dialog.c:77
msgid "genprof"
msgstr ""
#: src/reject_list.c:58
msgid "AppArmor Rejections"
msgstr ""

View File

@@ -1,55 +0,0 @@
# translation of apparmorapplet.po to dansk
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
#
# Martin Møller <martin@martinm-76.dk>, 2007.
# Jan Madsen <jan.madsen.pt(a)gmail.com>, 2007.
msgid ""
msgstr ""
"Project-Id-Version: apparmorapplet\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-02-06 14:27-0800\n"
"PO-Revision-Date: 2007-08-15 10:57+0100\n"
"Last-Translator: Jan Madsen <jan.madsen.pt(a)gmail.com>\n"
"Language-Team: dansk <opensuse-translation@opensuse.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.11.4\n"
#: src/apparmor-applet.c:244
msgid ""
"AppArmorApplet is free software; you can redistribute it and/or modify\n"
"it under the terms of the GNU General Public License as published by\n"
"the Free Software Foundation; either version 2 of the License, or\n"
"(at your option) any later version."
msgstr ""
"AppArmorApplet er fri software. Du kan redistribuere det og/eller ændre\n"
"det under betingelserne i GNU General Public License, som udgivet af\n"
"Free Software Foundation; enten i version 2 af licensen eller\n"
"(hvis du foretrækker det) i enhver senere version."
#: src/preferences_dialog.c:31
msgid "AppArmor Desktop Preferences"
msgstr "AppArmor desktop-præferencer"
#: src/preferences_dialog.c:46
msgid "Profile Generation"
msgstr "Profilgenerering"
#: src/preferences_dialog.c:54
msgid "Path"
msgstr "Søgesti"
#: src/preferences_dialog.c:76
msgid "YAST"
msgstr "YAST"
#: src/preferences_dialog.c:77
msgid "genprof"
msgstr "genprof"
#: src/reject_list.c:58
msgid "AppArmor Rejections"
msgstr "AppArmor afviste handlinger"

View File

@@ -1,43 +0,0 @@
# Copyright (C) 2006 SuSE Linux Products GmbH, Nuernberg
# This file is distributed under the same license as the package.
#
msgid ""
msgstr ""
"Project-Id-Version: apparmorapplet\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-02-06 14:27-0800\n"
"PO-Revision-Date: 2009-02-05 13:38\n"
"Last-Translator: Novell Language <language@novell.com>\n"
"Language-Team: Novell Language <language@novell.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: src/apparmor-applet.c:244
msgid "AppArmorApplet is free software; you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation; either version 2 of the License, or\n(at your option) any later version."
msgstr "AppAmorApplet ist freie Software, Sie können sie gemäß der Bestimmungen\nder GNU General Public License (in der von\nder Free Software Foundation veröffentlichten Form) weiter verteilen und/oder bearbeiten. Dies gilt für Version 2 der Lizenz bzw.\neine beliebige höhere Version (nach Ihrem Ermessen)."
#: src/preferences_dialog.c:31
msgid "AppArmor Desktop Preferences"
msgstr "AppAmor Desktop-Einstellungen"
#: src/preferences_dialog.c:46
msgid "Profile Generation"
msgstr "Profilgenerierung"
#: src/preferences_dialog.c:54
msgid "Path"
msgstr "Pfad"
#: src/preferences_dialog.c:76
msgid "YAST"
msgstr "YaST"
#: src/preferences_dialog.c:77
msgid "genprof"
msgstr "genprof"
#: src/reject_list.c:58
msgid "AppArmor Rejections"
msgstr "AppAmor-Zurückweisungen"

View File

@@ -1,59 +0,0 @@
# translation of apparmorapplet.el.po to Ελληνικά
# translation of apparmorapplet.el to Greek
# @TITLE@
# Copyright (C) 2006, SUSE Linux GmbH, Nuremberg
#
# This file is distributed under the same license as @PACKAGE@ package. FIRST
#
# Vasileios Giannakopoulos <billg@hellug.gr>, 2007.
# Kostas Boukouvalas <quantis@hellug.gr>, 2007.
# Vasileios Giannakopoulos <billg@billg.gr>, 2008.
msgid ""
msgstr ""
"Project-Id-Version: apparmorapplet.el\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-07-31 16:48-0600\n"
"PO-Revision-Date: 2008-06-06 01:04+0100\n"
"Last-Translator: Vasileios Giannakopoulos <billg@billg.gr>\n"
"Language-Team: Ελληνικά <billg@billg.gr>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.11.4\n"
#: src/apparmor-applet.c:244
msgid ""
"AppArmorApplet is free software; you can redistribute it and/or modify\n"
"it under the terms of the GNU General Public License as published by\n"
"the Free Software Foundation; either version 2 of the License, or\n"
"(at your option) any later version."
msgstr ""
"Το AppArmorApplet είναι ελεύθερο λογισμικό; μπορείτε να το επαναδιανείμετε ή/και να το τροποποιήσετε\n"
"υπό τους όρους της GNU General Public License όπως εκδόθηκε από\n"
"το Free Software Foundation; είτε στην έκδοση 2 της Άδειας, ή\n"
"(κατα την άποψή σας) σε νεότερη έκδοση."
#: src/preferences_dialog.c:31
msgid "AppArmor Desktop Preferences"
msgstr "Προτιμήσεις Επιφάνειας Εργασίας AppArmor"
#: src/preferences_dialog.c:46
msgid "Profile Generation"
msgstr "Δημιουργία Προφίλ"
#: src/preferences_dialog.c:54
msgid "Path"
msgstr "Διαδρομή"
#: src/preferences_dialog.c:76
msgid "YAST"
msgstr "YAST"
#: src/preferences_dialog.c:77
msgid "genprof"
msgstr "genprof"
#: src/reject_list.c:58
msgid "AppArmor Rejections"
msgstr "Απορριφθέντα AppArmor"

View File

@@ -1,51 +0,0 @@
# Benjamin Weber, 2007.
msgid ""
msgstr ""
"Project-Id-Version: @PACKAGE@\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-02-06 14:27-0800\n"
"PO-Revision-Date: 2007-08-17 15:35+0100\n"
"Last-Translator: Benjamin Weber\n"
"Language-Team: British English\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8-bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: KAider 0.1\n"
#: src/apparmor-applet.c:244
msgid ""
"AppArmorApplet is free software; you can redistribute it and/or modify\n"
"it under the terms of the GNU General Public License as published by\n"
"the Free Software Foundation; either version 2 of the License, or\n"
"(at your option) any later version."
msgstr ""
"AppArmorApplet is free software; you can redistribute it and/or modify\n"
"it under the terms of the GNU General Public Licence as published by\n"
"the Free Software Foundation; either version 2 of the License, or\n"
"(at your option) any later version."
#: src/preferences_dialog.c:31
msgid "AppArmor Desktop Preferences"
msgstr "AppArmor Desktop Preferences"
#: src/preferences_dialog.c:46
msgid "Profile Generation"
msgstr "Profile Generation"
#: src/preferences_dialog.c:54
msgid "Path"
msgstr "Path"
#: src/preferences_dialog.c:76
msgid "YAST"
msgstr "YaST"
#: src/preferences_dialog.c:77
msgid "genprof"
msgstr "genprof"
#: src/reject_list.c:58
msgid "AppArmor Rejections"
msgstr "AppArmor Rejections"

View File

@@ -1,45 +0,0 @@
msgid ""
msgstr ""
"Project-Id-Version: @PACKAGE@\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-02-06 14:27-0800\n"
"PO-Revision-Date: 2005-11-08 12:26+8\n"
"Last-Translator: Steve Beattie <steve@immunix.com>\n"
"Language-Team: English\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
#: src/apparmor-applet.c:244
msgid ""
"AppArmorApplet is free software; you can redistribute it and/or modify\n"
"it under the terms of the GNU General Public License as published by\n"
"the Free Software Foundation; either version 2 of the License, or\n"
"(at your option) any later version."
msgstr ""
#: src/preferences_dialog.c:31
msgid "AppArmor Desktop Preferences"
msgstr ""
#: src/preferences_dialog.c:46
#, fuzzy
msgid "Profile Generation"
msgstr "Profile doesn't exist\n"
#: src/preferences_dialog.c:54
msgid "Path"
msgstr "Path"
#: src/preferences_dialog.c:76
msgid "YAST"
msgstr ""
#: src/preferences_dialog.c:77
msgid "genprof"
msgstr ""
#: src/reject_list.c:58
msgid "AppArmor Rejections"
msgstr ""

View File

@@ -1,43 +0,0 @@
# Copyright (C) 2006 SuSE Linux Products GmbH, Nuernberg
# This file is distributed under the same license as the package.
#
msgid ""
msgstr ""
"Project-Id-Version: apparmorapplet\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-02-06 14:27-0800\n"
"PO-Revision-Date: 2009-02-04 14:32\n"
"Last-Translator: Novell Language <language@novell.com>\n"
"Language-Team: Novell Language <language@novell.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: src/apparmor-applet.c:244
msgid "AppArmorApplet is free software; you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation; either version 2 of the License, or\n(at your option) any later version."
msgstr "AppArmorApplet es un programa libre. Puede redistribuirlo y\nmodificarlo bajo los términos de la Licencia Pública General GNU,\ntal como la publica la Free Software Foundation, ya sea la versión 2\nde la licencia o cualquier versión posterior que elija."
#: src/preferences_dialog.c:31
msgid "AppArmor Desktop Preferences"
msgstr "Preferencias de AppArmor para el escritorio"
#: src/preferences_dialog.c:46
msgid "Profile Generation"
msgstr "Generación de perfiles"
#: src/preferences_dialog.c:54
msgid "Path"
msgstr "Vía"
#: src/preferences_dialog.c:76
msgid "YAST"
msgstr "YaST"
#: src/preferences_dialog.c:77
msgid "genprof"
msgstr "genprof"
#: src/reject_list.c:58
msgid "AppArmor Rejections"
msgstr "Rechazos de AppArmor"

View File

@@ -1,48 +0,0 @@
# translation of apparmorapplet.et.po to Estonian
# Ain Vagula <avagula@gmail.com>, 2007.
msgid ""
msgstr ""
"Project-Id-Version: apparmorapplet.et\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-02-06 14:27-0800\n"
"PO-Revision-Date: 2007-10-04 23:12+0300\n"
"Last-Translator: Ain Vagula <avagula@gmail.com>\n"
"Language-Team: Estonian <linux-ee@lists.eenet.ee>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: KBabel 1.11.4\n"
#: src/apparmor-applet.c:244
msgid ""
"AppArmorApplet is free software; you can redistribute it and/or modify\n"
"it under the terms of the GNU General Public License as published by\n"
"the Free Software Foundation; either version 2 of the License, or\n"
"(at your option) any later version."
msgstr ""
#: src/preferences_dialog.c:31
msgid "AppArmor Desktop Preferences"
msgstr "AppArmori töölaua eelistused"
#: src/preferences_dialog.c:46
msgid "Profile Generation"
msgstr "Profiili genereerimine"
#: src/preferences_dialog.c:54
msgid "Path"
msgstr "Asukoht"
#: src/preferences_dialog.c:76
msgid "YAST"
msgstr "YAST"
#: src/preferences_dialog.c:77
msgid "genprof"
msgstr "genprof"
#: src/reject_list.c:58
msgid "AppArmor Rejections"
msgstr ""

View File

@@ -1,52 +0,0 @@
# translation of apparmorapplet.po to suomi
# Jyri Palokangas <jmp@opensuse.fi>, 2007.
# Mikko Piippo <piippo@cc.helsinki.fi>, 2007.
msgid ""
msgstr ""
"Project-Id-Version: apparmorapplet\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-02-06 14:27-0800\n"
"PO-Revision-Date: 2007-08-21 17:52+0300\n"
"Last-Translator: Mikko Piippo <piippo@cc.helsinki.fi>\n"
"Language-Team: suomi <fi@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.11.4\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
#: src/apparmor-applet.c:244
msgid ""
"AppArmorApplet is free software; you can redistribute it and/or modify\n"
"it under the terms of the GNU General Public License as published by\n"
"the Free Software Foundation; either version 2 of the License, or\n"
"(at your option) any later version."
msgstr ""
"AppArmorApplet on vapaa ohjelma; voit levittää sitä edelleen ja/tai muokata \n"
"sitä Free Software Foundation -säätiön julkaiseman GNU GPL -lisenssin ehtojen mukaisesti. \n"
"Voit käyttää joko lisenssin versiota 2 tai halutessasi mitä tahansa uudempaa versiota."
#: src/preferences_dialog.c:31
msgid "AppArmor Desktop Preferences"
msgstr "AppArmor-työpöytäasetukset"
#: src/preferences_dialog.c:46
msgid "Profile Generation"
msgstr "Profiilin luominen"
#: src/preferences_dialog.c:54
msgid "Path"
msgstr "Polku"
#: src/preferences_dialog.c:76
msgid "YAST"
msgstr "YAST"
#: src/preferences_dialog.c:77
msgid "genprof"
msgstr "genprof"
#: src/reject_list.c:58
msgid "AppArmor Rejections"
msgstr "AppArmor hylkäykset"

View File

@@ -1,43 +0,0 @@
# Copyright (C) 2006 SuSE Linux Products GmbH, Nuernberg
# This file is distributed under the same license as the package.
#
msgid ""
msgstr ""
"Project-Id-Version: apparmorapplet\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-02-06 14:27-0800\n"
"PO-Revision-Date: 2009-02-04 15:43\n"
"Last-Translator: Novell Language <language@novell.com>\n"
"Language-Team: Novell Language <language@novell.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: src/apparmor-applet.c:244
msgid "AppArmorApplet is free software; you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation; either version 2 of the License, or\n(at your option) any later version."
msgstr "L'applet AppArmor est un logiciel libre que vous pouvez \ndistribuer et/ou modifier conformément aux termes de la Licence Publique\nGénérale GNU, tel que publié par la Free Software Foundation \n(version 2 de la license ou toute autre version ultérieure, le cas échéant)."
#: src/preferences_dialog.c:31
msgid "AppArmor Desktop Preferences"
msgstr "Préférences de bureau AppArmor"
#: src/preferences_dialog.c:46
msgid "Profile Generation"
msgstr "Génération du profil"
#: src/preferences_dialog.c:54
msgid "Path"
msgstr "Chemin d'accès"
#: src/preferences_dialog.c:76
msgid "YAST"
msgstr "YaST"
#: src/preferences_dialog.c:77
msgid "genprof"
msgstr "genprof"
#: src/reject_list.c:58
msgid "AppArmor Rejections"
msgstr "Rejets AppArmor"

View File

@@ -1,65 +0,0 @@
# translation of
#
# Proxecto Trasno - Adaptación do software libre á lingua galega: Se desexas
# colaborar connosco, podes atopar máis información en <http://trasno.net>
#
# Galician message file for apparmorapplet
# Copyright (C) 2000, 2001 SuSE GmbH.
#
# Jesús Bravo Álvarez <jba@pobox.com>, 2000.
# Manuel A. Vazquez <xixirei@yahoo.es>, 2008.
# Leandro Regueiro <leandro.regueiro@gmail.com>, 2008.
#
# Proxecto Trasno - Adaptación do software libre á lingua galega: Se desexas
# colaborar connosco, podes atopar máis información en <http://trasno.net>
#
msgid ""
msgstr ""
"Project-Id-Version: apparmorapplet\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-02-06 14:27-0800\n"
"PO-Revision-Date: 2008-05-02 14:02+0100\n"
"Last-Translator: Leandro Regueiro <leandro DOT regueiro AT gmail DOT com>\n"
"Language-Team: Galician <proxecto@trasno.net>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
#: src/apparmor-applet.c:244
msgid ""
"AppArmorApplet is free software; you can redistribute it and/or modify\n"
"it under the terms of the GNU General Public License as published by\n"
"the Free Software Foundation; either version 2 of the License, or\n"
"(at your option) any later version."
msgstr ""
"AppArmorApplet é software libre; vostede pode redistribuílo e/ou\n"
"modificalo baixo os termos da Licenza Pública Xeral de GNU publicada\n"
"pola Free Software Foundation; baixo os termos da licenza na versión 2,\n"
"ou calquera versión posterior (á súa elección)."
#: src/preferences_dialog.c:31
msgid "AppArmor Desktop Preferences"
msgstr "Preferencias de AppArmor para o escritorio"
#: src/preferences_dialog.c:46
msgid "Profile Generation"
msgstr "Xeración do perfil"
#: src/preferences_dialog.c:54
msgid "Path"
msgstr "Ruta"
#: src/preferences_dialog.c:76
msgid "YAST"
msgstr "YAST"
#: src/preferences_dialog.c:77
msgid "genprof"
msgstr "genprof"
#: src/reject_list.c:58
msgid "AppArmor Rejections"
msgstr "Rexeitamentos de AppArmor"

View File

@@ -1,54 +0,0 @@
# Marathi message file for YaST2 (@memory@).
# Copyright (C) 2007 SUSE Linux Products GmbH.
#
msgid ""
msgstr ""
"Project-Id-Version: YaST (@memory@)\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-02-06 14:27-0800\n"
"PO-Revision-Date: 2005-07-29 15:37+0530\n"
"Last-Translator: i18n@suse.de\n"
"Language-Team: Gujarati <i18n@suse.de>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n!=1);\n"
#: src/apparmor-applet.c:244
#, fuzzy
msgid ""
"AppArmorApplet is free software; you can redistribute it and/or modify\n"
"it under the terms of the GNU General Public License as published by\n"
"the Free Software Foundation; either version 2 of the License, or\n"
"(at your option) any later version."
msgstr ""
"પાવર મેનેજર નિશુલ્ક સોફ્ટવેર છે; તમે તે ફ્રી સોફ્ટવેર ફાઉન્ડેશન દ્વારા \n"
"પ્રકાશિત GNU સામાન્ય જાહેર લાઇસેન્સની શરતો હેઠળ, ક્યાંતો લાઇસેન્સની આવૃતિ 2, અથવા \n"
"(તમારા વિકલ્પ પ્રમાણે) અન્ય પછીની આવૃતિ, ફરીથી \n"
"વહેચી શકો અને/અથવા તે બદલી શકો."
#: src/preferences_dialog.c:31
#, fuzzy
msgid "AppArmor Desktop Preferences"
msgstr " ડેસ્કટોપ પસંદગીઓ"
#: src/preferences_dialog.c:46
#, fuzzy
msgid "Profile Generation"
msgstr "પ્રોફાઈલ સેટિંગ્સ"
#: src/preferences_dialog.c:54
msgid "Path"
msgstr "માર્ગ"
#: src/preferences_dialog.c:76
msgid "YAST"
msgstr ""
#: src/preferences_dialog.c:77
msgid "genprof"
msgstr ""
#: src/reject_list.c:58
msgid "AppArmor Rejections"
msgstr ""

View File

@@ -1,44 +0,0 @@
msgid ""
msgstr ""
"Project-Id-Version: @PACKAGE@\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-02-06 14:27-0800\n"
"PO-Revision-Date: 2004-08-09 10:24+0200\n"
"Last-Translator: xxx <yyy@example.org>\n"
"Language-Team: Hebrew <i18n@suse.de>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
#: src/apparmor-applet.c:244
msgid ""
"AppArmorApplet is free software; you can redistribute it and/or modify\n"
"it under the terms of the GNU General Public License as published by\n"
"the Free Software Foundation; either version 2 of the License, or\n"
"(at your option) any later version."
msgstr ""
#: src/preferences_dialog.c:31
msgid "AppArmor Desktop Preferences"
msgstr ""
#: src/preferences_dialog.c:46
msgid "Profile Generation"
msgstr ""
#: src/preferences_dialog.c:54
msgid "Path"
msgstr ""
#: src/preferences_dialog.c:76
msgid "YAST"
msgstr ""
#: src/preferences_dialog.c:77
msgid "genprof"
msgstr ""
#: src/reject_list.c:58
msgid "AppArmor Rejections"
msgstr ""

View File

@@ -1,53 +0,0 @@
# translation of apparmorapplet.hi.po to Hindi
# Sangeeta Kumari <k.sangeeta09@gmail.com>, 2007.
msgid ""
msgstr ""
"Project-Id-Version: apparmorapplet.hi\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-02-06 14:27-0800\n"
"PO-Revision-Date: 2007-08-24 22:40+0530\n"
"Last-Translator: \n"
"Language-Team: Hindi <en@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"\n"
"\n"
"\n"
"Plural-Forms: nplurals=2; plural=(n!=1);\n"
"\n"
"X-Generator: KBabel 1.11.4\n"
#: src/apparmor-applet.c:244
msgid ""
"AppArmorApplet is free software; you can redistribute it and/or modify\n"
"it under the terms of the GNU General Public License as published by\n"
"the Free Software Foundation; either version 2 of the License, or\n"
"(at your option) any later version."
msgstr ""
#: src/preferences_dialog.c:31
msgid "AppArmor Desktop Preferences"
msgstr ""
#: src/preferences_dialog.c:46
#, fuzzy
msgid "Profile Generation"
msgstr " प्रोफाइल सेटिंग "
#: src/preferences_dialog.c:54
msgid "Path"
msgstr "पथ"
#: src/preferences_dialog.c:76
msgid "YAST"
msgstr "YAST"
#: src/preferences_dialog.c:77
msgid "genprof"
msgstr "genprof"
#: src/reject_list.c:58
msgid "AppArmor Rejections"
msgstr ""

View File

@@ -1,52 +0,0 @@
# translation of apparmorapplet.hr.po to Hrvatski
# Krešimir Jozić <kjozic@gmail.com>, 2007.
msgid ""
msgstr ""
"Project-Id-Version: apparmorapplet.hr\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-02-06 14:27-0800\n"
"PO-Revision-Date: 2007-09-20 21:50+0200\n"
"Last-Translator: Krešimir Jozić <kjozic@gmail.com>\n"
"Language-Team: Hrvatski\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
"X-Generator: KBabel 1.11.4\n"
#: src/apparmor-applet.c:244
msgid ""
"AppArmorApplet is free software; you can redistribute it and/or modify\n"
"it under the terms of the GNU General Public License as published by\n"
"the Free Software Foundation; either version 2 of the License, or\n"
"(at your option) any later version."
msgstr ""
"AppArmorApplet je slobodan program, možete ga redistribuirati i/ili prerađivati\n"
"po pravilima GNU opće javne licence koju je objavila\n"
"Free Software Foundation; bilo pod verzijom 2 Licence ili\n"
"(po vašem izboru) bilo kojom novijom verzijom."
#: src/preferences_dialog.c:31
msgid "AppArmor Desktop Preferences"
msgstr "AppArmor postavke radne površine"
#: src/preferences_dialog.c:46
msgid "Profile Generation"
msgstr "Stvaranje profila"
#: src/preferences_dialog.c:54
msgid "Path"
msgstr "Putanja"
#: src/preferences_dialog.c:76
msgid "YAST"
msgstr "YAST"
#: src/preferences_dialog.c:77
msgid "genprof"
msgstr "genprof"
#: src/reject_list.c:58
msgid "AppArmor Rejections"
msgstr "AppArmor pravila za odbijanje"

View File

@@ -1,52 +0,0 @@
# translation of apparmorapplet.hu.po to
# Kalman Kemenczy <kkemenczy@novell.com>, 2007.
msgid ""
msgstr ""
"Project-Id-Version: apparmorapplet.hu\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-02-06 14:27-0800\n"
"PO-Revision-Date: 2007-08-12 14:47+0200\n"
"Last-Translator: Kalman Kemenczy <kkemenczy@novell.com>\n"
"Language-Team: <hu@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.11.4\n"
"Plural-Forms: Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: src/apparmor-applet.c:244
msgid ""
"AppArmorApplet is free software; you can redistribute it and/or modify\n"
"it under the terms of the GNU General Public License as published by\n"
"the Free Software Foundation; either version 2 of the License, or\n"
"(at your option) any later version."
msgstr ""
"Az AppArmor kisalkalmazás szabad szoftver, terjesztheti és/vagy\n"
"módosíthatja a Free Software Foundation által kiadott GNU\n"
"General Public License második (vagy bármely későbbi)\n"
"változatában foglaltak alapján."
#: src/preferences_dialog.c:31
msgid "AppArmor Desktop Preferences"
msgstr "AppArmor munkaasztal beállításai"
#: src/preferences_dialog.c:46
msgid "Profile Generation"
msgstr "Profillétrehozás"
# clients/online_update_details.ycp:86 clients/online_update_select.ycp:108
#: src/preferences_dialog.c:54
msgid "Path"
msgstr "Elérési útvonal"
#: src/preferences_dialog.c:76
msgid "YAST"
msgstr "YAST"
#: src/preferences_dialog.c:77
msgid "genprof"
msgstr "genprof"
#: src/reject_list.c:58
msgid "AppArmor Rejections"
msgstr "AppArmor visszautasítások"

View File

@@ -1,44 +0,0 @@
msgid ""
msgstr ""
"Project-Id-Version: @PACKAGE@\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-02-06 14:27-0800\n"
"PO-Revision-Date: 2002-10-08 13:38+0200\n"
"Last-Translator: I Made Wiryana <made@nakula.rvs.uni-bielefeld.de>\n"
"Language-Team: Indonesian <i18n@suse.de>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
#: src/apparmor-applet.c:244
msgid ""
"AppArmorApplet is free software; you can redistribute it and/or modify\n"
"it under the terms of the GNU General Public License as published by\n"
"the Free Software Foundation; either version 2 of the License, or\n"
"(at your option) any later version."
msgstr ""
#: src/preferences_dialog.c:31
msgid "AppArmor Desktop Preferences"
msgstr ""
#: src/preferences_dialog.c:46
msgid "Profile Generation"
msgstr ""
#: src/preferences_dialog.c:54
msgid "Path"
msgstr ""
#: src/preferences_dialog.c:76
msgid "YAST"
msgstr ""
#: src/preferences_dialog.c:77
msgid "genprof"
msgstr ""
#: src/reject_list.c:58
msgid "AppArmor Rejections"
msgstr ""

View File

@@ -1,43 +0,0 @@
# Copyright (C) 2006 SuSE Linux Products GmbH, Nuernberg
# This file is distributed under the same license as the package.
#
msgid ""
msgstr ""
"Project-Id-Version: apparmorapplet\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-02-06 14:27-0800\n"
"PO-Revision-Date: 2009-02-05 10:11\n"
"Last-Translator: Novell Language <language@novell.com>\n"
"Language-Team: Novell Language <language@novell.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: src/apparmor-applet.c:244
msgid "AppArmorApplet is free software; you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation; either version 2 of the License, or\n(at your option) any later version."
msgstr "AppArmorApplet è un software gratuito. È possibile ridistribuirlo e/o\nmodificarlo sotto i termini della GNU General Public Licence\npubblicati dalla Free Software Foundation: versione 2\ndella licenza oppure, a scelta, una versione successiva."
#: src/preferences_dialog.c:31
msgid "AppArmor Desktop Preferences"
msgstr "Preferenze Desktop AppArmor"
#: src/preferences_dialog.c:46
msgid "Profile Generation"
msgstr "Generazione del profilo"
#: src/preferences_dialog.c:54
msgid "Path"
msgstr "Percorso"
#: src/preferences_dialog.c:76
msgid "YAST"
msgstr "YAST"
#: src/preferences_dialog.c:77
msgid "genprof"
msgstr "genprof"
#: src/reject_list.c:58
msgid "AppArmor Rejections"
msgstr "Operazioni respinte da AppArmor"

View File

@@ -1,43 +0,0 @@
# Copyright (C) 2006 SuSE Linux Products GmbH, Nuernberg
# This file is distributed under the same license as the package.
#
msgid ""
msgstr ""
"Project-Id-Version: apparmorapplet\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-02-06 14:27-0800\n"
"PO-Revision-Date: 2009-02-04 15:11\n"
"Last-Translator: Novell Language <language@novell.com>\n"
"Language-Team: Novell Language <language@novell.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: src/apparmor-applet.c:244
msgid "AppArmorApplet is free software; you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation; either version 2 of the License, or\n(at your option) any later version."
msgstr "AppArmorアプレットはフリーソフトウェアです。これを、Free Software\nFoundationが公開しているGNU General Public License(バージョン2か、希望によっては\nそれ以降のバージョンのうちどれか)の定める条件の下で再配布および/または変更することが\nできます。"
#: src/preferences_dialog.c:31
msgid "AppArmor Desktop Preferences"
msgstr "AppArmorデスクトップ設定"
#: src/preferences_dialog.c:46
msgid "Profile Generation"
msgstr "プロファイル生成"
#: src/preferences_dialog.c:54
msgid "Path"
msgstr "パス"
#: src/preferences_dialog.c:76
msgid "YAST"
msgstr "YaST"
#: src/preferences_dialog.c:77
msgid "genprof"
msgstr "genprof"
#: src/reject_list.c:58
msgid "AppArmor Rejections"
msgstr "AppArmorによる拒否"

View File

@@ -1,50 +0,0 @@
msgid ""
msgstr ""
"Project-Id-Version: @PACKAGE@\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-02-06 14:27-0800\n"
"PO-Revision-Date: 2008-09-25 17:51+0400\n"
"Last-Translator: George Machitidze <giomac@gmail.com>\n"
"Language-Team: Georgian <i18n@suse.de>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
#: src/apparmor-applet.c:244
msgid ""
"AppArmorApplet is free software; you can redistribute it and/or modify\n"
"it under the terms of the GNU General Public License as published by\n"
"the Free Software Foundation; either version 2 of the License, or\n"
"(at your option) any later version."
msgstr ""
"AppArmorApplet არის თავისუფალი პროგრამული უზრუნველოყა;\n"
"თქვენ შეგიძლიათ იგი გაავრცელოთ ან/და შეცვალოთ\n"
"Free Software Foundation-ის მიერ გამოქვეყნაბული\n"
"GNU General Public License ლიცენზიით; ან მეორე ვერსიით,\n"
"ან უფრო ახალი ვერსიით (თქვენი არჩევანის მიხედვით)."
#: src/preferences_dialog.c:31
msgid "AppArmor Desktop Preferences"
msgstr "AppArmor სამუშაო მაგიდის პარამეტრები "
#: src/preferences_dialog.c:46
msgid "Profile Generation"
msgstr ""
#: src/preferences_dialog.c:54
msgid "Path"
msgstr "გეზი"
#: src/preferences_dialog.c:76
msgid "YAST"
msgstr "YAST"
#: src/preferences_dialog.c:77
msgid "genprof"
msgstr "genprof"
#: src/reject_list.c:58
msgid "AppArmor Rejections"
msgstr "AppArmor-ის უარყოფები"

View File

@@ -1,52 +0,0 @@
# translation of apparmorapplet.km.po to Khmer
# Khoem Sokhem <khoemsokhem@khmeros.info>, 2007.
msgid ""
msgstr ""
"Project-Id-Version: apparmorapplet.km\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-02-06 14:27-0800\n"
"PO-Revision-Date: 2007-08-13 14:34+0700\n"
"Last-Translator: Khoem Sokhem <khoemsokhem@khmeros.info>\n"
"Language-Team: Khmer <support@khmeros.info>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: KBabel 1.11.4\n"
#: src/apparmor-applet.c:244
msgid ""
"AppArmorApplet is free software; you can redistribute it and/or modify\n"
"it under the terms of the GNU General Public License as published by\n"
"the Free Software Foundation; either version 2 of the License, or\n"
"(at your option) any later version."
msgstr ""
"AppArmorApplet គឺ​ជា​កម្មវិធី​ឥតគិតថ្លៃ អ្នក​អាច​ចែកចាយវា និង/ឬ​កែប្រែ​បាន\n"
"ប៉ុន្តែ​ត្រូវ​នៅ​ក្រោម​អាជ្ញាបណ្ណ GNU ព្រោះ​ថា​បាន​បោះពុម្ព​ផ្សាយ​ដោយ\n"
"មូលនិធិ​កម្មវិធី​ឥតគិតថ្លៃ កំណែ ២ របស់​អាជ្ញាបណ្ណ ឬ\n"
"(ជម្រើស​របស់​អ្នក) នៅ​កំណែ​ក្រោយ ។"
#: src/preferences_dialog.c:31
msgid "AppArmor Desktop Preferences"
msgstr "ចំណូល​ចិត្ត​ផ្ទៃតុ​របស់ AppArmor"
#: src/preferences_dialog.c:46
msgid "Profile Generation"
msgstr "ការ​បង្កើត​ទម្រង់"
#: src/preferences_dialog.c:54
msgid "Path"
msgstr "ផ្លូវ"
#: src/preferences_dialog.c:76
msgid "YAST"
msgstr "YAST"
#: src/preferences_dialog.c:77
msgid "genprof"
msgstr "genprof"
#: src/reject_list.c:58
msgid "AppArmor Rejections"
msgstr "ការ​ច្រាន AppArmor ចេញ"

View File

@@ -1,43 +0,0 @@
# Copyright (C) 2006 SuSE Linux Products GmbH, Nuernberg
# This file is distributed under the same license as the package.
#
msgid ""
msgstr ""
"Project-Id-Version: apparmorapplet\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-02-06 14:27-0800\n"
"PO-Revision-Date: 2009-02-04 15:02\n"
"Last-Translator: Novell Language <language@novell.com>\n"
"Language-Team: Novell Language <language@novell.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: src/apparmor-applet.c:244
msgid "AppArmorApplet is free software; you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation; either version 2 of the License, or\n(at your option) any later version."
msgstr "AppArmorApplet은 무료 소프트웨어이며, 배포하거나\nFSF(Free Software Foundation)에서 발행한 GNU GPL(General Public License: 버전 2 또는 (사용자 재량으로)\n이후 버전) 약관 하에서 수정할 수 있습니다. "
#: src/preferences_dialog.c:31
msgid "AppArmor Desktop Preferences"
msgstr "AppArmor 데스크톱 기본 설정"
#: src/preferences_dialog.c:46
msgid "Profile Generation"
msgstr "프로파일 생성"
#: src/preferences_dialog.c:54
msgid "Path"
msgstr "경로"
#: src/preferences_dialog.c:76
msgid "YAST"
msgstr "YAST"
#: src/preferences_dialog.c:77
msgid "genprof"
msgstr "genprof"
#: src/reject_list.c:58
msgid "AppArmor Rejections"
msgstr "AppArmor 거부"

View File

@@ -1,44 +0,0 @@
msgid ""
msgstr ""
"Project-Id-Version: @PACKAGE@\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-02-06 14:27-0800\n"
"PO-Revision-Date: 2006-01-04 08:58+0100\n"
"Last-Translator: i18n@suse.de\n"
"Language-Team: Lao <i18n@suse.de>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
#: src/apparmor-applet.c:244
msgid ""
"AppArmorApplet is free software; you can redistribute it and/or modify\n"
"it under the terms of the GNU General Public License as published by\n"
"the Free Software Foundation; either version 2 of the License, or\n"
"(at your option) any later version."
msgstr ""
#: src/preferences_dialog.c:31
msgid "AppArmor Desktop Preferences"
msgstr ""
#: src/preferences_dialog.c:46
msgid "Profile Generation"
msgstr ""
#: src/preferences_dialog.c:54
msgid "Path"
msgstr ""
#: src/preferences_dialog.c:76
msgid "YAST"
msgstr ""
#: src/preferences_dialog.c:77
msgid "genprof"
msgstr ""
#: src/reject_list.c:58
msgid "AppArmor Rejections"
msgstr ""

View File

@@ -1,49 +0,0 @@
# Copyright (C) 2006, SUSE Linux GmbH, Nuremberg
# Andrius Štikonas <stikonas@gmail.com>, 2007.
# This file is distributed under the same license as AppArmorApplet package.
#
msgid ""
msgstr ""
"Project-Id-Version: AppArmorApplet\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-02-06 14:27-0800\n"
"PO-Revision-Date: 2007-08-19 19:59+0300\n"
"Last-Translator: Andrius Štikonas <stikonas@gmail.com>\n"
"Language-Team: Lithuanian <i18n@suse.de>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
#: src/apparmor-applet.c:244
msgid ""
"AppArmorApplet is free software; you can redistribute it and/or modify\n"
"it under the terms of the GNU General Public License as published by\n"
"the Free Software Foundation; either version 2 of the License, or\n"
"(at your option) any later version."
msgstr ""
#: src/preferences_dialog.c:31
msgid "AppArmor Desktop Preferences"
msgstr "AppArmor darbastalio nustatymai"
#: src/preferences_dialog.c:46
msgid "Profile Generation"
msgstr "Profilio generavimas"
#: src/preferences_dialog.c:54
msgid "Path"
msgstr "Kelias"
#: src/preferences_dialog.c:76
msgid "YAST"
msgstr "YAST"
#: src/preferences_dialog.c:77
msgid "genprof"
msgstr ""
#: src/reject_list.c:58
msgid "AppArmor Rejections"
msgstr ""

View File

@@ -1,48 +0,0 @@
# Macedonian message file for YaST2 (@memory@).
# Copyright (C) 2006 SUSE Linux Products GmbH.
# Зоран Димовски <zoki.dimovski@gmail.com>
#
msgid ""
msgstr ""
"Project-Id-Version: YaST (@memory@)\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-02-06 14:27-0800\n"
"PO-Revision-Date: 2001-07-17 16:12+0200\n"
"Last-Translator: Зоран Димовски <zoki.dimovski@gmail.com>\n"
"Language-Team: Macedonian <i18n@suse.de>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n>1);\n"
#: src/apparmor-applet.c:244
msgid ""
"AppArmorApplet is free software; you can redistribute it and/or modify\n"
"it under the terms of the GNU General Public License as published by\n"
"the Free Software Foundation; either version 2 of the License, or\n"
"(at your option) any later version."
msgstr ""
#: src/preferences_dialog.c:31
msgid "AppArmor Desktop Preferences"
msgstr ""
#: src/preferences_dialog.c:46
msgid "Profile Generation"
msgstr ""
#: src/preferences_dialog.c:54
msgid "Path"
msgstr ""
#: src/preferences_dialog.c:76
msgid "YAST"
msgstr ""
#: src/preferences_dialog.c:77
msgid "genprof"
msgstr ""
#: src/reject_list.c:58
msgid "AppArmor Rejections"
msgstr ""

View File

@@ -1,49 +0,0 @@
# Marathi message file for YaST2 (@memory@).
# Copyright (C) 2006 SUSE Linux Products GmbH.
# "( अमेय पाळंदे ) Ameya Palande" <2ameya@gmail.com>
#
msgid ""
msgstr ""
"Project-Id-Version: YaST (@memory@)\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-02-06 14:27-0800\n"
"PO-Revision-Date: 2005-07-29 15:37+0530\n"
"Last-Translator: \"( अमेय पाळंदे ) Ameya Palande\" <2ameya@gmail.com>\n"
"Language-Team: Marathi <i18n@suse.de>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n!=1);\n"
#: src/apparmor-applet.c:244
msgid ""
"AppArmorApplet is free software; you can redistribute it and/or modify\n"
"it under the terms of the GNU General Public License as published by\n"
"the Free Software Foundation; either version 2 of the License, or\n"
"(at your option) any later version."
msgstr ""
#: src/preferences_dialog.c:31
msgid "AppArmor Desktop Preferences"
msgstr ""
#: src/preferences_dialog.c:46
#, fuzzy
msgid "Profile Generation"
msgstr "प्रोफाईल सेटिंग्ज"
#: src/preferences_dialog.c:54
msgid "Path"
msgstr "पाथ"
#: src/preferences_dialog.c:76
msgid "YAST"
msgstr ""
#: src/preferences_dialog.c:77
msgid "genprof"
msgstr ""
#: src/reject_list.c:58
msgid "AppArmor Rejections"
msgstr ""

View File

@@ -1,59 +0,0 @@
# translation of apparmorapplet.po to norsk bokmål
# translation of apparmorapplet.po to
# @TITLE@
# Copyright (C) 2006, SUSE Linux GmbH, Nuremberg
#
# This file is distributed under the same license as @PACKAGE@ package. FIRST
#
# Olav Pettershagen <olav.pet@online.no>, 2007.
# Olav Pettershagen <olav.pet@gmail.com>, 2008.
msgid ""
msgstr ""
"Project-Id-Version: apparmorapplet\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-02-06 14:27-0800\n"
"PO-Revision-Date: 2008-10-03 16:36+0200\n"
"Last-Translator: Olav Pettershagen <olav.pet@gmail.com>\n"
"Language-Team: norsk bokmål\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.11.4\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: src/apparmor-applet.c:244
msgid ""
"AppArmorApplet is free software; you can redistribute it and/or modify\n"
"it under the terms of the GNU General Public License as published by\n"
"the Free Software Foundation; either version 2 of the License, or\n"
"(at your option) any later version."
msgstr ""
"AppArmorApplet er fri programvare; du kan redistribuere og/eller\n"
"modifisere den i henhold til GNU General Public License\n"
"som publisert av Free Software Foundation, enten versjon 2\n"
"av lisensen eller valgfri senere versjon."
#: src/preferences_dialog.c:31
msgid "AppArmor Desktop Preferences"
msgstr "Skrivebordsinnstillinger for AppArmor"
#: src/preferences_dialog.c:46
msgid "Profile Generation"
msgstr "Opprett profil"
#: src/preferences_dialog.c:54
msgid "Path"
msgstr "Sti"
#: src/preferences_dialog.c:76
msgid "YAST"
msgstr "YAST"
#: src/preferences_dialog.c:77
msgid "genprof"
msgstr "genprof"
#: src/reject_list.c:58
msgid "AppArmor Rejections"
msgstr "AppArmor-blokkeringer"

View File

@@ -1,43 +0,0 @@
# Copyright (C) 2006 SuSE Linux Products GmbH, Nuernberg
# This file is distributed under the same license as the package.
#
msgid ""
msgstr ""
"Project-Id-Version: apparmorapplet\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-02-06 14:27-0800\n"
"PO-Revision-Date: 2009-02-05 08:00\n"
"Last-Translator: Novell Language <language@novell.com>\n"
"Language-Team: Novell Language <language@novell.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: src/apparmor-applet.c:244
msgid "AppArmorApplet is free software; you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation; either version 2 of the License, or\n(at your option) any later version."
msgstr "AppArmorApplet is vrije software; u mag het herdistribueren en/of\naanpassen onder de voorwaarden van de GNU General Public License, zoals\ngepubliceerd door de Free Software Foundation; versie 2 van de\nlicentie of (naar uw believen) een latere versie."
#: src/preferences_dialog.c:31
msgid "AppArmor Desktop Preferences"
msgstr "AppArmor-bureaubladvoorkeuren"
#: src/preferences_dialog.c:46
msgid "Profile Generation"
msgstr "Profielgeneratie"
#: src/preferences_dialog.c:54
msgid "Path"
msgstr "Pad"
#: src/preferences_dialog.c:76
msgid "YAST"
msgstr "YaST"
#: src/preferences_dialog.c:77
msgid "genprof"
msgstr "genprof"
#: src/reject_list.c:58
msgid "AppArmor Rejections"
msgstr "AppArmor-weigeringen"

View File

@@ -1,55 +0,0 @@
# translation of apparmorapplet.pa.po to Panjabi
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
#
# A S Alam <aalam@users.sf.net>, 2007.
msgid ""
msgstr ""
"Project-Id-Version: apparmorapplet.pa\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-02-06 14:27-0800\n"
"PO-Revision-Date: 2007-08-13 06:50+0530\n"
"Last-Translator: A S Alam <aalam@users.sf.net>\n"
"Language-Team: Panjabi <punjabi-l10n@lists.sf.net>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.11.4\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
#: src/apparmor-applet.c:244
msgid ""
"AppArmorApplet is free software; you can redistribute it and/or modify\n"
"it under the terms of the GNU General Public License as published by\n"
"the Free Software Foundation; either version 2 of the License, or\n"
"(at your option) any later version."
msgstr ""
"AppArmor ਐਪਲਿਟ ਮੁਫਤ/ਮੁਕਤ ਸਾਫਟਵੇਅਰ ਹੈ, ਤੁਸੀਂ ਇਸ ਨੂੰ ਗਨੂ ਜਰਨਲ ਪਬਲਿਕ\n"
"ਲਾਈਸੈਂਸ, ਜੋ ਕਿ ਫਰੀ ਸਾਫਟਵੇਅਰ ਫਾਊਂਡੇਸ਼ਨ ਵਲੋਂ ਬਣਾਇਆ ਗਿਆ ਹੈ, ਦੇ ਲਾਈਸੈਂਸ\n"
"ਵਰਜਨ 2 ਜਾਂ ਨਵਾਂ (ਤੁਹਾਡੀ ਆਪਣੀ ਮਰਜ਼ੀ ਮੁਤਾਬਕ) ਦੇ ਅਧੀਨ ਇਸ ਨੂੰ ਵੰਡ ਸਕਦੇ ਹੋ\n"
"ਜਾਂ/ਅਤੇ ਸੋਧ ਸਕਦੇ ਹੋ।"
#: src/preferences_dialog.c:31
msgid "AppArmor Desktop Preferences"
msgstr "AppArmor ਡੈਸਕਟਾਪ ਪਸੰਦ"
#: src/preferences_dialog.c:46
msgid "Profile Generation"
msgstr "ਪਰੋਫਾਇਲ ਨਿਰਮਾਣ"
#: src/preferences_dialog.c:54
msgid "Path"
msgstr "ਮਾਰਗ"
#: src/preferences_dialog.c:76
msgid "YAST"
msgstr "YAST"
#: src/preferences_dialog.c:77
msgid "genprof"
msgstr "genprof"
#: src/reject_list.c:58
msgid "AppArmor Rejections"
msgstr "AppArmor ਇਨਕਾਰ"

View File

@@ -1,50 +0,0 @@
# Copyright (C) 2006 SuSE Linux Products GmbH, Nuernberg
# This file is distributed under the same license as the package.
#
msgid ""
msgstr ""
"Project-Id-Version: apparmorapplet\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-02-06 14:27-0800\n"
"PO-Revision-Date: 2009-02-03 00:14\n"
"Last-Translator: Novell Language <language@novell.com>\n"
"Language-Team: Novell Language <language@novell.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: src/apparmor-applet.c:244
msgid ""
"AppArmorApplet is free software; you can redistribute it and/or modify\n"
"it under the terms of the GNU General Public License as published by\n"
"the Free Software Foundation; either version 2 of the License, or\n"
"(at your option) any later version."
msgstr ""
"AppArmorAplet to wolne oprogramowanie; można je redystrybuować i/lub\n"
"modyfikować zgodnie z warunkami licencji GNU General Public License\n"
"wydanej przez Free Software Foundation; w wersji 2 tej licencji lub\n"
"dowolnej późniejszej."
#: src/preferences_dialog.c:31
msgid "AppArmor Desktop Preferences"
msgstr "Preferencje AppArmor Desktop"
#: src/preferences_dialog.c:46
msgid "Profile Generation"
msgstr "Generowanie profilu"
#: src/preferences_dialog.c:54
msgid "Path"
msgstr "Ścieżka"
#: src/preferences_dialog.c:76
msgid "YAST"
msgstr "YaST"
#: src/preferences_dialog.c:77
msgid "genprof"
msgstr "genprof"
#: src/reject_list.c:58
msgid "AppArmor Rejections"
msgstr "Odrzucenia AppArmor"

View File

@@ -1,57 +0,0 @@
# translation of apparmorapplet.po to Portuguese
# @TITLE@
# Copyright (C) 2006, SUSE Linux GmbH, Nuremberg
#
# This file is distributed under the same license as @PACKAGE@ package. FIRST
#
# Carlos Gonçalves <cgoncalves@opensuse.org>, 2007.
msgid ""
msgstr ""
"Project-Id-Version: apparmorapplet\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-02-06 14:27-0800\n"
"PO-Revision-Date: 2007-08-10 14:34+0100\n"
"Last-Translator: Carlos Gonçalves <cgoncalves@opensuse.org>\n"
"Language-Team: Portuguese <opensuse-pt@opensuse.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.11.4\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: src/apparmor-applet.c:244
msgid ""
"AppArmorApplet is free software; you can redistribute it and/or modify\n"
"it under the terms of the GNU General Public License as published by\n"
"the Free Software Foundation; either version 2 of the License, or\n"
"(at your option) any later version."
msgstr ""
"O AppArmor é um programa é livre; pode ser distribuído e/ou modificado\n"
"segundo os termos da licença GNU General Public License tal como\n"
"publicada pela Free Software Foundation; a versão 2 da Licença ou\n"
"(por sua opção) qualquer versão posterior."
#: src/preferences_dialog.c:31
msgid "AppArmor Desktop Preferences"
msgstr "Preferências do AppArmor"
#: src/preferences_dialog.c:46
msgid "Profile Generation"
msgstr "Generação de Perfil"
#: src/preferences_dialog.c:54
msgid "Path"
msgstr "Caminho"
#: src/preferences_dialog.c:76
msgid "YAST"
msgstr "YAST"
#: src/preferences_dialog.c:77
msgid "genprof"
msgstr "genprof"
#: src/reject_list.c:58
msgid "AppArmor Rejections"
msgstr "Rejeições do AppArmor"

View File

@@ -1,43 +0,0 @@
# Copyright (C) 2006 SuSE Linux Products GmbH, Nuernberg
# This file is distributed under the same license as the package.
#
msgid ""
msgstr ""
"Project-Id-Version: apparmorapplet\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-02-06 14:27-0800\n"
"PO-Revision-Date: 2009-02-05 09:28\n"
"Last-Translator: Novell Language <language@novell.com>\n"
"Language-Team: Novell Language <language@novell.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: src/apparmor-applet.c:244
msgid "AppArmorApplet is free software; you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation; either version 2 of the License, or\n(at your option) any later version."
msgstr "O applet AppArmor é um software livre; você pode redistribuí-lo e/ou modificá-lo\nseguindo os termos da licença GNU General Public License (GPL) tal como\npublicada pela Free Software Foundation; na versão 2 da licença ou\n(por sua opção) qualquer versão posterior."
#: src/preferences_dialog.c:31
msgid "AppArmor Desktop Preferences"
msgstr "Preferências de Área de Trabalho do AppArmor"
#: src/preferences_dialog.c:46
msgid "Profile Generation"
msgstr "Geração de Perfil"
#: src/preferences_dialog.c:54
msgid "Path"
msgstr "Caminho"
#: src/preferences_dialog.c:76
msgid "YAST"
msgstr "YaST"
#: src/preferences_dialog.c:77
msgid "genprof"
msgstr "genprof"
#: src/reject_list.c:58
msgid "AppArmor Rejections"
msgstr "Rejeições do AppArmor"

View File

@@ -1,51 +0,0 @@
# Stanciu-Lixandru Alec <stanciulixandru@gmail.com>, 2007.
# Andrei Cipu <traduceri@strainu.ro>, 2008
msgid ""
msgstr ""
"Project-Id-Version: OpenSUSE\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-02-06 14:27-0800\n"
"PO-Revision-Date: 2008-10-08 10:23-0700\n"
"Last-Translator: # Andrei Cipu <traduceri@strainu.ro>\n"
"Language-Team: Romanian <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=n==1 ? 0 : (n==0 || (n%100 > 0 && n%100 < 20)) ? 1 : 2;\n"
"X-Generator: Narro 0.9.2 on http://narro.i18n.ro\n"
#: src/apparmor-applet.c:244
msgid ""
"AppArmorApplet is free software; you can redistribute it and/or modify\n"
"it under the terms of the GNU General Public License as published by\n"
"the Free Software Foundation; either version 2 of the License, or\n"
"(at your option) any later version."
msgstr ""
"AppArmorApplet este software free, îl puteți redistribui și/sau modifica\n"
"conform cu termenii GNU General Public License așa cum este publicată\n"
"de Free Software Foundation, fie versiunea 2 a licenței sau (la latitudinea\n"
"dvs.) o versiune ulterioară."
#: src/preferences_dialog.c:31
msgid "AppArmor Desktop Preferences"
msgstr "Preferințe desktop pentru AppArmor"
#: src/preferences_dialog.c:46
msgid "Profile Generation"
msgstr "Generarea profilului"
#: src/preferences_dialog.c:54
msgid "Path"
msgstr "Cale"
#: src/preferences_dialog.c:76
msgid "YAST"
msgstr "YAST"
#: src/preferences_dialog.c:77
msgid "genprof"
msgstr "genprof"
#: src/reject_list.c:58
msgid "AppArmor Rejections"
msgstr "Respinse de AppArmor"

View File

@@ -1,43 +0,0 @@
# Copyright (C) 2006 SuSE Linux Products GmbH, Nuernberg
# This file is distributed under the same license as the package.
#
msgid ""
msgstr ""
"Project-Id-Version: apparmorapplet\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-02-06 14:27-0800\n"
"PO-Revision-Date: 2009-02-05 08:14\n"
"Last-Translator: Novell Language <language@novell.com>\n"
"Language-Team: Novell Language <language@novell.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: src/apparmor-applet.c:244
msgid "AppArmorApplet is free software; you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation; either version 2 of the License, or\n(at your option) any later version."
msgstr "AppArmorApplet является свободно распространяемым ПО; его можно распространять и/или изменять\nв рамках условий GNU General Public License, опубликованной Free Software Foundation\n (второй версии либо выше, на Ваше усмотрение)."
#: src/preferences_dialog.c:31
msgid "AppArmor Desktop Preferences"
msgstr "Настройки рабочей среды AppArmor"
#: src/preferences_dialog.c:46
msgid "Profile Generation"
msgstr "Создание профиля"
#: src/preferences_dialog.c:54
msgid "Path"
msgstr "Путь"
#: src/preferences_dialog.c:76
msgid "YAST"
msgstr "YaST"
#: src/preferences_dialog.c:77
msgid "genprof"
msgstr "genprof"
#: src/reject_list.c:58
msgid "AppArmor Rejections"
msgstr "Запреты AppArmor"

View File

@@ -1,47 +0,0 @@
# Sinhala message file for YaST2 (@memory@).
# Copyright (C) 2007 SUSE Linux Products GmbH.
#
msgid ""
msgstr ""
"Project-Id-Version: YaST (@memory@)\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-02-06 14:27-0800\n"
"PO-Revision-Date: 2005-07-29 15:37+0530\n"
"Last-Translator: i18n@suse.de\n"
"Language-Team: Sinhala <i18n@suse.de>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n!=1);\n"
#: src/apparmor-applet.c:244
msgid ""
"AppArmorApplet is free software; you can redistribute it and/or modify\n"
"it under the terms of the GNU General Public License as published by\n"
"the Free Software Foundation; either version 2 of the License, or\n"
"(at your option) any later version."
msgstr ""
#: src/preferences_dialog.c:31
msgid "AppArmor Desktop Preferences"
msgstr ""
#: src/preferences_dialog.c:46
msgid "Profile Generation"
msgstr ""
#: src/preferences_dialog.c:54
msgid "Path"
msgstr ""
#: src/preferences_dialog.c:76
msgid "YAST"
msgstr ""
#: src/preferences_dialog.c:77
msgid "genprof"
msgstr ""
#: src/reject_list.c:58
msgid "AppArmor Rejections"
msgstr ""

View File

@@ -1,57 +0,0 @@
# @TITLE@
# Copyright (C) 2006, SUSE Linux GmbH, Nuremberg
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
# This file is distributed under the same license as @PACKAGE@ package. FIRST
#
msgid ""
msgstr ""
"Project-Id-Version: @PACKAGE@\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-02-06 14:27-0800\n"
"PO-Revision-Date: 2003-09-24 10:40+0200\n"
"Last-Translator: Stanislav Visnovsky <visnovsky@kde.org>\n"
"Language-Team: Slovak <sk-i18n@linux.sk>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.2\n"
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
#: src/apparmor-applet.c:244
#, fuzzy
msgid ""
"AppArmorApplet is free software; you can redistribute it and/or modify\n"
"it under the terms of the GNU General Public License as published by\n"
"the Free Software Foundation; either version 2 of the License, or\n"
"(at your option) any later version."
msgstr ""
"Správca napájania je slobodný softvér; môžete ho redistribuovať a/alebo\n"
"upraviť podľa pravidiel licencie GNU General Public License\n"
"publikovanej organizáciou Free Software Foundation; verzie 2\n"
"licencie, alebo (podľa vašeho uváženia) akejkoľvek neskoršej verzie."
#: src/preferences_dialog.c:31
#, fuzzy
msgid "AppArmor Desktop Preferences"
msgstr "Nastavenia siete"
#: src/preferences_dialog.c:46
msgid "Profile Generation"
msgstr ""
#: src/preferences_dialog.c:54
msgid "Path"
msgstr ""
#: src/preferences_dialog.c:76
msgid "YAST"
msgstr ""
#: src/preferences_dialog.c:77
msgid "genprof"
msgstr ""
#: src/reject_list.c:58
msgid "AppArmor Rejections"
msgstr ""

View File

@@ -1,52 +0,0 @@
# @TITLE@
# Copyright (C) 2006, SUSE Linux GmbH, Nuremberg
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
# This file is distributed under the same license as @PACKAGE@ package. FIRST
#
msgid ""
msgstr ""
"Project-Id-Version: @PACKAGE@\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-02-06 14:27-0800\n"
"PO-Revision-Date: 2005-08-24 17:37+0200\n"
"Last-Translator: Janez Krek <janez.krek@euroteh.si>\n"
"Language-Team: Slovenščina <sl@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.3.1\n"
"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n"
#: src/apparmor-applet.c:244
msgid ""
"AppArmorApplet is free software; you can redistribute it and/or modify\n"
"it under the terms of the GNU General Public License as published by\n"
"the Free Software Foundation; either version 2 of the License, or\n"
"(at your option) any later version."
msgstr ""
#: src/preferences_dialog.c:31
msgid "AppArmor Desktop Preferences"
msgstr ""
#: src/preferences_dialog.c:46
#, fuzzy
msgid "Profile Generation"
msgstr "Nastavitve profila"
#: src/preferences_dialog.c:54
msgid "Path"
msgstr "Pot"
#: src/preferences_dialog.c:76
msgid "YAST"
msgstr ""
#: src/preferences_dialog.c:77
msgid "genprof"
msgstr ""
#: src/reject_list.c:58
msgid "AppArmor Rejections"
msgstr ""

View File

@@ -1,50 +0,0 @@
# @TITLE@
# Copyright (C) 2006, SUSE Linux GmbH, Nuremberg
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
# This file is distributed under the same license as @PACKAGE@ package. FIRST
#
msgid ""
msgstr ""
"Project-Id-Version: @PACKAGE@\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-02-06 14:27-0800\n"
"PO-Revision-Date: 2005-08-03 21:03+0200\n"
"Last-Translator: Данило Шеган <danilo@gnome.org>\n"
"Language-Team: Serbian <novell@prevod.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : (n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
#: src/apparmor-applet.c:244
msgid ""
"AppArmorApplet is free software; you can redistribute it and/or modify\n"
"it under the terms of the GNU General Public License as published by\n"
"the Free Software Foundation; either version 2 of the License, or\n"
"(at your option) any later version."
msgstr ""
#: src/preferences_dialog.c:31
msgid "AppArmor Desktop Preferences"
msgstr ""
#: src/preferences_dialog.c:46
msgid "Profile Generation"
msgstr ""
#: src/preferences_dialog.c:54
msgid "Path"
msgstr ""
#: src/preferences_dialog.c:76
msgid "YAST"
msgstr ""
#: src/preferences_dialog.c:77
msgid "genprof"
msgstr ""
#: src/reject_list.c:58
msgid "AppArmor Rejections"
msgstr ""

View File

@@ -1,43 +0,0 @@
# Copyright (C) 2006 SuSE Linux Products GmbH, Nuernberg
# This file is distributed under the same license as the package.
#
msgid ""
msgstr ""
"Project-Id-Version: apparmorapplet\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-02-06 14:27-0800\n"
"PO-Revision-Date: 2009-02-05 07:23\n"
"Last-Translator: Novell Language <language@novell.com>\n"
"Language-Team: Novell Language <language@novell.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: src/apparmor-applet.c:244
msgid "AppArmorApplet is free software; you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation; either version 2 of the License, or\n(at your option) any later version."
msgstr "AppArmorApplet är gratisprogramvara. Du får distribuera den och/eller\nändra den enligt villkoren i GNU General Public License\nfrån Free Software Foundation (version 2 eller senare)."
#: src/preferences_dialog.c:31
msgid "AppArmor Desktop Preferences"
msgstr "AppArmor-skrivbordsinställningar"
#: src/preferences_dialog.c:46
msgid "Profile Generation"
msgstr "Profilgenerering"
#: src/preferences_dialog.c:54
msgid "Path"
msgstr "Sökväg"
#: src/preferences_dialog.c:76
msgid "YAST"
msgstr "YaST"
#: src/preferences_dialog.c:77
msgid "genprof"
msgstr "genprof"
#: src/reject_list.c:58
msgid "AppArmor Rejections"
msgstr "AppArmor-nekanden"

View File

@@ -1,51 +0,0 @@
# @TITLE@
# Copyright (C) 2006, SUSE Linux GmbH, Nuremberg
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
# This file is distributed under the same license as @PACKAGE@ package. FIRST
#
msgid ""
msgstr ""
"Project-Id-Version: @PACKAGE@\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-02-06 14:27-0800\n"
"PO-Revision-Date: 2003-08-14 10:47+0200\n"
"Last-Translator: xxx <yyy@example.org>\n"
"Language-Team: Tamil <i18n@suse.de>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
#: src/apparmor-applet.c:244
msgid ""
"AppArmorApplet is free software; you can redistribute it and/or modify\n"
"it under the terms of the GNU General Public License as published by\n"
"the Free Software Foundation; either version 2 of the License, or\n"
"(at your option) any later version."
msgstr ""
#: src/preferences_dialog.c:31
msgid "AppArmor Desktop Preferences"
msgstr ""
#: src/preferences_dialog.c:46
#, fuzzy
msgid "Profile Generation"
msgstr "விவர அமைப்புகள்"
#: src/preferences_dialog.c:54
msgid "Path"
msgstr "பாதை"
#: src/preferences_dialog.c:76
msgid "YAST"
msgstr ""
#: src/preferences_dialog.c:77
msgid "genprof"
msgstr ""
#: src/reject_list.c:58
msgid "AppArmor Rejections"
msgstr ""

View File

@@ -1,47 +0,0 @@
# Thai message file for YaST2 (@memory@).
# Copyright (C) 2008 SUSE Linux Products GmbH.
#
msgid ""
msgstr ""
"Project-Id-Version: YaST (@memory@)\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-02-06 14:27-0800\n"
"PO-Revision-Date: 2008-01-04 08:58+0100\n"
"Last-Translator: i18n@suse.de\n"
"Language-Team: Thai <i18n@suse.de>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
#: src/apparmor-applet.c:244
msgid ""
"AppArmorApplet is free software; you can redistribute it and/or modify\n"
"it under the terms of the GNU General Public License as published by\n"
"the Free Software Foundation; either version 2 of the License, or\n"
"(at your option) any later version."
msgstr ""
#: src/preferences_dialog.c:31
msgid "AppArmor Desktop Preferences"
msgstr ""
#: src/preferences_dialog.c:46
msgid "Profile Generation"
msgstr ""
#: src/preferences_dialog.c:54
msgid "Path"
msgstr ""
#: src/preferences_dialog.c:76
msgid "YAST"
msgstr ""
#: src/preferences_dialog.c:77
msgid "genprof"
msgstr ""
#: src/reject_list.c:58
msgid "AppArmor Rejections"
msgstr ""

View File

@@ -1,51 +0,0 @@
# @TITLE@
# Copyright (C) 2006, SUSE Linux GmbH, Nuremberg
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
# This file is distributed under the same license as @PACKAGE@ package. FIRST
#
msgid ""
msgstr ""
"Project-Id-Version: @PACKAGE@\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-02-06 14:27-0800\n"
"PO-Revision-Date: 2001-10-18 10:13+0200\n"
"Last-Translator: Görkem Çetin <gorkem@gelecek.com.tr>\n"
"Language-Team: turkish <i18n@suse.de>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
#: src/apparmor-applet.c:244
msgid ""
"AppArmorApplet is free software; you can redistribute it and/or modify\n"
"it under the terms of the GNU General Public License as published by\n"
"the Free Software Foundation; either version 2 of the License, or\n"
"(at your option) any later version."
msgstr ""
#: src/preferences_dialog.c:31
msgid "AppArmor Desktop Preferences"
msgstr ""
#: src/preferences_dialog.c:46
#, fuzzy
msgid "Profile Generation"
msgstr "Profil mevcut değil\n"
#: src/preferences_dialog.c:54
msgid "Path"
msgstr ""
#: src/preferences_dialog.c:76
msgid "YAST"
msgstr ""
#: src/preferences_dialog.c:77
msgid "genprof"
msgstr ""
#: src/reject_list.c:58
msgid "AppArmor Rejections"
msgstr ""

View File

@@ -1,59 +0,0 @@
# translation of apparmorapplet.po to Ukrainian
# Translation of apparmorapplet.uk.po to Ukrainian
# @TITLE@
# Copyright (C) 2006, SUSE Linux GmbH, Nuremberg
#
# This file is distributed under the same license as @PACKAGE@ package. FIRST
#
# Ivan Petrouchtchak <ivanpetrouchtchak@yahoo.com>, 2007.
# Yuri Chornoivan <yurchor@ukr.net>, 2008.
msgid ""
msgstr ""
"Project-Id-Version: apparmorapplet\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-02-06 14:27-0800\n"
"PO-Revision-Date: 2008-02-12 18:57+0200\n"
"Last-Translator: Yuri Chornoivan <yurchor@ukr.net>\n"
"Language-Team: Ukrainian <translation@linux.org.ua>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: KBabel 1.11.4\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
#: src/apparmor-applet.c:244
msgid ""
"AppArmorApplet is free software; you can redistribute it and/or modify\n"
"it under the terms of the GNU General Public License as published by\n"
"the Free Software Foundation; either version 2 of the License, or\n"
"(at your option) any later version."
msgstr ""
"AppArmorApplet є вільним програмним забезпеченням; ви можете поширювати та/або змінювати\n"
"його за умов дотримання пунктів GNU General Public License, у тому вигляді, який\n"
"оприлюднено Free Software Foundation; як версію 2 цієї ліцензії, або\n"
"(за вашого бажання) будь-якої пізнішої версії."
#: src/preferences_dialog.c:31
msgid "AppArmor Desktop Preferences"
msgstr "Параметри стільниці AppArmor"
#: src/preferences_dialog.c:46
msgid "Profile Generation"
msgstr "Створення профілів"
#: src/preferences_dialog.c:54
msgid "Path"
msgstr "Шлях"
#: src/preferences_dialog.c:76
msgid "YAST"
msgstr "YAST"
#: src/preferences_dialog.c:77
msgid "genprof"
msgstr "genprof"
#: src/reject_list.c:58
msgid "AppArmor Rejections"
msgstr "Відкидання AppArmor"

View File

@@ -1,50 +0,0 @@
# @TITLE@
# Copyright (C) 2006, SUSE Linux GmbH, Nuremberg
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
# This file is distributed under the same license as @PACKAGE@ package. FIRST
#
msgid ""
msgstr ""
"Project-Id-Version: @PACKAGE@\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-02-06 14:27-0800\n"
"PO-Revision-Date: 2006-07-12 07:32+0200\n"
"Last-Translator: Phan Vĩnh Thịnh <teppi82@gmail.com>\n"
"Language-Team: Vietnamese <i18n@suse.de>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0\n"
#: src/apparmor-applet.c:244
msgid ""
"AppArmorApplet is free software; you can redistribute it and/or modify\n"
"it under the terms of the GNU General Public License as published by\n"
"the Free Software Foundation; either version 2 of the License, or\n"
"(at your option) any later version."
msgstr ""
#: src/preferences_dialog.c:31
msgid "AppArmor Desktop Preferences"
msgstr ""
#: src/preferences_dialog.c:46
msgid "Profile Generation"
msgstr ""
#: src/preferences_dialog.c:54
msgid "Path"
msgstr ""
#: src/preferences_dialog.c:76
msgid "YAST"
msgstr ""
#: src/preferences_dialog.c:77
msgid "genprof"
msgstr ""
#: src/reject_list.c:58
msgid "AppArmor Rejections"
msgstr ""

View File

@@ -1,55 +0,0 @@
# translation of apparmorapplet.wa.po to Walloon
# Translation into the walloon language.
# Copyright (C) 2007 SUSE Linux Products GmbH.
#
# Pablo Saratxaga <pablo@walon.org>, 2001, 2004.
# Jean Cayron <jean.cayron@gmail.com>, 2007.
msgid ""
msgstr ""
"Project-Id-Version: apparmorapplet.wa\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-02-06 14:27-0800\n"
"PO-Revision-Date: 2007-09-08 01:17+0200\n"
"Last-Translator: Jean Cayron <jean.cayron@gmail.com>\n"
"Language-Team: Walloon\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
"X-Generator: KBabel 1.11.4\n"
#: src/apparmor-applet.c:244
msgid ""
"AppArmorApplet is free software; you can redistribute it and/or modify\n"
"it under the terms of the GNU General Public License as published by\n"
"the Free Software Foundation; either version 2 of the License, or\n"
"(at your option) any later version."
msgstr ""
"AppArmo est on libe programe; vos l' poloz diner tt avå oudonbén l' candjî\n"
"sorlon ç' k' est dit el Licince Publike Djeneråle GNU del Free Software Foundation; "
"modêye 2 del licince oudonbén (a vosse tchoes) ene ôte modêye pus djonne."
#: src/preferences_dialog.c:31
msgid "AppArmor Desktop Preferences"
msgstr "Preferinces sicribannes AppArmor"
#: src/preferences_dialog.c:46
msgid "Profile Generation"
msgstr "Ahivaedje di profil"
#: src/preferences_dialog.c:54
msgid "Path"
msgstr "Tchimin"
#: src/preferences_dialog.c:76
msgid "YAST"
msgstr "YAST"
#: src/preferences_dialog.c:77
msgid "genprof"
msgstr "genprof"
#: src/reject_list.c:58
msgid "AppArmor Rejections"
msgstr "Çou k' AppArmor ridjete"

View File

@@ -1,48 +0,0 @@
# Copyright (C) 2007 SuSE Linux Products GmbH, Nuernberg
# This file is distributed under the same license as the package.
#
msgid ""
msgstr ""
"Project-Id-Version: base\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-02-06 14:27-0800\n"
"PO-Revision-Date: 2006-11-03 14:26\n"
"Last-Translator: Novell Language <language@novell.com>\n"
"Language-Team: Novell Language <language@novell.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: src/apparmor-applet.c:244
msgid ""
"AppArmorApplet is free software; you can redistribute it and/or modify\n"
"it under the terms of the GNU General Public License as published by\n"
"the Free Software Foundation; either version 2 of the License, or\n"
"(at your option) any later version."
msgstr ""
#: src/preferences_dialog.c:31
msgid "AppArmor Desktop Preferences"
msgstr ""
#: src/preferences_dialog.c:46
#, fuzzy
msgid "Profile Generation"
msgstr "Izakhelo zenkangelo"
#: src/preferences_dialog.c:54
msgid "Path"
msgstr "Indlela yothungelwano"
#: src/preferences_dialog.c:76
msgid "YAST"
msgstr ""
#: src/preferences_dialog.c:77
msgid "genprof"
msgstr ""
#: src/reject_list.c:58
msgid "AppArmor Rejections"
msgstr ""

View File

@@ -1,43 +0,0 @@
# Copyright (C) 2006 SuSE Linux Products GmbH, Nuernberg
# This file is distributed under the same license as the package.
#
msgid ""
msgstr ""
"Project-Id-Version: apparmorapplet\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-02-06 14:27-0800\n"
"PO-Revision-Date: 2009-02-05 09:53\n"
"Last-Translator: Novell Language <language@novell.com>\n"
"Language-Team: Novell Language <language@novell.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: src/apparmor-applet.c:244
msgid "AppArmorApplet is free software; you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation; either version 2 of the License, or\n(at your option) any later version."
msgstr "AppArmorApplet 是自由软件;您可以根据自由软件基金会\n发布的 GNU 通用公共许可证(第 2 版或您选择的任何更高版本)\n的条款重新分发和/或\n修改它。"
#: src/preferences_dialog.c:31
msgid "AppArmor Desktop Preferences"
msgstr "AppArmor 桌面自选设置"
#: src/preferences_dialog.c:46
msgid "Profile Generation"
msgstr "配置文件生成"
#: src/preferences_dialog.c:54
msgid "Path"
msgstr "路径"
#: src/preferences_dialog.c:76
msgid "YAST"
msgstr "YAST"
#: src/preferences_dialog.c:77
msgid "genprof"
msgstr "genprof"
#: src/reject_list.c:58
msgid "AppArmor Rejections"
msgstr "AppArmor 拒绝"

View File

@@ -1,43 +0,0 @@
# Copyright (C) 2006 SuSE Linux Products GmbH, Nuernberg
# This file is distributed under the same license as the package.
#
msgid ""
msgstr ""
"Project-Id-Version: apparmorapplet\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-02-06 14:27-0800\n"
"PO-Revision-Date: 2009-02-04 15:44\n"
"Last-Translator: Novell Language <language@novell.com>\n"
"Language-Team: Novell Language <language@novell.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: src/apparmor-applet.c:244
msgid "AppArmorApplet is free software; you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation; either version 2 of the License, or\n(at your option) any later version."
msgstr "AppArmorApplet 是一個自由軟體,您可以在 GNU 通用公共授權\n(GNU General Public License) 條款規定之下任意散佈和/或進行修改。\nGNU 通用公共授權是由自由軟體基金會 (Free Software Foundation)\n發行您可以選擇第二版或 (自行選擇) 更新的版本。"
#: src/preferences_dialog.c:31
msgid "AppArmor Desktop Preferences"
msgstr "AppArmor 桌面優先設定"
#: src/preferences_dialog.c:46
msgid "Profile Generation"
msgstr "設定檔產生程序"
#: src/preferences_dialog.c:54
msgid "Path"
msgstr "路徑"
#: src/preferences_dialog.c:76
msgid "YAST"
msgstr "YaST"
#: src/preferences_dialog.c:77
msgid "genprof"
msgstr "產生設定檔"
#: src/reject_list.c:58
msgid "AppArmor Rejections"
msgstr "AppArmor 拒絕項"

View File

@@ -1,54 +0,0 @@
# Copyright (C) 2007 SuSE Linux Products GmbH, Nuernberg
# This file is distributed under the same license as the package.
#
msgid ""
msgstr ""
"Project-Id-Version: installation\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-02-06 14:27-0800\n"
"PO-Revision-Date: 2006-11-03 14:26\n"
"Last-Translator: Novell Language <language@novell.com>\n"
"Language-Team: Novell Language <language@novell.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: src/apparmor-applet.c:244
#, fuzzy
msgid ""
"AppArmorApplet is free software; you can redistribute it and/or modify\n"
"it under the terms of the GNU General Public License as published by\n"
"the Free Software Foundation; either version 2 of the License, or\n"
"(at your option) any later version."
msgstr ""
"Isilawuli Samandla siyi-software yamahhala; ungaphinda uyisakaze futhi/noma\n"
"ululungise ngaphansi kwemibandela ye-GNU General Public License\n"
" njengoba ishicilelwe yi-Free Software Foundation; kungaba uhlelo 2\n"
" lweLayisensi, noma (ngokukhetha kwakho) noma yiluphi uhlelo lwamuva."
#: src/preferences_dialog.c:31
#, fuzzy
msgid "AppArmor Desktop Preferences"
msgstr "Okukhethwa Kukho Kwesendlalelo"
#: src/preferences_dialog.c:46
#, fuzzy
msgid "Profile Generation"
msgstr "Amasethingi ephrofayili"
#: src/preferences_dialog.c:54
msgid "Path"
msgstr "Umgudu:"
#: src/preferences_dialog.c:76
msgid "YAST"
msgstr ""
#: src/preferences_dialog.c:77
msgid "genprof"
msgstr ""
#: src/reject_list.c:58
msgid "AppArmor Rejections"
msgstr ""

View File

@@ -1,25 +0,0 @@
## Process this file with automake to produce Makefile.in
INCLUDES = \
-DPACKAGE_DATA_DIR=\""$(datadir)"\" \
-DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
-DGNOMELOCALEDIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
-DDBUS_API_SUBJECT_TO_CHANGE \
`$(PKG_CONFIG) --cflags libpanelapplet-2.0` \
`$(PKG_CONFIG) --cflags dbus-1` \
@PACKAGE_CFLAGS@
LIBS = \
`$(PKG_CONFIG) --libs libpanelapplet-2.0` \
`$(PKG_CONFIG) --libs dbus-1` \
@PACKAGE_LIBS@
libexec_PROGRAMS = apparmorapplet
apparmorapplet_SOURCES = \
apparmor-applet.c apparmor-applet.h \
preferences_dialog.c preferences_dialog.h \
reject_list.c reject_list.h
apparmorapplet_LDADD = @PACKAGE_LIBS@ $(INTLLIBS)

View File

@@ -1,355 +0,0 @@
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <glib.h>
#include <panel-applet.h>
#include <gtk/gtk.h>
#include <dbus/dbus.h>
#include <dbus/dbus-glib-lowlevel.h>
#include <regex.h>
#include <stdlib.h>
#include <string.h>
#include <glib/gi18n.h>
#include "preferences_dialog.h"
#include "reject_list.h"
#include "apparmor-applet.h"
struct _apparmor_applet *apparmor_applet = NULL;
static const BonoboUIVerb apparmor_menu_verbs[] = {
BONOBO_UI_UNSAFE_VERB("apparmor_applet_about", applet_about),
/* BONOBO_UI_UNSAFE_VERB("apparmor_applet_preferences", applet_prefs),*/
BONOBO_UI_VERB_END
};
// We don't really have any "preferences" to set yet.
// static const char Context_menu_xml [] =
// "<popup name=\"button3\">\n"
// " <menuitem name=\"About AppArmor Applet\" "
// " verb=\"apparmor_applet_about\" "
// " _label=\"_About...\"\n"
// " pixtype=\"stock\" "
// " pixname=\"gnome-stock-about\"/>\n"
// " <menuitem name=\"Preferences\" "
// " verb=\"apparmor_applet_preferences\" "
// " _label=\"_Preferences...\"\n"
// " pixtype=\"stock\" "
// " pixname=\"gtk-preferences\"/>\n"
// "</popup>\n";
static const char Context_menu_xml [] =
"<popup name=\"button3\">\n"
" <menuitem name=\"About AppArmor Applet\" "
" verb=\"apparmor_applet_about\" "
" _label=\"_About...\"\n"
" pixtype=\"stock\" "
" pixname=\"gnome-stock-about\"/>\n"
"</popup>\n";
void
insert_into_list(char *name)
{
GtkTreeIter iter, listIter;
gboolean exists, row_found;
row_found = FALSE;
exists = gtk_tree_model_get_iter_first (GTK_TREE_MODEL(apparmor_applet->program_store), &iter);
/* Check to see if it exists already and increment the rejection count if it is */
while (exists)
{
gchar *str_data;
gint int_data;
gtk_tree_model_get (GTK_TREE_MODEL(apparmor_applet->program_store), &iter,
0, &str_data,
1, &int_data,
-1);
if (g_strcasecmp(str_data, name) == 0)
{
int_data++;
gtk_list_store_set (apparmor_applet->program_store, &iter, 0, str_data, 1, int_data, -1);
row_found = TRUE;
g_free (str_data);
break;
}
g_free (str_data);
exists = gtk_tree_model_iter_next (GTK_TREE_MODEL(apparmor_applet->program_store), &iter);
}
if (row_found == FALSE)
{
gtk_list_store_append (apparmor_applet->program_store, &listIter);
gtk_list_store_set (apparmor_applet->program_store, &listIter, 0, name, 1, 1, -1);
}
}
static DBusHandlerResult signal_filter
(DBusConnection *connection, DBusMessage *message, void *user_data)
{
GtkTreePath *path;
GtkTreeIter listIter;
DBusMessageIter iter, subIter;
char *program_name;
int arrayLen;
/* We are about to be kicked off */
if (dbus_message_is_signal
(message, DBUS_PATH_LOCAL, "Disconnected"))
{
return DBUS_HANDLER_RESULT_HANDLED;
}
else if (dbus_message_is_signal (message, "com.novell.apparmor", "REJECT"))
{
apparmor_applet->alert_count++;
apparmor_applet->uncleared_alerts = TRUE;
dbus_message_iter_init(message, &iter);
/*
* 1 - The full string - DBUS_TYPE_STRING
* 2 - The PID (record->pid) - DBUS_TYPE_INT64
* 3 - The task (record->task) - DBUS_TYPE_INT64
* 4 - The audit ID (record->audit_id) - DBUS_TYPE_STRING
* 5 - The operation (record->operation: "Exec" "ptrace" etc) - DBUS_TYPE_STRING
* 6 - The denied mask (record->denied_mask: "rwx" etc) - DBUS_TYPE_STRING
* 7 - The requested mask (record->requested_mask) - DBUS_TYPE_STRING
* 8 - The name of the profile (record->profile) - DBUS_TYPE_STRING
* 9 - The first name field (record->name) - DBUS_TYPE_STRING
* 10- The second name field (record->name2) - DBUS_TYPE_STRING
* 11- The attribute (record->attribute) - DBUS_TYPE_STRING
* 12- The parent task (record->parent) - DBUS_TYPE_STRING
* 13- The magic token (record->magic_token) - DBUS_TYPE_STRING
* 14- The info field (record->info) - DBUS_TYPE_STRING
* 15- The active hat (record->active_hat) - DBUS_TYPE_STRING
*/
dbus_message_iter_next(&iter);
dbus_message_iter_next(&iter);
dbus_message_iter_next(&iter);
dbus_message_iter_next(&iter);
dbus_message_iter_next(&iter);
dbus_message_iter_next(&iter);
dbus_message_iter_next(&iter);
// dbus_message_iter_get_basic(&iter, &program_name);
dbus_message_iter_recurse(&iter, &subIter);
dbus_message_iter_get_fixed_array(&subIter, &program_name, &arrayLen);
if (program_name == NULL)
{
return DBUS_HANDLER_RESULT_HANDLED;
}
insert_into_list(program_name);
set_tooltip();
set_appropriate_icon();
return DBUS_HANDLER_RESULT_HANDLED;
}
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
}
/* The applet display */
static gboolean apparmor_applet_fill(PanelApplet * applet,
const gchar * iid,
gpointer data)
{
if (strcmp(iid, "OAFIID:AppArmorApplet") != 0)
{
return FALSE;
}
GError *error = NULL;
DBusConnection *bus;
DBusError dbus_error;
apparmor_applet = g_new(struct _apparmor_applet, 1);
apparmor_applet->uncleared_alerts = FALSE;
apparmor_applet->reject_dialog = NULL;
apparmor_applet->alert_icon_displayed = FALSE;
apparmor_applet->alert_count = 0;
apparmor_applet->tooltips = gtk_tooltips_new();
apparmor_applet->program_store = gtk_list_store_new(2, G_TYPE_STRING, G_TYPE_UINT);
apparmor_applet->applet = GTK_WIDGET(applet);
gtk_widget_realize(apparmor_applet->applet);
/* Set up the icons */
apparmor_applet->icon =
gdk_pixbuf_new_from_file(
gnome_program_locate_file
(NULL, GNOME_FILE_DOMAIN_PIXMAP,
"apparmor_default.png", FALSE, NULL), &error);
apparmor_applet->icon_alert =
gdk_pixbuf_new_from_file(
gnome_program_locate_file
(NULL, GNOME_FILE_DOMAIN_PIXMAP,
"apparmor_alert.png", FALSE, NULL), &error);
/* Get the panel height in order to resize the icon */
apparmor_applet->panel_height =
panel_applet_get_size(PANEL_APPLET(apparmor_applet->applet));
apparmor_applet->icon_resized =
gdk_pixbuf_scale_simple(apparmor_applet->icon,
apparmor_applet->panel_height,
apparmor_applet->panel_height,
GDK_INTERP_BILINEAR);
apparmor_applet->icon_alert_resized =
gdk_pixbuf_scale_simple(apparmor_applet->icon_alert,
apparmor_applet->panel_height,
apparmor_applet->panel_height,
GDK_INTERP_BILINEAR);
apparmor_applet->panel_image = g_object_new(GTK_TYPE_IMAGE,
"pixbuf",
apparmor_applet->icon_resized,
"storage-type", GTK_IMAGE_PIXBUF,
NULL);
panel_applet_setup_menu (PANEL_APPLET (apparmor_applet->applet),
Context_menu_xml,
apparmor_menu_verbs,
NULL);
gtk_container_add(GTK_CONTAINER(apparmor_applet->applet),
apparmor_applet->panel_image);
g_signal_connect(G_OBJECT(apparmor_applet->applet),
"button-press-event", G_CALLBACK(on_button_press),
NULL);
gtk_widget_show_all(GTK_WIDGET(apparmor_applet->applet));
set_tooltip();
gtk_tooltips_enable(apparmor_applet->tooltips);
dbus_error_init (&dbus_error);
bus = dbus_bus_get (DBUS_BUS_SYSTEM, &dbus_error);
if (!bus)
{
dbus_error_free (&dbus_error);
return FALSE;
}
dbus_connection_setup_with_g_main (bus, NULL);
/* listening to messages from all objects as no path is specified */
dbus_bus_add_match (bus, "type='signal',interface='com.novell.apparmor'", &dbus_error);
dbus_connection_add_filter (bus, signal_filter, NULL, NULL);
return TRUE;
}
void set_tooltip (void)
{
GString *apparmor_tooltip = g_string_sized_new(255);
g_string_printf(apparmor_tooltip, "There are %i AppArmor alerts", apparmor_applet->alert_count);
gtk_tooltips_set_tip(apparmor_applet->tooltips,
apparmor_applet->applet,
apparmor_tooltip->str, NULL);
}
void set_appropriate_icon (void)
{
GdkPixbuf *pixbuf = NULL;
if ((apparmor_applet->uncleared_alerts == TRUE) && (apparmor_applet->alert_icon_displayed == FALSE))
{
pixbuf = gdk_pixbuf_copy(apparmor_applet->icon_alert_resized);
gtk_image_set_from_pixbuf(GTK_IMAGE(apparmor_applet->panel_image), pixbuf);
apparmor_applet->alert_icon_displayed = TRUE;
}
else if ((apparmor_applet->uncleared_alerts == FALSE) && (apparmor_applet->alert_icon_displayed == TRUE))
{
pixbuf = gdk_pixbuf_copy(apparmor_applet->icon_resized);
gtk_image_set_from_pixbuf(GTK_IMAGE(apparmor_applet->panel_image), pixbuf);
apparmor_applet->alert_icon_displayed = FALSE;
}
if (pixbuf != NULL)
g_object_unref(pixbuf);
}
void applet_about(BonoboUIComponent * uic)
{
const gchar *license =
_("AppArmorApplet is free software; you can redistribute it and/or modify\n"
"it under the terms of the GNU General Public License, version 2, as published by\n"
"the Free Software Foundation.");
const gchar *authors[] = {
"Matt Barringer <mbarringer@suse.de>",
NULL
};
GtkWidget *about_apparmor_applet=
g_object_new(GTK_TYPE_ABOUT_DIALOG,
"authors", authors,
"logo", GDK_PIXBUF(apparmor_applet->icon),
"copyright", ("Copyright (C) 2007 Novell"),
"name", ("AppArmor Alert Applet"),
"version", VERSION,
"license", license,
NULL);
g_signal_connect (about_apparmor_applet, "response",
G_CALLBACK (gtk_widget_destroy),
about_apparmor_applet);
g_signal_connect (about_apparmor_applet, "destroy",
G_CALLBACK (gtk_widget_destroyed),
NULL);
gtk_widget_show(about_apparmor_applet);
}
void applet_prefs (BonoboUIComponent *uic)
{
GtkWidget *prefs_dialog;
prefs_dialog = create_preferences_dialog();
gtk_widget_show(prefs_dialog);
}
gboolean on_button_press (GtkWidget *event_box,
GdkEventButton *event,
gpointer data)
{
if (event->button != 1)
return FALSE;
if (apparmor_applet->reject_dialog == NULL)
{
apparmor_applet->reject_dialog = create_reject_dialog(apparmor_applet->program_store);
gtk_widget_show(apparmor_applet->reject_dialog);
}
else
{
gtk_widget_show(apparmor_applet->reject_dialog);
}
return TRUE;
}
/* Decrement the event count and reset the icon/tooltip state if necessary */
void decrement_event_count(gint decrement)
{
apparmor_applet->alert_count = apparmor_applet->alert_count - decrement;
if (apparmor_applet->alert_count <= 0)
{
apparmor_applet->alert_count= 0;
apparmor_applet->uncleared_alerts = FALSE;
set_appropriate_icon();
set_tooltip();
}
}
PANEL_APPLET_BONOBO_FACTORY("OAFIID:AppArmorApplet_Factory",
PANEL_TYPE_APPLET, "AppArmor Desktop Alerts", "0",
apparmor_applet_fill, NULL);

View File

@@ -1,37 +0,0 @@
#ifndef __APPARMOR_APPLET_H
#define __APPARMOR_APPLET_H
#include <panel-applet.h>
#define CONF_PATH "/apps/AppArmor/apparmor-applet"
#define CONF_PROFILE_KEY "/apps/AppArmor/apparmor-applet/profiler"
#define CONF_PATH_KEY "/apps/AppArmor/apparmor-applet/path"
struct _apparmor_applet
{
GtkWidget *applet;
GtkWidget *reject_dialog;
gboolean uncleared_alerts;
gboolean alert_icon_displayed;
GtkWidget *panel_image;
GdkPixbuf *icon; /* Default icon */
GdkPixbuf *icon_resized; /* The resized default icon */
GdkPixbuf *icon_alert; /* Alert icon */
GdkPixbuf *icon_alert_resized; /* Resized alert icon */
gint panel_height;
gint alert_count;
GtkTooltips *tooltips;
GtkListStore *program_store;
};
void applet_about(BonoboUIComponent *uic);
void applet_prefs(BonoboUIComponent *uic);
void set_tooltip(void);
void set_appropriate_icon();
gboolean on_button_press (GtkWidget *event_box,
GdkEventButton *event,
gpointer data);
void insert_into_list(char *name);
void decrement_event_count(gint decrement);
#endif

View File

@@ -1,129 +0,0 @@
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <string.h>
#include <stdio.h>
#include <gdk/gdkkeysyms.h>
#include <gtk/gtk.h>
#include <glib/gi18n.h>
#include <gconf/gconf-client.h>
#include "preferences_dialog.h"
#include "apparmor-applet.h"
GtkWidget *profile_combobox;
GtkWidget*
create_preferences_dialog (void)
{
GtkWidget *preferences_dialog;
GtkWidget *preferences_vbox;
GtkWidget *layout_table;
GtkWidget *profile_label;
GtkWidget *path_label;
GtkWidget *preferences_buttonbox;
GtkWidget *cancel_button;
GtkWidget *ok_button;
GtkWidget *path_entry;
GConfClient *client;
int active_combo;
client = gconf_client_get_default();
active_combo = gconf_client_get_int(client, CONF_PROFILE_KEY, NULL);
preferences_dialog = gtk_dialog_new ();
gtk_widget_set_name (preferences_dialog, "preferences_dialog");
gtk_window_set_title (GTK_WINDOW (preferences_dialog), _("AppArmor Desktop Preferences"));
gtk_window_set_position (GTK_WINDOW (preferences_dialog), GTK_WIN_POS_CENTER);
gtk_window_set_modal (GTK_WINDOW (preferences_dialog), TRUE);
gtk_window_set_type_hint (GTK_WINDOW (preferences_dialog), GDK_WINDOW_TYPE_HINT_DIALOG);
preferences_vbox = GTK_DIALOG (preferences_dialog)->vbox;
gtk_widget_set_name (preferences_vbox, "preferences_vbox");
gtk_widget_show (preferences_vbox);
layout_table = gtk_table_new (2, 2, FALSE);
gtk_widget_set_name (layout_table, "layout_table");
gtk_widget_show (layout_table);
gtk_box_pack_start (GTK_BOX (preferences_vbox), layout_table, FALSE, TRUE, 0);
gtk_table_set_col_spacings (GTK_TABLE (layout_table), 10);
profile_label = gtk_label_new (_("Profile Generation"));
gtk_widget_set_name (profile_label, "profile_label");
gtk_widget_show (profile_label);
gtk_table_attach (GTK_TABLE (layout_table), profile_label, 0, 1, 0, 1,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
gtk_misc_set_alignment (GTK_MISC (profile_label), 0, 0.5);
path_label = gtk_label_new (_("Path"));
gtk_widget_set_name (path_label, "path_label");
gtk_widget_show (path_label);
gtk_table_attach (GTK_TABLE (layout_table), path_label, 0, 1, 1, 2,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
gtk_misc_set_alignment (GTK_MISC (path_label), 0, 0.5);
path_entry = gtk_entry_new ();
gtk_widget_set_name (path_entry, "path_entry");
gtk_widget_show (path_entry);
gtk_table_attach (GTK_TABLE (layout_table), path_entry, 1, 2, 1, 2,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
gtk_entry_set_invisible_char (GTK_ENTRY (path_entry), 9679);
profile_combobox = gtk_combo_box_new_text ();
gtk_widget_set_name (profile_combobox, "profile_combobox");
gtk_widget_show (profile_combobox);
gtk_table_attach (GTK_TABLE (layout_table), profile_combobox, 1, 2, 0, 1,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (GTK_FILL), 0, 0);
gtk_combo_box_append_text (GTK_COMBO_BOX (profile_combobox), _("YAST"));
gtk_combo_box_append_text (GTK_COMBO_BOX (profile_combobox), _("genprof"));
gtk_combo_box_set_active(GTK_COMBO_BOX(profile_combobox), active_combo);
preferences_buttonbox = GTK_DIALOG (preferences_dialog)->action_area;
gtk_widget_set_name (preferences_buttonbox, "preferences_buttonbox");
gtk_widget_show (preferences_buttonbox);
gtk_button_box_set_layout (GTK_BUTTON_BOX (preferences_buttonbox), GTK_BUTTONBOX_END);
cancel_button = gtk_button_new_from_stock ("gtk-cancel");
gtk_widget_set_name (cancel_button, "cancel_button");
gtk_widget_show (cancel_button);
gtk_dialog_add_action_widget (GTK_DIALOG (preferences_dialog), cancel_button, GTK_RESPONSE_CANCEL);
GTK_WIDGET_SET_FLAGS (cancel_button, GTK_CAN_DEFAULT);
ok_button = gtk_button_new_from_stock ("gtk-ok");
gtk_widget_set_name (ok_button, "ok_button");
gtk_widget_show (ok_button);
gtk_dialog_add_action_widget (GTK_DIALOG (preferences_dialog), ok_button, GTK_RESPONSE_OK);
GTK_WIDGET_SET_FLAGS (ok_button, GTK_CAN_DEFAULT);
g_signal_connect(preferences_dialog, "response",
G_CALLBACK(button_press),
NULL);
return preferences_dialog;
}
void
button_press (GtkDialog * dialog, gint answer, gpointer data)
{
if (answer == GTK_RESPONSE_OK || answer == GTK_RESPONSE_CANCEL)
{
if (answer == GTK_RESPONSE_OK)
{
int active = gtk_combo_box_get_active (GTK_COMBO_BOX(profile_combobox));
if (active <= -1)
active = 0;
GConfClient *client;
client = gconf_client_get_default();
gconf_client_set_int(client, CONF_PROFILE_KEY, active, NULL);
}
gtk_widget_destroy(GTK_WIDGET(dialog));
}
}

View File

@@ -1,9 +0,0 @@
#ifndef PREFERENCES_DIALOG_H
#define PREFERENCES_DIALOG_H
GtkWidget* create_preferences_dialog (void);
void button_press (GtkDialog * dialog, gint answer, gpointer data);
#endif

View File

@@ -1,272 +0,0 @@
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <string.h>
#include <gconf/gconf-client.h>
#include <stdio.h>
#include <panel-applet.h>
#include <libgnome/libgnome.h>
#include <glib/gi18n.h>
#include <gdk/gdkkeysyms.h>
#include <gtk/gtk.h>
#include "reject_list.h"
#include "apparmor-applet.h"
static void
add_columns (GtkTreeView *treeview)
{
GtkCellRenderer *renderer;
GtkTreeViewColumn *column;
GtkTreeModel *model = gtk_tree_view_get_model (treeview);
/* column for fixed toggles */
renderer = gtk_cell_renderer_text_new ();
column = gtk_tree_view_column_new_with_attributes ("Profile Name",
renderer,
"text", 0,
NULL);
gtk_tree_view_column_set_sort_column_id (column, 0);
gtk_tree_view_append_column (treeview, column);
renderer = gtk_cell_renderer_text_new ();
column = gtk_tree_view_column_new_with_attributes ("Rejection Count",
renderer,
"text", 1,
NULL);
gtk_tree_view_column_set_sort_column_id (column, 1);
gtk_tree_view_append_column (treeview, column);
}
GtkWidget*
create_reject_dialog (GtkListStore *store)
{
GtkWidget *reject_dialog;
GtkWidget *reject_vbox;
GtkWidget *reject_list_scrolledwindow;
GtkWidget *program_list;
GtkWidget *reject_button_area;
GtkWidget *cancel_button;
GtkWidget *ok_button;
GtkTreeIter listIter;
reject_dialog = gtk_dialog_new ();
gtk_widget_set_name (reject_dialog, "reject_dialog");
gtk_window_set_title (GTK_WINDOW (reject_dialog), _("AppArmor Rejections"));
gtk_window_set_type_hint (GTK_WINDOW (reject_dialog), GDK_WINDOW_TYPE_HINT_DIALOG);
gtk_window_set_modal(GTK_WINDOW(reject_dialog), TRUE);
reject_vbox = GTK_DIALOG (reject_dialog)->vbox;
gtk_widget_set_name (reject_vbox, "reject_vbox");
gtk_widget_show (reject_vbox);
reject_list_scrolledwindow = gtk_scrolled_window_new (NULL, NULL);
gtk_widget_set_name (reject_list_scrolledwindow, "reject_list_scrolledwindow");
gtk_widget_show (reject_list_scrolledwindow);
gtk_box_pack_start (GTK_BOX (reject_vbox), reject_list_scrolledwindow, TRUE, TRUE, 0);
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (reject_list_scrolledwindow), GTK_SHADOW_IN);
program_list = gtk_tree_view_new_with_model(GTK_TREE_MODEL(store));
gtk_widget_set_name (program_list, "program_list");
gtk_widget_show (program_list);
gtk_container_add (GTK_CONTAINER (reject_list_scrolledwindow), program_list);
gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (program_list), TRUE);
add_columns (GTK_TREE_VIEW (program_list));
reject_button_area = GTK_DIALOG (reject_dialog)->action_area;
gtk_widget_set_name (reject_button_area, "reject_button_area");
gtk_widget_show (reject_button_area);
gtk_button_box_set_layout (GTK_BUTTON_BOX (reject_button_area), GTK_BUTTONBOX_END);
cancel_button = gtk_button_new_from_stock ("gtk-cancel");
gtk_widget_set_name (cancel_button, "cancel_button");
gtk_widget_show (cancel_button);
gtk_dialog_add_action_widget (GTK_DIALOG (reject_dialog), cancel_button, GTK_RESPONSE_CANCEL);
GTK_WIDGET_SET_FLAGS (cancel_button, GTK_CAN_DEFAULT);
ok_button = gtk_button_new_from_stock ("gtk-ok");
gtk_widget_set_name (ok_button, "ok_button");
gtk_widget_show (ok_button);
gtk_dialog_add_action_widget (GTK_DIALOG (reject_dialog), ok_button, GTK_RESPONSE_OK);
GTK_WIDGET_SET_FLAGS (ok_button, GTK_CAN_DEFAULT);
g_signal_connect(reject_dialog,
"response",
G_CALLBACK(reject_button_press),
NULL);
g_signal_connect(reject_dialog,
"delete-event",
G_CALLBACK(reject_window_close),
NULL);
g_signal_connect(program_list,
"button-press-event",
G_CALLBACK(popup_button_pressed),
NULL);
g_signal_connect(program_list,
"popup-menu",
G_CALLBACK(view_on_popup_menu),
NULL);
gtk_widget_grab_focus (program_list);
gtk_window_set_default_size(GTK_WINDOW(reject_dialog), 500, 400);
return reject_dialog;
}
void reject_button_press (GtkDialog * dialog, gint answer, gpointer data)
{
if (answer == GTK_RESPONSE_OK || answer == GTK_RESPONSE_CANCEL)
{
gtk_widget_hide(GTK_WIDGET(dialog));
}
}
void reject_window_close (GtkDialog * dialog, gpointer data)
{
gtk_widget_hide(GTK_WIDGET(dialog));
}
void
handle_popup_profile (GtkWidget *menuitem, gpointer userdata)
{
GtkTreeView *treeview = GTK_TREE_VIEW(userdata);
GConfClient *client = gconf_client_get_default();
int profiler_type = gconf_client_get_int(client, CONF_PROFILE_KEY, NULL);
char *cmdline;
GtkTreeSelection *selection = gtk_tree_view_get_selection(treeview);
GtkTreeIter iter;
GtkTreeModel *model = gtk_tree_view_get_model(treeview);
gchar *str_data = NULL;
if (gtk_tree_selection_get_selected(selection, &model, &iter) == TRUE)
{
gint int_data;
GtkListStore *store = GTK_LIST_STORE(model);
gtk_tree_model_get (model, &iter,
0, &str_data,
1, &int_data,
-1);
}
// 0 is YAST, 1 is genprof
if ((profiler_type == 0) && (str_data != NULL))
{
cmdline = "/opt/gnome/bin/gnomesu /sbin/yast2 LogProf";
gnome_execute_terminal_shell(NULL, cmdline);
}
else if ((profiler_type == 1) && (str_data != NULL))
{
/* /usr/sbin/genprof */
cmdline = (char *) malloc(41 + strlen(str_data));
strcpy(cmdline, "/opt/gnome/bin/gnomesu /usr/sbin/genprof ");
strcat(cmdline, str_data);
gnome_execute_terminal_shell(NULL, cmdline);
free(cmdline);
}
if (str_data != NULL)
g_free (str_data);
}
void
handle_popup_remove (GtkWidget *menuitem, gpointer userdata)
{
GtkTreeView *treeview = GTK_TREE_VIEW(userdata);
GtkTreeSelection *selection = gtk_tree_view_get_selection(treeview);
GtkTreeIter iter;
GtkTreeModel *model = gtk_tree_view_get_model(treeview);
if (gtk_tree_selection_get_selected(selection, &model, &iter) == TRUE)
{
gchar *str_data;
gint int_data;
GtkListStore *store = GTK_LIST_STORE(model);
gtk_tree_model_get (model, &iter,
0, &str_data,
1, &int_data,
-1);
g_free (str_data);
decrement_event_count(int_data);
gtk_list_store_remove(store, &iter);
}
}
void
display_popup_menu (GtkWidget *treeview, GdkEventButton *event, gpointer userdata)
{
GtkWidget *menu, *remove_item, *profile_item;
menu = gtk_menu_new();
profile_item = gtk_menu_item_new_with_label(_("Profile application"));
remove_item = gtk_menu_item_new_with_label(_("Remove from list"));
g_signal_connect(remove_item,
"activate",
G_CALLBACK(handle_popup_remove),
treeview);
g_signal_connect(profile_item,
"activate",
G_CALLBACK(handle_popup_profile),
treeview);
/* Disabled until we have an easier way of working with logprof */
/* gtk_menu_shell_append(GTK_MENU_SHELL(menu), profile_item);*/
gtk_menu_shell_append(GTK_MENU_SHELL(menu), remove_item);
gtk_widget_show_all(menu);
gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL,
(event != NULL) ? event->button : 0,
gdk_event_get_time((GdkEvent*)event));
}
gboolean
popup_button_pressed (GtkWidget *treeview, GdkEventButton *event, gpointer userdata)
{
if (event->type == GDK_BUTTON_PRESS && event->button == 3)
{
GtkTreeSelection *selection;
selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(treeview));
if (gtk_tree_selection_count_selected_rows(selection) <= 1)
{
GtkTreePath *path;
if (gtk_tree_view_get_path_at_pos(GTK_TREE_VIEW(treeview),
(gint) event->x,
(gint) event->y,
&path, NULL, NULL, NULL))
{
gtk_tree_selection_unselect_all(selection);
gtk_tree_selection_select_path(selection, path);
gtk_tree_path_free(path);
}
}
display_popup_menu(treeview, event, userdata);
return TRUE;
}
return FALSE;
}
gboolean
view_on_popup_menu (GtkWidget *treeview, gpointer userdata)
{
display_popup_menu(treeview, NULL, userdata);
return TRUE;
}

View File

@@ -1,13 +0,0 @@
#ifndef REJECT_LIST_H
#define REJECT_LIST_H
GtkWidget* create_reject_dialog (GtkListStore *store);
void reject_button_press (GtkDialog * dialog, gint answer, gpointer data);
void reject_window_close (GtkDialog * dialog, gpointer data);
void handle_popup_profile (GtkWidget *menuitem, gpointer userdata);
void handle_popup_remove (GtkWidget *menuitem, gpointer userdata);
void display_popup_menu (GtkWidget *treeview, GdkEventButton *event, gpointer userdata);
gboolean popup_button_pressed (GtkWidget *treeview, GdkEventButton *event, gpointer userdata);
gboolean view_on_popup_menu (GtkWidget *treeview, gpointer userdata);
#endif

View File

@@ -9,7 +9,6 @@
// Author: Robin Dunn
//
// Created: 13-Jan-2000
// RCS-ID: $Id$
// Copyright: (c) 2000 by Total Control Software
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////

Some files were not shown because too many files have changed in this diff Show More