Make the SUID boilerplate code copy-paste friendly

Even when the sudo password is asked.
This commit is contained in:
Andrea Cardaci 2018-05-30 12:12:48 +02:00
parent 66f60d7ef6
commit 1c0b2ff21d

View File

@ -28,8 +28,7 @@ layout: common
{% capture code %} {% capture code %}
{%- if function_name == 'suid-enabled' or function_name == 'suid-limited' %} {%- if function_name == 'suid-enabled' or function_name == 'suid-limited' %}
cp $(which {{ bin_name }}) . cp $(which {{ bin_name }}) .
sudo chown 0 ./{{ bin_name }} sudo sh -c 'chown 0 ./{{ bin_name }}; chmod +s ./{{ bin_name }}'
sudo chmod +s ./{{ bin_name }}
{% endif %} {% endif %}
{{ example.code }} {{ example.code }}
{% endcapture %} {% endcapture %}