Bug 253702 - net-mgmt/snmptt: Fix upstream bug
Summary: net-mgmt/snmptt: Fix upstream bug
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-ports-bugs (Nobody)
URL: https://sourceforge.net/p/snmptt/bugs...
Depends on:
Reported: 2021-02-19 20:33 UTC by Christian Ullrich
Modified: 2021-02-19 22:19 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (nistor)

Patch (845 bytes, text/plain)
2021-02-19 20:33 UTC, Christian Ullrich
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Ullrich 2021-02-19 20:33:29 UTC
Created attachment 222650 [details]

This is a fix for an upstream bug. Given the level of activity on the snmptt Sourceforge project, I expect some delay until upstream fixes the bug.

The code attempts to change from the executing user to a configured service user, but it does this by first changing effective, then real uid.

It then briefly looks around curiously before falling flat on its face because the real uid change failed, the process not having root anymore at that point.

The attached patch reverses the order of the operations.