/[radius]/radius/radzap/radzap.c
ViewVC logotype

Diff of /radius/radzap/radzap.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.17 by gray, Tue Jul 9 12:29:15 2002 UTC revision 1.18 by gray, Wed Apr 30 08:38:30 2003 UTC
# Line 1  Line 1 
1  /* This file is part of GNU RADIUS.  /* This file is part of GNU Radius.
2     Copyright (C) 2000, Sergey Poznyakoff     Copyright (C) 2000,2001,2002,2003 Sergey Poznyakoff
3        
4     This program is free software; you can redistribute it and/or modify     GNU Radius is free software; you can redistribute it and/or modify
5     it under the terms of the GNU General Public License as published by     it under the terms of the GNU General Public License as published by
6     the Free Software Foundation; either version 2 of the License, or     the Free Software Foundation; either version 2 of the License, or
7     (at your option) any later version.     (at your option) any later version.
8        
9     This program is distributed in the hope that it will be useful,     GNU Radius is distributed in the hope that it will be useful,
10     but WITHOUT ANY WARRANTY; without even the implied warranty of     but WITHOUT ANY WARRANTY; without even the implied warranty of
11     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12     GNU General Public License for more details.     GNU General Public License for more details.
13        
14     You should have received a copy of the GNU General Public License     You should have received a copy of the GNU General Public License
15     along with this program; if not, write to the Free Software Foundation,     along with GNU Radius; if not, write to the Free Software Foundation,
16     Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */     Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
17    
 #ifndef lint  
 static char rcsid[] =  
 "$Id$";  
 #endif  
   
18  #ifdef HAVE_CONFIG_H  #ifdef HAVE_CONFIG_H
19  # include <config.h>  # include <config.h>
20  #endif  #endif
# Line 74  static struct argp_option options[] = { Line 69  static struct argp_option options[] = {
69  };  };
70    
71  static error_t  static error_t
72  parse_opt (key, arg, state)  parse_opt(int key, char *arg, struct argp_state *state)
         int key;  
         char *arg;  
         struct argp_state *state;  
73  {  {
74          struct arguments *args = state->input;          struct arguments *args = state->input;
75                    
# Line 132  static struct argp argp = { Line 124  static struct argp argp = {
124   *      Zap a user from the radutmp and radwtmp file.   *      Zap a user from the radutmp and radwtmp file.
125   */   */
126  int  int
127  main(argc, argv)  main(int argc, char **argv)
         int argc;  
         char **argv;  
128  {  {
129          UINT4   ip = 0;          UINT4   ip = 0;
130          time_t  t;          time_t  t;
# Line 181  main(argc, argv) Line 171  main(argc, argv)
171   *      Zap a user, or all users on a NAS, from the radutmp file.   *      Zap a user, or all users on a NAS, from the radutmp file.
172   */   */
173  int  int
174  radzap(nasaddr, port, user, t)  radzap(UINT4 nasaddr, int port, char *user, time_t t)
         UINT4 nasaddr;  
         int port;  
         char *user;  
         time_t t;  
175  {  {
176          struct radutmp  *up;          struct radutmp  *up;
177          radut_file_t    file;          radut_file_t    file;
# Line 224  radzap(nasaddr, port, user, t) Line 210  radzap(nasaddr, port, user, t)
210  }  }
211    
212  int  int
213  confirm(utp)  confirm(struct radutmp *utp)
         struct radutmp *utp;  
214  {  {
215          char buf[MAX_LONGNAME];          char buf[MAX_LONGNAME];
216          NAS *cl;          NAS *cl;
# Line 254  confirm(utp) Line 239  confirm(utp)
239  }  }
240    
241  int  int
242  write_wtmp(ut)  write_wtmp(struct radutmp *ut)
         struct radutmp *ut;  
243  {  {
244          return radwtmp_putent(radwtmp_path, ut);          return radwtmp_putent(radwtmp_path, ut);
245  }  }

Legend:
Removed from v.1.17  
changed lines
  Added in v.1.18

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26