]> Savannah Git Hosting - gnulib.git/commit
read-file: add RF_SENSITIVE flag
authorDaiki Ueno <ueno@gnu.org>
Tue, 26 May 2020 08:22:37 +0000 (10:22 +0200)
committerDaiki Ueno <ueno@gnu.org>
Wed, 27 May 2020 12:14:37 +0000 (14:14 +0200)
commita2080f6506701d8d9ca5111d628607a6a8013f61
tree21f5bc6031441e9c34718eeadbe5f6160a8a56e0
parente4a38aadac2e90c6dfb317d0845746c200cf6697
read-file: add RF_SENSITIVE flag

* lib/read-file.h (RF_SENSITIVE): New define.
* lib/read-file.c (fread_file, read_file): Take into account of
RF_SENSITIVE flag.
* modules/read-file (Depends-on): Add explicit_bzero.
This adds an alternative behavior of those functions to explicitly
clear the internal memory block when it becomes unused.  This is
useful for reading sensitive information from a file.
ChangeLog
lib/read-file.c
lib/read-file.h
modules/read-file
tests/test-read-file.c