debugd: Encode non-UTF8 log content in base64.
This CL encodes any non-UTF8 log content in base64 before returning the
content over DBus as the DBus library gives an assertion on non-UTF8
strings.
BUG=chromium-os:35310
TEST=Manually inject non-UTF8 characters to /var/log/messages, e.g.
echo -e '\xef\xbf\xbc' >> /var/log/messages
and then verify that the 'syslog' section in chrome://system shows a
base64-encoded string of /var/log/messages.
Change-Id: Ib907c19aee9270b7984f3978b3fa58fd86b52738
Reviewed-on: https://gerrit.chromium.org/gerrit/35531
Reviewed-by: Darin Petkov <petkov@chromium.org>
Commit-Ready: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
2 files changed