From: Stoiko Ivanov <s.ivanov@proxmox.com>
To: pmg-devel@lists.proxmox.com
Subject: [PATCH pmg-api v2 2/5] config: add log-tracker-base key
Date: Tue, 9 Jun 2026 22:04:44 +0200 [thread overview]
Message-ID: <20260609200637.904334-3-s.ivanov@proxmox.com> (raw)
In-Reply-To: <20260609200637.904334-1-s.ivanov@proxmox.com>
makes it possible to override the input-base parameter for
pmg-log-tracker - functionality there was added in:
9816d19 ("fix #3657: allow scanning a configurable rotated log series")
the option is restricted to root@pam, as suggested by Thomas, since
enabling other admin users to open arbitrary files on the system might
leak information, in case the parser in pmg-log-tracker matches
something unexpected. To err on the side of caution - restrict it to
root@pam, as we can always make it more liberal in the future, while
restricting it later could break some users workflows.
the pattern allows for a input-base with a maximal depth of 6
directories, which should cover all needs.
the default in the config is /var/log/syslog and will be explicitly
provided to pmg-log-tracker if nothing is set in pmg.conf
exposing the option in pmg.conf enables users to use a different
log location for the daily work.
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
---
src/PMG/Config.pm | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/PMG/Config.pm b/src/PMG/Config.pm
index f48c31dc..fbe2f3cb 100644
--- a/src/PMG/Config.pm
+++ b/src/PMG/Config.pm
@@ -161,6 +161,12 @@ EODESC
maxLength => 64 * 1024,
default => '',
},
+ 'log-tracker-base' => {
+ description => "Location of rotated mail logs, input-base argument for pmg-log-tracker",
+ type => 'string',
+ pattern => '^/([^/\0]+\/){0,6}[^/\0]+$',
+ default => '/var/log/syslog',
+ },
};
}
@@ -182,6 +188,7 @@ sub options {
'dkim-use-domain' => { optional => 1 },
'admin-mail-from' => { optional => 1 },
'consent-text' => { optional => 1 },
+ 'log-tracker-base' => { optional => 1, root_only => 1 },
};
}
--
2.47.3
next prev parent reply other threads:[~2026-06-09 20:06 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-09 20:04 [PATCH pmg-api/pmg-docs/pmg-gui v2 0/5] tracking-center: make input-base configurable Stoiko Ivanov
2026-06-09 20:04 ` [PATCH pmg-api v2 1/5] config: add root_only paramter option Stoiko Ivanov
2026-06-10 16:26 ` Max R. Carrara
2026-06-09 20:04 ` Stoiko Ivanov [this message]
2026-06-10 16:26 ` [PATCH pmg-api v2 2/5] config: add log-tracker-base key Max R. Carrara
2026-06-09 20:04 ` [PATCH pmg-api v2 3/5] fix #3657: api: tracking center: explicitly set input base from config Stoiko Ivanov
2026-06-09 20:04 ` [PATCH pmg-gui v2 4/5] fix #3657: system options: add log-tracker-base textrow Stoiko Ivanov
2026-06-10 16:26 ` Max R. Carrara
2026-06-09 20:04 ` [PATCH pmg-docs v2 5/5] pmg-log-tracker: mention that input-base can be configured via GUI Stoiko Ivanov
2026-06-10 16:26 ` Max R. Carrara
2026-06-10 16:26 ` [PATCH pmg-api/pmg-docs/pmg-gui v2 0/5] tracking-center: make input-base configurable Max R. Carrara
2026-06-12 17:43 ` superseded: " Stoiko Ivanov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260609200637.904334-3-s.ivanov@proxmox.com \
--to=s.ivanov@proxmox.com \
--cc=pmg-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox