Apparmor parser fails w/cx rules and CRLF line endings
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
AppArmor |
Triaged
|
Medium
|
Unassigned |
Bug Description
The following profile should not cause the parser to fail:
$ file cx_dos_
cx_dos_
$ cat -n cx_dos_
1 #
2 #=DESCRIPTION cx w/ dos line endings
3 #=EXRESULT PASS
4 #
5 /usr/bin/foo {
6 /bin/cat cx,
7 /bin/foo Cx,
8
9 unsafe cx /bin/bar,
10 cx /bin/a,
11
12 profile /bin/cat {
13 /bin/cat mr,
14 }
15
16 profile /bin/a {
17 /bin/a mr,
18 /tmp/slurp* rw,
19 }
20
21 }
$../../
AppArmor parser error for cx_dos_
Note that the same file with regular unix LF line endings parses okay:
$ file simple_ok_cx_1.sd
simple_ok_cx_1.sd: ASCII text
$ cat -n simple_ok_cx_1.sd
1 #
2 #=DESCRIPTION test cx
3 #=EXRESULT PASS
4 #
5 /usr/bin/foo {
6 /bin/cat cx,
7 /bin/foo Cx,
8
9 unsafe cx /bin/bar,
10 cx /bin/a,
11
12 profile /bin/cat {
13 /bin/cat mr,
14 }
15
16 profile /bin/a {
17 /bin/a mr,
18 /tmp/slurp* rw,
19 }
20 }
$ ../../.
$
Changed in apparmor: | |
importance: | Undecided → Medium |
Changed in apparmor: | |
status: | New → Triaged |
tags: | added: aa-parser |