aa-status: handle profile names containing '('
aa-status crashed if a profile name contains an opening parenthesis because the regex enforces (simplified) '^[^(]* (.*)' when reading /sys/kernel/security/apparmor/profiles
This obviously doesn't match if a profile name contains '(' which is rare and strange, but still allowed, and the match result "None" then crashes aa-status.
Adjust the regex to allow all chars instead of all except '(' to handle these corner cases.
Note that '(enforce)' and '(complain)' still get read correctly because the regex ends with '((\w+))$' and therefore enforces matching "something inside parenthesis at the end of the line".
This bug exists since aa-status was rewritten into python, and even existed in the perl version before. However, in the perl version, the regex matching was protected with an if so profile names with '(' were skipped and hidden from the aa-status output.
Fixes: #51 (closed)
I propose this patch for 2.10..master.