Open doksu opened 8 years ago
Thank you. I will merge this in the 2.0 branch.
I'm not very familiar with SELinux, but you want to add a TYPE and ROLE to the sudoers rule right? Why not add them as seperate parameters?
Thanks Arnoud and sorry for the late replay. I did think about adding them as separate parameters but it seemed unnecessary because although sudo doesn't require both arguments, in practice I can't think of a situation where only the TYPE or ROLE arguments would be provided. Having said that, it certainly wouldn't hurt to separate them so I'll be guided by you as to what you think is best.
On a different note, if the 'context' variable is undefined, it seems to cause problems in the template. I've tried to address this using a few different approaches but to no avail; would you have any suggestions about how best to handle undefined variables in the template?
I'll confess I'm also interested in this feature. While I doubt I'd ever set only TYPE or ROLE, it would be nice to have the option.
I believe
<% if @myvar ? @myvar %>
should do the trick for the undef, but my ruby/erb is not very good....
As per my e-mail, could you please merge this change?
N.B. Further testing still required. :)
Thanks, Doug