From 978bea5902ece9b9f01d1d6525dbe0889a410ffc Mon Sep 17 00:00:00 2001 From: Sumit Bose Date: Tue, 16 Feb 2010 15:53:56 +0100 Subject: Check and set permissions on SBUS sockets --- src/util/util.h | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'src/util/util.h') diff --git a/src/util/util.h b/src/util/util.h index 945e20d00..5d2dff28f 100644 --- a/src/util/util.h +++ b/src/util/util.h @@ -33,6 +33,7 @@ #include #include #include +#include #include "config.h" @@ -247,8 +248,22 @@ int sss_parse_name(TALLOC_CTX *memctx, int backup_file(const char *src, int dbglvl); /* from check_and_open.c */ +enum check_file_type { + CHECK_DONT_CHECK_FILE_TYPE = -1, + CHECK_REG, + CHECK_DIR, + CHECK_CHR, + CHECK_BLK, + CHECK_FIFO, + CHECK_LNK, + CHECK_SOCK +}; +errno_t check_file(const char *filename, const int uid, const int gid, + const int mode, enum check_file_type type, + struct stat *caller_stat_buf); errno_t check_and_open_readonly(const char *filename, int *fd, const uid_t uid, - const gid_t gid, const mode_t mode); + const gid_t gid, const mode_t mode, + enum check_file_type type); /* from util.c */ int split_on_separator(TALLOC_CTX *mem_ctx, const char *str, -- cgit