From 1c0b2ff21d7ae020d501be0b583f206eb5909aab Mon Sep 17 00:00:00 2001 From: Andrea Cardaci Date: Wed, 30 May 2018 12:12:48 +0200 Subject: [PATCH] Make the SUID boilerplate code copy-paste friendly Even when the sudo password is asked. --- _layouts/bin.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/_layouts/bin.html b/_layouts/bin.html index b700b4b..f25ca25 100644 --- a/_layouts/bin.html +++ b/_layouts/bin.html @@ -28,8 +28,7 @@ layout: common {% capture code %} {%- if function_name == 'suid-enabled' or function_name == 'suid-limited' %} cp $(which {{ bin_name }}) . -sudo chown 0 ./{{ bin_name }} -sudo chmod +s ./{{ bin_name }} +sudo sh -c 'chown 0 ./{{ bin_name }}; chmod +s ./{{ bin_name }}' {% endif %} {{ example.code }} {% endcapture %}