亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? users.c

?? RADIUS協議的認證計費服務
?? C
?? 第 1 頁 / 共 5 頁
字號:
/* * RADIUS -- Remote Authentication Dial In User Service *  *  * Livingston Enterprises, Inc. 6920 Koll Center Parkway Pleasanton, CA   94566 *  * Copyright 1992 Livingston Enterprises, Inc. *  * Permission to use, copy, modify, and distribute this software for any * purpose and without fee is hereby granted, provided that this copyright * and permission notice appear on all copies and supporting documentation, * the name of Livingston Enterprises, Inc. not be used in advertising or * publicity pertaining to distribution of the program without specific * prior permission, and notice be given in supporting documentation that * copying and distribution is by permission of Livingston Enterprises, Inc. *  * Livingston Enterprises, Inc. makes no representations about the suitability * of this software for any purpose.  It is provided "as is" without express * or implied warranty. * *      Copyright (c) 1996 Ascend Communications, Inc. *      All rights reserved. * *      Permission to copy, display, distribute and make derivative works *      from this material in whole or in part for any purpose is granted *      provided that the above copyright notice and this paragraph are *      duplicated in all copies.  THIS SOFTWARE IS PROVIDED "AS IS" AND *      WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES INCLUDING, WITHOUT *      LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS *      FOR A PARTICULAR PURPOSE. * *//* * Copyright [C] The Regents of the University of Michigan and Merit Network, * Inc. 1992, 1993, 1994, 1995, 1996, 1997, 1998 All Rights Reserved * * Permission to use, copy, and modify this software and its documentation  * for any purpose and without fee is hereby granted, provided:  * * 1) that the above copyright notice and this permission notice appear in all *    copies of the software and derivative works or modified versions thereof,  * * 2) that both the copyright notice and this permission and disclaimer notice  *    appear in all supporting documentation, and  * * 3) that all derivative works made from this material are returned to the *    Regents of the University of Michigan and Merit Network, Inc. with *    permission to copy, to display, to distribute, and to make derivative *    works from the provided material in whole or in part for any purpose. * * Users of this code are requested to notify Merit Network, Inc. of such use * by sending email to aaa-admin@merit.edu * * Please also use aaa-admin@merit.edu to inform Merit Network, Inc of any * derivative works. * * Distribution of this software or derivative works or the associated * documentation is not allowed without an additional license. * * Licenses for other uses are available on an individually negotiated * basis.  Contact aaa-license@merit.edu for more information. * * THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE REGENTS OF THE * UNIVERSITY OF MICHIGAN AND MERIT NETWORK, INC. DO NOT WARRANT THAT THE * FUNCTIONS CONTAINED IN THE SOFTWARE WILL MEET LICENSEE'S REQUIREMENTS OR * THAT OPERATION WILL BE UNINTERRUPTED OR ERROR FREE.  The Regents of the * University of Michigan and Merit Network, Inc. shall not be liable for any * special, indirect, incidental or consequential damages with respect to any * claim by Licensee or any third party arising from use of the software. * * Merit AAA Server Support * Merit Network, Inc. * 4251 Plymouth Road, Suite C. * Ann Arbor, Michigan, USA 48105-2785 * * attn:  John Vollbrecht * voice: 734-764-9430 * fax:   734-647-3185 * email: aaa-admin@merit.edu * *//* * * Public entry points in this file: *  * add_file_list * addr_is_us * change_pw * client_is_us * client_queue_size * config_files * config_fini * config_init * dns_recv * find_auth_type * find_auth_ent * find_client * find_client_by_name * find_file_ent [[if USR_CCA is defined]] * find_host_by_name * free_user_ent * get_client_list * get_default_file_entry * get_our_addr * host_is_us * ip_hostname * pair_parse * return_file_list * update_expire * user_find * user_gettime * user_update *  */static char     sccsid[] =		"@(#)users.c 1.3 Copyright 1992 Livingston Enterprises Inc";static char     rcsid[] = "$Id: users.c,v 1.1.1.1 2001/08/10 20:49:29 bonze Exp $";#include	<sys/types.h>#include	<sys/param.h>#include	<sys/socket.h>#include	<sys/time.h>#include	<netinet/in.h>#include	<arpa/inet.h>#include	<stdio.h>#include	<stdlib.h>#include	<netdb.h>#include	<memory.h>#include	<unistd.h>#include	<ctype.h>#include	<dirent.h>#include	<syslog.h>#include	"radius.h"static int         fieldcpy PROTO((char *, char **, int));#ifdef USR_CCAstatic char        check_user PROTO((USER_ENTRY *));FILE_LIST         *find_file_ent PROTO((char *));#else	/* USR_CCA */static FILE_LIST  *find_file_ent PROTO((char *));#endif	/* USR_CCA */static void        free_clients PROTO((CLIENT_ENTRY *));static void        free_file_lists PROTO((void));static int         get_client_type PROTO((int, VENDOR_LIST **));#ifdef USR_CCAstatic char        parse_dns_nbns PROTO((char **, UINT4 *, UINT4 *));#endif	/* USR_CCA */static char       *parse_id PROTO((char *));static int         read_auth PROTO((FILE_LIST *, int));static int         read_clients PROTO((int));static int         read_users PROTO((FILE_LIST *, int));#if defined(ultrix) || defined(__hpux) || defined(__bsdi__) || defined(linux) || defined(SCO)extern int         h_errno;#endif	/* ultrix */extern char        send_buffer[RAD_SEND_BUFFER_SIZE];extern char        recv_buffer[RAD_RECV_BUFFER_SIZE];extern char        ourhostname[MAXHOSTNAMELEN];extern AATV       *authtype_tv[]; /* AATVs by authentication types */extern int         debug_flag;extern int         dumpcore;extern char       *radius_dir;extern FILE       *ddt;extern int         authfile_cnt;extern int         clients_cnt;extern int         users_cnt;extern int         file_logging; /* 0 => syslog, 1 => logfile, 2 => stderr */extern AATV       *rad_ipc_aatv;extern FILE       *msgfd;int                default_reply_holdtime = CLEANUP_DELAY;int                spawn_flag = 1; /* 0 => no spawning, 1 => spawning allowed */int                dnspid = 0;     /* PID of current DNS resolver process */UINT4              dns_address_aging = ADDRESS_AGING;UINT4              dns_address_window = 60;	/* one minute */int                doing_init = 1;	/* Always initing if not engine */char               default_radius_server[128] = DEFAULT_RADIUS_SERVER;char               default_tacacs_server[128] = DEFAULT_TACACS_SERVER;char               authfile_id[128];char               clients_id[128];int                rad_ipc_port = 0;MF_ENT             dns_addr_mf = { 0, 0 };	/* For DNS address structs. */MF_ENT             dns_client_mf = { 0, 0 };	/* For DNS address structs. */MF_ENT             dns_name_mf = { 0, 0 };	/* For DNS address structs. */MF_ENT             vendor_mf = { 0, 0 };	/* For vendors. */MF_ENT             vendor_list_mf = { 0, 0 };	/* For vendor lists. */#ifdef USR_CCAchar               dns_done = FALSE;UINT4              self_ip[SELF_IP_LEN]; /* Used with multi-homed servers */#else	/* USR_CCA */static UINT4       self_ip[11];		/* Used with multi-homed servers */#endif	/* USR_CCA */static FILE_LIST  *file_list = (FILE_LIST *) NULL;static CLIENT_ENTRY *client_list = (CLIENT_ENTRY *) NULL;static int         is_engine = 0;	/* rlmadmin(8) will not change this */static CLIENT_ENTRY *old_clients;static UINT4       last_client_ipaddr;static CLIENT_ENTRY *last_client_found;static char       *last_client_name;/************************************************************************* * *	Function: add_file_list * *	Purpose: Find an existing FILE_LIST entry on file_list with the *		 specified prefix or add and init a new one if the *		 entry doesn't already exist. * *************************************************************************/intadd_file_list (prefix)char           *prefix;{	FILE_LIST      *file_ent;	FILE_LIST     **fl_prev;#ifdef USR_CCA	ADDR_POOL      *apool;#endif /* USR_CCA */	static char    *func = "add_file_list";	dprintf(4, (LOG_AUTH, LOG_DEBUG, "%s: entered", func));	for (fl_prev = &file_list, file_ent = file_list;		file_ent;		fl_prev = &file_ent->next, file_ent = *fl_prev)	{		if (strcmp (file_ent->prefix, prefix) == 0)		{			return 0;		}	}	if ((file_ent = (FILE_LIST *) calloc (1, sizeof (FILE_LIST)))							== (FILE_LIST *) NULL)	{		logit (LOG_DAEMON, LOG_ALERT,			"%s: Couldn't allocate FILE_ENTRY storage", func);		return (-1);	}	file_ent->prefix = add_string (prefix, ASIS);	file_ent->user_list = (USER_ENTRY *) NULL;	file_ent->auth_list = (AUTH_ENTRY *) NULL;#ifdef USR_CCA	/*	 *	Add an entry for the default pool. That is, the pool for	 *	users who are statically assigned Framed IP addresses in	 *	the users file.	 */	if ((file_ent->pool_list = (ADDR_POOL *) calloc (1, sizeof (ADDR_POOL)))							== (ADDR_POOL *) NULL)	{		logit (LOG_DAEMON, LOG_ALERT,			"%s: Couldn't allocate ADDR_POOL storage", func);		return (-1);	}	apool = file_ent->pool_list;	apool->name = DEF_POOL_NAME;	apool->ip_address = 0;	apool->netmask = 0;	apool->network = 0;	apool->range = 0;	apool->count = 0;	apool->user_q = (ASSIGNED_IP *) NULL;	apool->next = (ADDR_POOL *) NULL;#endif	/* USR_CCA */	file_ent->next = (FILE_LIST *) NULL;	*fl_prev = file_ent;	return 0;} /* end of add_file_list () *//************************************************************************* * *	Function: addr_is_us * *	Purpose: Determine if we are the given host. * *	Returns: 1 if the given address is ours, *		 0 otherwise. * *************************************************************************/intaddr_is_us (addr)UINT4           addr;{	UINT4           *adptr;	for (adptr = self_ip; *adptr > 0; adptr++)	{		if (*adptr == addr)		{			return 1;		}	}	return 0;} /* end of addr_is_us () *//************************************************************************* * *	Function: change_pw * *	Purpose: Find the named user and change the password to the new value. * *	Remarks: This is called from passchange() only after the new *		 password has been validated.  The user was previously *		 found using user_find() so we know the user is in memory. * *	Returns: zero, if user's password has been changed in memory, *		 non-zero, otherwise. * *************************************************************************/intchange_pw (name, protocol, curpass, newpass)char           *name;int             protocol;VALUE_PAIR     *curpass;char           *newpass;{	int             namelen;	FILE_LIST      *file_ent;	VALUE_PAIR     *dbpass;		VALUE_PAIR     *prot_ent;	USER_ENTRY     *user_ent;	USER_ENTRY     *dflt_ent;	FILE           *debugout = stdout;	static char    *func = "change_pw";	dprintf(2, (LOG_AUTH, LOG_DEBUG, "%s: entered", func));	if ((file_ent = find_file_ent ((char *) NULL)) == (FILE_LIST *) NULL)	{		return (-1);	}	dflt_ent = file_list->user_list;	/*	 *	If there is no user file for this prefix, then use the	 *	first entry in file_list as the default file_ent.	 */	if ((user_ent = file_ent->user_list) == (USER_ENTRY *) NULL)	{		if (dflt_ent == (USER_ENTRY *) NULL)		{			/* No file entry, no password */			 return (-1);		}		user_ent = dflt_ent;	}	if ((namelen = strlen (name)) == 0)	{		return 1;	/* A null name would match every line. */	}	/*	 *	First check what type of lookup to do.	 *	See if user file(s) have been cached in memory.	 */	for (; user_ent; user_ent = user_ent->next)	{		/* Allow match for entry specifying framed protocol		 * type specified in "protocol".  An entry with a 		 * matching name but no framed-protocol type check 		 * item matches unconditionally.  An entry with a 		 * matching name and a framed-protocol type check 		 * item must match value in "protocol".		 */		if (strcmp (user_ent->name, name) == 0)		{			if ((prot_ent = get_vp (user_ent->check,						PW_FRAMED_PROTOCOL)) == NULL_VP)			{				break;			}			if (prot_ent->lvalue == protocol)			{				break;			}		}	}	if (!user_ent)	/* rc 1 => User not found */	{		return 1;	}	/* Find the password entry. */	dbpass = get_vp_ci (user_ent->check, CI_USER_PASSWORD, 0);	if ((dbpass == NULL_VP) || (dbpass->strvalue == (char *) NULL))	{		/* Missing our local copy of the password */		logit (LOG_DAEMON, LOG_ERR,			"%s: - Missing Local Password: %s", func);		return 1;	}	/* Let's be paranoid about this */	if (strcmp (dbpass->strvalue, curpass->strvalue))	{		logit (LOG_DAEMON, LOG_ERR,			"%s: - Password does not match cached password.", func);		return 1;	}	/* Go ahead and change it */		avpair_string_mod (dbpass, newpass, -1);	if (debug_flag >= 2)	{		if (ddt)		{			debugout = ddt;		}		fprintf (debugout, "Check items:\n");		debug_list (debugout, user_ent->check);		fprintf (debugout, "Reply items:\n");		debug_list (debugout, user_ent->reply);	}	return (0);	/* rc 0 => User found */} /* end of change_pw () */#ifdef USR_CCA/************************************************************************* * *	Function: check_user * *	Purpose: Processes Simultaneous-Use, Sessions-Allowed and *		 Address-Pool attributes, and checks for a valid *		 Termination-Action value. * ************************************************************************/static charcheck_user (user_ent)USER_ENTRY      *user_ent;{	VALUE_PAIR      *vp;	char            *func = "check_user";	if ((vp = get_vp_ci (user_ent->reply, CI_SIMULTANEOUS_USE, 0))								!= NULL_VP)	{		user_ent->sessions = vp->lvalue;		avpair_del (&user_ent->reply, CI_SIMULTANEOUS_USE, 0);	}	if ((vp = get_vp_ci (user_ent->reply, CI_ADDRESS_POOL_NAME, 0))								!= NULL_VP)	{		user_ent->pool_name = vp->strvalue;		avpair_del (&user_ent->reply, CI_ADDRESS_POOL_NAME, 0);		if ((vp = get_vp (user_ent->reply, PW_FRAMED_IP_ADDRESS))								!= NULL_VP)		{			logit (LOG_DAEMON,LOG_ERR,       "%s: User %s has a static Framed-IP-Address and an Address Pool defined",				func, user_ent->name);			return (-1);		}	}	if (user_ent->sessions > 1 ||		strcmp (user_ent->pool_name, DEF_POOL_NAME) != 0)	{		if (((vp = get_vp (user_ent->reply,					PW_TERMINATION_ACTION)) == NULL_VP))		{			/*			 *	This user's resources are to be managed.			 *	A Termination-Action attribute is required.			 */			logit (LOG_DAEMON, LOG_ERR,			   "%s: User %s-> Missing Termination Action attribute",				func, user_ent->name);			return (-1);		}		else if (vp->lvalue != MANAGE_RESOURCES)		{			logit (LOG_DAEMON, LOG_ERR,			   "%s: User %s-> Invalid Termination Action Attribute",				func, user_ent->name);			return (-1);		}	}	return (0);} /* end of check_user () */#endif /* USR_CCA *//************************************************************************* * *	Function: client_is_us * *	Purpose: Determine if we are the given host. * *	Returns: 1, if the given hostname is the name of this host, *		 0, otherwise. * *************************************************************************/intclient_is_us (ce)CLIENT_ENTRY    *ce;{

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美亚洲高清一区| 97久久久精品综合88久久| 久久99蜜桃精品| 激情av综合网| 色综合网站在线| 欧美日韩黄色影视| 久久欧美一区二区| 亚洲激情在线激情| 日韩二区三区四区| 波多野结衣视频一区| 欧美日韩一区二区在线观看视频| 91精品蜜臀在线一区尤物| 久久久噜噜噜久噜久久综合| 中文字幕一区二区5566日韩| 亚州成人在线电影| jlzzjlzz国产精品久久| 8x8x8国产精品| 亚洲三级理论片| 另类小说图片综合网| 91网站在线观看视频| 91精品国产91久久综合桃花 | 日韩欧美aaaaaa| 国产精品午夜春色av| 蜜桃精品视频在线| 色94色欧美sute亚洲线路一久 | 免费黄网站欧美| 色94色欧美sute亚洲线路二| 精品国产91久久久久久久妲己| 亚洲丝袜自拍清纯另类| 成人永久看片免费视频天堂| 日韩一区二区三区视频| 一区二区三区精品视频| 色综合久久综合中文综合网| 久久久久久久久久久电影| 亚洲国产精品麻豆| 91老师国产黑色丝袜在线| 国产精品九色蝌蚪自拍| 成人天堂资源www在线| 久久九九久精品国产免费直播| 久久www免费人成看片高清| 欧美一区二区三区在线视频| 午夜国产不卡在线观看视频| 制服丝袜av成人在线看| 婷婷久久综合九色综合绿巨人 | 自拍偷自拍亚洲精品播放| 国产suv精品一区二区6| 国产精品久久久久久久久久久免费看 | 亚洲h精品动漫在线观看| 欧美天堂一区二区三区| 免费一区二区视频| 国产日韩在线不卡| 在线免费观看不卡av| 偷拍一区二区三区| 欧美精品一区二区精品网| 国产成人亚洲精品青草天美| 亚洲免费观看高清| 日韩精品最新网址| av电影一区二区| 日韩av中文字幕一区二区三区 | 日韩黄色一级片| 亚洲国产精品高清| 日韩三级视频中文字幕| www.av精品| 久久精工是国产品牌吗| 亚洲私人影院在线观看| 欧美成人vr18sexvr| 在线看不卡av| 国产揄拍国内精品对白| 日本中文在线一区| 亚洲伦理在线精品| 国产日韩三级在线| 日韩一区二区三区三四区视频在线观看| 国产精品99久久久久久久女警 | 欧美在线观看一二区| 国产中文字幕精品| 蜜桃一区二区三区在线| 亚洲在线观看免费视频| 亚洲桃色在线一区| 中文字幕中文字幕一区二区| 精品第一国产综合精品aⅴ| 91精品婷婷国产综合久久| 色哦色哦哦色天天综合| 一本一本久久a久久精品综合麻豆 一本一道波多野结衣一区二区 | 日韩精品一区二区三区在线| 日本精品一区二区三区高清| 91成人国产精品| 欧美怡红院视频| 欧美乱妇一区二区三区不卡视频| 91福利国产精品| 欧美一二三区在线| 在线观看欧美黄色| 欧美性猛交xxxx乱大交退制版| 99久久国产免费看| 欧美一区二区三区在| 91精品国产全国免费观看| 欧美一区二视频| 久久久午夜精品| 一区二区三区欧美日韩| 日韩电影在线一区二区三区| 精一区二区三区| av亚洲精华国产精华| 欧美午夜一区二区三区| 精品国产乱码久久久久久影片| 欧美国产97人人爽人人喊| 亚洲va天堂va国产va久| 国产成人精品综合在线观看| 在线观看日产精品| 久久久噜噜噜久久人人看| 亚洲电影第三页| 成人午夜av影视| 精品免费日韩av| 天堂一区二区在线| 日本乱人伦aⅴ精品| 久久久久久久综合日本| 亚洲成人免费视| 日本久久电影网| 亚洲国产电影在线观看| 蜜桃视频在线观看一区| 欧美在线高清视频| 国产精品日日摸夜夜摸av| 韩国精品主播一区二区在线观看| 91精品国产全国免费观看| 一区二区三区四区在线免费观看| 成人久久久精品乱码一区二区三区 | 久久成人久久爱| 91精品婷婷国产综合久久性色| 婷婷成人综合网| 91精品在线免费观看| 精品综合免费视频观看| 久久久国产精华| 成av人片一区二区| 一区二区三区毛片| 欧美成人r级一区二区三区| 日韩一区欧美二区| 国产成人综合自拍| 亚洲精品五月天| 欧美理论在线播放| 国产一区视频导航| 国产精品久久久久一区二区三区共| 成人动漫一区二区在线| 夜夜嗨av一区二区三区| 欧美一级黄色大片| 国产精品91一区二区| 亚洲一区二区三区在线播放| 日韩一区二区在线看片| 99精品视频中文字幕| 日韩成人午夜电影| 亚洲色图制服丝袜| 欧美videossexotv100| 色偷偷久久人人79超碰人人澡| 免费在线视频一区| 日本一区二区免费在线观看视频 | 日本欧美在线看| 国产精品国产三级国产普通话99| 欧美日韩在线播放一区| 高清在线观看日韩| 国产一区二区三区免费观看| 婷婷久久综合九色综合伊人色| 亚洲日本丝袜连裤袜办公室| 精品美女在线观看| 制服丝袜激情欧洲亚洲| 欧美午夜理伦三级在线观看| 99久久99久久久精品齐齐| 国产精品一级二级三级| 91视频在线观看| 日本一区二区三区电影| 不卡一二三区首页| 国产精品一二三在| 国产剧情在线观看一区二区 | 国产一区二区三区在线观看免费视频 | 成人av影院在线| jvid福利写真一区二区三区| 国产精品一卡二卡在线观看| 国产在线看一区| 久久精品国产秦先生| 日韩黄色免费网站| 国产精品一二三区| 成人激情动漫在线观看| 色综合激情久久| 日韩一区二区在线观看| 日韩欧美国产成人一区二区| 久久精品一区二区三区不卡牛牛| 久久精品人人做人人综合| 国产精品免费网站在线观看| 亚洲欧美精品午睡沙发| 日本不卡免费在线视频| 成人午夜视频网站| 欧美日韩一区中文字幕| 久久久久成人黄色影片| 国产精品丝袜久久久久久app| 亚洲九九爱视频| 国产伦精品一区二区三区在线观看| 成人在线视频一区| 欧美岛国在线观看| 一区二区欧美在线观看| 国产精品一线二线三线| 欧美日韩成人综合在线一区二区| 国产精品久久久久一区| 麻豆专区一区二区三区四区五区| 日本韩国视频一区二区|