2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-08-31 06:16:03 +00:00

parser: update option parsing so --config-file does not have to be first

Requiring --config-file to be first in the option list is not user
friendly fix the option parsing so that --config-file can be specified
anywhere in the option list.

This also fixes a bug where even when the --config-file option is
first the option parsing fails because the detection logic is broken
for some option cases.

PR: https://gitlab.com/apparmor/apparmor/merge_requests/175
Acked-by: Seth Arnold <seth.arnold@canonical.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
This commit is contained in:
John Johansen
2018-08-19 02:13:21 -07:00
parent 9a8e7e58d2
commit af1818c053
2 changed files with 30 additions and 30 deletions

View File

@@ -359,9 +359,8 @@ profiles.
=item --config-file
Specify the config file to use instead of
/etc/apparmor/parser.conf. This option must be the first option
specified when invoking the parser, otherwise the parser will abort
with an error.
/etc/apparmor/parser.conf. This option will be processed early before
regular options regardless of the order it is specified in.
=item --print-config-file