[Groonga-commit] droonga/fluent-plugin-droonga at f2e7a70 [master] Enforce umask to be 022

Back to archive index

Yoji Shidara null+****@clear*****
Thu Feb 27 17:05:10 JST 2014


Yoji Shidara	2014-02-27 17:05:10 +0900 (Thu, 27 Feb 2014)

  New Revision: f2e7a70853f91c62fb9f0b90616abb9464b02590
  https://github.com/droonga/fluent-plugin-droonga/commit/f2e7a70853f91c62fb9f0b90616abb9464b02590

  Message:
    Enforce umask to be 022
    
    This is needed to make umask 022 when fluentd is daemonized.

  Modified files:
    lib/droonga/slice.rb

  Modified: lib/droonga/slice.rb (+5 -0)
===================================================================
--- lib/droonga/slice.rb    2014-02-27 15:06:09 +0900 (8194aa0)
+++ lib/droonga/slice.rb    2014-02-27 17:05:10 +0900 (1a4d07b)
@@ -58,6 +58,7 @@ module Droonga
 
     private
     def ensure_database
+      enforce_umask
       database_path = @options[:database]
       return if File.exist?(database_path)
       FileUtils.mkdir_p(File.dirname(database_path))
@@ -70,6 +71,10 @@ module Droonga
       end
     end
 
+    def enforce_umask
+      File.umask(022)
+    end
+
     def start_supervisor
       @supervisor = ServerEngine::Supervisor.new(Server, Worker) do
         force_options = {
-------------- next part --------------
HTML����������������������������...
Download 



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