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

Allocate a NULL-terminated file path with special characters escaped,
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