⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 log_t20.c

📁 mgcp协议源代码。支持多种编码:g711
💻 C
字号:
/* * Program:	TOPS-20 server login * * Author:	Mark Crispin *		6158 NE Lariat Loop *		Bainbridge Island, WA  98110-2098 *		Internet: MRC@Panda.COM * * Date:	1 August 1988 * Last Edited:	22 August 2000 * * Copyright 2000 by Mark Crispin * *  Permission to use, copy, modify, and distribute this software and its * documentation for any purpose and without fee is hereby granted, provided * that the above copyright notices appear in all copies and that both the * above copyright notices and this permission notice appear in supporting * documentation, and that the name of Mark Crispin not be used in advertising * or publicity pertaining to distribution of the software without specific, * written prior permission.  This software is made available "as is", and * MARK CRISPIN DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, WITH REGARD TO * THIS SOFTWARE, INCLUDING WITHOUT LIMITATION ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, AND IN NO EVENT SHALL * MARK CRISPIN BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, * WHETHER IN AN ACTION OF CONTRACT, TORT (INCLUDING NEGLIGENCE) OR STRICT * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF * THIS SOFTWARE. * *//* Dedication: * This file is dedicated with affection to the TOPS-20 operating system, which * set standards for user and programmer friendliness that have still not been * equaled by more `modern' operating systems. * Wasureru mon ka!!!! *//* Server log in * Accepts: user name string *	    password string *	    authenticating user name string *	    argument count *	    argument vector * Returns: T if password validated, NIL otherwise */long server_login (char *user,char *pass,char *authuser,int argc,char *argv[]){  int uid;  int argblk[5];  if (authuser && *authuser) {	/* not available */    syslog (LOG_NOTICE|LOG_AUTH,	    "Login %s failed: invalid authentication ID %s host=%.80s",	    user,authuser,tcp_clienthost ());    sleep (3);    return NIL;  }  argblk[1] = RC_EMO;		/* require exact match */  argblk[2] = (int) (user-1);	/* user name */  argblk[3] = 0;		/* no stepping */  if (!jsys (RCUSR,argblk)) return NIL;  uid = argblk[1] = argblk[3];	/* user number */  argblk[2] = (int) (pass-1);	/* password */  argblk[3] = 0;		/* no special account */  if (!jsys (LOGIN,argblk)) return NIL;  return T;}/* Authenticated server log in * Accepts: user name string *	    authenticating user name string *	    argument count *	    argument vector * Returns: T if password validated, NIL otherwise */long authserver_login (char *user,char *authuser,int argc,char *argv[]){  return NIL;			/* how to implement this on TOPS-20??? */}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -