Skip to content

Commit

Permalink
Merge pull request #243 from MalloZup/15-files
Browse files Browse the repository at this point in the history
Remove unnecessary chmod
  • Loading branch information
MalloZup authored Mar 2, 2021
2 parents dc7ce1d + 9288120 commit af555ad
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 7 deletions.
1 change: 0 additions & 1 deletion hawk/app/lib/crm_script.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ def run(jsondata, rootpw)
tmpf = Tempfile.new 'crmscript'
tmpf.write("script json \"#{cmd}\"")
tmpf.close
File.chmod(0666, tmpf.path)

if rootpw.nil?
cmdline = ['/usr/sbin/hawk_invoke', user, 'crm', '-f', tmpf.path]
Expand Down
5 changes: 0 additions & 5 deletions hawk/app/lib/invoker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,6 @@ def crm_configure_load_update(cmd)
begin
f << cmd
f.close
# Evil to allow unprivileged user running crm shell to read the file
# TODO(should): can we just allow group (probably ok live, but no
# good for testing when running as root), or some other alternative
# with piping data to crm?
File.chmod(0666, f.path)
CrmEvents.instance.push "crm configure\n#{cmd}\n" unless @no_log
result = crm '-F', 'configure', 'load', 'update', f.path
ensure
Expand Down
1 change: 0 additions & 1 deletion hawk/app/models/report.rb
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ def graph(hb_report, path, format = :svg)
require "tempfile"
tmpfile = Tempfile.new("hawk_dot")
tmpfile.close
File.chmod(0666, tmpfile.path)
_out, err, status = Util.capture3('crm_simulate', '-x', tpath.to_s, format == :xml ? "-G" : "-D", tmpfile.path.to_s)
rc = status.exitstatus

Expand Down

0 comments on commit af555ad

Please sign in to comment.