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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? login.c

?? <B>Digital的Unix操作系統(tǒng)VAX 4.2源碼</B>
?? C
?? 第 1 頁 / 共 3 頁
字號(hào):
#ifndef lintstatic  char    *sccsid = "@(#)login.c	4.6	(ULTRIX)	2/14/91";#endif lint/************************************************************************ *									* *		Copyright (c) 1986, 1987, 1988, 1989, 1990, 1991 by	* *		Digital Equipment Corporation, Maynard, MA		* *			All rights reserved.				* *									* *   This software is furnished under a license and may be used and	* *   copied  only  in accordance with the terms of such license and	* *   with the  inclusion  of  the  above  copyright  notice.   This	* *   software  or  any  other copies thereof may not be provided or	* *   otherwise made available to any other person.  No title to and	* *   ownership of the software is hereby transferred.			* *									* *   This software is  derived  from  software  received  from  the	* *   University    of   California,   Berkeley,   and   from   Bell	* *   Laboratories.  Use, duplication, or disclosure is  subject  to	* *   restrictions  under  license  agreements  with  University  of	* *   California and with AT&T.						* *									* *   The information in this software is subject to change  without	* *   notice  and should not be construed as a commitment by Digital	* *   Equipment Corporation.						* *									* *   Digital assumes no responsibility for the use  or  reliability	* *   of its software on equipment which is not supplied by Digital.	* *									* ************************************************************************//* *	$Source: /u1/usr/src/bin/RCS/login.c,v $ *	$Author: jg $ *	$Locker:  $ *	$Log:	login.c,v $ * *	14-Nov-90	dlong * Keep prompter alive for the whole time.  Prompter will be expected to * exit when the close-on-exec pipe to it is closed on shell startup.  This * allows all login errors, including shell-not-found to be reportable * through prompter.  It also allows prompter to signal login for * keyboard generated interrupts and provides an escape from a hard,intr * NFS home directory or mail spool file that has gone away. * *	26-Sep-90	wessex::lisa * Add two additional error messages to explain when a login is refused * because of an invalid or missing license PAK. Also extend time that * message is displayed for. * *	04-Sep-90	dlong * Don't hang with interrupts disabled if the HOME directory of mail spool * file is on an unavailable NFS partition. * *	17-Jul-89	jsd * Workaround ruserok() returning 0 on success, when it used to return 1. * *	19-Sep-89	dlong * Don't update auth entry (for fail count) if it doesn't reside on the local * machine. * *	22-Aug-89	dlong * Do an endauthent() before exec'ing password (to prevent retaining * an old cached entry), and before handing off to the user (to avoid * leaving them an open file descriptor for /etc/auth*).  Also, improve * error reporting since ERRORNXIT does not actually display the error * message.  Also, remove booby trap of closing all file descriptors after * having done a getauthuid() and a getpwnam() which might have intentionally * left open file decscriptors behind.  Also, only use one of T_ERROR or * T_RESULT in the audit record. * *	16-Aug-89	S. Logcher * Remove extraneous setpwent() and endpwent() calls from dodecnetlogin() * routine. * *	15-Aug-89	D. Long * Added prompter "-e" support.  Also, handle empty password better. * *	19-Jul-89 D. Long * Don't issue password expiration messages until after "Login succeeded" * message.  Otherwise the old prompter breaks.  Also, don't try and use the * UID as an audit ID.  Also, recognize the "e" option and ignore it.  Also, * fixed up some comments. * *	28-Jun-89 D. Long * Fixed problem logging in remotely in BSD mode.  Also, look for auth.h * in usr/include, not current directory. * *	15-May-89 Giles Atkinson * Convert login limits to use LMF * *	7/Jun/89	D. Long * Added security features for 4.0 * *	029 - Gary A. Gaudet. Fri Apr 21 21:57:43 EDT 1989 *		Added unbuffered stdin, cyphered name and password, *		and bzero buffer, for -P. * *	028 - Gary A. Gaudet. Mon Apr 17 14:37:31 EDT 1989 *		Added check for real root uid before using -P. * *	08/Jun/88	Mark Parenti * Changed signal handlers to void. * *	24/Mar/88	Tim Burke / Rich Hyde * Flush standard error after reporting an error.  Return success string to * prompter program to prevent reappearance of dialogue box on successful login. * *	29/Feb/88	Tim Burke / Rich Hyde * Flush output after reporting an error. * * 1.25 20/Jan/88	Mark Parenti * Change initialization of passwd structure to reflect changes made * for POSIX compliance. * *	07/Dec/87	Tim Burke / Rich Hyde * 1) Added a option -P <programname> that causes login to set it's *    standard input and output to be connected to the prompting program. *    This allows one to write a X based prompter that prompts for name and *    password and then ships that info back to login. * * 2) Added an option -C "string" to allow the system to specify a *    command to be run using the users shell.    It causes a (USER SHELL) -c *    "string" to be exec'ed.  This allows one to start a X based application *    but still allow normal logins, and [dr]logins to work. * *	08/Aug/87	Tim Burke * Look for LPASS8 in local mode word to preserve 8-bit mode as passed on * from getty(). * * 1.22 28/Jul/87	logcher * Changed doremotelogin() to call ruserok() in libc.a * * 1.20 02/Jun/87	logcher * In doremotelogin, when opening and reading ~user/.rhosts, seteuid * to that user uid and seteuid back after.  This avoids problems * when ~user is mounted remotely. * * 1.19 3/12/87		lp * Three times has to make it right! Finally fixed the decnet/telnet clash. * * 1.18 3/3/87		lp * Fixed the problem 1.15 problem abain (as 1.17 broke decnet). * *      2/25/87		Tim Burke * Allow setting of TERMIODISC if "termio" was specified in /etc/ttys. * * 1.17 2/12/87 	lp * Fixed a silly problem introduced in rev 1.15 (which broke telnet logins). *  * Rev 1.16 1/14/86	lp * Increased ahosts to 128 (from 32) as hostnames of the form * "washington.berekley.edu username" might be longer than 32 and * hence might not match. * * Revision 1.15 86/12/4	Tim Burke * A change to the dodecnetlogin routine to set proxy to -1 so that a prompt * for password will appear. * * Revision 1.14 86/8/8		Tim Burke * Inserted changes proposed by Peter Harbo of decnet.  These changes are * mainly in the dodecnetlogin routine to return -1 if username, but no * password has been received. * * Revision 1.13 86/6/24	Tim * Changed so that invalid rlogins and dlogins are handled similarly. * Inserted copyright notice. * * Revision 1.12 86/3/11	Robin * Made change to count logins in the kernel. * * Revision 1.11 86/2/5    10:05:00 robin * fixed problem that stopped erase from working if a second try * at logging in was made. * * Revision 1.8  85/10/22  10:30:00  was * add decnet support for remote login * * Revision 1.7  84/10/29  17:24:33  jg * fix problem with -p option.  Wasn't allowing user name, so getty * wasn't happy. *  * Revision 1.6  84/10/25  14:12:23  jg * Undid utmp changes.  Added -p flag to preserve environment passed * from getty. *  * Revision 1.5  84/10/01  09:28:38  jg * fix allocation bug that caused login to fail. *  * Revision 1.4  84/09/09  15:50:19  jg * fix bug introduced by environment change; was not doing rlogin right. *  * Revision 1.3  84/09/09  14:51:31  jg * fixed login not to destroy the environment set up by whomever is calling it. *  * Revision 1.2  84/09/01  11:39:08  jg * changes required by utmp.h changes. *  * Revision 1.1  84/04/20  01:07:13  root * Initial revision *  *//*static char *rcsid_login_c = "$Header: login.c,v 1.7 84/10/29 17:24:33 jg Exp $";static	char *sccsid = "@(#)login.c	4.34 (Berkeley) 84/05/07";*//* * login [ name ] * login -r hostname (for rlogind) * login -h hostname (for telnetd, etc.) */#define	NOPRIV#include <sys/param.h>#include <sys/quota.h>#include <sys/stat.h>#include <sys/time.h>#include <sys/resource.h>#include <sys/file.h>#include <sys/wait.h>#include <sys/types.h>#include <sys/sysinfo.h>#include <sys/utsname.h>#include <sys/ltatty.h>#ifndef	NOPRIV#include <sys/priv.h>#endif#include <sys/svcinfo.h>#include <fcntl.h>#include <sgtty.h>#include <utmp.h>#include <signal.h>#include <pwd.h>#include <grp.h>#include <stdio.h>#include <lastlog.h>#include <errno.h>#include <ttyent.h>#include <syslog.h>#include <limits.h>#include <lmf.h>#include <strings.h>#ifndef	NOAUDIT/* sample code to audit login's */#include <syscall.h>#include <sys/syscall.h>#include <sys/audit.h>#define LEN (SYSCALL_MASK_LEN+TRUSTED_MASK_LEN)#endif	NOAUDIT#include <auth.h>#include "proto.h"#ifdef AUTHEN#include <krb.h>#endif AUTHEN#define	SCMPN(a, b)	strncmp(a, b, sizeof(a))#define	SCPYN(a, b)	strncpy(a, b, sizeof(a))#define NMAX	sizeof(utmp.ut_name)#define	FALSE	0#define	TRUE	-1#ifndef	NOAUDITstatic char buf[LEN];static int i;#endif	NOAUDITchar	nolog[] =	"/etc/nologin";char	qlog[]  =	".hushlogin";char	maildir[40] =	"/usr/spool/mail/";char	lastlog[] =	"/usr/adm/lastlog";struct	passwd nouser = {"", "nope", -1, -1, -1, -1, -1, "", "", "", "" };struct	sgttyb ttyb;struct	utmp utmp;struct	ltattyi ltattyi;char	minusnam[16] = "-";char	*envinit[] =	{ 0 };		/* now set by setenv calls *//* * This bounds the time given to login.  We initialize it here * so it can be patched on machines where it's too small. */int	timeout = 240;char	term[64];struct	passwd *pwd, pwd_save;char *auth_db = AUTHORIZATION_DB;AUTHORIZATION *auth, *getauthuid();char	*strcat(), *rindex(), *index();void	timedout();char	*ttyname();char	*crypt16(), *crypt();char	*getpass();char	*stypeof();extern	char **environ;extern	int errno;struct	tchars tc = {	CINTR, CQUIT, CSTART, CSTOP, CEOT, CBRK};struct	ltchars ltc = {	CSUSP, CDSUSP, CRPRNT, CFLUSH, CWERASE, CLNEXT};int	rflag, dflag;int 	notty = FALSE;char	rusername[NMAX+1], lusername[NMAX+1];char	rpassword[NMAX+1];char	name[NMAX+1];char	*tty;static 	prompt_pid;static	eflag = 0;int	lastsend = -1;char	*pp;/* * Signal handler to just do an exit. */void exit_handler(sig, code, scp)int sig, code;struct sigconext *scp;{	exit(0);}/* * Function to send a message to the user, either through prompter * or the tty. */static sendreq(opcode, data)int opcode;char *data;{	REQ request;	register REQ *req = &request;	int i, length;	if(data)		length = strlen(data) + 1;	else		length = 0;/* * If using extended protocol send a packet out on stdout. */	if(eflag) {		SENDREQ(req, opcode, data, length);/* * Error messages are always acknowledged to provide a synchronous * user interface. */		if(opcode == ERROR) {			GETREQ(req, i);			if(req->opcode != ACKNOWLEDGE) {				sendreq(ERRORNXIT, "Protocol error\n");				cleanup(10, 1, "Protocol error");			}		}	} else {/* * If not using the extended protocol handle each message type * locally. */		lastsend = opcode;		switch(opcode) {/* * Get login user name. */		case GETNAME:		case GETENAME:			if(!notty) {				getloginname(data);				bcopy(&utmp, req->data, sizeof utmp);				req->length = sizeof utmp;			}			break;/* * Get users password. */		case GETPWD:		case GETEPWD:			if(!notty) {				pp = getpass(data);				strncpy(req->data, pp, REQDATASIZ);				req->length = strlen(pp) + 1;			}			break;/* * Display an error message. */		case ERROR:		case ERRORNXIT:			if(data && length > 0) {				fputs(data, stdout);				fflush(stdout);			}			break;/* * Display a non-error message. */		case VALID:		case VALIDNXIT:		case CHGPWD:			if(data && length > 0) {				fputs(data, stdout);				fflush(stdout);			}			break;/* * Only meaningful to extended protocol. */		case INITIALIZE:			break;		}	}}/* * Function to receive a message from the user, either through prompter * or some other route. */static getreq(req)REQ *req;{	int i;/* * If using extended protocol just retrieve a packet from stdin. */	if(eflag) {		GETREQ(req, i);	} else {/* * If not using extended protocol handle each case locally.  Look at * the last sent message to determine what input should be obtained. */		i = 0;		switch(lastsend) {/* * Waiting for input. */		case GETNAME:		case GETENAME:		case GETPWD:		case GETEPWD:			switch(lastsend) {/* * Waiting for a login name. */			case GETNAME:			case GETENAME:				req->opcode = NAME;				break;/* * Waiting for a password. */			case GETPWD:			case GETEPWD:				req->opcode = PASSWD;				break;			}/* * if notty is true we are talking to an old prompter.  Otherwise * we are talking to a simple tty and all cases are actually handled * in sendreq(). */			if(notty) {				i = fgets(req->data, REQDATASIZ, stdin) != NULL;				if(i)					req->length = strlen(req->data) + 1;				else {					req->length = 0;					i = -1;				}			}			break;/* * The initialize case is only meaningful with the extended protocol. */		case INITIALIZE:			break;		}		lastsend = -1;	}	return i;}/* * Prompter is used to solicit login identity and authentication * through a workstation display. */void start_prompter(prompter, tty) char *prompter;char *tty;{	int infds[2], outfds[2];	int i;		pipe(infds);	dup2(infds[0], 10);	close(infds[0]);	infds[0] = 10;	dup2(infds[1], 11);	close(infds[1]);	infds[1] = 11;	pipe(outfds);	dup2(outfds[0], 12);	close(outfds[0]);	outfds[0] = 12;	dup2(outfds[1], 13);	close(outfds[1]);	outfds[1] = 13;	if(eflag) {		close(2);		i = open("/dev/null", O_WRONLY);		if(i != 2) {			dup2(i, 2);			close(i);		}	}	if(prompt_pid = fork()) {		close(infds[1]);		close(outfds[0]);		/*		 * parents stdin;                 */		dup2(infds[0], 0);		close(infds[0]);		/* stdout */		dup2(outfds[1], 1);		if(!eflag) {			close(2);			dup2(outfds[1], 2);		}		close(outfds[1]);	} else {		close(infds[0]);		close(outfds[1]);		/* child stdin */		dup2(outfds[0], 0);		close(outfds[0]);		/* stdout */		dup2(infds[1], 1);		close(infds[1]);		if(eflag)			execlp(prompter, prompter, "-e", tty, 0);		else			execlp(prompter, prompter, tty, 0);		exit(0);	}	  }/* * audit_event() logs a LOGIN audit event. */audit_event(code, message)int code;char *message;{#ifndef	NOAUDIT	char tmask[AUD_NPARAM];	char *ar[AUD_NPARAM];	int i=0;	static char name[9];	static char host[17];/*  Fill in tokens.*/	strncpy(name, utmp.ut_name, 8);	tmask[i] = T_LOGIN;	ar[i++] = name;	if(pwd) {		tmask[i] = T_HOMEDIR;		ar[i++] = pwd->pw_dir;		tmask[i] = T_SHELL;		ar[i++] = pwd->pw_shell;	}	if(code)		tmask[i] = T_ERROR;	else		tmask[i] = T_RESULT;	ar[i++] = (char *) code;	if(message) {		tmask[i] = T_CHARP;		ar[i++] = message;	}	if(tty) {		tmask[i] = T_DEVNAME;		ar[i++] = tty;	}	strncpy(host, utmp.ut_host, 16);	if(*host) {		tmask[i] = T_CHARP;

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲一区二区三区视频在线| 日本一区二区电影| 久久久久久久久久美女| 国产偷国产偷精品高清尤物| 亚洲欧洲日产国码二区| 午夜精品在线视频一区| 极品美女销魂一区二区三区免费| 国产高清无密码一区二区三区| 色欧美乱欧美15图片| 日韩一卡二卡三卡国产欧美| 国产日韩v精品一区二区| 亚洲国产精品自拍| 国产传媒日韩欧美成人| 欧美在线观看你懂的| 久久这里只有精品首页| 一区二区三区不卡视频在线观看| 极品少妇一区二区| 欧美亚洲国产一区二区三区va| 精品美女在线观看| 亚洲一区二区三区四区五区黄 | 色婷婷av一区二区三区大白胸| 欧美精品第1页| 国产精品色一区二区三区| 日韩1区2区日韩1区2区| 91麻豆精品秘密| 日韩三级视频中文字幕| 亚洲免费大片在线观看| 国产精品一区二区91| 91精品国产全国免费观看| 亚洲日本韩国一区| 国精产品一区一区三区mba视频 | 日韩激情一二三区| 成人动漫一区二区三区| 日韩一区二区精品在线观看| 夜夜嗨av一区二区三区中文字幕 | 国产精品欧美一区喷水| 蜜桃一区二区三区在线观看| 色婷婷综合久久久中文字幕| 欧美精品一区二区不卡| 日韩高清欧美激情| 欧美色图12p| 亚洲色图在线看| 国产成人在线电影| 精品国产伦理网| 男女视频一区二区| 欧美日韩精品专区| 亚洲免费伊人电影| 99久久99久久免费精品蜜臀| 2023国产一二三区日本精品2022| 日本亚洲电影天堂| 精品视频1区2区3区| 亚洲手机成人高清视频| 国产91精品在线观看| 亚洲精品一区二区三区99| 日韩有码一区二区三区| 欧美四级电影网| 亚洲精品午夜久久久| 91亚洲资源网| ㊣最新国产の精品bt伙计久久| 国产寡妇亲子伦一区二区| 亚洲精品一区二区三区99| 久久精品国产精品亚洲精品| 91精品国产综合久久福利| 亚洲福利视频导航| 欧洲av一区二区嗯嗯嗯啊| 亚洲人妖av一区二区| 9色porny自拍视频一区二区| 欧美国产禁国产网站cc| 国产99一区视频免费 | 成人亚洲一区二区一| 久久精品一区二区三区不卡| 国产一区二区三区免费| 国产亚洲婷婷免费| 国产成人aaa| 国产精品福利一区| 97精品久久久午夜一区二区三区| 亚洲视频一区在线| 91日韩在线专区| 亚洲精选视频在线| 欧美日韩在线免费视频| 舔着乳尖日韩一区| 欧美一级欧美三级| 国产一区二区在线免费观看| 久久免费看少妇高潮| 国产精品456露脸| 欧美激情艳妇裸体舞| 91在线观看视频| 亚洲自拍偷拍麻豆| 51久久夜色精品国产麻豆| 久久99精品网久久| 欧美激情一区二区三区不卡 | 亚洲猫色日本管| 欧美最猛黑人xxxxx猛交| 午夜视频一区在线观看| 精品国产一区二区三区四区四 | 亚洲视频在线一区| 欧美日韩国产中文| 国产一区免费电影| 91精品国产色综合久久ai换脸 | 麻豆精品国产传媒mv男同| 欧美电影免费观看高清完整版在| 国产在线视频精品一区| 国产精品第五页| 精品视频在线免费观看| 伦理电影国产精品| 国产精品国产自产拍在线| 欧美日韩国产综合一区二区| 精品一区二区免费| 亚洲手机成人高清视频| 3d成人h动漫网站入口| 国产成人综合网站| 亚洲在线免费播放| 亚洲高清免费视频| 久久日一线二线三线suv| 91网站在线观看视频| 免费精品视频最新在线| 亚洲欧洲日本在线| 欧美一区二区三区影视| 99久久国产综合精品女不卡 | 精品少妇一区二区三区在线视频| 成人毛片视频在线观看| 亚洲国产日韩综合久久精品| 26uuu久久综合| 欧美专区在线观看一区| 国产精品一区二区三区99| 一区二区三区产品免费精品久久75| 精品国产免费一区二区三区香蕉| 一本到不卡精品视频在线观看| 免费看日韩精品| 一区二区三区精品在线观看| 久久综合网色—综合色88| 欧美色精品天天在线观看视频| 国产a级毛片一区| 日本成人在线一区| 亚洲欧美日韩国产另类专区| 久久久三级国产网站| 欧美老年两性高潮| 91在线观看视频| 国产精品一区不卡| 蜜臀av亚洲一区中文字幕| 一区二区三区精品视频在线| 欧美高清在线视频| 欧美成人精品福利| 欧美午夜片在线观看| 国产成人免费av在线| 美女在线观看视频一区二区| 一区二区三区**美女毛片| 国产精品免费久久久久| 久久久久久综合| 日韩一级在线观看| 欧美日韩国产首页| 91九色最新地址| 成年人午夜久久久| 国产一区二区免费视频| 免费精品视频在线| 午夜精品福利久久久| 亚洲最大成人网4388xx| 亚洲欧美一区二区三区国产精品| 国产日韩精品一区二区三区| 精品日韩在线观看| 555www色欧美视频| 欧美美女一区二区三区| 欧美私人免费视频| 欧美视频在线播放| 一本一本大道香蕉久在线精品 | 亚洲色图欧洲色图婷婷| 中文字幕乱码一区二区免费| 久久精品这里都是精品| 久久尤物电影视频在线观看| 精品成人一区二区三区四区| 欧美成人一区二区三区在线观看| 欧美精品在欧美一区二区少妇| 在线观看91视频| 91国内精品野花午夜精品| 91成人在线精品| 在线视频一区二区三| 在线欧美日韩国产| 欧美亚洲国产怡红院影院| 欧美在线免费视屏| 精品视频色一区| 欧美日韩1区2区| 91精品在线免费观看| 一区二区三区免费观看| 亚洲最新视频在线播放| 亚洲成a人片在线不卡一二三区| 一区二区在线看| 亚洲在线一区二区三区| 视频一区视频二区中文| 日韩电影在线一区二区三区| 免费成人在线视频观看| 九色综合国产一区二区三区| 国内国产精品久久| 国产v日产∨综合v精品视频| av电影天堂一区二区在线观看| www.一区二区| 日本高清免费不卡视频| 欧美精品日韩一区| 日韩美女视频在线| 久久综合999| 中文字幕一区二区日韩精品绯色|