2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-08-22 01:57:43 +00:00

8264 Commits

Author SHA1 Message Date
John Johansen
93c660e376 Merge parser: Add support for automatic @{attach_path} variable
Have the parser extract the attachment path from the profile declaration        
and make it available as a local variable within the profile. This allows             
profile rules to use the executable attachment path in rules.                   
                                                                                
eg.                                                                             
```                                                                             
  profile ex /bin/** {                                                          
     @{attach_path} r,                                                          
     # ...                                                                      
  }                                                                             
                                                                                
  profile /path/to/bin {                                                        
     @{attach_path} r,                                                          
     # ...                                                                      
}                                                                               
```                                                                             
                                                                                
if a profile does not define an attachment like                                 
                                                                                
```                                                                             
  profile noattach {                                                            
     @{attach_path} r,                                                          
  }                                                                             
```                                                                             
                                                                                
the apparmor_parser will fail the compile with the error.                       
                                                                                
```                                                                             
  Found reference to variable attach_path, but is never declared                
```                                                                             

While not recommended for rules directly in a profile the above
the undeclared variable error can be avoided in in abstractions
by wrapping the variable in a conditional.

```
if defined @{attach_path} {
   @{attach_path r,
}
```
                                                             
The attachment xattr/label conditionals are not made available at               
this time as regular file path rules can not use them.                          
                                                                                
Similarly a @{exec_path} variable is made available. It is different            
than @{attach_path} in that it is intended to be a kernel variable              
that represents the specific executable that was matched at run                 
time. However to support policy on kernels that don't define the                
kernel variable it has a fallback value that is the same as                     
@{attach_path}.                                                                 
                                                                                
This patch is a follow on to MR:1637 (https://gitlab.com/apparmor/apparmor/-/me\
rge_requests/1637)                                                              
and is similar to how the apparmor.d project uses the manually setup            
@{exec_path} variable.                                                          
                                                                                
We can bike shed over the variable name. @{attach_path} was chosen              
here because this is the attachment conditional path for the                    
executable, not the executable's actual path. While @{exec_path} is             
intended to be the applications actual executable path.                         
support the @{exec_path} kernel variable (all of them atm).                     
                                                                                
Notes:                                                                          
                                                                                
The minimize.sh tests are changed because this patch causes path based          
profile names to create an attachment. This could be done by doing the          
attach_variable expansion in the alternate location marked by the               
patch, but since the kernel is going to start doing this for all                
profiles that don't have an attachment it is better for the parser to           
do it, as it can optimize better.                                               
                                                                                
This patch series may cause breakage if policy declares either
@{attach_path} or @{exec_path} by shadowing those previously declared
variables in the profile block. The previously declared variable
is available in the attachment specification so uses like the
apparmor.d project won't break as it with transfer its variable
value to the attachment which will the transfer that value into
the automatic local var.
                                                                            
Signed-off-by: John Johansen <john.johansen@canonical.com>

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/1643
Approved-by: Maxime Bélair <maxime.belair@canonical.com>
Approved-by: John Johansen <john@jjmx.net>
Merged-by: John Johansen <john@jjmx.net>
2025-05-12 09:08:44 +00:00
Ryan Lee
05a48f676b profiles: remove CAP_SYS_ADMIN from iotop_c profile
See the comment for an explanation of why CAP_SYS_ADMIN was being checked and why it isn't actually necessary for setting ionice values for processes

Signed-off-by: Ryan Lee <ryan.lee@canonical.com>
2025-05-12 10:47:55 +02:00
John Johansen
d94ff137ef Merge parser: enable create perm when label is defined
Due to how labeling is implemented, during the creation it is not yet
defined, so we need to grant create permissions without attaching the
label yet. Also, adjust tests to pass when label support is
implemented in the kernel.

Signed-off-by: Georgia Garcia <georgia.garcia@canonical.com>

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/1623
Approved-by: Maxime Bélair <maxime.belair@canonical.com>
Approved-by: John Johansen <john@jjmx.net>
Merged-by: John Johansen <john@jjmx.net>
2025-05-12 08:00:11 +00:00
John Johansen
f3178d79b8 parser: make auto vars @{exec_path} and @{attach_path} local vars
Make it so the @{exec_path} and @{attach_path} variables behavior
completely as local variables, overriding global variables of the
same name, instead of conflicting with them.

The exec var is only validate for the profile block after the attachment
is defined so the pattern

@{exec_path}=/path
profile test @{exec_path} {

   @{exec_path} rw,
}

is valid with the global var defining the attachent which then sets
the local auto @{exec_path} and @{attach_path} variables.

Signed-off-by: John Johansen <john.johansen@canonical.com>
2025-05-10 09:55:14 -07:00
John Johansen
ee3b5d746f utils: tests: Update the utils tests for the two cases they don't handle
- the autovars not being defined because the profile doesn't have an
  attachment

- the autovar conflicting with a user defined var of the same name

Signed-off-by: John Johansen <john.johansen@canonical.com>
2025-05-09 04:53:35 -07:00
John Johansen
fba1ced1bc fixup profile 2025-05-09 04:53:35 -07:00
John Johansen
6e9ff1fa61 profiles: update the rest of the profiles to use @{exec_path}
Signed-off-by: John Johansen <john.johansen@canonical.com>
2025-05-09 03:53:05 -07:00
John Johansen
6d0834da8e profiles: update set of profiles updated in MR:1637 to use @{exec_path}
This patch updates the set of profiles updated by MR:1637, this is split
off from the rest of the profile updates because that set is explicity
recently set apart.

Signed-off-by: John Johansen <john.johansen@canonical.com>
2025-05-09 03:53:05 -07:00
John Johansen
699507f90a parser: Add support for automatic @{attach_path} variable
Have the parser extract the attachment path from the profile declaration
and make it available as a variable within the profile. This allows
profile rules to use the executable attachment path in rules.

eg.
```
  profile ex /bin/** {
     @{attach_path} r,
     # ...
  }

  profile /path/to/bin {
     @{attach_path} r,
     # ...
}
```

if a profile does not define an attachment like

```
  profile noattach {
     @{attach_path} r,
  }
```

the apparmor_parser will fail the compile with the error.

```
  Found reference to variable attach_path, but is never declared
```

The attachment xattr/label conditionals are not made available at
this time as regular file path rules can not use them.

Similarly a @{exec_path} variable is made available. It is different
than @{attach_path} in that it is intended to be a kernel variable
that represents the specific executable that was matched at run
time. However to support policy on kernels that don't define the
kernel variable it has a fallback value that is the same as
@{attach_path}.

This patch is a follow on to MR:1637 (https://gitlab.com/apparmor/apparmor/-/merge_requests/1637)
and is similar to how the apparmor.d project uses the manually setup
@{exec_path} variable.

We can bike shed over the variable name. @{attach_path} was chosen
here because this is the attachment conditional path for the
executable, not the executable's actual path. While @{exec_path} is
intended to be the applications actual executable path.
support the @{exec_path} kernel variable (all of them atm).

Notes:

The minimize.sh tests are changed because this patch causes path based
profile names to create an attachment. This could be done by doing the
attach_variable expansion in the alternate location marked by the
patch, but since the kernel is going to start doing this for all
profiles that don't have an attachment it is better for the parser to
do it, as it can optimize better.

This patch may cause breakage if policy declares either @{attach_path}
or @{exec_path} this will not be dealt with here, but in a subsequent
patch that allows variables to have a local scope so that the compiler
defined vars will just get declared locally.

Signed-off-by: John Johansen <john.johansen@canonical.com>
2025-05-09 03:53:05 -07:00
Georgia Garcia
b7ce9b81fa Merge fix spread pipeline
The spread pipeline was failing due to missing tests

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/1682
Approved-by: Maxime Bélair <maxime.belair@canonical.com>
Approved-by: Georgia Garcia <georgia.garcia@canonical.com>
Merged-by: Georgia Garcia <georgia.garcia@canonical.com>
2025-05-08 11:22:59 -03:00
Georgia Garcia
d6951bab60 spread: add modifiers to list of spread utils tests
Signed-off-by: Georgia Garcia <georgia.garcia@canonical.com>
2025-05-08 10:53:11 -03:00
Georgia Garcia
2c1ed72cbb spread: add allow_all to list of spread regression tests
Signed-off-by: Georgia Garcia <georgia.garcia@canonical.com>
2025-05-08 10:52:42 -03:00
Georgia Garcia
c07b0093d8 spread: improve error message when regression test is missing
Due to how the debug information shows up when something fails in
spread the information is hard to figure out.

See this example when the allow_all test was missing
https://gitlab.com/apparmor/apparmor/-/jobs/9958642493

Signed-off-by: Georgia Garcia <georgia.garcia@canonical.com>
2025-05-08 10:52:24 -03:00
John Johansen
eda0461d58 Merge profiles: expand set of flags allowed for fusermount3
fuse_overlayfs requires noatime, but we should also allow more flags than
just that to preempt future breakage from flags not included in the rules.

Signed-off-by: Ryan Lee <ryan.lee@canonical.com>

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/1673
Approved-by: Maxime Bélair <maxime.belair@canonical.com>
Approved-by: John Johansen <john@jjmx.net>
Merged-by: John Johansen <john@jjmx.net>
2025-05-08 11:04:06 +00:00
John Johansen
763c0d9d61 Merge profiles: replace the unconfined ipa_verify profile with a proper one
ipa_verify is a simple libcamera tool that does not use the portion of
libcamera that creates user namespaces. This simple profile should be
enough to replace the previous unconfined profile.

Signed-off-by: Ryan Lee <ryan.lee@canonical.com>

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/1624
Approved-by: John Johansen <john@jjmx.net>
Merged-by: John Johansen <john@jjmx.net>
2025-05-08 11:02:32 +00:00
John Johansen
90048417bb Merge regression: exercise options in (list) feature of mount rules
This includes testing for options in (list) by itself, along with a rudimentary test for the combination of options=(list) and options in (list).

In particular, the test for the combination confirms that the `apparmor.d` man page was wrong about what happens when these options are combined.

Signed-off-by: Ryan Lee <ryan.lee@canonical.com>

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/1672
Approved-by: John Johansen <john@jjmx.net>
Merged-by: John Johansen <john@jjmx.net>
2025-05-08 08:51:50 +00:00
John Johansen
e6bedaac1d Merge parser: fix handling of norelatime mount rule flag
Specifying norelatime should set the corresponding MS_RELATIME flag clear
bit. Instead, it ORed in MS_NORELATIME, which expands to 0. Properly set
the clear bit by using MS_RELATIME.

Fixes: c9e31b7f "Add mount rules"

Signed-off-by: Ryan Lee <ryan.lee@canonical.com>

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/1679
Approved-by: Georgia Garcia <georgia.garcia@canonical.com>
Approved-by: John Johansen <john@jjmx.net>
Merged-by: John Johansen <john@jjmx.net>
2025-05-08 08:50:39 +00:00
John Johansen
e8d5401a18 Merge profiles: fix more wpa_supplicant denials
In particular, the dbus rules were completely rebuilt based on reading through wpa_supplicant's dbus source code.

Signed-off-by: Ryan Lee <ryan.lee@canonical.com>

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/1630
Approved-by: John Johansen <john@jjmx.net>
Merged-by: John Johansen <john@jjmx.net>
2025-05-08 08:47:05 +00:00
John Johansen
717e019928 Merge abstractions/gnome: include abstractions/gtk
... and drop rules that are part of abstractions/gtk

Note that abstractions/gtk contains more than the rules dropped here,
which means it effectively extends the permissions granted by
abstractions/gnome.

Idea by darix.

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/1678
Approved-by: Ryan Lee <rlee287@yahoo.com>
Merged-by: John Johansen <john@jjmx.net>
2025-05-08 06:15:56 +00:00
John Johansen
3f37b671c3 Merge abstractions/mesa: more radv_builtin_shaders files
reported by darix

The initial radv_builtin_shaders rule was added in 4.1, therefore I propose this patch for at least 4.1 and master.

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/1677
Approved-by: Ryan Lee <rlee287@yahoo.com>
Merged-by: John Johansen <john@jjmx.net>
2025-05-08 06:14:57 +00:00
John Johansen
b1097077f5 Merge abstractions/wutmp: allow access to lastlog2.db
Reported by darix, seen with comm="sshd-session"

I propose this for master and 4.x (optionally also 3.x even if it's less likely that systems using these branches already use lastlog2)

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/1676
Approved-by: Ryan Lee <rlee287@yahoo.com>
Merged-by: John Johansen <john@jjmx.net>
2025-05-08 06:14:26 +00:00
John Johansen
726cb2e1f1 Merge regression: add an allow_all test that checks pix+ix transitions
MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/1663
Approved-by: John Johansen <john@jjmx.net>
Merged-by: John Johansen <john@jjmx.net>
2025-05-08 05:46:20 +00:00
Ryan Lee
3b012c3a24 profiles: fix lsof profile test
Signed-off-by: Ryan Lee <ryan.lee@canonical.com>
2025-05-07 16:49:14 -07:00
John Johansen
95036df4a1 Merge profiles: give iotop-c additional accesses
- iotop-c fails with permission errors in nl_init without network netlink
  raw.
- iotop-c also needs access to the iotop config directory instead of just
  the iotoprc file within.
- iotop-c uses CAP_SYS_NICE to set ionice values. For some reason, no
  audit log is generated without the capability present, but include it
  anyways in case this allowance is due to a parser or kernel bug that
  needs to be squashed later.


Fixes: https://bugs.launchpad.net/bugs/2107727

Signed-off-by: Ryan Lee <ryan.lee@canonical.com>

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/1675
Approved-by: John Johansen <john@jjmx.net>
Merged-by: John Johansen <john@jjmx.net>
2025-05-07 23:13:22 +00:00
John Johansen
4808e34257 Merge spread: remove disconnected_mount_complain from xfail tests
disconnected_mount_complain only contains xpass tests, which should
not be included in the spread XFAIL tests.

Fixes: 1aca4a1d ("tests: regression: mark disconnected-complain-mode tests as xpass")
Signed-off-by: Georgia Garcia <georgia.garcia@canonical.com>

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/1681
Approved-by: John Johansen <john@jjmx.net>
Merged-by: John Johansen <john@jjmx.net>
2025-05-07 23:08:00 +00:00
John Johansen
89c4ab100d Merge Improve compliance with C++ best practic and fix missing virtual dtor
Remove virtual from non-base class fns, as this can hide/make it hard to discover some bugs.
Add override to virtual fns that should be overriding, which helps catch certain class of bugs at compile time

fix(non-virtual-dtor): add missed virtual destructor

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/1669
Approved-by: John Johansen <john@jjmx.net>
Merged-by: John Johansen <john@jjmx.net>
2025-05-07 23:05:28 +00:00
John Johansen
330d202586 Merge branch 'master' into 'override'
# Conflicts:
#   parser/libapparmor_re/expr-tree.h
2025-05-07 23:04:59 +00:00
John Johansen
ec2549be2a Merge refactor(bison): replace deprecated name-prefix with %define api.prefix
%name-prefix is deprecated in Bison 2.6.  
<https://savannah.gnu.org/news/?id=7269>

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/1668
Approved-by: Ryan Lee <rlee287@yahoo.com>
Approved-by: John Johansen <john@jjmx.net>
Merged-by: John Johansen <john@jjmx.net>
2025-05-07 22:54:06 +00:00
John Johansen
b50ec6ca36 Merge fix: avoid using namespace std; in header files
using directive in a header file is a bad practice because it may lead
to unexpected results.

https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rs-using-directive

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/1664
Approved-by: John Johansen <john@jjmx.net>
Merged-by: John Johansen <john@jjmx.net>
2025-05-07 22:53:26 +00:00
John Johansen
e56751cec0 Merge binutils: Fix missing include limits.h
For NAME_MAX

Fixes 322a98c8 ("Fix incorrect strnlen length in aa_load.c load_policy_dir")

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/1666
Approved-by: Maxime Bélair <maxime.belair@canonical.com>
Approved-by: Ryan Lee <rlee287@yahoo.com>
Merged-by: John Johansen <john@jjmx.net>
2025-05-07 22:44:12 +00:00
Georgia Garcia
89e2aa76eb spread: remove disconnected_mount_complain from xfail tests
disconnected_mount_complain only contains xpass tests, which should
not be included in the spread XFAIL tests.

Fixes: 1aca4a1d ("tests: regression: mark disconnected-complain-mode tests as xpass")
Signed-off-by: Georgia Garcia <georgia.garcia@canonical.com>
2025-05-07 14:55:02 -03:00
Ryan Lee
09218c3d2f profiles: give iotop-c additional accesses
- iotop-c fails with permission errors in nl_init without network netlink
raw.
- iotop-c also needs access to the iotop config directory instead of just
  the iotoprc file within.
- iotop-c uses CAP_SYS_NICE to set ionice values. For some reason, no
  audit log is generated without the capability present, but include it
  anyways in case this allowance is due to a parser or kernel bug that
  needs to be squashed later.

Fixes: https://bugs.launchpad.net/bugs/2107727

Signed-off-by: Ryan Lee <ryan.lee@canonical.com>
2025-05-07 10:21:58 -07:00
John Johansen
648336489e Merge parser: fix failure to properly apply deny clearing in perms accumulation
The internal permission accumulation is currently broken in that
the ordering of rules matter to whether deny is clearing accumulated
perms.

If a deny node comes before an allow node the deny bits will get set
but the following allow bits won't get cleared by the deny node.

This isn't currently an actual issue for mediation as the deny
bit will be applied at one of
  1. apply_and_clear_deny
  2. permission remapping
  3. run time mediation

but it does result in the internal state having sometimes having both
allow and deny bits set, dependent on order of computation, resulting
in state machines with different sizes because minimization
partitioning is based on the internal permissions.

This means that dfa minimization may not result in a truly minimal
state machine, and even worse can cause inconsistenty and failure in
tests that rely on internal state like the equality and minimization
test, as seen in https://gitlab.com/apparmor/apparmor/-/issues/513

The failure was due to musl stl sets implementation producing a
different ordering of the nodes than glibc. So when the permissions
where accumulated the internal set of permissions were different.

Fix this by giving the different node classes their own internal priority.
This will ensure the bits are properly cleared for that priority before
accumulating.

Note: other ways of fixing.

1. Fixup internal accumulation to use accumulating perms of "higher"
   priority as part of the mask (deny and allow mask prompt).
2. Do a hard masking apply at the end after all bits have been accumulated
   (ie, in accept_perms after the for loop).

the priority route was chosen because it is a little smaller and
scales better if we get new Node types we have to deal with
(eg. planned complain node).

BugLink: https://gitlab.com/apparmor/apparmor/-/issues/513
Fixes: 1ebd99115 ("parser: change priority so that it accumulates based on permissions")
Signed-off-by: John Johansen <john.johansen@canonical.com>

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/1655
Approved-by: John Johansen <john@jjmx.net>
Merged-by: John Johansen <john@jjmx.net>
2025-05-07 08:42:52 +00:00
John Johansen
06e349345e parser: fix failure to properly apply deny clearing in perms accumulation
The internal permission accumulation is currently broken in that
the ordering of rules matter to whether deny is clearing accumulated
perms.

If a deny node comes before an allow node the deny bits will get set
but the following allow bits won't get cleared by the deny node.

This isn't currently an actual issue for mediation as the deny
bit will be applied at one of
  1. apply_and_clear_deny
  2. permission remapping
  3. run time mediation

but it does result in the internal state having sometimes having both
allow and deny bits set, dependent on order of computation, resulting
in state machines with different sizes because minimization
partitioning is based on the internal permissions.

This means that dfa minimization may not result in a truly minimal
state machine, and even worse can cause inconsistenty and failure in
tests that rely on internal state like the equality and minimization
test, as seen in https://gitlab.com/apparmor/apparmor/-/issues/513

The failure was due to musl stl sets implementation producing a
different ordering of the nodes than glibc. So when the permissions
where accumulated the internal set of permissions were different.

Fix this by giving the different node classes their own internal priority.
This will ensure the bits are properly cleared for that priority before
accumulating.

Note: other ways of fixing.

1. Fixup internal accumulation to use accumulating perms of "higher"
   priority as part of the mask (deny and allow mask prompt).
2. Do a hard masking apply at the end after all bits have been accumulated
   (ie, in accept_perms after the for loop).

the priority route was chosen because it is a little smaller and
scales better if we get new Node types we have to deal with
(eg. planned complain node).

BugLink: https://gitlab.com/apparmor/apparmor/-/issues/513
Fixes: 1ebd99115 ("parser: change priority so that it accumulates based on permissions")
Signed-off-by: John Johansen <john.johansen@canonical.com>
2025-05-07 01:41:59 -07:00
Ryan Lee
711bbac5eb parser: fix handling of norelatime mount rule flag
Specifying norelatime should set the corresponding MS_RELATIME flag clear
bit. Instead, it ORed in MS_NORELATIME, which expands to 0. Properly set
the clear bit by using MS_RELATIME.

Fixes: c9e31b7f "Add mount rules"

Signed-off-by: Ryan Lee <ryan.lee@canonical.com>
2025-05-06 16:01:53 -07:00
Christian Boltz
89c1aac5af
abstractions/gnome: include abstractions/gtk
... and drop rules that are part of abstractions/gtk

Note that abstractions/gtk contains more than the rules dropped here,
which means it effectively extends the permissions granted by
abstractions/gnome.

Idea by darix.
2025-05-07 00:08:15 +02:00
Christian Boltz
521a81ebfb
abstractions/mesa: more radv_builtin_shaders files
reported by darix
2025-05-06 23:36:38 +02:00
Christian Boltz
f8532f2d20
abstractions/wutmp: allow access to lastlog2.db
Reported by darix, seen with comm="sshd-session"
2025-05-06 23:28:17 +02:00
Ryan Lee
52c969c980 regression: exercise the combination of option= and option in for mounts
Signed-off-by: Ryan Lee <ryan.lee@canonical.com>
2025-05-06 12:30:13 -07:00
Ryan Lee
a7babf2391 regression: also exercise options in (list) feature of mount rules
Signed-off-by: Ryan Lee <ryan.lee@canonical.com>
2025-05-06 12:30:13 -07:00
Christian Boltz
e72ef56789 Merge profiles/apparmor.d: add ssh-keyscan profile
Add AA profile for ssh-keyscan. This profile has been tested on the latest plucky `ssh-agent` version `1:9.9p1-3ubuntu3`. In particular, this has been tested using the tests upstream and the archive in:

* `openssh-tests`

This is linked to the discussion in https://gitlab.com/apparmor/apparmor/-/merge_requests/1502, to add the profile deps of ssh-agent in as well.

Signed-off-by: Evan Caville <evan.caville@canonical.com>

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/1597
Approved-by: Ryan Lee <rlee287@yahoo.com>
Approved-by: Christian Boltz <apparmor@cboltz.de>
Merged-by: Christian Boltz <apparmor@cboltz.de>
2025-05-06 19:00:18 +00:00
Ryan Lee
1d7a9c6765 profiles: expand set of flags allowed for fusermount3
fuse_overlayfs requires noatime, but we should also allow more flags than
just that to preempt future breakage from flags not included in the rules.

Signed-off-by: Ryan Lee <ryan.lee@canonical.com>
2025-05-06 11:58:17 -07:00
Ryan Lee
7d33bde1ea Merge Split priority rules with unsafe keyword to separate tests
This helps to limit the amount of rules skipped in the utils tests
(because the utils don't support the `unsafe` keyword)

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/1671
Approved-by: Maxime Bélair <maxime.belair@canonical.com>
Approved-by: Georgia Garcia <georgia.garcia@canonical.com>
Approved-by: Ryan Lee <rlee287@yahoo.com>
Merged-by: Ryan Lee <rlee287@yahoo.com>
2025-05-06 08:40:32 -07:00
John Johansen
62c3cf913a Merge fix incorrect mount flag documentation in apparmor.d man page
The documentation was wrong about how options=(list) and options in (list) are combined

Signed-off-by: Ryan Lee <ryan.lee@canonical.com>

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/1674
Approved-by: John Johansen <john@jjmx.net>
Merged-by: John Johansen <john@jjmx.net>
2025-05-06 02:24:17 +00:00
Ryan Lee
3b1819db37 fix incorrect mount flag documentation in apparmor.d man page
The documentation was wrong about how options=(list) and options in (list) are combined

Signed-off-by: Ryan Lee <ryan.lee@canonical.com>
2025-05-05 17:16:06 -07:00
Evan Caville
004dc61959 profiles/apparmor.d: remove file access
Signed-off-by: Evan Caville <evan.caville@canonical.com>
2025-05-06 08:57:57 +10:00
Evan Caville
260ef98a95 profiles/apparmor.d: add ssh-keyscan profile
Signed-off-by: Evan Caville <evan.caville@canonical.com>
2025-05-06 08:57:57 +10:00
Christian Boltz
bd46a02e47 Merge parser: fix if condition at the bottom of equality.sh
The lack of a space after $testtype is a syntax error and was causing the
equality tests on Ubuntu Xenial to be silently skipped and marked PASS.

Signed-off-by: Ryan Lee <ryan.lee@canonical.com>

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/1670
Approved-by: Georgia Garcia <georgia.garcia@canonical.com>
Approved-by: Christian Boltz <apparmor@cboltz.de>
Merged-by: Christian Boltz <apparmor@cboltz.de>
2025-05-05 19:03:34 +00:00
Christian Boltz
94c5cf047f
Split priority rules with unsafe keyword to separate tests
This helps to limit the amount of rules skipped in the utils tests
(because the utils don't support the `unsafe` keyword)
2025-05-05 20:53:53 +02:00
Christian Boltz
71ea87966a Merge utils: add support for priority rule prefix
Add basic support for the priority rules prefix. This patch does not\
allow the utils to set or suggest priorities. It allows parsing and\
retaining of the priority prefix if it already exists on rules and\
checking if it's in the supported range.

Note that this MR is supposed to replace WIP MR https://gitlab.com/apparmor/apparmor/-/merge_requests/1531

MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/1636
Approved-by: Christian Boltz <apparmor@cboltz.de>
Merged-by: Christian Boltz <apparmor@cboltz.de>
2025-05-05 18:44:39 +00:00