Bug 200545 - net-mgmt/pnp has conflicting permissions with nagios and breaks the nagios package.
Summary: net-mgmt/pnp has conflicting permissions with nagios and breaks the nagios pa...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Lars Engels
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-30 21:29 UTC by Peter Wemm
Modified: 2015-07-14 18:37 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Wemm freebsd_committer freebsd_triage 2015-05-30 21:29:41 UTC
The packaged version of net-mgmt/pnp changes the owner/group of /var/spool/nagios to root:wheel and breaks the nagios package.  This has been causing problems on the freebsd cluster.

The other problem is nagios itself can't write the perfdata into the locations it is supposed to be able to write to, because they too are root:wheel.

This is my best guess at how to fix it:

pb00:/p/poudriere/ports/cluster/net-mgmt/pnp # svn diff
Index: pkg-plist
===================================================================
--- pkg-plist	(revision 387912)
+++ pkg-plist	(working copy)
@@ -668,7 +668,7 @@
 @dir %%WWWDIR%%/templates
 @dir /var/log/kohana
 @dir /var/log/stats
-@dir %%NAGIOSDIR%%/pnp/perfspool
-@dir %%NAGIOSDIR%%/pnp/rrd
-@dir %%NAGIOSDIR%%/pnp
-@dir %%NAGIOSDIR%%
+@dir(%%NAGIOSUSER%%,%%NAGIOSGROUP%%,755) %%NAGIOSDIR%%/pnp/perfspool
+@dir(%%NAGIOSUSER%%,%%NAGIOSGROUP%%,755) %%NAGIOSDIR%%/pnp/rrd
+@dir(%%NAGIOSUSER%%,%%NAGIOSGROUP%%,755) %%NAGIOSDIR%%/pnp
+@dir(%%NAGIOSUSER%%,%%NAGIOSGROUP%%,775) %%NAGIOSDIR%%

We are using this on the freebsd.org cluster.  I'd be grateful if it could be cleaned up and integrated.
Comment 1 Lars Engels freebsd_committer 2015-05-31 19:03:48 UTC
Good catch, and your patch looks good. I'll give it a shot
Comment 2 Peter Wemm freebsd_committer freebsd_triage 2015-05-31 19:18:54 UTC
I think /var/log/stats is also a problem.  That directory is being created as root/wheel, and that is causing 'permission denied' errors in /var/log/perfdata.log when it's trying to create files as user nagios in there.
Comment 3 commit-hook freebsd_committer 2015-05-31 19:49:18 UTC
A commit references this bug:

Author: lme
Date: Sun May 31 19:48:34 UTC 2015
New revision: 388159
URL: https://svnweb.freebsd.org/changeset/ports/388159

Log:
  - Fix directory permissions
  - Bump PORTREVISION

  PR:		200545
  Submitted by:	peter
  MFH:		2015Q2

Changes:
  head/net-mgmt/pnp/Makefile
  head/net-mgmt/pnp/pkg-plist
Comment 4 commit-hook freebsd_committer 2015-05-31 19:59:21 UTC
A commit references this bug:

Author: lme
Date: Sun May 31 19:58:42 UTC 2015
New revision: 388160
URL: https://svnweb.freebsd.org/changeset/ports/388160

Log:
  - Really fix plist permissions
  - Bump PORTREVISION

  PR:		200545
  Submitted by:	peter
  MFH:		2015Q2

Changes:
  head/net-mgmt/pnp/Makefile
  head/net-mgmt/pnp/pkg-plist
Comment 5 Lars Engels freebsd_committer 2015-07-14 18:37:03 UTC
Forgot to close the PR.