Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
b2e08b8
clients/upsimage.c, clients/upsset.c, clients/upsstats.c: fix indenta…
jimklimov Feb 6, 2026
77c206b
clients/upsstats.c: parameterize template_single and template_list fi…
jimklimov Feb 6, 2026
477b381
server/upsd.c, docs/man/upsd.conf.txt, conf/upsd.conf.sample, NEWS.ad…
jimklimov Feb 6, 2026
7cca1cc
clients/upsstats.c, docs/man/upsstats.cgi.txt, NEWS.adoc: support pro…
jimklimov Feb 6, 2026
53cb321
drivers/upsdrvctl.c: forkexec(): double-quote the WIN32 argv[0] in co…
jimklimov Feb 8, 2026
60bd713
drivers/upsdrvctl.c: forkexec(): double-quote the WIN32 argv[0] in co…
jimklimov Feb 8, 2026
3d08392
common/common.c: vupslog(): use a larger initial buffer
jimklimov Feb 8, 2026
9879eb7
server/upsd.c: refactor with one update_sysmaxconn() implementation […
jimklimov Feb 8, 2026
7d2d13a
server/upsd.c: mainloop(): debug-log chunking details [#3302]
jimklimov Feb 8, 2026
996b870
server/upsd.c: mainloop(): only log warnings if nfds_wanted > maxconn…
jimklimov Feb 8, 2026
4385bed
Fix hang in gen-snmp-subdriver.sh
darkglade Feb 8, 2026
97eb3b1
server/upsd.c, NEWS.adoc, docs/nut.dict: update_sysmaxconn(): support…
jimklimov Feb 8, 2026
6a7cd03
tools/nut-scanner/scan_upower.c: drop unused import of "g_variant_get…
jimklimov Feb 8, 2026
54c9e42
scripts/augeas/gen-nutupsconf-aug.py.in: try to actually catch warnin…
jimklimov Feb 8, 2026
9dd88ff
scripts/augeas/gen-nutupsconf-aug.py.in: fix ResourceWarnings about u…
jimklimov Feb 8, 2026
b05fb12
scripts/python/module/setup.py.in: try to actually catch warnings (e.…
jimklimov Feb 8, 2026
34f15d9
docs/config-prereqs.txt, docs/nut.dict: update for Fedora 43 [#3311]
jimklimov Feb 8, 2026
c7bd72d
drivers/generic_gpio_common.c, drivers/generic_gpio_libgpiod.c, tests…
jimklimov Feb 8, 2026
96c9acb
drivers/nutdrv_qx_voltronic-axpert.c: fix more casting from xcalloc()…
jimklimov Feb 8, 2026
eee9297
tests/generic_gpio_liblocal.c: gpiod_line_request_get_values(): do no…
jimklimov Feb 8, 2026
9f8740c
clients/cgilib.c: debug-trace also extractcgiargs() with what query-s…
jimklimov Feb 9, 2026
be0ae0e
docs/download.txt: link to "Finding recent development iteration arti…
jimklimov Feb 9, 2026
6ebc852
clients/upsclient.c: fix void* casting for a NSS build [#3311]
jimklimov Feb 9, 2026
70f7ed9
tools/nut-scanner/scan_*.c, NEWS.adoc: track seeked symbols to know w…
jimklimov Feb 8, 2026
e272694
common/common.c, include/common.h: introduce UPSLOG_STDOUT bit and su…
jimklimov Feb 9, 2026
8818a3a
clients/ups{image,set,stats}.c: introduce support for browser-friendl…
jimklimov Feb 9, 2026
38a9de1
clients/upsset.c: use "Pragma: no-cache" HTTP header as in upsstats.c…
jimklimov Feb 9, 2026
1530835
clients/cgilib.c: extractcgiargs(): fix processing of query strings w…
jimklimov Feb 9, 2026
c21672d
clients/upsstats.c: do_*link*() methods: err on the safe side and NUL…
jimklimov Feb 9, 2026
1d2aee1
Introduce CUSTOM_TEMPLATE_LIST and CUSTOM_TEMPLATE_SINGLE settings in…
jimklimov Feb 9, 2026
8b444e3
clients/upsstats.c: display_template(): if rejecting a file, or after…
jimklimov Feb 9, 2026
b993e63
scripts/Windows/wininit.c, NEWS.adoc, docs/man/nut.exe.txt: support e…
jimklimov Feb 9, 2026
9a805e2
configure.ac: refer to docs with Solaris man section layout [#3314]
jimklimov Feb 10, 2026
dea9c11
configure.ac: comment the trouble with automating Solaris man section…
jimklimov Feb 10, 2026
933f2c1
configure.ac: note more visibly that we can fall back to dist-tarball…
jimklimov Feb 10, 2026
86b84c9
configure.ac: when falling back to can_install_doc_man=yes do also tr…
jimklimov Feb 10, 2026
aa4e727
Merge pull request #3311 from jimklimov/fix-fedora-43
jimklimov Feb 10, 2026
8111ced
Merge pull request #3307 from jimklimov/issue-3205
jimklimov Feb 10, 2026
e714ba3
Merge pull request #3309 from darkglade/darkglade-gen-snmp-subdriver-fix
jimklimov Feb 10, 2026
1d1c57d
Merge pull request #3310 from jimklimov/nutscanner-ltdl-trace-symbols
jimklimov Feb 10, 2026
43a9336
Merge pull request #3313 from jimklimov/issue-3312
jimklimov Feb 10, 2026
83b0fda
Merge pull request #3304 from jimklimov/issue-2524
jimklimov Feb 10, 2026
cc72213
Merge pull request #3315 from jimklimov/issue-3314
jimklimov Feb 10, 2026
7a17b0d
Merge branch 'master' into issue-3302
jimklimov Feb 10, 2026
3c77d91
Merge pull request #3303 from jimklimov/issue-3302
jimklimov Feb 10, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion NEWS.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ For a complete and more detailed list of changes, please refer to the
ChangeLog file (generated for release archives), or to the Git version
control history for "live" codebase.


PLANNED: Release notes for NUT 2.8.5 - what's new since 2.8.4
-------------------------------------------------------------

Expand Down Expand Up @@ -114,6 +113,11 @@ https://github.com/networkupstools/nut/milestone/12
operations. (Re-)registration of the "Network UPS Tools" service should
now populate a nice description of it. The `-U` (uninstall) action should
now also try to stop the service first. [PR #3235]
* Using `nut.exe -N` for testing and pressing 'Ctrl+C' should now cause the
started daemons to be killed off. Previously they would linger and e.g.
preclude subsequent experiments with the service wrapper. Console close
events are ignored, so there is a way to indefinitely keep the daemons
started by test-mode wrapper running (kill via Task Manager). [#3312]
* Revised WIN32 `WSAStartup()` and registration of `atexit(WSACleanup)` to
only be done once per program (and cleanups to be always registered); this
impacts the C `libupsclient` and C++ `libnutclient` libraries (and so most
Expand Down Expand Up @@ -277,6 +281,10 @@ https://github.com/networkupstools/nut/milestone/12
built-in NUT configuration path on all platforms, but to also consider
`NUT_CONFPATH` and other fallback locations, like other code does.
[PR #3249]
* Enhance debug-logging of dynamic library loading with information about
any missing method in the library discovered at run-time, if lack of such
prevents us from using that library, and blocks scanning of corresponding
protocol and/or media to discover possibly supported devices. [PR #3310]
* Introduced `nut-scanner` support for new `nut-upower` driver. [PR #3293]

- `upsd` data server updates:
Expand All @@ -287,6 +295,11 @@ https://github.com/networkupstools/nut/milestone/12
comes into play and breaks things. [issue #661]
* Fixed `LISTEN *` handling for `upsd.exe` in NUT for Windows builds.
[PR #3237]
* Extended processing of `MAXCONN` setting to allow larger values than the
operating system allows, by only waiting for that amount of Unix sockets
or Windows `HANDLE`'s at a time, and moving on to another chunk.
The system-provided value can be further limited by `NUT_SYSMAXCONN_LIMIT`
environment variable (e.g. in tests). [#3302]

- `upsdrvctl` tool updates:
* Make use of `setproctag()` and `getproctag()` to report parent/child
Expand Down Expand Up @@ -338,6 +351,9 @@ several `FSD` notifications into one executed action. [PR #3097]
* Introduced a `@NUT_UPSSTATS_TEMPLATE@` command which the HTML template
files now MUST start with (safety check that we are reading a template).
[issue #3252, PR #3249]
* (Experimental) Custom templates other than `upsstats{,-single}.html` can
now be specified as CGI parameters, if locally permitted via `hosts.conf`.
[issue #2524, PR #3304]

- `upssched` tool updates:
* Previously in PR #2896 (NUT releases v2.8.3 and v2.8.4) the `UPSNAME` and
Expand Down
15 changes: 13 additions & 2 deletions clients/cgilib.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,15 @@ void extractcgiargs(void)
while (ptr) {
varname = ptr;
eq = strchr(varname, '=');
if (!eq) {
ptr = strchr(varname, '&');
amp = strchr(varname, '&');
if (!eq
|| (eq && amp && amp < eq)
) {
/* Last token is a flag (without assignment in sight),
* OR we've got a flag token in the middle of a query
* string, followed by another key=value pair later on.
*/
ptr = amp;
if (ptr)
*ptr++ = '\0';

Expand All @@ -99,6 +106,8 @@ void extractcgiargs(void)
continue;
}

/* The nearest point of interest is a key=value pair,
* maybe followed by another amp and flag or assignment... */
*eq = '\0';
value = eq + 1;
amp = strchr(value, '&');
Expand All @@ -111,6 +120,8 @@ void extractcgiargs(void)

cleanvar = unescape(varname);
cleanval = unescape(value);
upsdebugx(3, "%s: parsearg('%s', '%s')<br/>",
__func__, NUT_STRARG(cleanvar), NUT_STRARG(cleanval));
parsearg(cleanvar, cleanval);
free(cleanvar);
free(cleanval);
Expand Down
2 changes: 1 addition & 1 deletion clients/upsclient.c
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ int upscli_init(int certverify, const char *certpath,
void upscli_add_host_cert(const char* hostname, const char* certname, int certverify, int forcessl)
{
#ifdef WITH_NSS
HOST_CERT_t* cert = xmalloc(sizeof(HOST_CERT_t));
HOST_CERT_t* cert = (HOST_CERT_t *)xmalloc(sizeof(HOST_CERT_t));
cert->next = first_host_cert;
cert->host = xstrdup(hostname);
cert->certname = xstrdup(certname);
Expand Down
34 changes: 26 additions & 8 deletions clients/upsimage.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
Copyrights:
(C) 1998 Russell Kroll <rkroll@exploits.org>
(C) 2002 Simon Rozman <simon@rozman.net>
(C) 2020-2026 Jim Klimov <jimklimov+nut@gmail.com>

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -619,14 +620,14 @@ int main(int argc, char **argv)
double var = 0;

#ifdef WIN32
/* Required ritual before calling any socket functions */
static WSADATA WSAdata;
static int WSA_Started = 0;
if (!WSA_Started) {
WSAStartup(2, &WSAdata);
atexit((void(*)(void))WSACleanup);
WSA_Started = 1;
}
/* Required ritual before calling any socket functions */
static WSADATA WSAdata;
static int WSA_Started = 0;
if (!WSA_Started) {
WSAStartup(2, &WSAdata);
atexit((void(*)(void))WSACleanup);
WSA_Started = 1;
}

/* Avoid binary output conversions, e.g.
* mangling what looks like CRLF on WIN32 */
Expand All @@ -646,6 +647,23 @@ int main(int argc, char **argv)
nut_debug_level = i;
}

#ifdef NUT_CGI_DEBUG_UPSIMAGE
# if (NUT_CGI_DEBUG_UPSIMAGE - 0 < 1)
# undef NUT_CGI_DEBUG_UPSIMAGE
# define NUT_CGI_DEBUG_UPSIMAGE 6
# endif
/* Un-comment via make flags when developer-troubleshooting: */
nut_debug_level = NUT_CGI_DEBUG_UPSIMAGE;
#endif

if (nut_debug_level > 0) {
cgilogbit_set();
printf("Content-type: text/html\n");
printf("Pragma: no-cache\n");
printf("\n");
printf("<p>NUT CGI Debugging enabled, level: %d</p>\n\n", nut_debug_level);
}

extractcgiargs();

upscli_init_default_connect_timeout(NULL, NULL, UPSCLI_DEFAULT_CONNECT_TIMEOUT);
Expand Down
35 changes: 26 additions & 9 deletions clients/upsset.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* upsset - CGI program to manage read/write variables

Copyright (C) 1999 Russell Kroll <rkroll@exploits.org>
Copyright (C) 2020-2026 Jim Klimov <jimklimov+nut@gmail.com>

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -1116,14 +1117,14 @@ int main(int argc, char **argv)
int i;

#ifdef WIN32
/* Required ritual before calling any socket functions */
static WSADATA WSAdata;
static int WSA_Started = 0;
if (!WSA_Started) {
WSAStartup(2, &WSAdata);
atexit((void(*)(void))WSACleanup);
WSA_Started = 1;
}
/* Required ritual before calling any socket functions */
static WSADATA WSAdata;
static int WSA_Started = 0;
if (!WSA_Started) {
WSAStartup(2, &WSAdata);
atexit((void(*)(void))WSACleanup);
WSA_Started = 1;
}

/* Avoid binary output conversions, e.g.
* mangling what looks like CRLF on WIN32 */
Expand All @@ -1136,7 +1137,9 @@ int main(int argc, char **argv)
NUT_UNUSED_VARIABLE(argv);
username = password = function = monups = NULL;

printf("Content-type: text/html\n\n");
printf("Content-type: text/html\n");
printf("Pragma: no-cache\n");
printf("\n");

/* NOTE: Caller must `export NUT_DEBUG_LEVEL` to see debugs for upsc
* and NUT methods called from it. This line aims to just initialize
Expand All @@ -1148,6 +1151,20 @@ int main(int argc, char **argv)
nut_debug_level = i;
}

#ifdef NUT_CGI_DEBUG_UPSSET
# if (NUT_CGI_DEBUG_UPSSET - 0 < 1)
# undef NUT_CGI_DEBUG_UPSSET
# define NUT_CGI_DEBUG_UPSSET 6
# endif
/* Un-comment via make flags when developer-troubleshooting: */
nut_debug_level = NUT_CGI_DEBUG_UPSSET;
#endif

if (nut_debug_level > 0) {
cgilogbit_set();
printf("<p>NUT CGI Debugging enabled, level: %d</p>\n\n", nut_debug_level);
}

/* see if the magic string is present in the config file */
check_conf();

Expand Down
Loading
Loading