003 File Manager
Current Path:
/usr/src/contrib/opie/libopie
usr
/
src
/
contrib
/
opie
/
libopie
/
📁
..
📄
Makefile.in
(1.21 KB)
📄
accessfile.c
(4.29 KB)
📄
atob8.c
(2.08 KB)
📄
btoa8.c
(925 B)
📄
btoe.c
(24.92 KB)
📄
btoh.c
(939 B)
📄
challenge.c
(2.43 KB)
📄
generator.c
(9.19 KB)
📄
getsequence.c
(992 B)
📄
getutmpentry.c
(1.87 KB)
📄
hash.c
(1.99 KB)
📄
hashlen.c
(1.78 KB)
📄
insecure.c
(4.63 KB)
📄
keycrunch.c
(1.35 KB)
📄
lock.c
(6.54 KB)
📄
login.c
(3.04 KB)
📄
logwtmp.c
(6.42 KB)
📄
lookup.c
(770 B)
📄
md4c.c
(8.58 KB)
📄
md5c.c
(10.36 KB)
📄
newseed.c
(1.9 KB)
📄
open.c
(1.36 KB)
📄
parsechallenge.c
(1.78 KB)
📄
passcheck.c
(1.42 KB)
📄
passwd.c
(2 KB)
📄
randomchallenge.c
(1.77 KB)
📄
readpass.c
(6.51 KB)
📄
readrec.c
(3.23 KB)
📄
unlock.c
(2.51 KB)
📄
verify.c
(4.88 KB)
📄
version.c
(969 B)
📄
writerec.c
(2.09 KB)
Editing: getutmpentry.c
/* getutmpentry.c: The __opiegetutmpentry() library function. %%% copyright-cmetz-96 This software is Copyright 1996-2001 by Craig Metz, All Rights Reserved. The Inner Net License Version 3 applies to this software. You should have received a copy of the license with this software. If you didn't get a copy, you may request one from <license@inner.net>. History: Modified by cmetz for OPIE 2.31. Cache result. Created by cmetz for OPIE 2.3 (re-write). */ #include "opie_cfg.h" #include <stdio.h> #include <sys/types.h> #if DOUTMPX #include <utmpx.h> #define setutent setutxent #define getutline(x) getutxline(x) #define utmp utmpx #else #include <utmp.h> #endif /* DOUTMPX */ #if HAVE_STRING_H #include <string.h> #endif /* HAVE_STRING_H */ #if DEBUG #include <syslog.h> #endif /* DEBUG */ #include "opie.h" #if !HAVE_GETUTLINE && !DOUTMPX struct utmp *getutline __P((struct utmp *)); #endif /* HAVE_GETUTLINE && !DOUTMPX */ static struct utmp u; int __opiegetutmpentry FUNCTION((line, utmp), char *line AND struct utmp *utmp) { struct utmp *pu; if (u.ut_line[0]) { pu = &u; goto gotit; }; memset(&u, 0, sizeof(u)); if (!strncmp(line, "/dev/", 5)) { strncpy(u.ut_line, line + 5, sizeof(u.ut_line)); setutent(); if ((pu = getutline(&u))) goto gotit; #ifdef hpux strcpy(u.ut_line, "pty/"); strncpy(u.ut_line + 4, line + 5, sizeof(u.ut_line) - 4); setutent(); if ((pu = getutline(&u))) goto gotit; #endif /* hpux */ } strncpy(u.ut_line, line, sizeof(u.ut_line)); setutent(); if ((pu = getutline(&u))) goto gotit; #if DEBUG syslog(LOG_DEBUG, "__opiegetutmpentry: failed to find entry for line %s", line); #endif /* DEBUG */ return -1; gotit: #if DEBUG syslog(LOG_DEBUG, "__opiegetutmpentry: succeeded with line %s", pu->ut_line); #endif /* DEBUG */ memcpy(utmp, pu, sizeof(struct utmp)); return 0; }
Upload File
Create Folder