Merge pull request #83 from abf/rosa-build:81-remove_entry_secure-does-not-work
[refs #81]: ArgumentError: parent directory is world writable, FileUtils#remove_entry_secure does not work
This commit is contained in:
commit
0035d54fe2
|
@ -21,7 +21,9 @@ class KeyPair < ActiveRecord::Base
|
||||||
protected
|
protected
|
||||||
|
|
||||||
def check_keys
|
def check_keys
|
||||||
dir = Dir.mktmpdir('keys-', "#{APP_CONFIG['root_path']}/tmp")
|
tmp = "#{APP_CONFIG['root_path']}/tmp"
|
||||||
|
system "sudo chown `whoami` #{tmp} && chmod 1777 #{tmp}"
|
||||||
|
dir = Dir.mktmpdir('keys-', tmp)
|
||||||
begin
|
begin
|
||||||
%w(pubring secring).each do |kind|
|
%w(pubring secring).each do |kind|
|
||||||
filename = "#{dir}/#{kind}"
|
filename = "#{dir}/#{kind}"
|
||||||
|
|
Loading…
Reference in New Issue