|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T t
Length: 818 (0x332) Types: TextFile Names: »try.c«
└─⟦4f9d7c866⟧ Bits:30007245 EUUGD6: Sikkerheds distributionen └─⟦62b59102f⟧ »./log_tcp/3.1.tar.Z« └─⟦1de3ed35f⟧ └─⟦this⟧ »log_tcp/try.c«
/* * try - program to try out host access-control tables, including the * optional shell commands. * * usage: try process_name host_name * * where process_name is a daemon process name (argv[0] value), and host_name * is a host name or address. * * Prints YES if access is granted, NO if denied. */ #include <stdio.h> #include <syslog.h> main(argc, argv) int argc; char **argv; { #ifdef HOSTS_ACCESS #ifdef LOG_MAIL openlog(argv[0], LOG_PID, FACILITY); #else openlog(argv[0], LOG_PID); #endif if (argc != 3) { fprintf(stderr, "usage: %s process_name host_name\n", argv[0]); return (1); } else { printf(hosts_access(argv[1], argv[2]) ? "YES\n" : "NO\n"); return (0); } #else fprintf(stderr, "host access control is not enabled.\n"); return (1); #endif }