~ubuntu-branches/ubuntu/hardy/freeradius/hardy-proposed

« back to all changes in this revision

Viewing changes to src/main/session.c

  • Committer: Bazaar Package Importer
  • Author(s): Mark Hymers
  • Date: 2006-12-16 20:45:11 UTC
  • mfrom: (3.1.10 feisty)
  • Revision ID: james.westby@ubuntu.com-20061216204511-3pbbsu4s8jtehsor
Tags: 1.1.3-3
Fix POSIX compliance problem in init script.  Closes: #403384. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 * session.c    session management
3
3
 *
4
 
 * Version:     $Id: session.c,v 1.21 2003/07/23 19:50:39 aland Exp $
 
4
 * Version:     $Id: session.c,v 1.21.2.1.2.1 2006/03/24 17:54:57 aland Exp $
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
127
127
        int     status;
128
128
        int     n;
129
129
        char    address[16];
130
 
        char    port[8];
 
130
        char    port[11];
131
131
        RADCLIENT *cl;
132
132
 
133
133
        /*
196
196
                return WEXITSTATUS(status);
197
197
        }
198
198
 
199
 
        /*
200
 
         *      Child - exec checklogin with the right parameters.
201
 
         */
202
 
        for (n = 256; n >= 3; n--)
203
 
                close(n);
 
199
        closefrom(3);
204
200
 
205
201
        /*
206
202
         *  We don't close fd's 0, 1, and 2.  If we're in debugging mode,
212
208
         */
213
209
 
214
210
        ip_ntoa(address, nasaddr);
215
 
        sprintf(port, "%u", portnum);
 
211
        snprintf(port, 11, "%u", portnum);
216
212
 
217
213
#ifdef __EMX__
218
214
        /* OS/2 can't directly execute scripts then we call the command