fileio: read_full_file_full() also warns when file is world readable and secure flag is set

This commit is contained in:
Yu Watanabe
2019-04-09 15:50:22 +09:00
parent 7a309a8c63
commit 50caae7b92
2 changed files with 7 additions and 3 deletions
+2 -2
View File
@@ -48,9 +48,9 @@ int read_full_file_full(const char *filename, ReadFullFileFlags flags, char **co
static inline int read_full_file(const char *filename, char **contents, size_t *size) {
return read_full_file_full(filename, 0, contents, size);
}
int read_full_stream_full(FILE *f, ReadFullFileFlags flags, char **contents, size_t *size);
int read_full_stream_full(FILE *f, const char *filename, ReadFullFileFlags flags, char **contents, size_t *size);
static inline int read_full_stream(FILE *f, char **contents, size_t *size) {
return read_full_stream_full(f, 0, contents, size);
return read_full_stream_full(f, NULL, 0, contents, size);
}
int verify_file(const char *fn, const char *blob, bool accept_extra_nl);