003 File Manager
Current Path:
/usr/src/contrib/tcp_wrappers
usr
/
src
/
contrib
/
tcp_wrappers
/
📁
..
📄
BLURB
(1.7 KB)
📄
Banners.Makefile
(2.17 KB)
📄
CHANGES
(18.75 KB)
📄
DISCLAIMER
(1.21 KB)
📄
Makefile
(32.68 KB)
📄
README
(47.08 KB)
📄
README.IRIX
(2.57 KB)
📄
README.NIS
(6.52 KB)
📄
clean_exit.c
(1.07 KB)
📄
diag.c
(1.44 KB)
📄
environ.c
(4.75 KB)
📄
eval.c
(3.59 KB)
📄
fakelog.c
(1012 B)
📄
fix_options.c
(3.7 KB)
📄
fromhost.c
(1.37 KB)
📄
hosts_access.3
(3.52 KB)
📄
hosts_access.5
(15.97 KB)
📄
hosts_access.c
(14.13 KB)
📄
hosts_ctl.c
(1.08 KB)
📄
hosts_options.5
(6.5 KB)
📄
inetcf.c
(8.03 KB)
📄
inetcf.h
(516 B)
📄
misc.c
(1.9 KB)
📄
miscd.c
(3.07 KB)
📄
mystdarg.h
(571 B)
📄
myvsyslog.c
(766 B)
📄
ncr.c
(2.52 KB)
📄
options.c
(13.85 KB)
📄
patchlevel.h
(88 B)
📄
percent_m.c
(797 B)
📄
percent_x.c
(2.37 KB)
📄
printf.ck
(39 B)
📄
ptx.c
(2.65 KB)
📄
refuse.c
(911 B)
📄
rfc931.c
(5.95 KB)
📄
safe_finger.c
(4.98 KB)
📄
scaffold.c
(6.38 KB)
📄
scaffold.h
(370 B)
📄
setenv.c
(931 B)
📄
shell_cmd.c
(2.13 KB)
📄
socket.c
(12.06 KB)
📄
strcasecmp.c
(3.78 KB)
📄
tcpd.8
(6.86 KB)
📄
tcpd.c
(3.49 KB)
📄
tcpd.h
(8.18 KB)
📄
tcpdchk.8
(2.51 KB)
📄
tcpdchk.c
(12.84 KB)
📄
tcpdmatch.8
(3.18 KB)
📄
tcpdmatch.c
(10.69 KB)
📄
tli-sequent.c
(4.85 KB)
📄
tli-sequent.h
(411 B)
📄
tli.c
(10.34 KB)
📄
try-from.c
(2.01 KB)
📄
update.c
(3.05 KB)
📄
vfprintf.c
(3.12 KB)
📄
workarounds.c
(7.57 KB)
Editing: misc.c
/* * Misc routines that are used by tcpd and by tcpdchk. * * Author: Wietse Venema, Eindhoven University of Technology, The Netherlands. * * $FreeBSD$ */ #ifndef lint static char sccsic[] = "@(#) misc.c 1.2 96/02/11 17:01:29"; #endif #include <sys/types.h> #include <sys/param.h> #include <netinet/in.h> #include <arpa/inet.h> #include <stdio.h> #include <string.h> #include "tcpd.h" extern char *fgets(); #ifndef INADDR_NONE #define INADDR_NONE (-1) /* XXX should be 0xffffffff */ #endif /* xgets - fgets() with backslash-newline stripping */ char *xgets(ptr, len, fp) char *ptr; int len; FILE *fp; { int got; char *start = ptr; while (fgets(ptr, len, fp)) { got = strlen(ptr); if (got >= 1 && ptr[got - 1] == '\n') { tcpd_context.line++; if (got >= 2 && ptr[got - 2] == '\\') { got -= 2; } else { return (start); } } ptr += got; len -= got; ptr[0] = 0; } return (ptr > start ? start : 0); } /* split_at - break string at delimiter or return NULL */ char *split_at(string, delimiter) char *string; int delimiter; { char *cp; #ifdef INET6 int bracket = 0; for (cp = string; cp && *cp; cp++) { switch (*cp) { case '[': bracket++; break; case ']': bracket--; break; default: if (bracket == 0 && *cp == delimiter) { *cp++ = 0; return cp; } break; } } return (NULL); #else if ((cp = strchr(string, delimiter)) != 0) *cp++ = 0; return (cp); #endif } /* dot_quad_addr - convert dotted quad to internal form */ unsigned long dot_quad_addr(str) char *str; { int in_run = 0; int runs = 0; char *cp = str; /* Count the number of runs of non-dot characters. */ while (*cp) { if (*cp == '.') { in_run = 0; } else if (in_run == 0) { in_run = 1; runs++; } cp++; } return (runs == 4 ? inet_addr(str) : INADDR_NONE); }
Upload File
Create Folder