2 # fixscript will replace this line with require innshellvars.pl
4 # Example wrapper nnrpd_auth.pl for support of old perl authentication
5 # scripts, by Erik Klavon.
7 # This file contains a sample perl script which can be used to
8 # duplicate the behavior of the old nnrpperlauth functionality. This
9 # script only supports authentication.
11 # How to use this wrapper:
12 # - append your old script to this file with two changes:
13 # - rename the old "auth_init" sub to "old_auth_init"
14 # - rename the old "authenticate" sub to "old_authenticate"
18 # This sub simply calls old_auth_init
19 # Comment this out if you don't need auth_init
27 # This sub modifies the global hash attributes so that it has all the
28 # entries required in the old way of doing things, calls
29 # old_authenticate, and transforms the return array into the new
33 $attributes{type} = "authenticate";
34 my @auth_array = old_authenticate();
38 $return_array[0] = $auth_array[0];
41 if ($auth_array[0] != 281) {
42 $return_array[1] = "Perl authentication error!";
45 $return_array[1] = "";