summaryrefslogtreecommitdiff
path: root/src/util/util.h
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2010-02-16 15:53:56 +0100
committerStephen Gallagher <sgallagh@redhat.com>2010-02-23 16:16:23 -0500
commit978bea5902ece9b9f01d1d6525dbe0889a410ffc (patch)
treed83a94851cb6e3fe10fdbfcee1757190c15ab4eb /src/util/util.h
parente0bb119bdc1549d731f371202428c0cb667d3388 (diff)
downloadsssd-978bea5902ece9b9f01d1d6525dbe0889a410ffc.tar.gz
sssd-978bea5902ece9b9f01d1d6525dbe0889a410ffc.tar.bz2
sssd-978bea5902ece9b9f01d1d6525dbe0889a410ffc.zip
Check and set permissions on SBUS sockets
Diffstat (limited to 'src/util/util.h')
-rw-r--r--src/util/util.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/util/util.h b/src/util/util.h
index 945e20d0..5d2dff28 100644
--- a/src/util/util.h
+++ b/src/util/util.h
@@ -33,6 +33,7 @@
#include <time.h>
#include <pcre.h>
#include <sys/types.h>
+#include <sys/stat.h>
#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,