资源简介
vsftpd-3.0.2.tar.gz 源码。(此为博客http://blog.csdn.net/shallnet 文章对应源码下载)
代码片段和文件信息
/*
* Part of Very Secure FTPd
* Licence: GPL v2
* Author: Chris Evans
* access.c
*
* Routines to do very very simple access control based on filenames.
*/
#include “access.h“
#include “ls.h“
#include “tunables.h“
#include “str.h“
int
vsf_access_check_file(const struct mystr* p_filename_str)
{
static struct mystr s_access_str;
unsigned int iters = 0;
if (!tunable_deny_file)
{
return 1;
}
if (str_isempty(&s_access_str))
{
str_alloc_text(&s_access_str tunable_deny_file);
}
if (vsf_filename_passes_filter(p_filename_str &s_access_str &iters))
{
return 0;
}
else
{
struct str_locate_result loc_res =
str_locate_str(p_filename_str &s_access_str);
if (loc_res.found)
{
return 0;
}
}
return 1;
}
int
vsf_access_check_file_visible(const struct mystr* p_filename_str)
{
static struct mystr s_access_str;
unsigned int iters = 0;
if (!tunable_hide_file)
{
return 1;
}
if (str_isempty(&s_access_str))
{
str_alloc_text(&s_access_str tunable_hide_file);
}
if (vsf_filename_passes_filter(p_filename_str &s_access_str &iters))
{
return 0;
}
else
{
struct str_locate_result loc_res =
str_locate_str(p_filename_str &s_access_str);
if (loc_res.found)
{
return 0;
}
}
return 1;
}
- 上一篇:2010文都统考计算机基础班讲义
- 下一篇:JSON查看器,结构化查看
相关资源
- linux ftp服务器安装包vsftpd-1.1.3-8.i386
- vsftpd-2.3.4
- ftp-0.17-51.1.el6.x86_64.rpm
- LINUX-FTP服务包 vsftpd-2.0.1-5.src.rpm
- vsftpd-3.0.2-27.el7.x86_64.rpm
- vsftpd-3.0.3-14.el6.1.x86_64.rpm
- vsftpd-3.0.3.tar
- vsftpd-3.0.2-22.el7.x86_64.rpm 官方网站
- vsftpd-2.2.2-11.el6.x86_64.rpm
- vsftpd-1.1.3-8.i386.rpm
- vsftpd安装包
- vsftpd-2.0.7-4.17.1.x86_64.rpm
- vsftpd-2.3.4-1.x86_64.rpm
评论
共有 条评论