Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARPwatch improvements. Issue #10770 #912

Merged
merged 1 commit into from
Aug 19, 2020

Conversation

vktg
Copy link
Contributor

@vktg vktg commented Jul 22, 2020

Comment on lines 67 to 70
if (!empty($notifications_recipient)) {
$rc['start'] .= ' -w '.escapeshellarg($notifications_recipient);
}
$rc['start'] .= "\n";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These lines do not need to be indented the extra spaces here. They should be aligned with line 60. Lines 61-66 are indented more as they are continuations of the statement on line 60.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@@ -228,7 +232,7 @@ $fd = fopen('php://stdin','r');
$message = stream_get_contents($fd);
fclose($fd);

if (false !== $message) {
if ((false !== $message) && (false === strpos($message, ': Cron '))) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be done unconditionally in this way? The feature request mentioned adding a checkbox/option for it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checkbox added, but this is weird behavior anyway
https://redmine.pfsense.org/issues/8454

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, since arpwatch can only use /usr/sbin/sendmail to send mail, anything else that wants /usr/sbin/sendmail will also take advantage of it being there (Notably Cron). There isn't really a good way around that as far as I'm aware. Unless the script can check something in its environment to tell it's being called by arpwatch specifically and nothing else.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it should be OK with this Disable Cron emails checkbox for now

@netgate-git-updates netgate-git-updates merged commit 180a4c7 into pfsense:devel Aug 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants