Commit graph

4617 commits

Author SHA1 Message Date
Launchpad Translations on behalf of apparmor-dev
0e25580aa2
Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
(cherry picked from commit 5a62c68743)
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-13 22:20:04 -07:00
Launchpad Translations on behalf of apparmor-dev
afe12f0ced
Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
(cherry picked from commit 78c09e4337)
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-13 22:19:52 -07:00
Launchpad Translations on behalf of apparmor-dev
729658325c
Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
(cherry picked from commit 2c614d4413)
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-13 22:19:45 -07:00
Launchpad Translations on behalf of apparmor-dev
8f2ee21057
Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
(cherry picked from commit d14723b78c)
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-13 22:19:34 -07:00
Launchpad Translations on behalf of apparmor-dev
3f23facd6c
Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
(cherry picked from commit fe2faeb24f)
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-13 22:19:21 -07:00
Launchpad Translations on behalf of apparmor-dev
059becffa7
Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
(cherry picked from commit 9650201928)
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-13 22:19:12 -07:00
Launchpad Translations on behalf of apparmor-dev
c05a08d4fd
Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
(cherry picked from commit 2b936e25a8)
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-13 22:19:03 -07:00
Launchpad Translations on behalf of apparmor-dev
369951df87
Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
(cherry picked from commit 02ba8523c6)
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-13 22:18:52 -07:00
Launchpad Translations on behalf of apparmor-dev
868703fb97
Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
(cherry picked from commit 72bcf23c5d)
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-13 22:18:41 -07:00
Launchpad Translations on behalf of apparmor-dev
dedac677b6
Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
(cherry picked from commit 9f9294b48b)
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-13 22:18:33 -07:00
Launchpad Translations on behalf of apparmor-dev
edd479d996
Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
(cherry picked from commit 41b5fecbcf)
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-13 22:18:22 -07:00
Launchpad Translations on behalf of apparmor-dev
b93b5ca426
Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
(cherry picked from commit dc98e8ff55)
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-13 22:18:14 -07:00
Launchpad Translations on behalf of apparmor-dev
9ff782450f
Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
(cherry picked from commit ba3dc9fc85)
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-13 22:18:05 -07:00
Launchpad Translations on behalf of apparmor-dev
aa848bdca2
Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
(cherry picked from commit 42b43d58d0)
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-13 22:17:55 -07:00
Launchpad Translations on behalf of apparmor-dev
5d434ffd34
Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
(cherry picked from commit 301857ef5d)
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-13 22:17:30 -07:00
Launchpad Translations on behalf of apparmor-dev
5d26399925
Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
(cherry picked from commit 303deea3a8)
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-13 22:17:18 -07:00
Launchpad Translations on behalf of apparmor-dev
6c054b503b
Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
(cherry picked from commit 894c6cd6d2)
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-13 22:17:08 -07:00
Launchpad Translations on behalf of apparmor-dev
37eeff0057
Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
(cherry picked from commit eb38db5953)
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-13 22:17:00 -07:00
Launchpad Translations on behalf of apparmor-dev
e087c20381
Launchpad automatic translations update.
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
(cherry picked from commit 5cc8718965)
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
2019-06-13 22:16:18 -07:00
Christian Boltz
e704d1c18d syslog-ng: add abstractions/python for python-parser
When running syslog-ng with a defined python-parser, it needs access to
python libraries.

For details about python-parser, see
https://www.syslog-ng.com/community/b/blog/posts/format-your-log-messages-in-python

References: https://github.com/balabit/syslog-ng/issues/2625
PR: https://gitlab.com/apparmor/apparmor/merge_requests/361
(cherry picked from commit 234a924480)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-06-13 17:40:47 -07:00
Jörg Sommer
2d2dc42aa6 parser: Fix parsing of arrow “px -> …”
The parser failed to read the profile name after the the arrow. Rules with
`-> foo-bar;` failed with “Found unexpected character: '-'”. Rules with
`-> @{tgt};` compiled fine, but failed at runtime with “profile transition
not found”.

The patch was written by sbeattie and published on
https://paste.ubuntu.com/p/tzxxmVwGJ8/

https://matrix.to/#/!pNJIrowvqsuGgjXsEY:matrix.org/$15477566201815716pmube:matrix.org?via=matrix.org&via=alea.gnuu.de
PR: https://gitlab.com/apparmor/apparmor/merge_requests/334
(cherry picked from commit 0e0663e99e)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-06-13 17:35:40 -07:00
John Johansen
4c40011a3b parser: Don't skip cache just because optimizations are specified
The parser currently skips the cache if optimizations are specified
because it can not determine if the cached policy was compiled
with the specified optimization. However this causes cache misses
even if policy is cached with those options, and distros are setting
some optimizations by default.

Instead of skipping reading the cache if optimizations are set, users
can force overwriting the cache if needed, until the parser can
store aditional meta info in the cache.

PR: https://gitlab.com/apparmor/apparmor/merge_requests/385
BugLink: http://bugs.launchpad.net/bugs/1820068
Signed-off-by: John Johansen <john.johansen@canonical.com>
(cherry picked from commit f6cd5c01c1)
2019-06-13 17:21:33 -07:00
Christian Boltz
39a81f4a19 Merge branch 'cboltz-dovecot-backports' into 'apparmor-2.13'
[2.12+2.13] backport dovecot profile additions

See merge request apparmor/apparmor!389

Acked-by: Seth Arnold <seth.arnold@canonical.com>
2019-06-13 20:33:36 +00:00
Christian Boltz
e97af4af46
backport dovecot profile additions
This is a partial backport of bc36daa264
(without the abstractions/nameservice removal in
usr.lib.dovecot.pop3-login)

Original commmit message:

dovecot: align {pop3,managesieve}-login to imap-login

Those 3 login daemons should have similiar needs and thus similar
profiles. IMAP is likely the most tested one so let's align the
other 2 with it. Unix and TCP sockets rules were added to pop3-login
after the removal of abstractions/nameservice that included them
implicitly.

Signed-off-by: Simon Deziel <simon@sdeziel.info>
2019-06-13 22:26:18 +02:00
Christian Boltz
9318977332 Merge branch 'cboltz-postfix-name' into 'apparmor-2.13'
[2.12+2.13] make abstractions/postfix-common compatible with latest postfix profiles

See merge request apparmor/apparmor!387

Seth Arnold <seth.arnold@canonical.com>
2019-06-13 20:06:21 +00:00
Christian Boltz
4573d25297
make abstractions/postfix-common compatible with latest postfix profiles
Even if we don't backport the latest postfix profiles (in extras) to
2.12 and 2.13, making the abstraction compatible with them (by adding
peer=postfix-master rules in addition to the path-based ones) makes
things much easier for people who want to use the latest profiles.
2019-06-13 21:46:12 +02:00
John Johansen
fd2b170e65 libapparmor python: Fix 'aa_log_record' object has no attribute '__getattr__'
When building with swig 4 we are seeing the error

AttributeError: 'aa_log_record' object has no attribute '__getattr__'

Which forces swig to use modern classes which do not generate __getattr__
methods.

issue: https://gitlab.com/apparmor/apparmor/issues/33
Acked-by: Seth Arnold <seth.arnold@canonical.com>
Acked-by: Steve Beattie <steve@nxnw.org>
Signed-off-by: John Johansen <john.johansen@canonical.com>
(cherry picked from commit a6ac6f4cfc)
2019-06-04 21:51:08 -07:00
John Johansen
d49fd5b9fa tests/regression: fix mount test to use next available loop device
looping through the first 16 loop devices to find a free device will
fail if those mount devices are taken, and unfortunately there are
now services that use an excessive amount of loop devices causing
the regression test to fail.

PR: https://gitlab.com/apparmor/apparmor/merge_requests/379
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Steve Beattie <steve@nxnw.org>
(cherry picked from commit ab0f2af1da)
2019-05-11 22:26:07 -07:00
Christian Boltz
d2e83231f0 Merge branch 'cboltz-fix-deny-hat' into 'apparmor-2.13'
[2.11..2.13] handle_children: Fix denying of adding a hat

See merge request apparmor/apparmor!378

Acked-by: John Johansen <john.johansen@canonical.com>
2019-05-02 22:19:12 +00:00
Christian Boltz
87f91864be
handle_children: Fix denying of adding a hat
Choosing "Deny" when handle_children() asks about adding a hat should
not add that hat, but it should _not_ leave the function because that
means all the other log events that were not migrated to prelog yet will
be lost.

Change "return" to "continue" to fix this.
2019-05-02 22:42:03 +02:00
Christian Boltz
21c3d57f8d Merge branch 'cboltz-link-man' into 'master'
Drop 'to' option for link rules from manpage

See merge request apparmor/apparmor!368

Acked-by: Eric Chiang <ericchiang@google.com>

(cherry picked from commit 041cd95a98)

115a1d89 Drop 'to' option for link rules from manpage
2019-04-29 19:22:13 +00:00
Christian Boltz
388e5be974 Merge branch 'cboltz-gitignore' into 'master'
Add several libapparmor/swig/ruby files to gitignore

See merge request apparmor/apparmor!366

(cherry picked from commit 9c11ce37c6)

7ed1a16a Add several libapparmor/swig/ruby files to gitignore
2019-04-26 16:16:21 +00:00
Christian Boltz
9aaff3ce13 Merge branch 'bugfix/aa-always-logfile-fallback' into 'master'
Fix error 'KeyError: 'logfiles'' when no logprof.conf exists

See merge request apparmor/apparmor!365

Acked-by: Christian Boltz <apparmor@cboltz.de> for 2.12..master

(cherry picked from commit cece787182)

455c4413 aa.py: Ensure there is always a fallback falue for the logfile location
3c7e1668 aa.py: Indicate permission error if log file is found but cannot be opened
2019-04-21 16:48:47 +00:00
Goldwyn Rodrigues
82094950e2 identd: Add network netlink dgram
identd requires access to network netlink dgram.

(cherry picked from commit 1d75abba3f)
PR: https://gitlab.com/apparmor/apparmor/merge_requests/353
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-03-29 01:06:41 -07:00
intrigeri
08f9d16d37 Adjust tests to match base abstraction update.
Since !345 the set of permissions that are granted (get_file_perms_2)
or suggested (propose_file_rules) has changed. These new sets are
expected due to the changes brought by this MR, so let's adjust
the test suite accordingly.

(cherry picked from commit 0170e98f9c)
PR: https://gitlab.com/apparmor/apparmor/merge_requests/358
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-03-29 00:58:11 -07:00
intrigeri
8dff7dc232 base abstraction: allow mr on *.so* in common library paths.
For example, VirtualBox guests have /usr/lib/VBoxOGL.so.

Without this changes, in a VirtualBox VM with VBoxVGA graphics,
at least one Qt5 application (OnionShare) won't start and display:

  ImportError: libGL.so.1: failed to map segment from shared object

… and the system logs have:

  apparmor="DENIED" operation="file_mmap" profile="/usr/bin/onionshare-gui" name="/usr/lib/VBoxOGL.so" pid=11415 comm="onionshare-gui" requested_mask="m" denied_mask="m" fsuid=1000 ouid=0

While this works fine with VBoxSVGA and VMSVGA when 3D acceleration is enabled.

So let's not assume all libraries have a name that starts with "lib".

PR: https://gitlab.com/apparmor/apparmor/merge_requests/345
(cherry picked from commit 5cbb7df95e)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-03-24 00:06:25 -07:00
Simon Deziel
b4f55efcc9 dovecot: master SIGTERM child that are slow to die
When doing a service reload, I noticed the following:

    ```Mar 22 15:52:27 smtp dovecot: master: Warning: SIGHUP received - reloading configuration
    Mar 22 15:52:27 smtp dovecot: imap(simon): Server shutting down. in=35309 out=232805
    Mar 22 15:52:27 smtp dovecot: imap(simon): Server shutting down. in=24600 out=1688166
    Mar 22 15:52:27 smtp dovecot: imap(simon): Server shutting down. in=14026 out=95516
    Mar 22 15:52:27 smtp dovecot: imap(simon): Server shutting down. in=13776 out=141513
    Mar 22 15:52:33 smtp dovecot: master: Warning: Processes aren't dying after reload, sending SIGTERM.
    Mar 22 15:52:33 smtp dovecot: master: Error: service(imap): kill(5806, 15) failed: Permission denied
    Mar 22 15:52:33 smtp dovecot: master: Error: service(imap-login): kill(5804, 15) failed: Permission denied
    Mar 22 15:52:33 smtp dovecot: master: Error: service(config): kill(506, 15) failed: Permission denied
    Mar 22 15:52:33 smtp kernel: [65542.184326] audit: type=1400 audit(1553284353.609:82): apparmor="DENIED" operation="signal" profile="dovecot" pid=414 comm="dovecot" requested_mask="send" denied_mask="send" signal=term peer="/usr/lib/dovecot/imap"
    Mar 22 15:52:33 smtp kernel: [65542.197596] audit: type=1400 audit(1553284353.625:83): apparmor="DENIED" operation="signal" profile="dovecot" pid=414 comm="dovecot" requested_mask="send" denied_mask="send" signal=term peer="/usr/lib/dovecot/imap-login"
    Mar 22 15:52:33 smtp kernel: [65542.197635] audit: type=1400 audit(1553284353.625:84): apparmor="DENIED" operation="signal" profile="dovecot" pid=414 comm="dovecot" requested_mask="send" denied_mask="send" signal=term peer="/usr/lib/dovecot/config"
    Mar 22 15:52:36 smtp dovecot: imap(simon): Server shutting down. in=17882 out=104004
    ```

The server was heavily loaded which is probably why it ended up trying to SIGTERM those.

Signed-off-by: Simon Deziel <simon@sdeziel.info>
(cherry picked from commit f01fd38ca0)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-03-22 16:04:52 -07:00
Christian Boltz
d4f1f9310b Merge branch 'cboltz-subshell' into 'master'
remove_profiles(): Fix returning $retval

See merge request apparmor/apparmor!352

Acked-by: Eric Chiang <ericchiang@google.com> for 2.11..master

(cherry picked from commit c9148a304c)

be02f008 remove_profiles(): Fix returning $retval
2019-03-18 17:46:22 +00:00
Christian Boltz
75236d62e2 Merge branch 'cboltz-utils-keywords' into 'master'
update network keyword list in utils and add test

See merge request apparmor/apparmor!350

Acked-by: Eric Chiang <ericchiang@google.com> for 2.12..master

(cherry picked from commit dc010bc034)

49849ed7 update network keyword list in utils and add test
2019-03-18 16:02:42 +00:00
Christian Boltz
e6a25f6971 Merge branch 'cboltz-network-keywords' into 'master'
apparmor.d manpage: update list of network domain keywords

See merge request apparmor/apparmor!349

Acked-by: Eric Chiang <ericchiang@google.com> for 2.12..master

(cherry picked from commit 6416ccebf6)

6b276563 apparmor.d manpage: update list of network domain keywords
2019-03-14 21:20:14 +00:00
Tyler Hicks
b502110dcf libapparmor: Fix variable name overlap in merge() macro
The calling function and the merge() macro both make use of a variable
named "i" but this causes problems when merging. The aa_policy_cache.sh
test script experiences "bad file descriptor" failures due to the merged
list containing invalid fd values (-1).

Fix this by renaming merge()'s index variables from i and j to y and z
to hopefully prevent future overlap. The better fix here would be to
convert merge() to a function but that's a more intrusive change and I
don't have an easy way to test the overlay feature.

PR: https://gitlab.com/apparmor/apparmor/merge_requests/348
(cherry picked from commit d7ac07afc4)
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-03-12 23:22:26 -07:00
Tyler Hicks
01aec04bd6 libapparmor: Fix segfault when loading policy cache files
qsort()'s _size_ parameter is used to indicate the size of the elements
in the _base_ array parameter. Adjust the third argument to qsort() to
indicate that we're dealing with an array of struct dirent pointers
rather than an array of struct dirent.

PR: https://gitlab.com/apparmor/apparmor/merge_requests/348
(cherry picked from commit 8b21871820)
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-03-12 23:21:41 -07:00
Tyler Hicks
68eb3be2ae tests: Teach aa_policy_cache.sh about the cache location and subdirs
Adjust aa_policy_cache.sh to handle the additional layer in the
directory hierarchy when determining where the policy cache binaries are
stored. This is needed due to the multicache changes that allow multiple
policy caches to exist on a single system.

Differentiate between the cache location (the top level directory
containing all caches) and the cache directory (the directory used to
store the cached policies).

Use the libapparmor wrapper to get the cache directory for the given
cache location and the features of the currently running kernel.

PR: https://gitlab.com/apparmor/apparmor/merge_requests/348
(cherry picked from commit f31457b26e)
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-03-12 23:20:48 -07:00
Tyler Hicks
9374f419a0 tests: Add option to dump policy cache dir with the libapparmor wrapper
Print the policy cache directory path for the features of the currently
running kernel to stdout so that the aa_policy_cache.sh regression test
script can make use of it when writing out binary policy files.

PR: https://gitlab.com/apparmor/apparmor/merge_requests/348
(cherry picked from commit ad81ea0e67)
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-03-12 23:20:24 -07:00
John Johansen
5704fba8d9 library: fix segfault in overlaydirat_for_each
(cherry picked from commit abbca9435f)
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Tyler Hicks <tyler.hicks@canonical.com>
2019-03-12 16:19:59 -07:00
Eric Chiang
a75ae4497c parser: determine xmatch priority based on smallest DFA match
The length of a xmatch is used to prioritize multiple profiles that
match the same path, with the intent that the more specific match wins.
Currently, the length of a xmatch is computed by the position of the
first regex character.

While trying to work around issues with no_new_privs by combining
profiles, we noticed that the xmatch length computation doesn't work as
expected for multiple regexs. Consider the following two profiles:

    profile all /** { }
    profile bins /{,usr/,usr/local/}bin/** { }

xmatch_len is currently computed as "1" for both profiles, even though
"bins" is clearly more specific.

When determining the length of a regex, compute the smallest possible
match and use that for xmatch priority instead of the position of the
first regex character.

(cherry picked from commit cc09794fbd)
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-03-12 04:28:53 -07:00
John Johansen
4454ed77fd policy: Revert /usr/{bin,sbin}/ alternation in dnsmasq profile name
Using /usr/{bin,sbin}/dbsmasq as both the profile name and attachment break compatibility with the peer=/usr/sbin/dnsmasq rule, in the libvirtd profile.

Instead specify the profile has the old name of /usr/sbin/dnsmasq and specify the attachment separately. This looks funny but it avoids breaking libvirtd and still provides the broader attachment need by distros that have merged sbin into bin.

References: https://bugzilla.opensuse.org/show_bug.cgi?id=1127073

I propose this patch for 2.12 and 2.13. (Older versions didn't get the alternation, master has a profile name added.)

PR: https://gitlab.com/apparmor/apparmor/merge_requests/346
Signed-off-by: John Johansen <john.johansen@canonical.com>
2019-03-07 23:35:54 +00:00
Christian Boltz
0afd232e5b
dnsmasq: Work around breakage caused by {bin,sbin} alternation
Even if we expected it to stay compatible with peer=/usr/sbin/dnsmasq in
the libvirtd profile, practise shows that we were wrong.

This patch adds a tricky workaround so that the profile name doesn't
change, but the profile will attach even on distributions with merged
bin and sbin. (Credits for this crazy idea go to John ;-)

It also re-adds the libvirtd peer name /usr/sbin/libvirtd to avoid
breaking libvirtd.

References: https://bugzilla.opensuse.org/show_bug.cgi?id=1127073
and the discussion in https://gitlab.com/apparmor/apparmor/merge_requests/346
2019-03-07 21:55:47 +01:00
intrigeri
a7dab42516 Merge branch 'bug1816470' into 'master'
tunables/share: fix buggy syntax that broke the ~/.local/share part of the @{user_share_dirs} tunable

See merge request apparmor/apparmor!344

(cherry picked from commit 2ed3763a2f)

cdeb6185 tunables/share: fix buggy syntax that broke the ~/.local/share part of the...
2019-02-25 06:49:40 +00:00
John Johansen
394d086e58 parser: Fix parser failing to handle errors when setting up work
The parser is not correctly handling some error conditions when
dealing with work units. Failure to spawn work, access files, etc
should be returned where appropriate, and be able to abort processing
if abort_on_error is set.

In addition some errors are leading to a direct exit without checking
for abort_on_error.

BugLink: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=921866
BugLink: http://bugs.launchpad.net/bugs/1815294

Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Eric Chiang <ericchiang@google.com>
(backported from commit cb43e57d27)

Conflicts:
	parser/parser_main.c
Reason:
	commit 48a32b78b1 not backported
2019-02-22 02:35:22 -08:00