diff options
Diffstat (limited to 'net/nrpep/files')
-rw-r--r-- | net/nrpep/files/patch-aa | 113 | ||||
-rw-r--r-- | net/nrpep/files/patch-ab | 99 | ||||
-rw-r--r-- | net/nrpep/files/patch-ac | 11 |
3 files changed, 223 insertions, 0 deletions
diff --git a/net/nrpep/files/patch-aa b/net/nrpep/files/patch-aa new file mode 100644 index 000000000000..a72ea0d7143b --- /dev/null +++ b/net/nrpep/files/patch-aa @@ -0,0 +1,113 @@ +--- nrpep.bak Sat Jan 8 01:00:45 2000 ++++ nrpep Wed Apr 10 16:50:09 2002 +@@ -13,24 +13,39 @@ + + # Perl libs and such the program needs + use strict; +-use vars qw($opt_c $version %commands $key $cipher); ++use vars qw($opt_d $opt_c $version %commands $key $cipher); + use Getopt::Std; + use Crypt::TripleDES; + + # Global Variables +-$version = "0.2"; ++$version = "0.2-fbsd"; + + # Get the command line arguments +-getopts('c:'); ++getopts('d:c:'); ++ ++# Open a log ++if ($opt_d) { ++ open(LOG,">>$opt_d") or die "Cannot open $opt_d for logging"; ++ print LOG "\n\nNRPEP\n"; ++} ++ + # Check for the proper command line arguments, if we fail, print out an + # error message and die. + &Check_Command($opt_c); ++ + # Grab the configuration file, and parse it for all the variables we + # will need. +-&Get_Configs($opt_c); ++%commands = Get_Configs($opt_c); ++if ($opt_d) {print LOG Dumper(%commands);} ++ + # Now that I have a set of commands, go into recieve mode + &Recieve; + ++$opt_d && close(LOG); ++exit 0; ++ ++###################################################################################### ++ + sub Recieve { + my $line; + my $commandentered; +@@ -49,8 +64,10 @@ + $_ =~ s/(\r|\n)//g; + # Start a new cipher with the proper key; + $cipher = new Crypt::TripleDES; +-# Decrypt the command ++# Decrypt the command ++ $opt_d && print LOG "Decrypting $_\n"; + $commandentered = $cipher->decrypt3(pack("H*", $_), $key); ++ $opt_d && print LOG " ... got $commandentered\n"; + $commandentered =~ s/\s+$//; + # If the command entered looks like one in the config file, execute it and + # print it's return code +@@ -72,6 +89,8 @@ + } + } + ++################################################################################# ++ + sub Check_Command { + # If I don't have a config file given, barf the mini-howto + unless ($opt_c) { +@@ -89,30 +108,31 @@ + } + } + ++################################################################################### ++ + sub Get_Configs { + my $opt_c = $_[0]; +- my $line; +- my $command; +- my $plugin; +- my $garbage; ++ ++ my %commands; + + # Open the config file... + open(FILE, "$opt_c") || die "Cannot open file at $opt_c"; +- foreach $line (<FILE>) { ++ foreach my $line (<FILE>) { + chomp($line); +-# Ignore comments +- unless ($line =~ /^#/) { ++# Ignore comments and blank lines ++ unless ($line =~ /^#/ or $line =~ /^\s*$/) { + # If it's a command line, grab the command name and toss it in a name value + # hash. The value is the command to execute. +- if ($line =~ /command\[.*\]=/) { +- ($garbage, $plugin) = split(/\=/, $line); +- ($garbage, $garbage, $command) = split(/(\[|\])/, $line); ++ if (my ($command,$plugin) = $line =~ /^\s*command\[(.+)\]=(.*)$/) { + $commands{$command} = $plugin; ++ $opt_d && print LOG "Got command '$command' = $plugin\n"; + # If it's the secret, we want it! +- } elsif ($line =~ /secret=/) { +- ($garbage, $key) = split(/\=/, $line, 2); ++ } elsif ($line =~ /secret=(.+)/) { ++ $key = $1; + } + } + } + close(FILE); ++ ++ return %commands; + } + + diff --git a/net/nrpep/files/patch-ab b/net/nrpep/files/patch-ab new file mode 100644 index 000000000000..d8a0da71decf --- /dev/null +++ b/net/nrpep/files/patch-ab @@ -0,0 +1,99 @@ +--- Makefile.orig Wed Jan 5 23:04:22 2000 ++++ Makefile Wed Apr 10 18:24:16 2002 +@@ -3,50 +3,57 @@ + # + + # +-# Configuration Files ++# Configuration Files + # + + # + # What directory the server program (nrpep) should live in + # +-nrpepserverdir = "/usr/sbin" ++nrpepserverdir = $(PREFIX)/sbin + + # + # What directory the plugin client should live in + # +-nrpepplugindir = "/usr/local/netsaint/libexec" ++nrpepplugindir = $(PREFIX)/libexec/netsaint + + # + # What user should own nrpep + # +-nrpepowner = "root" ++nrpepowner = root + + # + # What group should own nrpep + # +-nrpepgroup = "root" ++nrpepgroup = wheel + + # + # What user should own check_nrpep + # +-checknrpepowner = "netsaint" ++checknrpepowner = root + + # + # What group should own check_nrpep + # +-checknrpepgroup = "netsaint" ++checknrpepgroup = wheel + + # + # What directory should the nrpep config files go to + # +-nrpepconfigdir = "/usr/local/netsaint/etc" ++nrpepconfigdir = $(PREFIX)/etc/netsaint + + # *************************************** + # DO NOT CHANGE ANYTHING BELOW THIS POINT + # *************************************** + + all: +- cat README | more ++ mv nrpep.cfg nrpep.cfg.orig ++ cat nrpep.cfg.orig | sed -e 's%/usr/local/netsaint/libexec%$(PREFIX)/libexec/netsaint%' > nrpep.cfg ++ ++install: install-client install-server ++ if [ ! -d "$(PREFIX)/share/doc/nrpep" ]; then \ ++ mkdir -p $(PREFIX)/share/doc/nrpep; \ ++ fi ++ cp README $(PREFIX)/share/doc/nrpep + + install-client: + `if [ ! -d "$(nrpepplugindir)" ]; then \ +@@ -55,8 +62,8 @@ + `if [ ! -d "$(nrpepconfigdir)" ]; then \ + mkdir -p $(nrpepconfigdir); \ + fi` +- install -b -D -g $(checknrpepgroup) -o $(checknrpepowner) -m 755 check_nrpep $(nrpepplugindir); +- install -b -D -g $(checknrpepgroup) -o $(checknrpepowner) -m 644 check_nrpep.cfg $(nrpepconfigdir); ++ install -g $(checknrpepgroup) -o $(checknrpepowner) -m 755 check_nrpep $(nrpepplugindir); ++ install -g $(checknrpepgroup) -o $(checknrpepowner) -m 644 check_nrpep.cfg $(nrpepconfigdir); + + install-server: + `if [ ! -d "$(nrpepserverdir)" ]; then \ +@@ -65,8 +72,8 @@ + `if [ ! -d "$(nrpepconfigdir)" ]; then \ + mkdir -p $(nrpepconfigdir); \ + fi` +- install -b -D -g $(nrpepgroup) -o $(nrpepowner) -m 755 nrpep $(nrpepserverdir); +- install -b -D -g $(nrpepgroup) -o $(nrpepowner) -m 644 nrpep.cfg $(nrpepconfigdir); ++ install -g $(nrpepgroup) -o $(nrpepowner) -m 755 nrpep $(nrpepserverdir); ++ install -g $(nrpepgroup) -o $(nrpepowner) -m 644 nrpep.cfg $(nrpepconfigdir); + + uninstall-client: + rm $(nrpepplugindir)/check_nrpep +@@ -75,3 +82,7 @@ + uninstall-server: + rm $(nrpepserverdir)/nrpep + rm $(nrpepconfigdir)/nrpep.cfg ++ ++ ++ ++ diff --git a/net/nrpep/files/patch-ac b/net/nrpep/files/patch-ac new file mode 100644 index 000000000000..e89895349f03 --- /dev/null +++ b/net/nrpep/files/patch-ac @@ -0,0 +1,11 @@ +--- check_nrpep.old Tue Apr 2 16:52:01 2002 ++++ check_nrpep Wed Apr 10 17:31:09 2002 +@@ -59,7 +59,7 @@ + if ($opts{'f'}) { + &Get_Configs($opts{'f'}); + } else { +- &Get_Configs("/usr/local/netsaint/etc/check_nrpep.cfg"); ++ &Get_Configs("/usr/local/etc/netsaint/check_nrpep.cfg"); + } + # Longer timeout? If it's given on the command line use it, otherwise + # read from the config file |