From: Alan T. DeKok Date: Thu, 26 Jul 2012 13:33:57 +0000 (-0400) Subject: Removed unused module. X-Git-Tag: release_3_0_0_beta0~111 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b44327ff5589cfadce1a3c71dd6e691c926b5871;p=thirdparty%2Ffreeradius-server.git Removed unused module. This module does nothing useful --- diff --git a/src/modules/rlm_copy_packet/Makefile b/src/modules/rlm_copy_packet/Makefile deleted file mode 100644 index 2b182ac837f..00000000000 --- a/src/modules/rlm_copy_packet/Makefile +++ /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 index e2fe1bb63cc..00000000000 --- a/src/modules/rlm_copy_packet/README +++ /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 index 022398647ba..00000000000 --- a/src/modules/rlm_copy_packet/all.mk +++ /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 index 48e536c4d4b..00000000000 --- a/src/modules/rlm_copy_packet/rlm_copy_packet.c +++ /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 - */ - -#include -RCSID("$Id$") - -#include -#include - -/* - * 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 */ - }, -};