Skip to content

Commit

Permalink
Stop to use world writable permission for newly created files
Browse files Browse the repository at this point in the history
If process don't have umask (= umask(0)) such as daemon mode
groonga-httpd, newly created files have world writable permission. It's
not good for security reason.

It's backward incompatibility change.
  • Loading branch information
kou committed Dec 29, 2014
1 parent a15474e commit 7286bca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/dat/file-impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
#ifdef WIN32
# define GRN_IO_FILE_CREATE_MODE (GENERIC_READ | GENERIC_WRITE)
#else /* WIN32 */
# define GRN_IO_FILE_CREATE_MODE 0666
# define GRN_IO_FILE_CREATE_MODE 0644
#endif /* WIN32 */

namespace grn {
Expand Down
2 changes: 1 addition & 1 deletion lib/grn_io.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ extern "C" {
#ifdef WIN32
# define GRN_IO_FILE_CREATE_MODE (GENERIC_READ | GENERIC_WRITE)
#else /* WIN32 */
# define GRN_IO_FILE_CREATE_MODE 0666
# define GRN_IO_FILE_CREATE_MODE 0644
#endif /* WIN32 */

typedef enum {
Expand Down

0 comments on commit 7286bca

Please sign in to comment.