chiark / gitweb /
REORG Delete everything that's not innduct or build system or changed for innduct
[innduct.git] / samples / nnrpd_access_wrapper.pl.in
diff --git a/samples/nnrpd_access_wrapper.pl.in b/samples/nnrpd_access_wrapper.pl.in
deleted file mode 100644 (file)
index 2a2a388..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-#! /usr/bin/perl
-# fixscript will replace this line with require innshellvars.pl
-
-# Example wrapper nnrpd_access.pl for support of old perl authentication
-# scripts, by Erik Klavon.
-
-# This file contains a sample perl script which can be used to
-# duplicate the behavior of the old nnrpperlauth functionality. This
-# script only supports access control.
-
-# How to use this wrapper:
-# - append your old script to this file with two changes:
-# - rename the old "auth_init" sub to "old_auth_init"
-# - rename the old "authenticate" sub to "old_authenticate"
-
-
-# access
-# This sub modifies the global hash attributes so that it has all the
-# entries required in the old way of doing things, calls
-# old_authenticate, and creates a return hash with the right attributes.
-
-sub access {
-    # Comment this out if you don't need auth_init.
-    old_auth_init();
-
-    $attributes{type} = "connect";
-    my @connect_array = old_authenticate();
-    my %hash;
-
-    # handle max rate
-    if ($connect_array[4]) {
-        # Force perl to make a C string out of this integer, 
-        # or else bad things will happen. Sigh.
-        $hash{"max_rate"} = $connect_array[4] . "\0"; 
-    }
-
-    # handle read boolean, set to wildmat
-    if ($connect_array[1]) {
-        $hash{"read"} = $connect_array[3];
-    }
-
-    # handle post boolean, set to wildmat
-    if ($connect_array[2]) {
-        $hash{"post"} = $connect_array[3];
-    }
-
-    return %hash;    
-}