[Groonga-commit] groonga/groonga at 97b28f3 [master] Reduce needless write permission

Back to archive index

Kouhei Sutou null+****@clear*****
Wed Sep 16 12:14:37 JST 2015


Kouhei Sutou	2015-09-16 12:14:37 +0900 (Wed, 16 Sep 2015)

  New Revision: 97b28f37de2a825e85f0b8037ff5d714048456bb
  https://github.com/groonga/groonga/commit/97b28f37de2a825e85f0b8037ff5d714048456bb

  Message:
    Reduce needless write permission

  Modified files:
    lib/io.c

  Modified: lib/io.c (+1 -1)
===================================================================
--- lib/io.c    2015-09-16 12:04:25 +0900 (c193965)
+++ lib/io.c    2015-09-16 12:14:37 +0900 (f898a68)
@@ -487,7 +487,7 @@ grn_io_detect_type(grn_ctx *ctx, const char *path)
   struct _grn_io_header h;
   uint32_t res = 0;
   int fd;
-  grn_open(fd, path, O_RDWR | GRN_OPEN_FLAG_BINARY);
+  grn_open(fd, path, O_RDONLY | GRN_OPEN_FLAG_BINARY);
   if (fd != -1) {
     struct stat s;
     if (fstat(fd, &s) != -1 && s.st_size >= sizeof(struct _grn_io_header)) {
-------------- next part --------------
HTML����������������������������...
下載 



More information about the Groonga-commit mailing list
Back to archive index