Changeset 1396
- Timestamp:
- 01/20/08 20:32:46 (4 years ago)
- Files:
-
- branches/1.2-stable/Makefile (modified) (1 diff)
- branches/1.2-stable/Makefile.config (modified) (2 diffs)
- branches/1.2-stable/node/munin-node.in (modified) (4 diffs)
- branches/1.2-stable/node/munin-run.in (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/1.2-stable/Makefile
r1395 r1396 156 156 -e 's|@@GROUP@@|$(GROUP)|g' \ 157 157 -e 's|@@PLUGINUSER@@|$(PLUGINUSER)|g' \ 158 -e 's|@@GOODSH@@|$(GOODSH)|g' \ 159 -e 's|@@BASH@@|$(BASH)|g' \ 160 -e 's|@@HASSETR@@|$(HASSETR)|g' \ 158 161 $$file > build/$$destname; \ 159 162 done branches/1.2-stable/Makefile.config
r929 r1396 52 52 PYTHON = /usr/bin/env python 53 53 54 # A modern (posix) shell. We're not looking for arrays, but $() and 55 # other modern stuff is expected. On a posix-system the expression 56 # below will find the right shell. Most Unixes released the last 10 57 # years are POSIX compliant enough for this to work (he said bravely). 58 # 59 # On Linux /bin/sh, SunOS/Solaris /usr/xpg4/bin/sh or /bin/ksh 60 # In general: bash or ksh will work 61 # 62 GOODSH = $(shell PATH=`getconf PATH` sh -c 'type sh | sed "s/.* //"') 63 64 # Path of bash for bash specific plugins 65 BASH = /bin/bash 66 54 67 # Server only - Where to install the perl libraries 55 PERLLIB = $(DESTDIR)$(shell $(PERL) -V:sitelib | cut -d = -f2 | sed "s/[\';]//g")68 PERLLIB = $(DESTDIR)$(shell $(PERL) -V:sitelib | cut -d"'" -f2) 56 69 57 70 # Client only - Install plugins for this architecture … … 82 95 CHECKGROUP = $(shell $(GETENT) group $(GROUP) >/dev/null 2>/dev/null || (echo "echo Group $(GROUP) nonexistant. Create the group and retry; exit 2")) 83 96 97 # For OSX, comment out the previous two lines and comment in these 98 #CHECKUSER = $(shell nicl . -read /users/$(USER) >/dev/null 2>/dev/null || (echo "echo User $(USER) nonexistant. Create the user and retry; exit 2")) 99 #CHECKGROUP = $(shell nicl . -read /groups/$(GROUP) >/dev/null 2>/dev/null || (echo "echo Group $(GROUP) nonexistant. Create the group and retry; exit 2")) 100 84 101 CHOWN = chown 85 102 CHMOD = chmod 86 103 CHGRP = chgrp 104 # Check whether setruid functionality can be used 105 HASSETR = $(shell perl -e 'use Config; my @vars=("d_setruid", "d_setreuid", "d_setresuid"); foreach my $$var (@vars) { if ($$Config{$$var} eq "define") { print "1\n"; exit 0; } } print "0\n"; exit 0;' ) 106 branches/1.2-stable/node/munin-node.in
r1382 r1396 29 29 use Net::Server::Fork; # any personality will do 30 30 31 # Variable is set at build, with values detected by the makefiles 32 my $HAS_SETR = @@HASSETR@@; 33 31 34 chdir ("/"); 32 35 … … 42 45 $0 =~ /^(.*)$/; # for some strange reason won't "$0 = $0;" work. 43 46 $0 = $1; 47 44 48 # Make configuration settings available at runtime. 45 49 $ENV{'MUNIN_PREFIX'} = '@@PREFIX@@'; … … 260 264 closedir (DIR); 261 265 } 262 266 263 267 opendir (DIR,$servicedir) || die "Cannot open plugindir: $servicedir $!"; 264 268 FILES: … … 430 434 print "# Want to run as euid/egid $u/$g\n" if $DEBUG; 431 435 432 $( = $g unless $g == 0; 436 if ($HAS_SETR) 437 { 438 $( = $g unless $g == 0; 439 $< = $u unless $u == 0; 440 } 433 441 $) = $gs unless $g == 0; 434 $< = $u unless $u == 0;435 442 $> = $u unless $u == 0; 436 443 branches/1.2-stable/node/munin-run.in
r1382 r1396 24 24 use vars qw(@ISA); 25 25 use Getopt::Long; 26 27 # Variable is set at build, with values detected by the makefiles 28 my $HAS_SETR = @@HASSETR@@; 26 29 27 30 # "Clean" environment to disable taint-checking on the environment. We _know_ … … 354 357 print "# Want to run as euid/egid $u/$g\n" if $DEBUG; 355 358 356 $( = $g unless $g == 0; 359 if ($HAS_SETR) 360 { 361 $( = $g unless $g == 0; 362 $< = $u unless $u == 0; 363 } 357 364 $) = $gs unless $g == 0; 358 $< = $u unless $u == 0;359 365 $> = $u unless $u == 0; 360 366
