]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Removed unused module.
authorAlan T. DeKok <aland@freeradius.org>
Thu, 26 Jul 2012 13:33:57 +0000 (09:33 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 26 Jul 2012 14:35:28 +0000 (10:35 -0400)
This module does nothing useful

src/modules/rlm_copy_packet/Makefile [deleted file]
src/modules/rlm_copy_packet/README [deleted file]
src/modules/rlm_copy_packet/all.mk [deleted file]
src/modules/rlm_copy_packet/rlm_copy_packet.c [deleted file]

diff --git a/src/modules/rlm_copy_packet/Makefile b/src/modules/rlm_copy_packet/Makefile
deleted file mode 100644 (file)
index 2b182ac..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#
-# Makefile
-#
-# Version:     $Id$
-#
-
-TARGET         = rlm_copy_packet
-SRCS           = rlm_copy_packet.c
-
-include ../rules.mak
diff --git a/src/modules/rlm_copy_packet/README b/src/modules/rlm_copy_packet/README
deleted file mode 100644 (file)
index e2fe1bb..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-  This module initializes the Access-Accept packet by copying all of
-the attributes from the Access-Request to the Access-Accept.
-
-  It should be listed in the "authorize" section of "radiusd.conf",
-probably after "preprocess", but before any other module.
-
-
-       authorize {
-               ...
-
-               copy_packet
-
-               ...
-       }
-
-  It currently takes no configuration, so the sub-section of the
-"modules" section should look like:
-
-       modules {
-               ...
-
-               copy_packet {
-               }
-
-               ...
-       }
diff --git a/src/modules/rlm_copy_packet/all.mk b/src/modules/rlm_copy_packet/all.mk
deleted file mode 100644 (file)
index 0223986..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-TARGET         = rlm_copy_packet.a
-SOURCES                = rlm_copy_packet.c
diff --git a/src/modules/rlm_copy_packet/rlm_copy_packet.c b/src/modules/rlm_copy_packet/rlm_copy_packet.c
deleted file mode 100644 (file)
index 48e536c..0000000
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * rlm_copy_packet.c
- *
- * Version:    $Id$
- *
- *   This program is free software; you can redistribute it and/or modify
- *   it under the terms of the GNU General Public License as published by
- *   the Free Software Foundation; either version 2 of the License, or
- *   (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
- *
- * Copyright 2004,2006  The FreeRADIUS server project
- * Copyright 2004  Alan DeKok <aland@cladju.com>
- */
-
-#include <freeradius-devel/ident.h>
-RCSID("$Id$")
-
-#include <freeradius-devel/radiusd.h>
-#include <freeradius-devel/modules.h>
-
-/*
- *     Define a structure for our module configuration.
- *
- *     It doesn't take any configuration right now...
- */
-typedef struct rlm_packet_t {
-       char            *string;
-} rlm_packet_t;
-
-
-/*
- *     A mapping of configuration file names to internal variables.
- *
- *     Note that the string is dynamically allocated, so it MUST
- *     be freed.  When the configuration file parse re-reads the string,
- *     it free's the old one, and strdup's the new one, placing the pointer
- *     to the strdup'd string into 'config.string'.  This gets around
- *     buffer over-flows.
- */
-static const CONF_PARSER module_config[] = {
-  { "string",  PW_TYPE_STRING_PTR, offsetof(rlm_packet_t,string), NULL,  NULL},
-
-  { NULL, -1, 0, NULL, NULL }          /* end the list */
-};
-
-
-static int packet_detach(void *instance)
-{
-       free(instance);
-       return 0;
-}
-
-
-/*
- *     Do any per-module initialization that is separate to each
- *     configured instance of the module.  e.g. set up connections
- *     to external databases, read configuration files, set up
- *     dictionary entries, etc.
- *
- *     If configuration information is given in the config section
- *     that must be referenced in later calls, store a handle to it
- *     in *instance otherwise put a null pointer there.
- */
-static int packet_instantiate(CONF_SECTION *conf, void **instance)
-{
-       rlm_packet_t *inst;
-
-       /*
-        *      Set up a storage area for instance data
-        */
-       inst = rad_malloc(sizeof(*inst));
-       if (!inst) {
-               return -1;
-       }
-       memset(inst, 0, sizeof(*inst));
-
-       /*
-        *      If the configuration parameters can't be parsed, then
-        *      fail.
-        */
-       if (cf_section_parse(conf, inst, module_config) < 0) {
-               packet_detach(inst);
-               return -1;
-       }
-
-       *instance = inst;
-
-       return 0;
-}
-
-
-/*
- *     Initialize the reply with the request.
- */
-static int packet_authorize(void *instance, REQUEST *request)
-{
-       VALUE_PAIR      *vps;
-
-       instance = instance;    /* -Wunused */
-
-       vps = paircopy(request->packet->vps);
-       pairadd(&(request->reply->vps), vps);
-       return RLM_MODULE_UPDATED;
-}
-
-
-/*
- *     The module name should be the only globally exported symbol.
- *     That is, everything else should be 'static'.
- *
- *     If the module needs to temporarily modify it's instantiation
- *     data, the type should be changed to RLM_TYPE_THREAD_UNSAFE.
- *     The server will then take care of ensuring that the module
- *     is single-threaded.
- */
-module_t rlm_copy_packet = {
-        RLM_MODULE_INIT,
-       "copy_packet",
-       RLM_TYPE_THREAD_SAFE,           /* type */
-       packet_instantiate,             /* instantiation */
-       packet_detach,                  /* detach */
-       {
-               NULL,                   /* authentication */
-               packet_authorize,       /* authorization */
-               NULL,                   /* preaccounting */
-               NULL,                   /* accounting */
-               NULL,                   /* checksimul */
-               NULL,                   /* pre-proxy */
-               NULL,                   /* post-proxy */
-               NULL                    /* post-auth */
-       },
-};