mirror of
https://github.com/bol-van/zapret.git
synced 2025-08-10 01:02:03 +03:00
nfqws,tpws: r/o open instead of stat() for list file check
This commit is contained in:
@@ -122,16 +122,16 @@ static bool test_list_files()
|
||||
struct ipset_file *ifile;
|
||||
|
||||
LIST_FOREACH(hfile, ¶ms.hostlists, next)
|
||||
if (!file_mod_time(hfile->filename))
|
||||
if (!file_open_test(hfile->filename, O_RDONLY))
|
||||
{
|
||||
DLOG_PERROR("file_mod_time");
|
||||
DLOG_PERROR("file_open_test");
|
||||
DLOG_ERR("cannot access hostlist file '%s'\n",hfile->filename);
|
||||
return false;
|
||||
}
|
||||
LIST_FOREACH(ifile, ¶ms.ipsets, next)
|
||||
if (!file_mod_time(ifile->filename))
|
||||
if (!file_open_test(ifile->filename, O_RDONLY))
|
||||
{
|
||||
DLOG_PERROR("file_mod_time");
|
||||
DLOG_PERROR("file_open_test");
|
||||
DLOG_ERR("cannot access ipset file '%s'\n",ifile->filename);
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user