Bug 253702 - net-mgmt/snmptt: Fix upstream bug
Summary: net-mgmt/snmptt: Fix upstream bug
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Neel Chauhan
URL: https://sourceforge.net/p/snmptt/bugs...
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-19 20:33 UTC by Christian Ullrich
Modified: 2021-03-05 19:44 UTC (History)
2 users (show)

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


Attachments
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]
Patch

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.
Comment 1 nistor 2021-02-27 22:34:03 UTC
Spoke to developer in email about this patch, all looks good and upstream fixed for new version as well.
Comment 2 Neel Chauhan freebsd_committer freebsd_triage 2021-03-05 19:42:32 UTC
Committed!
Comment 3 commit-hook freebsd_committer freebsd_triage 2021-03-05 19:44:38 UTC
A commit references this bug:

Author: nc
Date: Fri Mar  5 19:44:32 UTC 2021
New revision: 567415
URL: https://svnweb.freebsd.org/changeset/ports/567415

Log:
  net-mgmt/snmptt: Fix upstream 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.

  PR:		253702
  Submitted by:	Christian Ullrich <chris AT chrullrich DOT net>
  Approved by:	nistor AT snickers DOT org

Changes:
  head/net-mgmt/snmptt/Makefile
  head/net-mgmt/snmptt/files/patch-snmptt