28 lines
871 B
Plaintext
28 lines
871 B
Plaintext
|
#! /bin/sh /usr/share/dpatch/dpatch-run
|
||
|
## 05_pid_privileges.dpatch by <luk@luknote>
|
||
|
##
|
||
|
## All lines beginning with `## DP:' are a description of the patch.
|
||
|
## DP: No description.
|
||
|
|
||
|
@DPATCH@
|
||
|
diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' pkg-nrpe~/src/nrpe.c pkg-nrpe/src/nrpe.c
|
||
|
--- pkg-nrpe~/src/nrpe.c 2014-05-23 20:42:27.000000000 +0200
|
||
|
+++ pkg-nrpe/src/nrpe.c 2014-07-15 14:09:45.027422047 +0200
|
||
|
@@ -317,13 +317,13 @@
|
||
|
/* log info to syslog facility */
|
||
|
syslog(LOG_NOTICE,"Starting up daemon");
|
||
|
|
||
|
+ /* drop privileges */
|
||
|
+ drop_privileges(nrpe_user,nrpe_group);
|
||
|
+
|
||
|
/* write pid file */
|
||
|
if(write_pid_file()==ERROR)
|
||
|
return STATE_CRITICAL;
|
||
|
|
||
|
- /* drop privileges */
|
||
|
- drop_privileges(nrpe_user,nrpe_group);
|
||
|
-
|
||
|
/* make sure we're not root */
|
||
|
check_privileges();
|
||
|
|