增加进程优先级

This commit is contained in:
aixiao 2022-12-30 11:07:44 +08:00
parent a47d429273
commit ce37ef75d6
13 changed files with 56 additions and 3 deletions

View File

@ -0,0 +1 @@
../libclamav.la

View File

@ -0,0 +1,41 @@
# libclamav.la - a libtool library file
# Generated by libtool (GNU libtool) 2.4.7 Debian-2.4.7-4
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
# The name that we can dlopen(3).
dlname='libclamav.so.9'
# Names of this library.
library_names='libclamav.so.9.0.5 libclamav.so.9 libclamav.so'
# The name of the static archive.
old_library=''
# Linker flags that cannot go in dependency_libs.
inherited_linker_flags=''
# Libraries that this one depends upon.
dependency_libs=' -ljson-c -lbz2 -lltdl -lxml2 -lmspack -lssl -lcrypto -lz -lpthread -lm -ltfm -lpcre2-8'
# Names of additional weak libraries provided by this library
weak_library_names=''
# Version information for libclamav.
current=9
age=0
revision=5
# Is this an already installed library?
installed=yes
# Should we warn about portability when linking against -modules?
shouldnotlink=no
# Files to dlopen/dlpreopen
dlopen=''
dlpreopen=''
# Directory that this library needs to be installed in:
libdir='/usr/lib/'

View File

@ -0,0 +1 @@
libclamav.so.9.0.5

View File

@ -0,0 +1 @@
libclamav.so.9.0.5

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1 @@
../libclamav_internal_utils.la

Binary file not shown.

View File

@ -0,0 +1 @@
../libclamav_nocxx.la

View File

@ -38,4 +38,4 @@ dlopen=''
dlpreopen=''
# Directory that this library needs to be installed in:
libdir='/usr/lib/x86_64-linux-gnu'
libdir='/usr/lib/'

View File

@ -55,12 +55,15 @@ static char *GET_PUBLIC_IP(char *URL)
/* 指定要获取的URL */
curl_easy_setopt(curl_handle, CURLOPT_URL, URL);
/* 将所有数据发送到此函数 */
//对于同一次阻塞的curl_easy_perform而言在写完获取的数据之前会多次调用 WriteMemoryCallback
curl_easy_setopt(curl_handle, CURLOPT_WRITEFUNCTION, WriteMemoryCallback);
/* 将"chunk"结构传递给回调函数 */
curl_easy_setopt(curl_handle, CURLOPT_WRITEDATA, (void *)&chunk);
curl_easy_setopt(curl_handle, CURLOPT_USERAGENT, "libcurl-agent/1.0");
//对于同一次阻塞的curl_easy_perform而言在写完获取的数据之前会多次调用 WriteMemoryCallback
res = curl_easy_perform(curl_handle);
@ -988,6 +991,10 @@ goto_daemon:
free(public_ip);
exit(0);
}
if (-1 == (nice(-20))) // 进程优先级
perror("nice");
while (1)

View File

@ -13,8 +13,8 @@ global {
REFUSE_NUMBER = 3; // 拒绝攻击次数
CLAMAV = 1; // clamav 是否扫描病毒(测试阶段)(1开启,非1关闭)
CLAMAV_ARG = "-r / --exclude-dir=^/sys|^/dev|^/proc|^/opt/infected|^/root|^/home|^/mnt --move=/opt/infected --max-filesize 1024M -l clamscan.log";
CLAMAV_TIME = "* 55 14 * * *"; // clamav 扫描时间(Cron格式, 秒 分 时 天 月 周)
CLAMAV_ARG = "-r / --exclude-dir=^/sys|^/dev|^/proc|^/opt/infected|^/root|^/home|^/mnt|^/usr|^/var --move=/opt/infected --max-filesize 1024M -l clamscan.log";
CLAMAV_TIME = "* 35 16 * * *"; // clamav 扫描时间(Cron格式, 秒 分 时 天 月 周)
IPV4_RESTRICTION = 1; // 是否启用IP白名单(1开启,非1关闭)