Author Topic: Sentry v1.02 Installation Problems  (Read 8345 times)

Ron Wingfield

  • wiki
  • **
  • Posts: 1
  • Karma: +0/-0
Sentry v1.02 Installation Problems
« on: July 12, 2015, 12:19:38 pm »
I'm trying to install sentry v1.02 into /usr/local/var/db/sentry.  The OS is FreeBSD 10.1-RELEASE and Perl v5.22.0.  I've downloaded sentry.pl, diff'ed it for local mods, set  my $root_dir  = '/usr/local/var/db/sentry'; and as simply instructed, run:
Code: [Select]
root@alpha:/usr/local/var/db/sentry # perl sentry.pl
I've had the previous version of Sentry running successfully (I was very pleased with the performance!), but I upgraded the Perl version to 5.22 (deleted all old versions) -- after that upgrade, sentry quit capturing and black-listing abusers.  For those of you reading this, Matt Simerson explained via eMail, that he has made some changes that involved path issues and now utilizes the /usr/bin/env utility  . . .which is why I'm attempting to install the latest version of sentry.

***   Edits   ***
Can anyone . . suggest what might (or might not) be in play here?   

Well . . .my post on the FreeBSD Forum, /usr/bin/env perl - Failure when invoked by hosts.allow spawn rule  describes what I have learned about the FreeBSD port of Perl 5.2+.  In fact, there is not a problem with Sentry, per se, but rather with the interaction of the /usr/bin/env utility and (I think) the spawned or execl'd process (i.e., parent forks, spawns child, parent forgets about child and continues, child does it's thing and dies.)   It's thing, of course, is invocation of the sentry.pl Perl script.

Problem is . . .I think, is that the env's path to ./perl is lost during the spawned fork.  And, as far as I can tell, the failed call just drops off into the ether . . .no complaint, no error message, no log entry . . .just solid gone.  Consequently, the sentry.pl script is never executed.

To resolve the problem (as least for now - I'm waiting on suggestions from the FreeBSD community) I had to hard-code the path to perl in the sentry.pl script to , i.e., #!/usr/local/bin/perl, rather than use #!/usr/bin/env perl.
« Last Edit: July 14, 2015, 04:38:33 pm by Ron Wingfield »

matt

  • Administrator
  • Wizard
  • *****
  • Posts: 635
  • Karma: +0/-0
    • Matt's Personal Site
Re: Sentry v1.02 Installation Problems
« Reply #1 on: July 23, 2015, 09:55:07 am »
I have since released sentry 1.03, which rewrites the shebang at install time, with the full path to whichever version of perl is running it when you install.