tcpwrap.c

来自「文件传输协议linux 下vsftpd2.1.0.tar.gz」· C语言 代码 · 共 54 行

C
54
字号
/* * Part of Very Secure FTPd * Licence: GPL v2 * Author: Chris Evans * tcpwrap.c * * Routines to encapsulate the usage of tcp_wrappers. */#include "tcpwrap.h"#include "builddefs.h"#include "utility.h"#include "sysutil.h"#ifdef VSF_BUILD_TCPWRAPPERS  #include <tcpd.h>#endif#ifdef VSF_BUILD_TCPWRAPPERS#include <sys/syslog.h>int deny_severity = LOG_WARNING;int allow_severity = LOG_INFO;intvsf_tcp_wrapper_ok(int remote_fd){  struct request_info req;  vsf_sysutil_openlog(0);  request_init(&req, RQ_DAEMON, "vsftpd", RQ_FILE, remote_fd, 0);  fromhost(&req);  if (!hosts_access(&req))  {    vsf_sysutil_closelog();    return 0;  }  vsf_sysutil_closelog();  return 1;}#else /* VSF_BUILD_TCPWRAPPERS */intvsf_tcp_wrapper_ok(int remote_fd){  (void) remote_fd;  die("tcp_wrappers is set to YES but no tcp wrapper support compiled in");  return 0;}#endif /* VSF_BUILD_TCPWRAPPERS */

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?