lib/bugzilla/utils.rb
def save_config(opts, conf)
      fname = opts[:config].nil? ? @defaultyamlfile : opts[:config]
      if File.exist?(fname)
        st = File.lstat(fname)
        if st.mode & 0o600 != 0o600
          raise format('The permissions of %s has to be 0600', fname)
        end
      end
      File.open(fname, 'w') { |f| f.chmod(0o600); f.write(conf.to_yaml) }
    end
def save_config(opts, conf)
      fname = opts[:config].nil? ? @defaultyamlfile : opts[:config]
      if File.exist?(fname)
        st = File.lstat(fname)
        if st.mode & 0o600 != 0o600
          raise format('The permissions of %s has to be 0600', fname)
        end
      end
      File.open(fname, 'w') { |f| f.chmod(0o600); f.write(conf.to_yaml) }
    end
def read_config