string_helpers: add kstrdup_quotable_cmdline
authorKees Cook <keescook@chromium.org>
Wed, 20 Apr 2016 22:46:24 +0000 (15:46 -0700)
committerJames Morris <james.l.morris@oracle.com>
Thu, 21 Apr 2016 00:47:26 +0000 (10:47 +1000)
commit0d0443288f2244d7054796086e481ddef6abdbba
tree3e7aa0126218b2bcec350ae3b3d1ec41e00e14a2
parentb53f27e4fa0d0e72d897830cc4f3f83d2a25d952
string_helpers: add kstrdup_quotable_cmdline

Provide an escaped (but readable: no inter-argument NULLs) commandline
safe for logging.

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: James Morris <james.l.morris@oracle.com>
include/linux/string_helpers.h
lib/string_helpers.c