Skip to content

Commit

Permalink
Remove hardcoding of default user/group to run the plugin (SF#1083251).
Browse files Browse the repository at this point in the history
  • Loading branch information
jomono committed Dec 22, 2004
1 parent 8916437 commit e7fb5bb
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 4 deletions.
2 changes: 2 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ munin (work)
* Main: Added option cgiurl_graph.
* Main: Bugfix when using long labels and CGI graphing.
* Node: Fix bug when encountering strange environment (Deb#285173).
* Node: Remove hardcoding of default user/group to run the plugin as
(SF#1083251).
* Packaging: Expand man-page macros properly on man-page generation
(Deb#286399).
* Plugin: Added plugin generic/dhcpd3, created by Rune N. Skillingstad.
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ build-stamp:
-e 's|@@VERSION@@|$(VERSION)|g' \
-e 's|@@PLUGSTATE@@|$(PLUGSTATE)|g' \
-e 's|@@CGIDIR@@|$(CGIDIR)|g' \
-e 's|@@USER@@|$(USER)|g' \
-e 's|@@GROUP@@|$(GROUP)|g' \
-e 's|@@PLUGINUSER@@|$(PLUGINUSER)|g' \
$$file > build/$$destname; \
done
touch build-stamp
Expand Down
3 changes: 3 additions & 0 deletions Makefile.config
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ VERSION = $(shell cat RELEASE)
USER = munin
GROUP = munin

# Default user to run the plugins as
PLUGINUSER = nobody

# Which command to use to check if the USER and GROUP to run Munin as, exists.
GETENT = $(shell which getent || which true 2>/dev/null)
CHECKUSER = $(shell $(GETENT) passwd $(USER) >/dev/null 2>/dev/null || (echo "echo User $(USER) nonexistant. Create the user and retry; exit 2"))
Expand Down
7 changes: 5 additions & 2 deletions node/munin-node.in
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
# $Id$
#
# $Log$
# Revision 1.20 2004/12/22 21:33:48 jimmyo
# Remove hardcoding of default user/group to run the plugin (SF#1083251).
#
# Revision 1.19 2004/12/09 20:03:25 jimmyo
# Added two new plugins contributed by Jacques Caruso, generic/exim_mailqueue_alt and generic/mailscanner.
#
Expand Down Expand Up @@ -140,8 +143,8 @@ my $do_usage = 0;
my $DEBUG = 0;
my $do_version = 0;
my $VERSION="@@VERSION@@";
my $defuser = getpwnam ("nobody");
my $defgroup= getgrnam ("munin");
my $defuser = getpwnam ("@@PLUGINUSER@@");
my $defgroup= getgrnam ("@@GROUP@@");
my $paranoia= 0;
my @ignores = ();
my %sconf = ('timeout' => 10);
Expand Down
7 changes: 5 additions & 2 deletions node/munin-run.in
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
# $Id$
#
# $Log$
# Revision 1.12 2004/12/22 21:33:48 jimmyo
# Remove hardcoding of default user/group to run the plugin (SF#1083251).
#
# Revision 1.11 2004/12/22 20:48:23 jimmyo
# Fix bug when encountering strange environment.
#
Expand Down Expand Up @@ -106,8 +109,8 @@ my $do_usage = 0;
my $DEBUG = 0;
my $do_version = 0;
my $VERSION="@@VERSION@@";
my $defuser = getpwnam ("nobody");
my $defgroup= getgrnam ("munin");
my $defuser = getpwnam ("@@PLUGINUSER@@");
my $defgroup= getgrnam ("@@GROUP@@");
my $paranoia = 0;
my @ignores = ();

Expand Down

0 comments on commit e7fb5bb

Please sign in to comment.