~ubuntu-branches/ubuntu/jaunty/freeradius/jaunty-updates

« back to all changes in this revision

Viewing changes to src/modules/rlm_exec/rlm_exec.c

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2008-09-22 08:42:02 UTC
  • mfrom: (1.1.12 upstream)
  • Revision ID: james.westby@ubuntu.com-20080922084202-eyjprg3z55481ha5
Tags: 2.1.0+dfsg-0ubuntu1
* New upstream release.
* Fixes FTBFS issue with new libtool.
* Fixes listen on random port. (LP: #261809)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 * rlm_exec.c
3
3
 *
4
 
 * Version:     $Id: rlm_exec.c,v 1.30 2007/11/25 14:02:10 aland Exp $
 
4
 * Version:     $Id$
5
5
 *
6
6
 *   This program is free software; you can redistribute it and/or modify
7
7
 *   it under the terms of the GNU General Public License as published by
22
22
 */
23
23
 
24
24
#include <freeradius-devel/ident.h>
25
 
RCSID("$Id: rlm_exec.c,v 1.30 2007/11/25 14:02:10 aland Exp $")
 
25
RCSID("$Id$")
26
26
 
27
27
#include <freeradius-devel/radiusd.h>
28
28
#include <freeradius-devel/modules.h>
134
134
        /*
135
135
         *      FIXME: Do xlat of program name?
136
136
         */
137
 
        DEBUG2("rlm_exec (%s): Executing %s", inst->xlat_name, fmt);
 
137
        RDEBUG2("Executing %s", fmt);
138
138
        result = radius_exec_program(fmt, request, inst->wait,
139
139
                                     out, outlen, *input_pairs, NULL, inst->shell_escape);
140
 
        DEBUG2("rlm_exec (%s): result %d", inst->xlat_name, result);
 
140
        RDEBUG2("result %d", result);
141
141
        if (result != 0) {
142
142
                out[0] = '\0';
143
143
                return 0;
282
282
               (request->proxy->code == inst->packet_code)) ||
283
283
              (request->proxy_reply &&
284
284
               (request->proxy_reply->code == inst->packet_code)))) {
285
 
                DEBUG2("  rlm_exec (%s): Packet type is not %s.  Not executing.",
286
 
                       inst->xlat_name, inst->packet_type);
 
285
                RDEBUG2("Packet type is not %s.  Not executing.",
 
286
                       inst->packet_type);
287
287
                return RLM_MODULE_NOOP;
288
288
        }
289
289
 
298
298
         *      list is empty.
299
299
         */
300
300
        if (input_pairs && !*input_pairs) {
301
 
                DEBUG2("rlm_exec (%s): WARNING! Input pairs are empty.  No attributes will be passed to the script", inst->xlat_name);
 
301
                RDEBUG2("WARNING! Input pairs are empty.  No attributes will be passed to the script");
302
302
        }
303
303
 
304
304
        /*
380
380
                tmp = pairmake("Reply-Message", "Access denied (external check failed)", T_OP_SET);
381
381
                pairadd(&request->reply->vps, tmp);
382
382
 
383
 
                DEBUG2("Login incorrect (external check failed)");
 
383
                RDEBUG2("Login incorrect (external check failed)");
384
384
 
385
385
                request->reply->code = PW_AUTHENTICATION_REJECT;
386
386
                return RLM_MODULE_REJECT;
392
392
                 *      exit status.
393
393
                 */
394
394
                request->reply->code = PW_AUTHENTICATION_REJECT;
395
 
                DEBUG2("Login incorrect (external check said so)");
 
395
                RDEBUG2("Login incorrect (external check said so)");
396
396
                return RLM_MODULE_REJECT;
397
397
        }
398
398