Skip to content

Conversation

@0xgouda
Copy link
Collaborator

@0xgouda 0xgouda commented Jan 2, 2026

  • Add privilege check before invoking local parser routine, on failure, fallback to checking remote privileges.
  • Update local parsing docs, as we don't necessarily require superuser privileges in local mode; we only need read privilege on the logs dir and its files.
  • The check only tests read privilege on the logs dir (i.e, ls), I didn't test all possible directory and file privileges, assuming the default setup, so if a user (postgres or superuser) has read privilege on the logs directory, then he should be able to read all the files.

I didn't consider testing all possible directory and
file privileges, assuming the default setup so
if a user (postgres or superuser) has read privilege
on the logs directory then he should be able to
read all the files.
We don't neccesarily require superuser privileges in local
mode, e.g, `postgres` user will be enough as he can access
the log dir and its content.
@coveralls
Copy link

Pull Request Test Coverage Report for Build 20658767384

Details

  • 9 of 12 (75.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.02%) to 73.901%

Changes Missing Coverage Covered Lines Changed/Added Lines %
internal/reaper/logparser.go 9 12 75.0%
Totals Coverage Status
Change from base Build 20632675700: -0.02%
Covered Lines: 3865
Relevant Lines: 5230

💛 - Coveralls

Copy link
Collaborator

@pashagolub pashagolub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@pashagolub pashagolub self-assigned this Jan 2, 2026
@pashagolub pashagolub added enhancement New feature or request metrics Metrics related issues labels Jan 2, 2026
@pashagolub pashagolub merged commit 00ede3a into master Jan 2, 2026
9 checks passed
@pashagolub pashagolub deleted the check-privilege-before-local-parsing branch January 2, 2026 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request metrics Metrics related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants