1
0
mirror of https://github.com/OpenNebula/one.git synced 2024-12-22 13:33:52 +03:00

Bug #2257: Better label for ONE commands for the sudoers file

This commit is contained in:
Jaime Melis 2013-08-15 15:05:00 -04:00
parent cb15b27ea0
commit 886cc05b8b

View File

@ -62,10 +62,10 @@ __END__
Defaults !requiretty
Defaults secure_path = /sbin:/bin:/usr/sbin:/usr/bin
<% KEYS.each do |k|; v = abs_cmds["ONE_#{k}"] %>
<% KEYS.each do |k|; l = "ONE_#{k}"; v = abs_cmds[l] %>
<% if !v.nil? %>
Cmnd_Alias <%= k %> = <%= v.join(", ") %>
Cmnd_Alias <%= l %> = <%= v.join(", ") %>
<% end %>
<% end %>
oneadmin ALL=(ALL) NOPASSWD: <%= KEYS.select{|k| l="ONE_#{k}"; l if !abs_cmds[l].nil?}.join(", ") %>
oneadmin ALL=(ALL) NOPASSWD: <%= KEYS.select{|k| !abs_cmds["ONE_#{k}"].nil?}.collect{|k| "ONE_#{k}"}.join(", ") %>