[pkg-nagios-changes] [Git][nagios-team/monitoring-plugins][master] 2 commits: d/control: Adding libsystemd-dev and libsystemd0 as build-dep (Closes: #1110265)
Jan Wagner (@waja)
gitlab at salsa.debian.org
Mon Aug 11 22:54:43 BST 2025
Jan Wagner pushed to branch master at Debian Nagios Maintainer Group / monitoring-plugins
Commits:
7236330a by Jan Wagner at 2025-08-10T21:18:04+00:00
d/control: Adding libsystemd-dev and libsystemd0 as build-dep (Closes: #1110265)
- - - - -
8cd52e30 by Jan Wagner at 2025-08-11T21:42:55+00:00
Adding d/patches/25_check_users_sd_get_uids to fix user count
- - - - -
3 changed files:
- debian/control
- + debian/patches/25_check_users_sd_get_uids
- debian/patches/series
Changes:
=====================================
debian/control
=====================================
@@ -13,6 +13,8 @@ Build-Depends: debhelper-compat (= 13),
libnet-snmp-perl,
libpq-dev,
libssl-dev,
+ libsystemd0,
+ libsystemd-dev,
liburiparser-dev,
mawk | awk,
perl,
=====================================
debian/patches/25_check_users_sd_get_uids
=====================================
@@ -0,0 +1,28 @@
+From fb39f96ac6f72bb56d17f3e8694134dfea9186e9 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Lorenz=20K=C3=A4stle?=
+ <12514511+RincewindsHat at users.noreply.github.com>
+Date: Mon, 11 Aug 2025 21:49:20 +0200
+Subject: [PATCH] check_users: Use sd_get_uids instead of sd_get_session
+
+Previously check_users in combination with systemd used
+sd_get_sessions (3) to aquire the number of users, probably
+with the idea that every users opens a session.
+Turns out, that a user can have multiple sessions and we only really
+want to know how many users there are.
+
+This commit changes to sd_get_uids (3) to achieve that target.
+---
+ plugins/check_users.d/users.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/plugins/check_users.c
++++ b/plugins/check_users.c
+@@ -92,7 +92,7 @@
+
+ #ifdef HAVE_LIBSYSTEMD
+ if (sd_booted () > 0)
+- users = sd_get_sessions (NULL);
++ users = sd_get_uids(NULL);
+ else {
+ #endif
+ #if HAVE_WTSAPI32_H
=====================================
debian/patches/series
=====================================
@@ -17,4 +17,5 @@
22_check_by_ssh_missing_options
23_sslutils_fix_error_message
24_check_http_deprecation
+25_check_users_sd_get_uids
# feature patches
View it on GitLab: https://salsa.debian.org/nagios-team/monitoring-plugins/-/compare/bee01b8716350afdcab7ce89d7a1aab9f9532f31...8cd52e30e9f2c7e202c4b5d6681750de8397754d
--
View it on GitLab: https://salsa.debian.org/nagios-team/monitoring-plugins/-/compare/bee01b8716350afdcab7ce89d7a1aab9f9532f31...8cd52e30e9f2c7e202c4b5d6681750de8397754d
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-nagios-changes/attachments/20250811/bcbbd16a/attachment-0001.htm>
More information about the pkg-nagios-changes
mailing list