lib/util: Add functions to escape log lines but not break all non-ascii
authorGary Lockyer <gary@catalyst.net.nz>
Tue, 28 Feb 2017 22:10:29 +0000 (11:10 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 29 Mar 2017 00:37:26 +0000 (02:37 +0200)
commiteacb5aead71299b6bebbddbaf7c9a3d545f9151b
tree20daf5094bcf9ff3beb89cf8301e58c44c3ce6dd
parent6adcaf16482fbca1ca8eeb80a2a7029d415c423f
lib/util: Add functions to escape log lines but not break all non-ascii

We do not want to turn every non-ascii username into a pile of hex, so we instead focus
on avoding newline insertion attacks and other low control chars

Pair-programmed-by: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
lib/util/tests/util_str_escape.c [new file with mode: 0644]
lib/util/util_str_escape.c [new file with mode: 0644]
lib/util/util_str_escape.h [new file with mode: 0644]
lib/util/wscript_build
source4/torture/local/local.c
source4/torture/local/wscript_build