Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Mar 2024 19:54:30 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 277704] net-mgmt/nrpe changes /var/ ownership to nagios when rc.d/nrpe starts
Message-ID:  <bug-277704-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D277704

            Bug ID: 277704
           Summary: net-mgmt/nrpe changes /var/ ownership to nagios when
                    rc.d/nrpe starts
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: bofh@freebsd.org
          Reporter: sr@genyosha.net
             Flags: maintainer-feedback?(bofh@freebsd.org)
          Assignee: bofh@freebsd.org

Installed net-mgmt/nrpe 4.1.0 pkg. Using /usr/local/etc/nrpe.cfg.sample as a
template for the running nrpe.cfg gives this pidfile setting:

pid_file=3D/var/nrpe.pid

With the included rc.d/nrpe startup script this results in /var/ directory
getting chown'd to the nagios user.

Presumably it happens due to this command in rc.d/nrpe nrpe_prestart()

        install -d -o ${nrpe_user:-nagios} ${pidfile%/*}

Which results in:

$ ls -lad /var
drwxr-xr-x  26 nagios wheel 1024 Mar 14 11:39 var
$ ls -la /var/nrpe.pid=20
-rw-r--r--  1 root wheel 5 Mar 14 11:39 /var/nrpe.pid

The /var/ ownership change seems bad, and the pidfile location may not be
optimal. A couple ideas for a fix:

1) comment-out pid_file from nrpe.cfg and let rc.d/nrpe pidfile logic choose
the location
2) set a different path for pid_file in nrpe.cfg, e.g. /var/run/nrpe/nrpe.p=
id

I'm presently using option #1 and it does avoid the /var/ ownership change.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-277704-7788>