summaryrefslogtreecommitdiff
path: root/src/basic/fileio.h
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2019-04-08 03:48:30 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2019-04-09 15:50:22 +0900
commit7a309a8c63a5b090f093e561dadc47b576afa569 (patch)
tree804c26d8f10e420fff81f90900a4d169a6a7d7bb /src/basic/fileio.h
parent15f8f026cf73b3a9c185897e184861c5f72c3862 (diff)
downloadsystemd-7a309a8c63a5b090f093e561dadc47b576afa569.tar.gz
fileio: introduce warn_file_is_world_accessible()
Diffstat (limited to 'src/basic/fileio.h')
-rw-r--r--src/basic/fileio.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/basic/fileio.h b/src/basic/fileio.h
index b5b34fe1c3..93e972c2ee 100644
--- a/src/basic/fileio.h
+++ b/src/basic/fileio.h
@@ -5,6 +5,7 @@
#include <stdbool.h>
#include <stddef.h>
#include <stdio.h>
+#include <sys/stat.h>
#include <sys/types.h>
#include "macro.h"
@@ -86,3 +87,5 @@ static inline int read_nul_string(FILE *f, size_t limit, char **ret) {
}
int safe_fgetc(FILE *f, char *ret);
+
+int warn_file_is_world_accessible(const char *filename, struct stat *st, const char *unit, unsigned line);