From 404ee19742e6890de5bd92ea3fc99a94358ef140 Mon Sep 17 00:00:00 2001 From: William Melody Date: Wed, 1 Mar 2017 19:32:49 -0800 Subject: [PATCH] Add `_verify_write_permissions()` checks to `block` and `unblock`. --- hosts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hosts b/hosts index 998d732..7b8be39 100755 --- a/hosts +++ b/hosts @@ -756,6 +756,7 @@ Description: for IPv4 and both \`fe80::1%lo0\` and \`::1\` for IPv6. HEREDOC block() { + _verify_write_permissions "$@" if [[ -z "${1}" ]] then ${_ME} help block @@ -1173,6 +1174,7 @@ Description: Unblock a given hostname by removing its entries from the hosts file. HEREDOC unblock() { + _verify_write_permissions "$@" if [[ -z "${1}" ]] then ${_ME} help unblock