From f2bb091bd1bb2a4672ba03173595e9a01564f8ce Mon Sep 17 00:00:00 2001 From: Samuel Cochran Date: Tue, 12 Mar 2013 17:43:11 +1100 Subject: [PATCH] denyhosts: 10.8 has no secure.log and logs sshd to system.log Closes Homebrew/homebrew#18418. Signed-off-by: Adam Vandenberg --- Formula/denyhosts.rb | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Formula/denyhosts.rb b/Formula/denyhosts.rb index c4b87aa77f..6f3ed8f061 100644 --- a/Formula/denyhosts.rb +++ b/Formula/denyhosts.rb @@ -22,6 +22,13 @@ class Denyhosts < Formula inreplace 'DenyHosts/constants.py' do |s| s.change_make_var! 'CONFIG_FILE', "'#{etc}/denyhosts.cfg'" end + + unless MacOS.mountain_lion_or_newer? + inreplace 'denyhosts.cfg' do |s| + s.gsub! %r{^SECURE_LOG\s*=\s*/private/var/log/system\.log}, 'SECURE_LOG = /private/var/log/secure.log' + end + end + # Install mostly into libexec (a la Duplicity) system "python", "setup.py", "install", "--prefix=#{prefix}", @@ -262,10 +269,10 @@ index 0000000..a140844 +# +# Mac OS X (v10.4 or greater - +# also refer to: http://www.denyhosts.net/faq.html#macos -+SECURE_LOG = /private/var/log/secure.log ++#SECURE_LOG = /private/var/log/secure.log +# +# Mac OS X (v10.3 or earlier): -+#SECURE_LOG=/private/var/log/system.log ++SECURE_LOG=/private/var/log/system.log +# +######################################################################## +