Compare commits
No commits in common. "bcf0d456eecc0e31f0dd576e24331e8e23e8ec16" and "30e860885f65a64ded3afce1e940efd863ef8508" have entirely different histories.
bcf0d456ee
...
30e860885f
23
README.md
23
README.md
@ -25,18 +25,13 @@ New Versions
|
|||||||
------------
|
------------
|
||||||
|
|
||||||
https://prj.zxalexis.ru/gitea/zx/bforce
|
https://prj.zxalexis.ru/gitea/zx/bforce
|
||||||
|
|
||||||
|
|
||||||
Older Sources
|
Copyright (c) 1998-2000 Alexander Belkin, Moscow, Russia.
|
||||||
-------------
|
(c) 2004-2007 Evgeniy Kozhuhovskiy 2:450/256, 2:450/267
|
||||||
https://github.com/zotrix/binkleyforce/
|
(c) 2005 Andrey Slusar
|
||||||
https://sourceforge.net/projects/binkforce/
|
(c) 2006-2016 Max N. Boyarov
|
||||||
|
(c) 2007-2008 Sergey Babitch
|
||||||
Copyright <br>
|
(c) 2011-2014 Sergey Dorofeev
|
||||||
> (c) 1998-2000 Alexander Belkin, Moscow, Russia.<br>
|
(c) 2014 Alexander Skovpen
|
||||||
> (c) 2004-2007 Evgeniy Kozhuhovskiy 2:450/256, 2:450/267<br>
|
(c) 2024 Alexey Khromov
|
||||||
> (c) 2005 Andrey Slusar<br>
|
|
||||||
> (c) 2006-2016 Max N. Boyarov<br>
|
|
||||||
> (c) 2007-2008 Sergey Babitch<br>
|
|
||||||
> (c) 2011-2014 Sergey Dorofeev<br>
|
|
||||||
> (c) 2014 Alexander Skovpen<br>
|
|
||||||
> (c) 2024 Alexey Khromov<br>
|
|
||||||
|
@ -146,7 +146,6 @@ clean:
|
|||||||
rm -f ./bin/core
|
rm -f ./bin/core
|
||||||
clean-am:
|
clean-am:
|
||||||
rm -f ./Makefile
|
rm -f ./Makefile
|
||||||
rm -f ../debian/Makefile
|
|
||||||
rm -f ./include/config.h
|
rm -f ./include/config.h
|
||||||
rm -f ./config.log
|
rm -f ./config.log
|
||||||
rm -f ./config.status
|
rm -f ./config.status
|
||||||
|
@ -453,7 +453,7 @@ int main(int argc, char *argv[], char *envp[])
|
|||||||
/* Reopen log file if it was defined in config */
|
/* Reopen log file if it was defined in config */
|
||||||
if( log_reopen(log_getfilename(LOG_FILE_SESSION), NULL, NULL) )
|
if( log_reopen(log_getfilename(LOG_FILE_SESSION), NULL, NULL) )
|
||||||
{
|
{
|
||||||
DEB((D_CONFIG, "can't continue without logging"));
|
log("can't continue without logging");
|
||||||
gotoexit(BFERR_FATALERROR);
|
gotoexit(BFERR_FATALERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -755,7 +755,6 @@ int daemon_pidfile(int cmd)
|
|||||||
pid_t hispid, mypid = getpid();
|
pid_t hispid, mypid = getpid();
|
||||||
FILE *pf;
|
FILE *pf;
|
||||||
struct stat sb;
|
struct stat sb;
|
||||||
int res;
|
|
||||||
|
|
||||||
if( !pidfile )
|
if( !pidfile )
|
||||||
return 0;
|
return 0;
|
||||||
@ -769,12 +768,7 @@ int daemon_pidfile(int cmd)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
res = fscanf(pf, "%d", &hispid);
|
fscanf(pf, "%d", &hispid);
|
||||||
if (res != 1) {
|
|
||||||
log("daemon pidfile: not readable");
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
fclose(pf);
|
fclose(pf);
|
||||||
|
|
||||||
if( hispid ) {
|
if( hispid ) {
|
||||||
@ -813,12 +807,7 @@ int daemon_pidfile(int cmd)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
res = fscanf(pf, "%d", &hispid);
|
fscanf(pf, "%d", &hispid);
|
||||||
if (res != 1) {
|
|
||||||
log("daemon pidfile: not readable");
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
fclose(pf);
|
fclose(pf);
|
||||||
|
|
||||||
if( !hispid || (hispid == mypid) ) {
|
if( !hispid || (hispid == mypid) ) {
|
||||||
@ -842,12 +831,7 @@ int daemon_pidfile(int cmd)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
res = fscanf(pf, "%d", &hispid);
|
fscanf(pf, "%d", &hispid);
|
||||||
if (res != 1) {
|
|
||||||
log("daemon pidfile: not readable");
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
fclose(pf);
|
fclose(pf);
|
||||||
unlink(pidfile);
|
unlink(pidfile);
|
||||||
|
|
||||||
|
@ -311,7 +311,6 @@ int session_set_inbound(void)
|
|||||||
{
|
{
|
||||||
struct stat st;
|
struct stat st;
|
||||||
char *p_inb;
|
char *p_inb;
|
||||||
int res;
|
|
||||||
|
|
||||||
p_inb = conf_string(cf_inbound_directory);
|
p_inb = conf_string(cf_inbound_directory);
|
||||||
if( !p_inb ) {
|
if( !p_inb ) {
|
||||||
@ -343,11 +342,7 @@ int session_set_inbound(void)
|
|||||||
log("inbound: %s", buf);
|
log("inbound: %s", buf);
|
||||||
state.inbound = (char*)xstrcpy(buf);
|
state.inbound = (char*)xstrcpy(buf);
|
||||||
snprintf( buf, PATH_MAX+30, "/bin/mkdir -p -m 700 %s", state.inbound ); /* 30 additional chars allowed */
|
snprintf( buf, PATH_MAX+30, "/bin/mkdir -p -m 700 %s", state.inbound ); /* 30 additional chars allowed */
|
||||||
res = system( buf );
|
system( buf );
|
||||||
if (res != 0) {
|
|
||||||
log("Inbound create error: %d", res);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -70,14 +70,12 @@ static char *session_stat_get_stsfile(s_faddr *addr, int linenum)
|
|||||||
|
|
||||||
static int session_stat_read_stsfile(FILE *fp, s_sess_stat *stat)
|
static int session_stat_read_stsfile(FILE *fp, s_sess_stat *stat)
|
||||||
{
|
{
|
||||||
int res;
|
|
||||||
|
|
||||||
if( fseek(fp, 0, SEEK_SET) == -1 )
|
if( fseek(fp, 0, SEEK_SET) == -1 )
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
memset(stat, '\0', sizeof(s_sess_stat));
|
memset(stat, '\0', sizeof(s_sess_stat));
|
||||||
|
|
||||||
res = fscanf(fp, "%u %u %u %u %u %u %lu %lu %lu %lu",
|
fscanf(fp, "%u %u %u %u %u %u %lu %lu %lu %lu",
|
||||||
(unsigned int *) &stat->tries,
|
(unsigned int *) &stat->tries,
|
||||||
(unsigned int *) &stat->tries_noconn,
|
(unsigned int *) &stat->tries_noconn,
|
||||||
(unsigned int *) &stat->tries_noansw,
|
(unsigned int *) &stat->tries_noansw,
|
||||||
@ -88,10 +86,7 @@ static int session_stat_read_stsfile(FILE *fp, s_sess_stat *stat)
|
|||||||
(unsigned long *) &stat->hold_freqs,
|
(unsigned long *) &stat->hold_freqs,
|
||||||
(unsigned long *) &stat->last_success_out,
|
(unsigned long *) &stat->last_success_out,
|
||||||
(unsigned long *) &stat->last_success_in);
|
(unsigned long *) &stat->last_success_in);
|
||||||
if (res == 0) {
|
|
||||||
log("Read STS unsuccessfull...");
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
/* Set last successfull session time */
|
/* Set last successfull session time */
|
||||||
stat->last_success = MAX(stat->last_success_out, stat->last_success_in);
|
stat->last_success = MAX(stat->last_success_out, stat->last_success_in);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user