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: update.c
/* * Routines for controlled update/initialization of request structures. * * request_init() initializes its argument. Pointers and string-valued members * are initialized to zero, to indicate that no lookup has been attempted. * * request_set() adds information to an already initialized request structure. * * Both functions take a variable-length name-value list. * * Diagnostics are reported through syslog(3). * * Author: Wietse Venema, Eindhoven University of Technology, The Netherlands. * * $FreeBSD$ */ #ifndef lint static char sccsid[] = "@(#) update.c 1.1 94/12/28 17:42:56"; #endif /* System libraries */ #include <stdio.h> #include <syslog.h> #include <string.h> #include <unistd.h> /* Local stuff. */ #include "mystdarg.h" #include "tcpd.h" /* request_fill - request update engine */ static struct request_info *request_fill(request, ap) struct request_info *request; va_list ap; { int key; char *ptr; while ((key = va_arg(ap, int)) > 0) { switch (key) { default: tcpd_warn("request_fill: invalid key: %d", key); return (request); case RQ_FILE: request->fd = va_arg(ap, int); continue; case RQ_CLIENT_SIN: #ifdef INET6 request->client->sin = va_arg(ap, struct sockaddr *); #else request->client->sin = va_arg(ap, struct sockaddr_in *); #endif continue; case RQ_SERVER_SIN: #ifdef INET6 request->server->sin = va_arg(ap, struct sockaddr *); #else request->server->sin = va_arg(ap, struct sockaddr_in *); #endif continue; /* * All other fields are strings with the same maximal length. */ case RQ_DAEMON: ptr = request->daemon; break; case RQ_USER: ptr = request->user; break; case RQ_CLIENT_NAME: ptr = request->client->name; break; case RQ_CLIENT_ADDR: ptr = request->client->addr; break; case RQ_SERVER_NAME: ptr = request->server->name; break; case RQ_SERVER_ADDR: ptr = request->server->addr; break; } STRN_CPY(ptr, va_arg(ap, char *), STRING_LENGTH); } return (request); } /* request_init - initialize request structure */ struct request_info *VARARGS(request_init, struct request_info *, request) { static struct request_info default_info; struct request_info *r; va_list ap; /* * Initialize data members. We do not assign default function pointer * members, to avoid pulling in the whole socket module when it is not * really needed. */ VASTART(ap, struct request_info *, request); *request = default_info; request->fd = -1; strcpy(request->daemon, unknown); sprintf(request->pid, "%d", getpid()); request->client->request = request; request->server->request = request; r = request_fill(request, ap); VAEND(ap); return (r); } /* request_set - update request structure */ struct request_info *VARARGS(request_set, struct request_info *, request) { struct request_info *r; va_list ap; VASTART(ap, struct request_info *, request); r = request_fill(request, ap); VAEND(ap); return (r); }
Upload File
Create Folder