857b72166f
Mirmon helps administrators in keeping an eye on the mirror sites. In a concise graphic format, mirmon shows each site's status history of the last two weeks. It is easy to spot stale or dead mirrors.
17 lines
705 B
Plaintext
17 lines
705 B
Plaintext
$OpenBSD: patch-mirmon_pl,v 1.1.1.1 2010/06/08 00:03:55 sthen Exp $
|
|
--- mirmon.pl.orig Wed Mar 17 09:35:27 2010
|
|
+++ mirmon.pl Tue Jun 8 01:02:50 2010
|
|
@@ -59,6 +59,12 @@ Mirmon::verbose ( $opt{v} ) ;
|
|
Mirmon::debug ( $opt{d} ) ;
|
|
Mirmon::quiet ( $opt{q} ) ;
|
|
|
|
+use POSIX qw(setuid setgid getpwnam);
|
|
+print "Dropping privileges to _mirmon ...\n" if Mirmon::debug;
|
|
+my (undef, undef, $uid, $gid) = POSIX::getpwnam("_mirmon");
|
|
+POSIX::setgid($uid) or die "setgid() to $gid failed, abort\n";
|
|
+POSIX::setuid($uid) or die "setuid() to $uid failed, abort\n";
|
|
+
|
|
my $M = Mirmon -> new ( $opt{c} ) ;
|
|
$M -> conf -> timeout ( $opt{t} ) if $opt{t} ;
|
|
if ( $get ) { $M -> get_dates ( $get ) ; $M -> put_state ; }
|