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: ncr.c
/* * This part for NCR UNIX with is from Andrew Maffei (arm@aqua.whoi.edu). It * assumes TLI throughout. In order to look up endpoint address information * we must talk to the "timod" streams module. For some reason "timod" wants * to sit directly on top of the device driver. Therefore we pop off all * streams modules except the driver, install the "timod" module so that we * can figure out network addresses, and then restore the original state. */ #ifndef lint static char sccsid[] = "@(#) ncr.c 1.1 94/12/28 17:42:34"; #endif #include <sys/types.h> #include <stdio.h> #include <syslog.h> #include <sys/tiuser.h> #include <stropts.h> #include <sys/conf.h> #include "tcpd.h" #define MAX_MODULE_COUNT 10 /* XXX */ /* fromhost - tear down the streams stack then rebuild it */ void fromhost(request) struct request_info *request; { int i; int num_mod; struct str_list str_list; struct str_mlist mod_buffer[MAX_MODULE_COUNT]; int fd = request->fd; str_list.sl_nmods = MAX_MODULE_COUNT; str_list.sl_modlist = &mod_buffer[0]; /* * On systems with WIN streams support we have to be careful about what * is on the stream we are passed. This code POPs off all modules above * the pseudo driver, pushes timod, gets the host address information, * pops timod and then pushes all modules back on the stream. * * Some state may be lost in this process. /usr/etc/tlid seems to do special * things to the stream depending on the TCP port being serviced. (not a * very nice thing to do!). It is unclear what to do if this code breaks * - the stream may be left in an unknown condition. */ if ((num_mod = ioctl(fd, I_LIST, NULL)) < 0) tcpd_warn("fromhost: LIST failed: %m"); if (ioctl(fd, I_LIST, &str_list) < 0) tcpd_warn("fromhost: LIST failed: %m"); /* * POP stream modules except for the driver. */ for (i = 0; i < num_mod - 1; i++) if (ioctl(fd, I_POP, 0) < 0) tcpd_warn("fromhost: POP %s: %m", mod_buffer[i].l_name); /* * PUSH timod so that host address ioctls can be executed. */ if (ioctl(fd, I_PUSH, "timod") < 0) tcpd_warn("fromhost: PUSH timod: %m"); tli_host(request); /* * POP timod, we're done with it now. */ if (ioctl(fd, I_POP, 0) < 0) tcpd_warn("fromhost: POP timod: %m"); /* * Restore stream modules. */ for (i = num_mod - 2; i >= 0; i--) if (ioctl(fd, I_PUSH, mod_buffer[i].l_name) < 0) tcpd_warn("fromhost: PUSH %s: %m", mod_buffer[i].l_name); }
Upload File
Create Folder