资源简介
基于sky的一次性口令认证系统的实现,其中包含了多段代码
代码片段和文件信息
/*
* Copyright (c) 1987 Regents of the University of California.
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted
* provided that the above copyright notice and this paragraph are
* duplicated in all such forms and that any documentation
* advertising materials and other materials related to such
* distribution and use acknowledge that the software was developed
* by the University of California Berkeley. The name of the
* University may not be used to endorse or promote products derived
* from this software without specific prior written permission.
* THIS SOFTWARE IS PROVIDED ‘‘AS IS‘‘ AND WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTIES INCLUDING WITHOUT LIMITATION THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = “@(#)getenv.c 5.5 (Berkeley) 6/27/88“;
#endif /* LIBC_SCCS and not lint */
#include
/*
* getenv --
* Returns ptr to value associated with name if any else NULL.
*/
char *
getenv(name)
char *name;
{
int offset;
char *_findenv();
return(_findenv(name &offset));
}
/*
* _findenv --
* Returns pointer to value associated with name if any else NULL.
* Sets offset to be the offset of the name/value combination in the
* environmental array for use by setenv(3) and unsetenv(3).
* Explicitly removes ‘=‘ in argument name.
*
* This routine *should* be a static; don‘t use it.
*/
char *
_findenv(name offset)
register char *name;
int *offset;
{
extern char **environ;
register int len;
register char **P *C;
for (C = name len = 0; *C && *C != ‘=‘; ++C ++len);
for (P = environ; *P; ++P)
if (!strncmp(*P name len))
if (*(C = *P + len) == ‘=‘) {
*offset = P - environ;
return(++C);
}
return(NULL);
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 40960 2000-09-29 23:13 ab.out
文件 1842 2000-09-29 23:13 getenv.c
文件 1173 2000-09-29 23:13 getskeyprompt.c
文件 968 2000-09-29 23:13 hashes.asc
文件 160 2000-09-29 23:13 junk
文件 131072 2000-09-29 23:13 key
文件 1699 2000-09-29 23:13 keyaudit.sh
文件 455 2000-09-29 23:13 keyinfo
文件 149 2000-09-29 23:13 keyinit
文件 237568 2000-09-29 23:13 keylogin
文件 212992 2000-09-29 23:14 keysu
文件 38558 2000-09-29 23:26 libskey.a
文件 17986 2000-09-29 23:23 login.c
文件 1865 2000-09-29 23:24 Makefile
文件 9652 2000-09-29 23:24 md4.c
文件 2722 2000-09-29 23:24 md4.h
文件 1084 2000-09-29 23:27 My-Public-Key
文件 20534 2000-09-29 23:24 put.c
文件 370 2000-09-29 23:28 README
文件 2838 2000-09-29 23:24 setenv.c
文件 2542 2000-09-29 23:22 skey.c
文件 946 2000-09-29 23:24 skey.h
文件 188416 2000-09-29 23:30 skey.init
文件 4436 2000-09-29 23:21 skeyinit.c
文件 6937 2000-09-29 23:23 skeylogin.c
文件 4432 2000-09-29 23:23 skeysubr.c
文件 5765 2000-09-29 23:23 su.c
评论
共有 条评论