it will work with very minimal modifications. To convert your 1.9 acl to a 2.0 ruleset, follow these rules:
add an admin role at the top of /etc/grsec/acl:
- Code: Select all
role admin sA
subject / r
/ rwcdmxi
Then add a default role, which will encompass all your 1.9 subjects:
- Code: Select all
role default G
role_transitions admin
In 2.0, the { }'s enclosing the object definitions are not necessary, but "subject" needs to come before the pathname for the subject.
So a subject would look like:
- Code: Select all
subject /bin/su
/tmp/blah rw
+CAP_SETUID
You also don't group together connect and bind rules with { }'s. They are now done with one connect or bind rule per line, like so:
- Code: Select all
connect 192.168.1.0/24:22 stream tcp
connect 192.168.2.0/24:20-21 stream tcp
bind 0.0.0.0 stream dgram tcp udp
Additionally, since grsecurity 2.0 supports more fine grained object permissions, if a process needs to create a file, then the object needs "c" added to its object mode in addition to "w". If a process needs to delete a file, then the object needs "d" added to its object mode in addition to "w".
That's all there is to it. Except for the creation/deletion it's just formatting changes.
-Brad