Commit Graph
28 Commits
Author SHA1 Message Date
singhharsh1708 d0731402bd fix: verify zmx10 shared memory before polling monitor state 2026-11-20 01:33:14 +05:30
Jash d77393b875 fix: zmx10 alarm output after PREALARM and replacing pending timers refs #6354 2026-11-16 12:25:59 +05:30
singhharsh1708 e7ef345c24 fix: x10 alarm input triggers an alarm instead of a zero score that never alarms 2026-11-16 04:35:18 +05:30
Jash 27db5261d0 fix: close the client socket on an invalid unit code in zmx10 refs #5732 2026-11-14 17:53:21 +05:30
Steve GilvarryandClaude Opus 5 ba49bbb33c fix: make the Perl scripts' taint-safe PATH configurable
The scripts run under -T, so they cannot trust the caller's PATH and set
their own. Sixteen of them hardcoded /bin:/usr/bin:/usr/local/bin, which
assumes everything they shell out to lives under /usr or /usr/local.

ZoneMinder::General::findDbCommand looks for a database client on that
PATH, and zmupdate.pl and zmcamtool.pl run what it finds. So an install
whose client sits anywhere else cannot apply schema changes:

  sh: mysql: command not found
  Command 'mysql -u'zmuser' ... ' exited with status: 127

even with the client on the caller's PATH. Homebrew on Apple Silicon is
the case that surfaced it - the client is in /opt/homebrew/bin - but a
--prefix=/opt install on Linux has the same shape, as does anything that
keeps its database client outside the FHS locations.

Replaced the literal with @ZM_SCRIPT_PATH@, defaulting to the same three
directories plus wherever cmake actually found a client, and overridable
for packagers who want to pin it. Warn at configure time when no client
is found at all, since that failure otherwise appears much later and
says something unrelated.

Nothing changes for an install whose client is already under /usr/bin:
the directory is only appended when it is not in the list, so the
default stays exactly as it was.

Memory.pm is deliberately left alone. It has a narrower PATH of
/bin:/usr/bin, and the only command it runs is uname through an absolute
path from ZM_PATH_UNAME, so it does not need widening.

Verified on macOS across the three cases: with the client in
/opt/homebrew/bin the directory is appended; -DZM_SCRIPT_PATH= is
respected verbatim; and pointing detection at /usr/bin/mariadb leaves
the default untouched. Build clean, suite 146 cases.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B5KL9Xbi7K5aGsauLtd8tG
2026-09-13 13:04:59 +10:00
Isaac Connor 06e1eb68b6 Add start to list of commands 2024-11-05 13:12:12 -05:00
Isaac Connor 9a2706acaa Turn down debug levels 2024-11-04 08:05:12 -05:00
Isaac Connor 369c448dd3 TUrn x10 events into a debug 2024-10-20 09:58:56 -04:00
Isaac Connor b50ef69629 Merge branch 'master' of github.com:ZoneMinder/zoneminder 2024-10-16 18:45:51 -04:00
Isaac Connor 88692cf04f COde style, cleanups, remove STATE_TAPE 2024-10-16 18:45:10 -04:00
Isaac Connor 0019857f11 Die with semi-useful log message if failed to create x10 2024-10-10 12:21:37 -04:00
Isaac Connor 86f393565e Remove Function references and swap with appropriate Capturing, Analysing, Recording 2022-01-27 13:42:31 -05:00
Isaac Connor 0323925406 Code style updates. Quote the word Function in SQL for newer mysql 2020-03-04 09:48:55 -05:00
Isaac Connor 766a59884d Don't hard code perl path. Use PERL_EXECUTABLE cmake var 2019-09-23 12:54:27 -04:00
Isaac Connor 82eaacc624 switch quotes 2017-01-12 12:54:46 -05:00
Isaac Connor faeb785961 zmMemVerify attaches, so we need to zmMemInvalidate even if the shared data is no good 2017-01-10 15:08:23 -05:00
Andy Bauer 254fcbcef7 update gpl 2 mailing address in source files 2016-12-26 09:23:16 -06:00
Kyle Johnson b9085cea64 Fix issue where programs are installed in unexpected paths.
For example, on freebsd, sudo is in /usr/local/bin, and as things
were pre-this commit, sudo wasn't being found.
2016-03-11 14:28:16 -07:00
Isaac Connor f6a226e700 Correct bareword config entries with newer {} style 2015-05-27 10:00:24 -04:00
Dmitry Smirnov b0909a4c57 autouse Data::Dumper 2015-04-16 15:48:51 +10:00
Dmitry Smirnov b0d98c6052 zmx10.pl: pod2usage + readability 2015-04-16 15:48:50 +10:00
Isaac Connor a10f2aa31c Add version to the usage line in zmx10.pl 2015-01-07 09:14:00 -05:00
Isaac Connor 3d55dde548 COnfig fixes 2014-01-03 09:33:49 -05:00
stan b7ca4dba77 Fixed a few more incorrectly quoted split patterns, though these were not disfunctional.
git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@3505 e3e1d417-86f3-4887-817a-d78f3d33393f
2011-08-26 07:51:36 +00:00
stan ad803d0327 Added script reinitialisations after fork
git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@3467 e3e1d417-86f3-4887-817a-d78f3d33393f
2011-06-24 16:04:32 +00:00
stan 6ff385e407 git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@3459 e3e1d417-86f3-4887-817a-d78f3d33393f 2011-06-21 09:19:10 +00:00
stan e9865320e7 Prevent memory handles from leaking when polling monitors
git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@3360 e3e1d417-86f3-4887-817a-d78f3d33393f
2011-05-25 08:27:46 +00:00
stan 11a1cc2d41 Now supports custom perl install path
git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@2908 e3e1d417-86f3-4887-817a-d78f3d33393f
2009-06-08 09:11:56 +00:00