Skip to content

upsmon, upssched: handle NOTIFYCMD and CMDSCRIPT values strictly as paths#3499

Open
jimklimov wants to merge 1 commit into
networkupstools:masterfrom
jimklimov:avoid-system
Open

upsmon, upssched: handle NOTIFYCMD and CMDSCRIPT values strictly as paths#3499
jimklimov wants to merge 1 commit into
networkupstools:masterfrom
jimklimov:avoid-system

Conversation

@jimklimov

Copy link
Copy Markdown
Member

Documentation was vague about this, and implementation used system() which modern guidelines frown upon. Fix this to mean a single token with an exact path name (or a program in PATH) without arguments, inline scriptlets, etc.

NOTE: SHUTDOWNCMD should not be impacted by this change, and can still take arguments as is often does (e.g. shutdown -t now).

@jimklimov jimklimov added this to the 2.8.6 milestone Jun 22, 2026
@jimklimov jimklimov added upsmon Shutdowns and overrides and battery level triggers Issues and PRs about system shutdown, especially if battery charge/runtime remaining is involved Hardening Ideas and implems to make NUT deployments more robust and secure (relaxed convenience may suffer) labels Jun 22, 2026
@github-actions

github-actions Bot commented Jun 22, 2026

Copy link
Copy Markdown

A ZIP file with standard source tarball and another tarball with pre-built docs for commit ecf98e7 is temporarily available: NUT-tarballs-PR-3499.zip.

jimklimov added a commit to jimklimov/nut that referenced this pull request Jun 22, 2026
…CRIPT values strictly as paths [networkupstools#3499]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
@AppVeyorBot

Copy link
Copy Markdown

@AppVeyorBot

Copy link
Copy Markdown

@AppVeyorBot

Copy link
Copy Markdown

jimklimov added a commit to jimklimov/nut that referenced this pull request Jun 22, 2026
…CRIPT values strictly as paths [networkupstools#3499]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
@AppVeyorBot

Copy link
Copy Markdown

Build nut 2.8.5.4858-master completed (commit 56e169d096 by @jimklimov)

@AppVeyorBot

Copy link
Copy Markdown

…CRIPT values strictly as paths [networkupstools#3499]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
@AppVeyorBot

Copy link
Copy Markdown

Build nut 2.8.5.4896-master completed (commit 9d71ba391a by @jimklimov)

@AppVeyorBot

Copy link
Copy Markdown

Build nut 2.8.5.4898-master completed (commit 771863a5c8 by @jimklimov)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Hardening Ideas and implems to make NUT deployments more robust and secure (relaxed convenience may suffer) Shutdowns and overrides and battery level triggers Issues and PRs about system shutdown, especially if battery charge/runtime remaining is involved upsmon

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants