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

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

?? loginlib.c

?? vxworks5.5.1源代碼。完整源代碼
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* loginLib.c - user login/password subroutine library *//* Copyright 1984-1992 Wind River Systems, Inc. */#include "copyright_wrs.h"/*modification history--------------------02a,26may99,pfl  fixed login password encryption (SPR 9584)01z,14mar99,jdi  doc: removed refs to config.h and/or configAll.h (SPR 25663).01y,14jul97,dgp  doc: change ^D to CTRL-D in loginPrompt01x,10jul97,dgp  doc: fix SPR 8303, loginUserAdd() saves address of password01w,01aug96,sgv  fix for spr #4971, passwd set in loginPrompt.01v,13oct95,jdi  fixed vxencrypt pathnames; changed refs to UNIX to "host".01u,14mar93,jdi  fixed typo.01t,20jan93,jdi  documentation cleanup for 5.1.01s,20jul92,jmm  added group parameter to symAdd call01r,18jul92,smb  Changed errno.h to errnoLib.h.01q,26may92,rrr  the tree shuffle01p,13dec91,gae  ANSI cleanup.01o,19nov91,rrr  shut up some ansi warnings.01n,14nov91,jpb  fixed problem with logout trashing user name.		 moved all references to originalUser and originalPasswd		 from loginLib.c to shellLib.c (local). see spr 916 and 1100.01m,04oct91,rrr  passed through the ansification filter                  -changed functions to ansi style		  -changed includes to have absolute path from h/		  -changed VOID to void		  -changed copyright notice01l,13may91,shl  undo'ed 01j.01k,01may91,jdi  documentation tweaks.01j,29apr91,shl  added call to save machine name, user and group ids (spr 916).01i,05apr91,jdi	 documentation -- removed header parens and x-ref numbers;		 doc review by shl.01h,11feb91,jaa	 documentation cleanup.01g,08oct90,shl  fixed to set NULL password correctly in remCurIdSet().01f,04oct90,shl  fixed loginPrompt() to save original and install		 new user name and password after successful rlogin.01e,10aug90,dnw  made loginDefaultEncrypt be default implicitly by setting		   encryptRtn to loginDefaultEncrypt;		 cleaned-up documentation.01d,15jul90,gae  made loginPrompt check userName against NULL -- bug fix.01c,09may90,shl  fixed loginStringSet to copy MAX_LOGIN_NAME_LEN bytes.01b,19apr90,shl  de-linted.01a,03feb90,shl  written.*//*DESCRIPTIONThis library provides a login/password facility for network access to theVxWorks shell.  When installed, it requires a user name and password matchto gain access to the VxWorks shell from rlogin or telnet.  Therefore VxWorkscan be used in secure environments where access must be restricted.Routines are provided to prompt for the user name and password, and verify the response by looking up the name/password pair in a login usertable.  This table contains a list of user names and encrypted passwordsthat will be allowed to log in to the VxWorks shell remotely.  Routines areprovided to add, delete, and access the login user table.  The list ofuser names can be displayed with loginUserShow().INSTALLATIONThe login security feature is initialized by the root task, usrRoot(), inusrConfig.c, if the configuration macro INCLUDE_SECURITY is defined.  Defining this macro also adds a single default user to the login table.The default user and password are defined as LOGIN_USER_NAMEand LOGIN_PASSWORD.  These can be set to any desired name and password.More users can be added by making additional calls to loginUserAdd().  IfINCLUDE_SECURITY is not defined, access to VxWorks will not be restrictedand secure.The name/password pairs are added to the table by calling loginUserAdd(),which takes the name and an encrypted password as arguments.  The VxWorkshost tool vxencrypt is used to generate the encrypted form of a password.For example, to add a user name of "fred" and password of "flintstone",first run vxencrypt on the host to find the encryption of "flintstone" asfollows:.CS    % vxencrypt    please enter password: flintstone    encrypted password is ScebRezb9c.CEThen invoke the routine loginUserAdd() in VxWorks:.CS	loginUserAdd ("fred", "ScebRezb9c");.CEThis can be done from the shell, a start-up script, or application code.LOGGING INWhen the login security facility is installed, every attempt to rloginor telnet to the VxWorks shell will first prompt for a user name and password..CS    % rlogin target    VxWorks login: fred    Password: flintstone    ->.CEThe delay in prompting between unsuccessful logins is increased linearly withthe number of attempts, in order to slow down password-guessing programs.ENCRYPTION ALGORITHMThis library provides a simple default encryption routine,loginDefaultEncrypt().  This algorithm requires thatpasswords be at least 8 characters and no more than 40 characters.The routine loginEncryptInstall() allows a user-specified encryptionfunction to be used instead of the default.INCLUDE FILES: loginLib.hSEE ALSO: shellLib, vxencrypt,.pG "Shell"*/#include "vxWorks.h"#include "stdlib.h"#include "semLib.h"#include "string.h"#include "lstLib.h"#include "loginLib.h"#include "ioLib.h"#include "symLib.h"#include "symbol.h"#include "remLib.h"#include "errnoLib.h"#include "stdio.h"#include "unistd.h"#include "sysLib.h"#include "tickLib.h"/* global variables */int     loginTimeOutInSecond = 60;    /* number of seconds before timing out *//* local variables */LOCAL char    	loginString [MAX_LOGIN_NAME_LEN + 1] = "VxWorks login: ";LOCAL SYMTAB_ID loginSymTbl;LOCAL FUNCPTR 	encryptRtn = loginDefaultEncrypt; /* encryption function */LOCAL int     	encryptVar;			  /* and its argument *//* forward static functions */static BOOL loginPrintName (char *name, int val, SYM_TYPE type, char *string);static STATUS loginNameGet (char *name);static STATUS loginPasswdGet (char *passwd);static STATUS loginEncrypt (char *in, char *out);/********************************************************************************* loginInit - initialize the login table** This routine must be called to initialize the login data structure used by* routines throughout this module.  If the configuration macro INCLUDE_SECURITY* is defined, it is called by usrRoot() in usrConfig.c, before any other* routines in this module.** RETURNS: N/A*/void loginInit (void)    {    static BOOL loginInitialized = FALSE;    if (!loginInitialized)        {        loginInitialized = TRUE;	loginSymTbl 	 = symTblCreate (6, FALSE, memSysPartId);					/* make 64 entry hash table */	}    }/********************************************************************************* loginUserAdd - add a user to the login table** This routine adds a user name and password entry to the login table.* Note that what is saved in the login table is the user name and the* address of <passwd>, not the actual password.** The length of user names should not exceed MAX_LOGIN_NAME_LEN, while* the length of passwords depends on the encryption routine used.  For the* default encryption routine, passwords should be at least 8 characters long* and no more than 40 characters.** The procedure for adding a new user to login table is as follows:* .IP (1) 4* Generate the encrypted password by invoking vxencrypt* in \f3host/<hostOs>/bin\fP.* .IP (2)* Add a user by invoking loginUserAdd() in the VxWorks shell* with the user name and the encrypted password.* .LP* The password of a user can be changed by first deleting the user entry,* then adding the user entry again with the new encrypted password.** EXAMPLE*.CS*    -> loginUserAdd "peter", "RRdRd9Qbyz"*    value = 0 = 0x0*    -> loginUserAdd "robin", "bSzyydqbSb"*    value = 0 = 0x0*    -> loginUserShow**      User Name*      =========*      peter*      robin*    value = 0 = 0x0*    ->*.CE** RETURNS: OK, or ERROR if the user name has already been entered.** SEE ALSO: vxencrypt*/STATUS loginUserAdd    (    char  name[MAX_LOGIN_NAME_LEN+1],   /* user name */    char  passwd[80]                    /* user password */    )    {    char     *value;    SYM_TYPE  type;			/* login type */    if (symFindByName (loginSymTbl, name, &value, &type) == OK)	{	errnoSet (S_loginLib_USER_ALREADY_EXISTS);	return (ERROR);	}    else        if (symAdd (loginSymTbl, name, passwd, type, symGroupDefault) != OK)	    return (ERROR);    return (OK);    }/********************************************************************************* loginUserDelete - delete a user entry from the login table** This routine deletes an entry in the login table.* Both the user name and password must be specified to remove an entry* from the login table.** RETURNS: OK, or ERROR if the specified user or password is incorrect.*/STATUS loginUserDelete    (    char  *name,                /* user name */    char  *passwd               /* user password */    )    {    char      encryptBuf [80+1];    char     *value;    SYM_TYPE  type;    if (loginEncrypt (passwd, encryptBuf) == ERROR)        return (ERROR);    if (symFindByName (loginSymTbl, name, &value, &type) == OK)	{	if (symRemove (loginSymTbl, name, type) == OK)	    return (OK);   	}    errnoSet (S_loginLib_UNKNOWN_USER);    return (ERROR);    }/********************************************************************************* loginUserVerify - verify a user name and password in the login table** This routine verifies a user entry in the login table.** RETURNS: OK, or ERROR if the user name or password is not found.*/STATUS loginUserVerify    (    char  *name,                /* name of user */    char  *passwd               /* password of user */    )    {    char      encryptBuf[80+1];    char     *value;    SYM_TYPE  type;    if (loginEncrypt (passwd, encryptBuf) == ERROR)	return (ERROR);    if (symFindByName (loginSymTbl, name, &value, &type) == ERROR)        {        errnoSet(S_loginLib_UNKNOWN_USER);        return (ERROR);        }    if (strcmp (value, encryptBuf) == 0)	/* verify password */	return (OK);    else	{	errnoSet (S_loginLib_INVALID_PASSWORD);	return (ERROR);	}    }/********************************************************************************* loginPrintName - display a single user entry** ARGSUSED1*/LOCAL BOOL loginPrintName    (    char     *name,    int       val,    SYM_TYPE  type,    char     *string    )    {    printf ("  %-15s\n", name);    return (TRUE);    }/********************************************************************************* loginUserShow - display the user login table** This routine displays valid user names.** EXAMPLE*.CS*     -> loginUserShow ()**       User Name*       =========*       peter*       robin*     value = 0 = 0x0*.CE** RETURNS: N/A*/void loginUserShow (void)    {    char  *string;    string = "";    printf ("\n%s\n", "  User Name");    printf (  "%s\n", "  =========");    (void)symEach (loginSymTbl, (FUNCPTR)loginPrintName, (int)string);    }/******************************************************************************* loginNameGet - prompt user for login name** RETURNS: OK if <name> is at least 1 byte long, or ERROR if less.*/LOCAL STATUS loginNameGet    (    char *name          /* buffer for user name */    )    {    int   nbytes 	  = 0;		/* bytes read */

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产福利一区二区| 亚洲专区一二三| 粉嫩aⅴ一区二区三区四区 | 欧美亚洲自拍偷拍| 亚洲视频一区在线| 欧美在线观看一区二区| 亚洲福利视频三区| 日韩欧美中文字幕公布| 国产精品77777竹菊影视小说| 亚洲国产精华液网站w| 91在线无精精品入口| 亚洲一区二区在线观看视频| 欧美一区二区久久| 国产美女视频91| 亚洲欧洲一区二区三区| 欧美视频精品在线观看| 久久草av在线| 欧美国产日韩a欧美在线观看| 色狠狠色噜噜噜综合网| 日韩国产精品大片| 久久久亚洲欧洲日产国码αv| av在线综合网| 日韩二区在线观看| 国产精品美女视频| 欧美日韩一区二区三区四区五区| 麻豆精品一区二区三区| 国产精品欧美久久久久一区二区| 欧美系列亚洲系列| 高清国产一区二区| 亚洲国产一区二区三区| 久久久美女毛片| 欧美日韩在线亚洲一区蜜芽| 国产一区二区三区四| 亚洲综合色网站| 久久久影视传媒| 欧美日韩在线播| 国产成人精品综合在线观看| 丝袜亚洲另类丝袜在线| 国产欧美日韩在线看| 91精品婷婷国产综合久久竹菊| 国产成人av一区二区三区在线观看| 亚洲永久精品大片| 国产精品久久久久久久久免费相片| 欧美日韩国产系列| 色综合久久久久网| 国产伦精一区二区三区| 日韩电影一区二区三区| 国产精品成人午夜| 精品乱码亚洲一区二区不卡| 精品视频一区三区九区| youjizz国产精品| 国内精品伊人久久久久影院对白| 无码av中文一区二区三区桃花岛| 国产精品少妇自拍| 久久久久久免费| 在线播放视频一区| 欧美综合一区二区| 成人av在线影院| 国产91精品在线观看| 奇米色777欧美一区二区| 一区二区三区在线免费播放| 国产精品成人在线观看| 欧美韩日一区二区三区四区| 精品国产三级电影在线观看| 日韩亚洲欧美成人一区| 7777精品伊人久久久大香线蕉完整版| 色94色欧美sute亚洲线路一ni| 成人一区二区三区视频在线观看| 狠狠色狠狠色综合| 麻豆精品国产91久久久久久| 日韩av不卡在线观看| 婷婷综合五月天| 天堂在线亚洲视频| 丝瓜av网站精品一区二区| 午夜精品福利在线| 免费人成黄页网站在线一区二区| 日韩中文字幕不卡| 日本伊人精品一区二区三区观看方式| 亚洲成av人片在线观看| 亚洲第一综合色| 日韩av网站在线观看| 麻豆免费精品视频| 国产精品一区专区| 成人性生交大片免费看在线播放| 成人激情综合网站| 在线视频综合导航| 欧美日韩日日夜夜| 日韩精品一区二区三区视频| 精品欧美一区二区在线观看| 精品粉嫩aⅴ一区二区三区四区| 欧美一区二区三区不卡| 色综合久久综合| 91麻豆精品国产91久久久久久| 欧美亚洲一区二区在线| 欧美三级午夜理伦三级中视频| 欧美色视频一区| 3d成人h动漫网站入口| 色先锋aa成人| 日韩欧美久久一区| 精品1区2区在线观看| 久久你懂得1024| 国产女同性恋一区二区| 国产精品午夜在线观看| 一区二区国产盗摄色噜噜| 午夜av区久久| 国产成人亚洲精品狼色在线| 91在线观看视频| 日韩欧美第一区| 国产亚洲一区二区三区四区 | 欧美自拍偷拍一区| 在线精品观看国产| 欧美精品一区二区高清在线观看| 久久精品夜色噜噜亚洲aⅴ| 国产精品嫩草99a| 亚洲人成网站色在线观看| 一区二区免费看| 日本不卡在线视频| gogo大胆日本视频一区| 欧美精品日韩精品| 精品少妇一区二区三区日产乱码| 国产精品久久久久久久久免费桃花| 一区二区三区在线观看视频| 日韩中文字幕不卡| 成人国产精品免费观看| 欧美午夜精品久久久| 日本一区二区三区国色天香| 亚洲福利一区二区| 国产精品亚洲一区二区三区妖精| 91亚洲精品久久久蜜桃网站 | 2020国产精品自拍| 亚洲欧洲综合另类在线| 日一区二区三区| 色婷婷久久久亚洲一区二区三区| 91精品久久久久久蜜臀| 国产精品久久久久久久久果冻传媒 | 欧美日韩和欧美的一区二区| 日韩精品在线看片z| 亚洲人快播电影网| 久久精品国产精品青草| 91免费视频网址| 欧美刺激午夜性久久久久久久| 亚洲三级电影网站| 精品一区免费av| 欧美亚洲免费在线一区| 久久久久国产精品免费免费搜索| 国产精品色婷婷| 日韩精品免费视频人成| 色综合天天综合给合国产| 精品精品国产高清一毛片一天堂| 一区二区三区免费| 日本道色综合久久| 国产拍揄自揄精品视频麻豆| 免费观看一级特黄欧美大片| av在线播放不卡| 精品福利一二区| 日本不卡123| 欧洲中文字幕精品| 国产精品毛片a∨一区二区三区| 日韩—二三区免费观看av| 色综合久久天天| 国产精品国产三级国产三级人妇 | 在线看不卡av| 成人免费一区二区三区在线观看| 五月婷婷欧美视频| 欧美一区中文字幕| 亚洲自拍都市欧美小说| 91亚洲精品久久久蜜桃| 国产欧美视频在线观看| 国产真实乱子伦精品视频| 欧美日韩一区二区在线观看视频| 亚洲色图第一区| 色综合久久久久网| 1024国产精品| jizzjizzjizz欧美| 久久久精品黄色| 成人av资源下载| 亚洲欧美综合色| 99视频国产精品| 亚洲欧美aⅴ...| 99国产一区二区三精品乱码| 亚洲欧美一区二区三区孕妇| 成人午夜视频福利| 国产精品久久久久一区二区三区 | 午夜伦理一区二区| 欧美三区在线视频| 亚洲成人www| 91精品国产综合久久久久久漫画| 午夜日韩在线电影| 欧美视频一区二| 麻豆一区二区三| 国产亚洲婷婷免费| 东方欧美亚洲色图在线| 国产欧美日韩三级| 91欧美激情一区二区三区成人| 国产精品理论片| 在线一区二区视频| 视频一区二区中文字幕| 精品美女在线播放| 成人高清在线视频| 日av在线不卡|