亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
欧美性一级生活| 国模无码大尺度一区二区三区| 激情深爱一区二区| av网站一区二区三区| 91精品国产日韩91久久久久久| 国产欧美日韩精品一区| 日韩影视精彩在线| 欧美理论在线播放| 亚洲人成伊人成综合网小说| 国产成人一区二区精品非洲| 日韩欧美美女一区二区三区| 亚洲国产精品一区二区久久 | 国产.欧美.日韩| 91麻豆精品国产91久久久久久 | 国产网站一区二区三区| 日本中文字幕一区二区有限公司| 色哟哟国产精品| 亚洲精品免费电影| 色综合久久综合中文综合网| 国产精品日产欧美久久久久| 狠狠色狠狠色合久久伊人| 日韩免费性生活视频播放| 麻豆精品在线播放| 亚洲综合在线第一页| 青青草91视频| 日韩精品综合一本久道在线视频| 波多野结衣一区二区三区 | 久热成人在线视频| 欧美老年两性高潮| 亚洲国产日韩综合久久精品| 欧美日韩午夜在线视频| 日本不卡1234视频| 久久九九影视网| av一二三不卡影片| 亚洲最新视频在线播放| 欧美日韩国产综合一区二区 | 亚洲成人久久影院| 欧美日韩国产中文| 国产成人高清在线| 亚洲综合偷拍欧美一区色| 欧美精品在线视频| 国产精品自在欧美一区| 一区二区欧美在线观看| 精品国产1区二区| av激情亚洲男人天堂| 三级不卡在线观看| 中文字幕色av一区二区三区| 欧美日韩精品三区| 99re亚洲国产精品| 国产最新精品免费| 亚洲一二三区视频在线观看| 久久久噜噜噜久久人人看| 制服丝袜亚洲播放| 一本一道波多野结衣一区二区| 国产在线精品视频| 男男视频亚洲欧美| 亚洲午夜国产一区99re久久| 久久精品亚洲乱码伦伦中文| 久热成人在线视频| 91精品欧美一区二区三区综合在| 免费高清在线视频一区·| 欧美日韩国产一二三| 偷拍一区二区三区| 亚洲精品一线二线三线无人区| av中文一区二区三区| 另类专区欧美蜜桃臀第一页| 亚洲一区二区四区蜜桃| 2014亚洲片线观看视频免费| 在线精品观看国产| 成人午夜在线播放| 精品1区2区3区| 欧美在线观看视频在线| 高清成人在线观看| 精品一区二区三区视频| 日本最新不卡在线| 亚洲r级在线视频| 亚洲精品视频在线看| 国产精品白丝在线| 国产精品女上位| 亚洲人快播电影网| 亚洲一级二级三级在线免费观看| 亚洲午夜电影在线| 一区二区三区欧美视频| 亚洲伊人色欲综合网| 亚洲欧美韩国综合色| 国产精品美女一区二区三区 | 欧美在线不卡一区| 欧美性视频一区二区三区| 欧美在线|欧美| 欧美一级一级性生活免费录像| 欧美日韩国产中文| 欧美成人精品3d动漫h| 久久精品在线观看| 中文子幕无线码一区tr| 亚洲女人****多毛耸耸8| 亚洲精品你懂的| 日韩av成人高清| 激情综合一区二区三区| 国产高清在线精品| 色8久久精品久久久久久蜜| 91精品国产综合久久久久久久| 久久久99精品久久| 一区二区三区丝袜| 久久国产婷婷国产香蕉| jlzzjlzz亚洲日本少妇| 日本韩国欧美一区| 日韩无一区二区| 国产精品久久久久久久久久久免费看 | 99久久夜色精品国产网站| 欧美精品久久99| 亚洲日本韩国一区| 日韩avvvv在线播放| 懂色av一区二区三区免费看| 99久久国产免费看| 欧美精品xxxxbbbb| 中文字幕av一区二区三区高 | 欧美日韩国产美| 中文字幕一区二区5566日韩| 日本aⅴ亚洲精品中文乱码| 91在线播放网址| 久久久久国产精品人| 午夜成人免费视频| 欧美视频一区二区三区在线观看| 欧美极品另类videosde| 久久国产精品色| 欧美日本免费一区二区三区| 亚洲美女一区二区三区| 国产成人免费xxxxxxxx| 欧美一区二区三区小说| 综合电影一区二区三区| 国产成人在线视频网址| 日韩一区二区中文字幕| 亚洲综合在线观看视频| 91在线无精精品入口| 中文字幕字幕中文在线中不卡视频| 激情另类小说区图片区视频区| 91精品久久久久久久99蜜桃 | 天天亚洲美女在线视频| 欧美剧在线免费观看网站 | 亚洲免费av高清| 一本大道综合伊人精品热热| 成人免费小视频| 99久久精品国产一区二区三区| 日本一区二区三区电影| 成人性生交大片免费看视频在线 | 亚洲精品ww久久久久久p站| 91美女片黄在线| 日韩中文字幕麻豆| 欧美精品一区二区三区在线| 精品亚洲成av人在线观看| 日韩一区二区免费在线观看| 日本网站在线观看一区二区三区 | 91久久久免费一区二区| 亚洲在线成人精品| 欧美一级国产精品| 韩国毛片一区二区三区| 国产精品久久久久久久久图文区| 99国产一区二区三精品乱码| 亚洲欧洲日韩在线| 欧美日韩黄色一区二区| 国产电影一区二区三区| 亚洲二区在线视频| 欧美人牲a欧美精品| 国产在线精品一区二区不卡了| 国产精品久久久久久亚洲毛片 | 国产精品久久毛片a| 91福利在线免费观看| 精品系列免费在线观看| 自拍av一区二区三区| 亚洲精品一区二区精华| 99久久精品国产精品久久| 日韩电影免费在线| 亚洲天堂2016| 国产日韩高清在线| 91精品欧美综合在线观看最新| av中文字幕在线不卡| 国内精品在线播放| 轻轻草成人在线| 亚洲国产高清在线观看视频| 欧美猛男gaygay网站| 99视频超级精品| 国产成人精品亚洲777人妖| 亚洲第一久久影院| 亚洲欧美一区二区三区久本道91| 欧美经典三级视频一区二区三区| 欧美精品一区二区精品网| 欧美日韩不卡一区| 欧美日韩免费高清一区色橹橹| 成人性生交大合| 国产v综合v亚洲欧| 国产在线视频一区二区| 蜜桃久久久久久久| 久久狠狠亚洲综合| 久久精品国产在热久久| 美女视频黄久久| 国产在线一区观看| 国产福利一区二区三区视频在线 | 欧美精品在欧美一区二区少妇| 欧美午夜电影一区| 欧美最新大片在线看|