From bc28ff95e287a6794890c75348075fa9bd7af2f7 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 9 Oct 2013 20:03:31 +0000 Subject: changing UNIX domain socket access control to file permissions checks, instead of UDS credentials (#2887) --- src/include/gnunet_disk_lib.h | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'src/include/gnunet_disk_lib.h') diff --git a/src/include/gnunet_disk_lib.h b/src/include/gnunet_disk_lib.h index f6aa3d070..7de64abff 100644 --- a/src/include/gnunet_disk_lib.h +++ b/src/include/gnunet_disk_lib.h @@ -265,7 +265,7 @@ enum GNUNET_DISK_PipeEnd * Checks whether a handle is invalid * * @param h handle to check - * @return GNUNET_YES if invalid, GNUNET_NO if valid + * @return #GNUNET_YES if invalid, #GNUNET_NO if valid */ int GNUNET_DISK_handle_invalid (const struct GNUNET_DISK_FileHandle *h); @@ -506,6 +506,21 @@ GNUNET_DISK_pipe_handle (const struct GNUNET_DISK_PipeHandle *p, */ struct GNUNET_DISK_FileHandle * GNUNET_DISK_get_handle_from_w32_handle (HANDLE osfh); +#else + +/** + * Update POSIX permissions mask of a file on disk. If both argumets + * are #GNUNET_NO, the file is made world-read-write-executable (777). + * + * @param fn name of the file to update + * @param require_uid_match #GNUNET_YES means 700 + * @param require_gid_match #GNUNET_YES means 770 unless @a require_uid_match is set + */ +void +GNUNET_DISK_fix_permissions (const char *fn, + int require_uid_match, + int require_gid_match); + #endif -- cgit v1.2.3