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:
parent
cb15b27ea0
commit
886cc05b8b
@ -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(", ") %>
|
||||
|
Loading…
Reference in New Issue
Block a user