search for: chown_logs

Displaying 2 results from an estimated 2 matches for "chown_logs".

2012 Oct 02
3
[PATCH] chowning /dev/null should be guarded against
...list, so please Cc: me. --- lib/unicorn/util.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/unicorn/util.rb b/lib/unicorn/util.rb index cde2563..6b6cca2 100644 --- a/lib/unicorn/util.rb +++ b/lib/unicorn/util.rb @@ -15,7 +15,7 @@ module Unicorn::Util def self.chown_logs(uid, gid) ObjectSpace.each_object(File) do |fp| - fp.chown(uid, gid) if is_log?(fp) + fp.chown(uid, gid) if is_log?(fp)&& fp.path != "/dev/null" end end # :startdoc: -- 1.7.12.1
2011 Jun 16
7
[PATCH] replace fchmod()-based heartbeat with raindrops
...ead. This method should only be used if you need # fine-grained control of exactly when you want to change permissions @@ -36,12 +77,12 @@ class Unicorn::Worker < Struct.new(:nr, :tmp, :switched) uid = Etc.getpwnam(user).uid gid = Etc.getgrnam(group).gid if group Unicorn::Util.chown_logs(uid, gid) - tmp.chown(uid, gid) + @tmp.chown(uid, gid) if @tmp if gid && Process.egid != gid Process.initgroups(user, gid) Process::GID.change_privilege(gid) end Process.euid != uid and Process::UID.change_privilege(uid) - self.switched = true + @swi...