Bumped version number, added support for nodes outbound boxes
This commit is contained in:
parent
cf432130e8
commit
d864d6a2a9
38
ChangeLog
38
ChangeLog
@ -2,7 +2,43 @@ $Id$
|
||||
|
||||
MBSEBBS History.
|
||||
|
||||
v0.35.01 05-Jun-2002
|
||||
v0.35.02 22-Jun-2002
|
||||
|
||||
general:
|
||||
Added checks for GoldED in external program checks.
|
||||
Added new empty path /opt/mbse/var/boxes.
|
||||
Implemented nodes private outbound boxes.
|
||||
|
||||
common.a:
|
||||
Added debug nodelist IFT flag for logging.
|
||||
|
||||
mbsetup:
|
||||
Changed node records layout into 8 screens to be able to add
|
||||
more settings. New settings not in use yet are disabled.
|
||||
Added settings for node contact information. This is private
|
||||
for mbsetup use only.
|
||||
Implemented nodes special outbound box setup. When you enter
|
||||
that item for the first time, it fills this with a suggested
|
||||
path.
|
||||
|
||||
mbcico:
|
||||
Implemented nodes special outbound boxes.
|
||||
|
||||
mbout:
|
||||
Implemented nodes special outbound boxes.
|
||||
|
||||
mbfido:
|
||||
In newsmode when a mesage is received with an illegal formated
|
||||
date headerline, the date is replaced with the current date
|
||||
and time. Possible cause: SunMail 1.0
|
||||
|
||||
mbtask:
|
||||
When first run the goldnode command is only filled in if it
|
||||
excists in the mbtask configuration.
|
||||
Implemented nodes special outbound boxes.
|
||||
|
||||
|
||||
v0.35.01 05-Jun-2002 - 22-Jun-2002
|
||||
|
||||
upgrade:
|
||||
Start mbsetup, check in the nodes setup if all the session
|
||||
|
5
Makefile
5
Makefile
@ -144,6 +144,11 @@ install:
|
||||
${CHOWN} -R ${OWNER}.${GROUP} ${PREFIX}/var ; \
|
||||
chmod -R 0750 ${PREFIX}/var ; \
|
||||
fi
|
||||
@if [ ! -d ${PREFIX}/var/boxes ]; then \
|
||||
mkdir ${PREFIX}/var/boxes ; \
|
||||
${CHOWN} ${OWNER}.${GROUP} ${PREFIX}/var/boxes ; \
|
||||
chmod 0750 ${PREFIX}/var/boxes ; \
|
||||
fi
|
||||
@if [ ! -d ${PREFIX}/var/unknown ] ; then \
|
||||
mkdir ${PREFIX}/var/unknown ; \
|
||||
mkdir ${PREFIX}/var/inbound ; \
|
||||
|
2
TODO
2
TODO
@ -1,6 +1,6 @@
|
||||
$Id$
|
||||
|
||||
MBSE BBS V0.35.01 TODO list.
|
||||
MBSE BBS V0.35.02 TODO list.
|
||||
----------------------------
|
||||
|
||||
These are a list of things that must be implemented one way or
|
||||
|
83
configure
vendored
83
configure
vendored
@ -1196,7 +1196,7 @@ SUBDIRS="lib mbcico mbfido mbmon mbsebbs mbtask mbsetup unix lang examples html
|
||||
|
||||
|
||||
PACKAGE="mbsebbs"
|
||||
VERSION="0.35.01"
|
||||
VERSION="0.35.02"
|
||||
COPYRIGHT="Copyright (C) 1997-2002 Michiel Broek, All Rights Reserved"
|
||||
SHORTRIGHT="Copyright (C) 1997-2002 M. Broek"
|
||||
GROUP="bbs"
|
||||
@ -7689,6 +7689,85 @@ else
|
||||
echo "${ECHO_T}no" >&6
|
||||
fi
|
||||
|
||||
# Extract the first word of "golded", so it can be a program name with args.
|
||||
set dummy golded; ac_word=$2
|
||||
echo "$as_me:$LINENO: checking for $ac_word" >&5
|
||||
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
|
||||
if test "${ac_cv_path_GOLDEDBIN+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
case $GOLDEDBIN in
|
||||
[\\/]* | ?:[\\/]*)
|
||||
ac_cv_path_GOLDEDBIN="$GOLDEDBIN" # Let the user override the test with a path.
|
||||
;;
|
||||
*)
|
||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
for as_dir in $PATH
|
||||
do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
ac_cv_path_GOLDEDBIN="$as_dir/$ac_word$ac_exec_ext"
|
||||
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
GOLDEDBIN=$ac_cv_path_GOLDEDBIN
|
||||
|
||||
if test -n "$GOLDEDBIN"; then
|
||||
echo "$as_me:$LINENO: result: $GOLDEDBIN" >&5
|
||||
echo "${ECHO_T}$GOLDEDBIN" >&6
|
||||
else
|
||||
echo "$as_me:$LINENO: result: no" >&5
|
||||
echo "${ECHO_T}no" >&6
|
||||
fi
|
||||
|
||||
# Extract the first word of "goldnode", so it can be a program name with args.
|
||||
set dummy goldnode; ac_word=$2
|
||||
echo "$as_me:$LINENO: checking for $ac_word" >&5
|
||||
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
|
||||
if test "${ac_cv_path_GOLDNODE+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
case $GOLDNODE in
|
||||
[\\/]* | ?:[\\/]*)
|
||||
ac_cv_path_GOLDNODE="$GOLDNODE" # Let the user override the test with a path.
|
||||
;;
|
||||
*)
|
||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
for as_dir in $PATH
|
||||
do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
ac_cv_path_GOLDNODE="$as_dir/$ac_word$ac_exec_ext"
|
||||
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
GOLDNODE=$ac_cv_path_GOLDNODE
|
||||
|
||||
if test -n "$GOLDNODE"; then
|
||||
echo "$as_me:$LINENO: result: $GOLDNODE" >&5
|
||||
echo "${ECHO_T}$GOLDNODE" >&6
|
||||
else
|
||||
echo "$as_me:$LINENO: result: no" >&5
|
||||
echo "${ECHO_T}no" >&6
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# Check whether --with-log-compress or --without-log-compress was given.
|
||||
if test "${with_log_compress+set}" = set; then
|
||||
@ -8375,6 +8454,8 @@ s,@RB@,$RB,;t t
|
||||
s,@SB@,$SB,;t t
|
||||
s,@RZ@,$RZ,;t t
|
||||
s,@SZ@,$SZ,;t t
|
||||
s,@GOLDEDBIN@,$GOLDEDBIN,;t t
|
||||
s,@GOLDNODE@,$GOLDNODE,;t t
|
||||
s,@LOG_COMPRESS@,$LOG_COMPRESS,;t t
|
||||
s,@LOG_COMPRESSEXT@,$LOG_COMPRESSEXT,;t t
|
||||
CEOF
|
||||
|
@ -9,7 +9,7 @@ AC_SUBST(SUBDIRS)
|
||||
dnl General settings for MBSE BBS
|
||||
dnl After changeing the version number, run autoconf!
|
||||
PACKAGE="mbsebbs"
|
||||
VERSION="0.35.01"
|
||||
VERSION="0.35.02"
|
||||
COPYRIGHT="Copyright (C) 1997-2002 Michiel Broek, All Rights Reserved"
|
||||
SHORTRIGHT="Copyright (C) 1997-2002 M. Broek"
|
||||
GROUP="bbs"
|
||||
@ -175,6 +175,9 @@ AC_PATH_PROG(RB,rb)
|
||||
AC_PATH_PROG(SB,sb)
|
||||
AC_PATH_PROG(RZ,rz)
|
||||
AC_PATH_PROG(SZ,sz)
|
||||
AC_PATH_PROG(GOLDEDBIN,golded)
|
||||
AC_PATH_PROG(GOLDNODE,goldnode)
|
||||
|
||||
dnl
|
||||
AC_ARG_WITH(log-compress,[ --with-log-compress=METHOD Log compression method (default gzip)], LOG_COMPRESS=$with_log_compress, LOG_COMPRESS=gzip)
|
||||
case "$LOG_COMPRESS" in
|
||||
|
@ -608,6 +608,8 @@ void ipflags(unsigned long flags)
|
||||
t = xstrcat(t, (char *)" IVM");
|
||||
if (flags & IP_IP)
|
||||
t = xstrcat(t, (char *)" IP");
|
||||
if (flags & IP_IFT)
|
||||
t = xstrcat(t, (char *)" IFT");
|
||||
Syslog('s', "%s", t);
|
||||
free(t);
|
||||
}
|
||||
|
@ -1240,7 +1240,7 @@ struct _nodes {
|
||||
unsigned Dir_in_waitclr : 1; /* Inbound wait for clear */
|
||||
unsigned Dir_in_mklck : 1; /* Inbound create lock */
|
||||
|
||||
/* FTP transfer */
|
||||
/* FTP transfers */
|
||||
char FTP_site[65]; /* Site name or IP address */
|
||||
char FTP_user[17]; /* Username */
|
||||
char FTP_pass[17]; /* Password */
|
||||
@ -1256,12 +1256,24 @@ struct _nodes {
|
||||
unsigned FTP_unique : 1; /* Unique storage */
|
||||
unsigned FTP_uppercase : 1; /* Force uppercase */
|
||||
unsigned FTP_lowercase : 1; /* Force lowercase */
|
||||
unsigned FTP_passive : 1; /* Passive mode */
|
||||
unsigned FTP_out_chklck : 1; /* Outbound check lockfile */
|
||||
unsigned FTP_out_waitclr : 1; /* Outbound wait for clear */
|
||||
unsigned FTP_out_mklck : 1; /* Outbound create lock */
|
||||
unsigned FTP_in_chklck : 1; /* Inbound check lockfile */
|
||||
unsigned FTP_in_waitclr : 1; /* Inbound wait for clear */
|
||||
unsigned FTP_in_mklck : 1; /* Inbound create lock */
|
||||
|
||||
char OutBox[65]; /* Node's personal outbound */
|
||||
char Nl_flags[65]; /* Override nodelist flags */
|
||||
char Nl_hostname[41]; /* Override hostname */
|
||||
|
||||
/* Contact information */
|
||||
char Ct_phone[17]; /* Node's private phone */
|
||||
char Ct_fax[17]; /* Node's fax */
|
||||
char Ct_cellphone[21]; /* Node's cellphone */
|
||||
char Ct_email[31]; /* Node's email */
|
||||
char Ct_remark[65]; /* Remark */
|
||||
};
|
||||
|
||||
|
||||
|
@ -44,6 +44,7 @@
|
||||
#endif
|
||||
|
||||
extern int master;
|
||||
extern int Loaded;
|
||||
int made_request;
|
||||
|
||||
|
||||
@ -100,8 +101,7 @@ char *xtodos(char *orig)
|
||||
*/
|
||||
void add_list(file_list **lst, char *local, char *Remote, int disposition, off_t floff, FILE *flofp, int toend)
|
||||
{
|
||||
file_list **tmpl;
|
||||
file_list *tmp;
|
||||
file_list **tmpl, *tmp;
|
||||
|
||||
Syslog('o', "add_list(\"%s\",\"%s\",%d,%s)", MBSE_SS(local),MBSE_SS(Remote),disposition,toend?"to end":"to beg");
|
||||
|
||||
@ -137,27 +137,31 @@ static void check_flo(file_list **lst, char *nm)
|
||||
int disposition;
|
||||
struct stat stbuf;
|
||||
|
||||
Syslog('O', "check_flo(\"%s\")",MBSE_SS(nm));
|
||||
|
||||
if ((fp = fopen(nm,"r+")) == NULL) {
|
||||
Syslog('O',"no flo file");
|
||||
/*
|
||||
* If no flo file, return.
|
||||
*/
|
||||
return;
|
||||
}
|
||||
|
||||
Syslog('o', "check_flo(\"%s\")",MBSE_SS(nm));
|
||||
|
||||
fl.l_type = F_RDLCK;
|
||||
fl.l_whence = 0;
|
||||
fl.l_start = 0L;
|
||||
fl.l_len = 0L;
|
||||
|
||||
if (fcntl(fileno(fp), F_SETLK, &fl) != 0) {
|
||||
if (errno != EAGAIN)
|
||||
WriteError("$cannot read-lock \"%s\"",MBSE_SS(nm));
|
||||
WriteError("$Can't read-lock \"%s\"", MBSE_SS(nm));
|
||||
else
|
||||
Syslog('O',"flo file busy");
|
||||
Syslog('o',"flo file busy");
|
||||
fclose(fp);
|
||||
return;
|
||||
}
|
||||
|
||||
if (stat(nm, &stbuf) != 0) {
|
||||
WriteError("$cannot access \"%s\"",MBSE_SS(nm));
|
||||
WriteError("$Can't access \"%s\"", MBSE_SS(nm));
|
||||
fclose(fp);
|
||||
return;
|
||||
}
|
||||
@ -191,14 +195,6 @@ static void check_flo(file_list **lst, char *nm)
|
||||
*q = '\0';
|
||||
p = buf2;
|
||||
}
|
||||
// FIXME: removed because it is useless, but it may break some systems.
|
||||
// } else {
|
||||
// if (strncasecmp(p, CFG.uxpath, strlen(CFG.uxpath)) == 0) {
|
||||
// for (p=p, q=buf2+strlen(buf2); *p; p++, q++)
|
||||
// *q = ((*p) == '\\')?'/':tolower(*p);
|
||||
// *q = '\0';
|
||||
// p = buf2;
|
||||
// }
|
||||
}
|
||||
|
||||
if ((q=strrchr(p,'/')))
|
||||
@ -223,16 +219,16 @@ static void check_flo(file_list **lst, char *nm)
|
||||
|
||||
file_list *create_filelist(fa_list *al, char *fl, int create)
|
||||
{
|
||||
file_list *st=NULL;
|
||||
file_list *tmpf;
|
||||
file_list *st = NULL, *tmpf;
|
||||
fa_list *tmpa;
|
||||
char flavor, *tmpfl;
|
||||
char *nm;
|
||||
char tmpreq[13];
|
||||
char flavor, *tmpfl, *nm, *temp, tmpreq[13];
|
||||
struct stat stbuf;
|
||||
int packets = 0;
|
||||
FILE *fp;
|
||||
DIR *dp;
|
||||
struct dirent *de;
|
||||
unsigned char buffer[2];
|
||||
struct passwd *pw;
|
||||
|
||||
Syslog('o', "Create_filelist(%s,\"%s\",%d)", al?ascfnode(al->addr,0x1f):"<none>", MBSE_SS(fl), create);
|
||||
made_request = 0;
|
||||
@ -240,6 +236,71 @@ file_list *create_filelist(fa_list *al, char *fl, int create)
|
||||
for (tmpa = al; tmpa; tmpa = tmpa->next) {
|
||||
Syslog('o', "Check address %s", ascfnode(tmpa->addr, 0x1f));
|
||||
|
||||
/*
|
||||
* For the main aka, check the outbox.
|
||||
*/
|
||||
if ((tmpa->addr) && Loaded && strlen(nodes.OutBox) &&
|
||||
(tmpa->addr->zone == nodes.Aka[0].zone) && (tmpa->addr->net == nodes.Aka[0].net) &&
|
||||
(tmpa->addr->node == nodes.Aka[0].node) && (tmpa->addr->point == nodes.Aka[0].point)) {
|
||||
Syslog('o', "checking outbox %s", nodes.OutBox);
|
||||
if (nodes.Crash)
|
||||
flavor = 'c';
|
||||
else if (nodes.Hold)
|
||||
flavor = 'h';
|
||||
else
|
||||
flavor = 'o';
|
||||
if ((dp = opendir(nodes.OutBox)) == NULL) {
|
||||
Syslog('o', "\"%s\" cannot be opened, proceed", MBSE_SS(nodes.OutBox));
|
||||
} else {
|
||||
temp = calloc(PATH_MAX, sizeof(char));
|
||||
pw = getpwnam((char *)"mbse");
|
||||
while ((de = readdir(dp))) {
|
||||
if (strcmp(de->d_name, ".") && strcmp(de->d_name, "..")) {
|
||||
sprintf(temp, "%s/%s", nodes.OutBox, de->d_name);
|
||||
if (stat(temp, &stbuf) == 0) {
|
||||
Syslog('o' ,"checking file \"%s\"", de->d_name);
|
||||
if (S_ISREG(stbuf.st_mode)) {
|
||||
if (pw->pw_uid == stbuf.st_uid) {
|
||||
/*
|
||||
* We own the file
|
||||
*/
|
||||
if ((stbuf.st_mode & S_IRUSR) && (stbuf.st_mode & S_IWUSR)) {
|
||||
add_list(&st, temp, de->d_name, KFS, 0L, NULL, 1);
|
||||
} else {
|
||||
Syslog('+', "No R/W permission on %s", temp);
|
||||
}
|
||||
} else if (pw->pw_gid == stbuf.st_gid) {
|
||||
/*
|
||||
* We own the file group
|
||||
*/
|
||||
if ((stbuf.st_mode & S_IRGRP) && (stbuf.st_mode & S_IWGRP)) {
|
||||
add_list(&st, temp, de->d_name, KFS, 0L, NULL, 1);
|
||||
} else {
|
||||
Syslog('+', "No R/W permission on %s", temp);
|
||||
}
|
||||
} else {
|
||||
/*
|
||||
* No owner of file
|
||||
*/
|
||||
if ((stbuf.st_mode & S_IROTH) && (stbuf.st_mode & S_IWOTH)) {
|
||||
add_list(&st, temp, de->d_name, KFS, 0L, NULL, 1);
|
||||
} else {
|
||||
Syslog('+', "No R/W permission on %s", temp);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Syslog('+', "Not a regular file %s", temp);
|
||||
}
|
||||
} else {
|
||||
WriteError("Can't stat %s", temp);
|
||||
}
|
||||
}
|
||||
}
|
||||
closedir(dp);
|
||||
free(temp);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Check spool files, these are more or less useless but they
|
||||
* create a filelist of files to send which are never send.
|
||||
@ -306,7 +367,7 @@ file_list *create_filelist(fa_list *al, char *fl, int create)
|
||||
}
|
||||
|
||||
for (tmpf = st; tmpf; tmpf = tmpf->next)
|
||||
Syslog('O',"flist: \"%s\" -> \"%s\" dsp:%d flofp:%lu floff:%lu",
|
||||
Syslog('o',"flist: \"%s\" -> \"%s\" dsp:%d flofp:%lu floff:%lu",
|
||||
MBSE_SS(tmpf->local), MBSE_SS(tmpf->remote), tmpf->disposition,
|
||||
(unsigned long)tmpf->flofp, (unsigned long)tmpf->floff);
|
||||
|
||||
@ -322,8 +383,7 @@ file_list *create_freqlist(fa_list *al)
|
||||
{
|
||||
file_list *st = NULL, *tmpf;
|
||||
fa_list *tmpa;
|
||||
char *nm;
|
||||
char tmpreq[13];
|
||||
char *nm, tmpreq[13];
|
||||
struct stat stbuf;
|
||||
|
||||
Syslog('o', "create_freqlist(%s)", al?ascfnode(al->addr, 0x1f):"<none>");
|
||||
@ -338,10 +398,11 @@ file_list *create_freqlist(fa_list *al)
|
||||
}
|
||||
}
|
||||
|
||||
if (made_request) {
|
||||
for (tmpf = st; tmpf; tmpf = tmpf->next)
|
||||
Syslog('O', "flist: \"%s\" -> \"%s\" dsp:%d flofp:%lu floff:%lu",
|
||||
MBSE_SS(tmpf->local), MBSE_SS(tmpf->remote), tmpf->disposition,
|
||||
tmpf->flofp, tmpf->floff);
|
||||
Syslog('o', "flist: \"%s\" -> \"%s\" dsp:%d flofp:%lu floff:%lu",
|
||||
MBSE_SS(tmpf->local), MBSE_SS(tmpf->remote), tmpf->disposition, tmpf->flofp, tmpf->floff);
|
||||
}
|
||||
|
||||
return st;
|
||||
}
|
||||
@ -382,8 +443,7 @@ void tidy_filelist(file_list *fl, int dsf)
|
||||
void execute_disposition(file_list *fl)
|
||||
{
|
||||
FILE *fp=NULL;
|
||||
char *nm;
|
||||
char tpl='~';
|
||||
char *nm, tpl='~';
|
||||
|
||||
Syslog('o', "execute_disposition(%s)", fl->local);
|
||||
nm = fl->local;
|
||||
@ -406,8 +466,7 @@ void execute_disposition(file_list *fl)
|
||||
continue;
|
||||
|
||||
/*
|
||||
* Count nr of files which haven't been
|
||||
* sent yet
|
||||
* Count nr of files which haven't been sent yet
|
||||
*/
|
||||
if (buf[0] != '~')
|
||||
files_remain++;
|
||||
@ -447,17 +506,16 @@ void execute_disposition(file_list *fl)
|
||||
|
||||
switch (fl->disposition) {
|
||||
case DSF:
|
||||
case LEAVE:
|
||||
break;
|
||||
case TFS:
|
||||
Syslog('o', "Truncating sent file \"%s\"",MBSE_SS(nm));
|
||||
case LEAVE: break;
|
||||
|
||||
case TFS: Syslog('o', "Truncating sent file \"%s\"",MBSE_SS(nm));
|
||||
if ((fp=fopen(nm,"w")))
|
||||
fclose(fp);
|
||||
else
|
||||
WriteError("$Cannot truncate file \"%s\"",MBSE_SS(nm));
|
||||
break;
|
||||
case KFS:
|
||||
Syslog('o', "Removing sent file \"%s\"",MBSE_SS(nm));
|
||||
|
||||
case KFS: Syslog('o', "Removing sent file \"%s\"",MBSE_SS(nm));
|
||||
if (unlink(nm) != 0) {
|
||||
if (errno == ENOENT)
|
||||
Syslog('o', "Cannot unlink nonexistent file \"%s\"", MBSE_SS(nm));
|
||||
@ -465,8 +523,8 @@ void execute_disposition(file_list *fl)
|
||||
WriteError("$Cannot unlink file \"%s\"", MBSE_SS(nm));
|
||||
}
|
||||
break;
|
||||
default: WriteError("execute_disposition: unknown disp %d for \"%s\"",
|
||||
fl->disposition,MBSE_SS(nm));
|
||||
|
||||
default: WriteError("execute_disposition: unknown disp %d for \"%s\"", fl->disposition,MBSE_SS(nm));
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -68,16 +68,99 @@ int outstat()
|
||||
{
|
||||
int rc;
|
||||
struct _alist *tmp, *old;
|
||||
char flstr[6];
|
||||
char flstr[6], *temp, flavor;
|
||||
time_t age;
|
||||
char temp[81];
|
||||
faddr *fa;
|
||||
callstat *cst;
|
||||
FILE *fp;
|
||||
DIR *dp = NULL;
|
||||
struct dirent *de;
|
||||
struct stat sb;
|
||||
struct passwd *pw;
|
||||
|
||||
if ((rc = scanout(each))) {
|
||||
WriteError("Error scanning outbound, aborting");
|
||||
return rc;
|
||||
}
|
||||
|
||||
/*
|
||||
* Check private outbound box for nodes in the setup.
|
||||
*/
|
||||
temp = calloc(PATH_MAX, sizeof(char));
|
||||
sprintf(temp, "%s/etc/nodes.data", getenv("MBSE_ROOT"));
|
||||
if ((fp = fopen(temp, "r")) == NULL) {
|
||||
WriteError("Error open %s, aborting", temp);
|
||||
free(temp);
|
||||
return 1;
|
||||
}
|
||||
fread(&nodeshdr, sizeof(nodeshdr), 1, fp);
|
||||
fseek(fp, 0, SEEK_SET);
|
||||
fread(&nodeshdr, nodeshdr.hdrsize, 1, fp);
|
||||
pw = getpwnam((char *)"mbse");
|
||||
|
||||
while ((fread(&nodes, nodeshdr.recsize, 1, fp)) == 1) {
|
||||
if (strlen(nodes.OutBox)) {
|
||||
if (nodes.Crash)
|
||||
flavor = 'c';
|
||||
else if (nodes.Hold)
|
||||
flavor = 'h';
|
||||
else
|
||||
flavor = 'o';
|
||||
fa = fido2faddr(nodes.Aka[0]);
|
||||
Syslog('o', "checking outbox %s (%s)", nodes.OutBox, ascfnode(fa, 0x2f));
|
||||
if ((dp = opendir(nodes.OutBox)) == NULL) {
|
||||
Syslog('o', "\"%s\" cannot be opened, proceed", MBSE_SS(nodes.OutBox));
|
||||
} else {
|
||||
while ((de = readdir(dp))) {
|
||||
if (strcmp(de->d_name, ".") && strcmp(de->d_name, "..")) {
|
||||
sprintf(temp, "%s/%s", nodes.OutBox, de->d_name);
|
||||
if (stat(temp, &sb) == 0) {
|
||||
Syslog('o' ,"checking: \"%s\"", de->d_name);
|
||||
if (S_ISREG(sb.st_mode)) {
|
||||
if (pw->pw_uid == sb.st_uid) {
|
||||
/*
|
||||
* We own the file
|
||||
*/
|
||||
if ((sb.st_mode & S_IRUSR) && (sb.st_mode & S_IWUSR)) {
|
||||
each(fa, flavor, 0, temp);
|
||||
} else {
|
||||
Syslog('o', "no R/W permission on %s", temp);
|
||||
}
|
||||
} else if (pw->pw_gid == sb.st_gid) {
|
||||
/*
|
||||
* We own the file group
|
||||
*/
|
||||
if ((sb.st_mode & S_IRGRP) && (sb.st_mode & S_IWGRP)) {
|
||||
each(fa, flavor, 0, temp);
|
||||
} else {
|
||||
Syslog('o', "no R/W permission on %s", temp);
|
||||
}
|
||||
} else {
|
||||
/*
|
||||
* No owner of file
|
||||
*/
|
||||
if ((sb.st_mode & S_IROTH) && (sb.st_mode & S_IWOTH)) {
|
||||
each(fa, flavor, 0, temp);
|
||||
} else {
|
||||
Syslog('o', "no R/W permission on %s", temp);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Syslog('o', "not a regular file");
|
||||
}
|
||||
} else {
|
||||
WriteError("Can't stat %s", temp);
|
||||
}
|
||||
}
|
||||
}
|
||||
closedir(dp);
|
||||
}
|
||||
tidy_faddr(fa);
|
||||
}
|
||||
fseek(fp, nodeshdr.filegrp + nodeshdr.mailgrp, SEEK_CUR);
|
||||
}
|
||||
fclose(fp);
|
||||
|
||||
if (!do_quiet) {
|
||||
colour(10, 0);
|
||||
printf("flavor try size age address\n");
|
||||
@ -98,8 +181,7 @@ int outstat()
|
||||
cst = getstatus(&(tmp->addr));
|
||||
age = time(NULL);
|
||||
age -= tmp->time;
|
||||
sprintf(temp, "%s %3d %9lu %s %s", flstr, cst->tryno, (long)tmp->size,
|
||||
str_time(age), ascfnode(&(tmp->addr), 0x1f));
|
||||
sprintf(temp, "%s %3d %9lu %s %s", flstr, cst->tryno, (long)tmp->size, str_time(age), ascfnode(&(tmp->addr), 0x1f));
|
||||
|
||||
if (!do_quiet)
|
||||
printf("%s\n", temp);
|
||||
@ -107,6 +189,7 @@ int outstat()
|
||||
}
|
||||
}
|
||||
|
||||
free(temp);
|
||||
for (tmp = alist; tmp; tmp = old) {
|
||||
old = tmp->next;
|
||||
free(tmp->addr.domain);
|
||||
@ -126,6 +209,8 @@ int each(faddr *addr, char flavor, int isflo, char *fname)
|
||||
FILE *fp;
|
||||
char buf[256], *p;
|
||||
|
||||
Syslog('o', "each(%s, %c, %s, %s)", ascfnode(addr, 0x2f), flavor, isflo?"isflo":"noflo", fname);
|
||||
|
||||
if ((isflo != OUT_PKT) && (isflo != OUT_FLO) && (isflo != OUT_REQ) && (isflo != OUT_POL))
|
||||
return 0;
|
||||
|
||||
|
@ -79,8 +79,7 @@ static int scan_dir(int (*fn)(faddr *, char, int, char *), char *dname, int ispo
|
||||
}
|
||||
|
||||
while ((de=readdir(dp)))
|
||||
if ((strlen(de->d_name) == 12) && (de->d_name[8] == '.') &&
|
||||
(strspn(de->d_name,"0123456789abcdefABCDEF") == 8)) {
|
||||
if ((strlen(de->d_name) == 12) && (de->d_name[8] == '.') && (strspn(de->d_name,"0123456789abcdefABCDEF") == 8)) {
|
||||
Syslog('o' ,"checking: \"%s\"",de->d_name);
|
||||
addr.point= 0;
|
||||
strncpy(fname,dname,PATH_MAX-2);
|
||||
@ -124,9 +123,7 @@ static int scan_dir(int (*fn)(faddr *, char, int, char *), char *dname, int ispo
|
||||
isflo=OUT_POL;
|
||||
else
|
||||
isflo=-1;
|
||||
Syslog('o' ,"%s \"%s\"",
|
||||
(isflo == OUT_FLO) ? "flo file" : "packet",
|
||||
de->d_name);
|
||||
Syslog('o' ,"%s \"%s\"", (isflo == OUT_FLO) ? "flo file" : "packet", de->d_name);
|
||||
if ((rc=fn(&addr,flavor,isflo,fname)))
|
||||
goto exout;
|
||||
} else if ((strncasecmp(de->d_name+9,"su",2) == 0) ||
|
||||
@ -153,7 +150,7 @@ static int scan_dir(int (*fn)(faddr *, char, int, char *), char *dname, int ispo
|
||||
*/
|
||||
if ((strncasecmp(de->d_name+9, dayname(), 2)) || (fage > 6)) {
|
||||
if (unlink(fname) == 0)
|
||||
Syslog('-', "Removed truncated ARCmail file %s", fname);
|
||||
Syslog('+', "Removed truncated ARCmail file %s", fname);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -125,7 +125,7 @@ int E_Group(gr_list **fdp, char *title)
|
||||
|
||||
clr_index();
|
||||
set_color(WHITE, BLACK);
|
||||
mvprintw(5, 5, (char *)"%s", title);
|
||||
mvprintw(5, 6, (char *)"%s", title);
|
||||
set_color(CYAN, BLACK);
|
||||
|
||||
for (tmp = *fdp; tmp; tmp = tmp->next)
|
||||
|
@ -716,7 +716,7 @@ char *edit_str(int y, int x, int l, char *line, char *help)
|
||||
|
||||
|
||||
|
||||
char *edit_pth(int y, int x, int l, char *line, char *help)
|
||||
char *edit_pth(int y, int x, int l, char *line, char *help, mode_t mode)
|
||||
{
|
||||
static char s[256];
|
||||
char *temp;
|
||||
@ -729,7 +729,7 @@ char *edit_pth(int y, int x, int l, char *line, char *help)
|
||||
temp = xstrcat(temp, (char *)"/foobar");
|
||||
if (access(s, R_OK)) {
|
||||
if (yes_no((char *)"Path doesn't exist, create"))
|
||||
if (! mkdirs(temp, 0775))
|
||||
if (! mkdirs(temp, mode))
|
||||
errmsg((char *)"Can't create path");
|
||||
}
|
||||
}
|
||||
@ -1723,6 +1723,95 @@ char *getmagictype(int val)
|
||||
|
||||
|
||||
|
||||
char *get_sessiontype(int val)
|
||||
{
|
||||
switch (val) {
|
||||
case S_DIRECT: return (char *)"Direct ";
|
||||
case S_DIR: return (char *)"Directory";
|
||||
case S_FTP: return (char *)"FTP ";
|
||||
default: return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void show_sessiontype(int y, int x, int val)
|
||||
{
|
||||
mvprintw(y, x, get_sessiontype(val));
|
||||
}
|
||||
|
||||
|
||||
|
||||
int edit_sessiontype(int y, int x, int val)
|
||||
{
|
||||
int ch;
|
||||
|
||||
showhelp((char *)"Toggle ^Session type^ with spacebar, press <Enter> whene done.");
|
||||
do {
|
||||
set_color(YELLOW, BLUE);
|
||||
show_sessiontype(y, x, val);
|
||||
|
||||
ch = readkey(y, x, YELLOW, BLUE);
|
||||
|
||||
if (ch == ' ') {
|
||||
if (val < S_FTP)
|
||||
val++;
|
||||
else
|
||||
val = S_DIRECT;
|
||||
}
|
||||
} while (ch != KEY_ENTER && ch != '\012');
|
||||
set_color(WHITE, BLACK);
|
||||
show_sessiontype(y, x, val);
|
||||
return val;
|
||||
}
|
||||
|
||||
|
||||
|
||||
char *get_routertype(int val)
|
||||
{
|
||||
switch (val) {
|
||||
case R_ROUTE: return (char *)"Routed ";
|
||||
case R_NEWDEST: return (char *)"Redirect ";
|
||||
case R_BOUNCE: return (char *)"Bounce ";
|
||||
case R_CC: return (char *)"CarbonCopy";
|
||||
default: return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void show_routertype(int y, int x, int val)
|
||||
{
|
||||
mvprintw(y, x, get_routertype(val));
|
||||
}
|
||||
|
||||
|
||||
|
||||
int edit_routertype(int y, int x, int val)
|
||||
{
|
||||
int ch;
|
||||
|
||||
showhelp((char *)"Toggle ^Routing mode^ with spacebar, press <Enter> whene done.");
|
||||
do {
|
||||
set_color(YELLOW, BLUE);
|
||||
show_routertype(y, x, val);
|
||||
|
||||
ch = readkey(y, x, YELLOW, BLUE);
|
||||
|
||||
if (ch == ' ') {
|
||||
if (val < R_CC)
|
||||
val++;
|
||||
else
|
||||
val = R_ROUTE;
|
||||
}
|
||||
} while (ch != KEY_ENTER && ch != '\012');
|
||||
set_color(WHITE, BLACK);
|
||||
show_routertype(y, x, val);
|
||||
return val;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void show_aka(int y, int x, fidoaddr aka)
|
||||
{
|
||||
char temp[24];
|
||||
|
@ -20,7 +20,7 @@ int select_menu(int);
|
||||
int select_tag(int);
|
||||
void show_str(int, int, int, char *);
|
||||
char *edit_str(int, int, int, char *, char *);
|
||||
char *edit_pth(int, int, int, char *, char *);
|
||||
char *edit_pth(int, int, int, char *, char *, mode_t);
|
||||
void test_jam(char *);
|
||||
char *edit_jam(int, int, int, char *, char *);
|
||||
char *edit_ups(int, int, int, char *, char *);
|
||||
@ -67,6 +67,12 @@ int edit_linetype(int, int, int);
|
||||
char *getmagictype(int);
|
||||
void show_magictype(int, int, int);
|
||||
int edit_magictype(int, int, int);
|
||||
char *get_sessiontype(int);
|
||||
void show_sessiontype(int, int, int);
|
||||
int edit_sessiontype(int, int, int);
|
||||
char *get_routetype(int);
|
||||
void show_routetype(int, int, int);
|
||||
int edit_routetype(int, int, int);
|
||||
void show_aka(int, int, fidoaddr);
|
||||
void edit_color(int *, int *, char *, char *);
|
||||
char *get_color(int);
|
||||
@ -77,7 +83,7 @@ char *getmenutype(int);
|
||||
* Macro's for the edit functions
|
||||
*/
|
||||
#define E_STR(y,x,l,str,help) strcpy(str, edit_str(y,x,l,str,(char *)help)); break;
|
||||
#define E_PTH(y,x,l,str,help) strcpy(str, edit_pth(y,x,l,str,(char *)help)); break;
|
||||
#define E_PTH(y,x,l,str,help,mode) strcpy(str, edit_pth(y,x,l,str,(char *)help,mode)); break;
|
||||
#define E_UPS(y,x,l,str,help) strcpy(str, edit_ups(y,x,l,str,(char *)help)); break;
|
||||
#define E_JAM(y,x,l,str,help) strcpy(str, edit_jam(y,x,l,str,(char *)help)); break;
|
||||
#define E_BOOL(y,x,bool,help) bool = edit_bool(y,x,bool,(char *)help); break;
|
||||
|
@ -332,7 +332,7 @@ int EditFileRec(int Area)
|
||||
return 0;
|
||||
case 1: E_STR( 6,16,44, area.Name, "The ^name^ for this area")
|
||||
case 2: strcpy(tpath, area.Path);
|
||||
strcpy(area.Path, edit_pth(7,16,64, area.Path, (char *)"The ^path^ for the files in this area"));
|
||||
strcpy(area.Path, edit_pth(7,16,64, area.Path, (char *)"The ^path^ for the files in this area", 0775));
|
||||
if (strlen(tpath) && strlen(area.Path) && strcmp(tpath, area.Path) && strcmp(tpath, CFG.ftp_base)) {
|
||||
if ((dp = opendir(tpath)) == NULL) {
|
||||
WriteError("Can't open directory %s", tpath);
|
||||
|
@ -420,7 +420,7 @@ int EditFGrpRec(int Area)
|
||||
strcpy(fgroup.BbsGroup, fgroup.Name);
|
||||
break;
|
||||
case 2: E_STR( 7,16,55,fgroup.Comment, "The ^description^ of this file group")
|
||||
case 3: E_PTH( 8,16,64,fgroup.BasePath, "The ^base path^ for new created file areas")
|
||||
case 3: E_PTH( 8,16,64,fgroup.BasePath, "The ^base path^ for new created file areas", 0775)
|
||||
case 4: tmp = PickAka((char *)"10.1.4", TRUE);
|
||||
if (tmp != -1)
|
||||
fgroup.UseAka = CFG.aka[tmp];
|
||||
|
@ -240,12 +240,12 @@ void e_global2(void)
|
||||
|
||||
switch(select_menu(7)) {
|
||||
case 0: return;
|
||||
case 1: E_PTH( 6,16,64, CFG.req_magic, "The path to the ^magic filerequest^ files.")
|
||||
case 1: E_PTH( 6,16,64, CFG.req_magic, "The path to the ^magic filerequest^ files.", 0750)
|
||||
case 2: E_STR( 7,16,64, CFG.dospath, "The translated ^DOS^ drive and path, empty disables translation")
|
||||
case 3: E_PTH( 8,16,64, CFG.uxpath, "The translated ^Unix^ path.")
|
||||
case 3: E_PTH( 8,16,64, CFG.uxpath, "The translated ^Unix^ path.", 0750)
|
||||
case 4: E_BOOL(9,16, CFG.leavecase, "^Leave^ outbound flo filenames as is, ^No^ forces uppercase.")
|
||||
case 5: E_PTH(10,16,64, CFG.ftp_base, "The ^FTP home^ directory to strip of the real directory")
|
||||
case 6: E_PTH(11,16,64, CFG.alists_path, "The path where ^area lists^ and ^filebone lists^ are stored.")
|
||||
case 5: E_PTH(10,16,64, CFG.ftp_base, "The ^FTP home^ directory to strip of the real directory", 0750)
|
||||
case 6: E_PTH(11,16,64, CFG.alists_path, "The path where ^area lists^ and ^filebone lists^ are stored.", 0750)
|
||||
case 7: E_STR(12,16,64, CFG.externaleditor,
|
||||
"The full path and filename to the ^external message editor^ (blank=disable)")
|
||||
}
|
||||
@ -296,17 +296,17 @@ void e_global(void)
|
||||
|
||||
switch(select_menu(12)) {
|
||||
case 0: return;
|
||||
case 1: E_PTH( 6,16,64, CFG.bbs_menus, "The path to the ^default menus^.")
|
||||
case 2: E_PTH( 7,16,64, CFG.bbs_txtfiles, "The path to the ^default textfiles^.")
|
||||
case 3: E_PTH( 8,16,64, CFG.bbs_macros, "The path to the ^default macro templates^.")
|
||||
case 4: E_PTH( 9,16,64, CFG.bbs_usersdir, "The path to the ^users home^ directories.")
|
||||
case 5: E_PTH(10,16,64, CFG.nodelists, "The path to the ^nodelists^.")
|
||||
case 6: E_PTH(11,16,64, CFG.inbound, "The path to the ^inbound^ for unknown systems.")
|
||||
case 7: E_PTH(12,16,64, CFG.pinbound, "The path to the ^nodelists^ for protected systems.")
|
||||
case 8: E_PTH(13,16,64, CFG.outbound, "The path to the base ^outbound^ directory.")
|
||||
case 9: E_PTH(14,16,64, CFG.msgs_path, "The path to the ^*.msgs^ directory.")
|
||||
case 10:E_PTH(15,16,64, CFG.badtic, "The path to the ^bad tic files^.")
|
||||
case 11:E_PTH(16,16,64, CFG.ticout, "The path to the ^outgoing TIC^ files.")
|
||||
case 1: E_PTH( 6,16,64, CFG.bbs_menus, "The path to the ^default menus^.", 0750)
|
||||
case 2: E_PTH( 7,16,64, CFG.bbs_txtfiles, "The path to the ^default textfiles^.", 0750)
|
||||
case 3: E_PTH( 8,16,64, CFG.bbs_macros, "The path to the ^default macro templates^.", 0750)
|
||||
case 4: E_PTH( 9,16,64, CFG.bbs_usersdir, "The path to the ^users home^ directories.", 0770)
|
||||
case 5: E_PTH(10,16,64, CFG.nodelists, "The path to the ^nodelists^.", 0750)
|
||||
case 6: E_PTH(11,16,64, CFG.inbound, "The path to the ^inbound^ for unknown systems.", 0750)
|
||||
case 7: E_PTH(12,16,64, CFG.pinbound, "The path to the ^nodelists^ for protected systems.", 0750)
|
||||
case 8: E_PTH(13,16,64, CFG.outbound, "The path to the base ^outbound^ directory.", 0750)
|
||||
case 9: E_PTH(14,16,64, CFG.msgs_path, "The path to the ^*.msgs^ directory.", 0750)
|
||||
case 10:E_PTH(15,16,64, CFG.badtic, "The path to the ^bad tic files^.", 0750)
|
||||
case 11:E_PTH(16,16,64, CFG.ticout, "The path to the ^outgoing TIC^ files.", 0750)
|
||||
case 12:e_global2();
|
||||
s_global();
|
||||
break;
|
||||
@ -1066,9 +1066,9 @@ void e_intmailcfg(void)
|
||||
case 1: E_STR( 7,16,64, CFG.popnode, "The ^FQDN^ of the node where the ^POP3^ server runs.")
|
||||
case 2: E_STR( 8,16,64, CFG.smtpnode, "The ^FQDN^ of the node where the ^SMTP^ server runs.")
|
||||
case 3: if (CFG.newsfeed == FEEDRNEWS)
|
||||
strcpy(CFG.rnewspath, edit_pth(9,16,64, CFG.rnewspath, (char *)"The path and filename to the ^rnews^ command."));
|
||||
strcpy(CFG.rnewspath, edit_pth(9,16,64, CFG.rnewspath, (char *)"The path and filename to the ^rnews^ command.", 0775));
|
||||
if (CFG.newsfeed == FEEDUUCP)
|
||||
strcpy(CFG.rnewspath, edit_pth(9,16,64, CFG.rnewspath, (char *)"The path to the ^uucppublic^ directory."));
|
||||
strcpy(CFG.rnewspath, edit_pth(9,16,64, CFG.rnewspath, (char *)"The path to the ^uucppublic^ directory.", 0775));
|
||||
break;
|
||||
case 4: if (CFG.newsfeed == FEEDINN)
|
||||
strcpy(CFG.nntpnode, edit_str(10,16,64, CFG.nntpnode, (char *)"The ^FQDN^ of the node where the ^NNTP^ server runs."));
|
||||
|
@ -350,9 +350,9 @@ int EditLangRec(int Area)
|
||||
return 0;
|
||||
case 1: E_UPS( 7,16,1, lang.LangKey, "The ^Key^ to select this language")
|
||||
case 2: E_STR( 8,16,30,lang.Name, "The ^name^ of this language")
|
||||
case 3: E_PTH( 9,16,64,lang.MenuPath, "The ^Menus Path^ of this language")
|
||||
case 4: E_PTH( 10,16,64,lang.TextPath, "The ^Textfile path^ of this language")
|
||||
case 5: E_PTH( 11,16,64,lang.MacroPath,"The ^Macro template path^ if this language")
|
||||
case 3: E_PTH( 9,16,64,lang.MenuPath, "The ^Menus Path^ of this language", 0755)
|
||||
case 4: E_PTH( 10,16,64,lang.TextPath, "The ^Textfile path^ of this language", 0755)
|
||||
case 5: E_PTH( 11,16,64,lang.MacroPath,"The ^Macro template path^ if this language", 0755)
|
||||
case 6: E_BOOL(12,16, lang.Available,"Is this language ^available^")
|
||||
case 7: E_STR( 13,16,24,lang.Filename, "The ^Filename^ (without path) of the language datafile")
|
||||
case 8: E_SEC( 14,16, lang.Security, "8.2. LANGUAGE SECURITY", s_lang)
|
||||
|
@ -364,7 +364,7 @@ int EditMagicRec(int Area)
|
||||
|
||||
case MG_COPY:
|
||||
case MG_UNPACK:
|
||||
E_PTH(12,16,64, magic.Path, "The ^path^ to use")
|
||||
E_PTH(12,16,64, magic.Path, "The ^path^ to use", 0750)
|
||||
|
||||
case MG_EXEC:
|
||||
E_STR(12,16,64, magic.Cmd, "The ^command^ to execute")
|
||||
|
@ -381,7 +381,7 @@ int EditMGrpRec(int Area)
|
||||
}
|
||||
break;
|
||||
case 2: E_STR( 8,16,55, mgroup.Comment, "The ^desription^ for this message group")
|
||||
case 3: E_PTH( 9,16,64, mgroup.BasePath, "The ^Base path^ where new JAM areas are created")
|
||||
case 3: E_PTH( 9,16,64, mgroup.BasePath, "The ^Base path^ where new JAM areas are created", 0770)
|
||||
case 4: E_SEC( 10,16, mgroup.RDSec, "9.1.4 MESSAGE GROUP READ SECURITY", MgScreen)
|
||||
case 5: E_SEC( 11,16, mgroup.WRSec, "9.1.5 MESSAGE GROUP WRITE SECURITY", MgScreen)
|
||||
case 6: E_SEC( 12,16, mgroup.SYSec, "9.1.6 MESSAGE GROUP SYSOP SECURITY", MgScreen)
|
||||
|
511
mbsetup/m_node.c
511
mbsetup/m_node.c
@ -362,38 +362,35 @@ void E_Mail(void)
|
||||
{
|
||||
clr_index();
|
||||
set_color(WHITE, BLACK);
|
||||
mvprintw( 5, 6, "7.14 EDIT NODE - MAIL PROCESSING");
|
||||
mvprintw( 5, 6, "7.4 EDIT NODE - MAIL PROCESSING");
|
||||
set_color(CYAN, BLACK);
|
||||
mvprintw( 7, 6, "1. Session pwd");
|
||||
mvprintw( 8, 6, "2. PKT password");
|
||||
mvprintw( 9, 6, "3. Check PKT pwd");
|
||||
mvprintw(10, 6, "4. UplMgr program");
|
||||
mvprintw(11, 6, "5. UplMgr passwd");
|
||||
mvprintw(12, 6, "6. Mail forward");
|
||||
mvprintw(13, 6, "7. ARCmail comp.");
|
||||
mvprintw(14, 6, "8. ARCmail a..z");
|
||||
mvprintw( 7, 6, "1. PKT password");
|
||||
mvprintw( 8, 6, "2. Check PKT pwd");
|
||||
mvprintw( 9, 6, "3. UplMgr program");
|
||||
mvprintw(10, 6, "4. UplMgr passwd");
|
||||
mvprintw(11, 6, "5. Mail forward");
|
||||
mvprintw(12, 6, "6. ARCmail comp.");
|
||||
mvprintw(13, 6, "7. ARCmail a..z");
|
||||
|
||||
for (;;) {
|
||||
set_color(WHITE, BLACK);
|
||||
show_str( 7,25,15, (char *)"***************");
|
||||
show_str( 8,25,15, (char *)"***************");
|
||||
show_bool(9,25, nodes.MailPwdCheck);
|
||||
show_str(10,25, 8, nodes.UplAmgrPgm);
|
||||
show_str(11,25,15, (char *)"***************");
|
||||
show_bool(12,25, nodes.MailFwd);
|
||||
show_bool(13,25, nodes.ARCmailCompat);
|
||||
show_bool(14,25, nodes.ARCmailAlpha);
|
||||
show_bool( 8,25, nodes.MailPwdCheck);
|
||||
show_str( 9,25, 8, nodes.UplAmgrPgm);
|
||||
show_str( 10,25,15, (char *)"***************");
|
||||
show_bool(11,25, nodes.MailFwd);
|
||||
show_bool(12,25, nodes.ARCmailCompat);
|
||||
show_bool(13,25, nodes.ARCmailAlpha);
|
||||
|
||||
switch(select_menu(8)) {
|
||||
switch(select_menu(7)) {
|
||||
case 0: return;
|
||||
case 1: E_STR( 7,25,15,nodes.Spasswd, "The ^Session password^ for this node")
|
||||
case 2: E_STR( 8,25,15,nodes.Epasswd, "The ^Mail (.pkt)^ password^ for this node")
|
||||
case 3: E_BOOL( 9,25, nodes.MailPwdCheck, "Check the ^mail PKT^ password")
|
||||
case 4: E_STR( 10,25, 8,nodes.UplAmgrPgm, "Name of the uplink ^areamanager program^")
|
||||
case 5: E_STR( 11,25,15,nodes.UplAmgrPass, "Uplink ^areamanager password^ for this node")
|
||||
case 6: E_BOOL(12,25, nodes.MailFwd, "^Forward^ echomail for this node")
|
||||
case 7: E_BOOL(13,25, nodes.ARCmailCompat, "Use ^ARCmail 0.60^ file naming convention for out of zone mail")
|
||||
case 8: E_BOOL(14,25, nodes.ARCmailAlpha, "Allow ^0..9 and a..z^ filename extensions for ARCmail archives")
|
||||
case 1: E_STR( 7,25,15, nodes.Epasswd, "The ^Mail (.pkt)^ password^ for this node")
|
||||
case 2: E_BOOL( 8,25, nodes.MailPwdCheck, "Check the ^mail PKT^ password")
|
||||
case 3: E_STR( 9,25, 8, nodes.UplAmgrPgm, "Name of the uplink ^areamanager program^")
|
||||
case 4: E_STR( 10,25,15, nodes.UplAmgrPass, "Uplink ^areamanager password^ for this node")
|
||||
case 5: E_BOOL(11,25, nodes.MailFwd, "^Forward^ echomail for this node")
|
||||
case 6: E_BOOL(12,25, nodes.ARCmailCompat, "Use ^ARCmail 0.60^ file naming convention for out of zone mail")
|
||||
case 7: E_BOOL(13,25, nodes.ARCmailAlpha, "Allow ^0..9 and a..z^ filename extensions for ARCmail archives")
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -405,7 +402,7 @@ void E_Files(void)
|
||||
{
|
||||
clr_index();
|
||||
set_color(WHITE, BLACK);
|
||||
mvprintw( 5, 6, "7.16 EDIT NODE - FILES PROCESSING");
|
||||
mvprintw( 5, 6, "7.6 EDIT NODE - FILES PROCESSING");
|
||||
set_color(CYAN, BLACK);
|
||||
mvprintw( 7, 6, "1. Files password");
|
||||
mvprintw( 8, 6, "2. Mgr password");
|
||||
@ -426,16 +423,16 @@ void E_Files(void)
|
||||
|
||||
for (;;) {
|
||||
set_color(WHITE, BLACK);
|
||||
show_str( 7,25,15, (char *)"***************");
|
||||
show_str( 8,25,15, (char *)"***************");
|
||||
show_str( 9,25, 8, nodes.UplFmgrPgm);
|
||||
show_str(10,25,15, (char *)"***************");
|
||||
show_bool(11,25, nodes.AddPlus);
|
||||
show_bool(12,25, nodes.Message);
|
||||
show_bool(13,25, nodes.Tic);
|
||||
show_bool(14,25, nodes.AdvTic);
|
||||
show_bool(15,25, nodes.FileFwd);
|
||||
show_bool(16,25, nodes.Billing);
|
||||
show_str( 7,26,15, (char *)"***************");
|
||||
show_str( 8,26,15, (char *)"***************");
|
||||
show_str( 9,26, 8, nodes.UplFmgrPgm);
|
||||
show_str( 10,26,15, (char *)"***************");
|
||||
show_bool(11,26, nodes.AddPlus);
|
||||
show_bool(12,26, nodes.Message);
|
||||
show_bool(13,26, nodes.Tic);
|
||||
show_bool(14,26, nodes.AdvTic);
|
||||
show_bool(15,26, nodes.FileFwd);
|
||||
show_bool(16,26, nodes.Billing);
|
||||
show_bool( 7,65, nodes.BillDirect);
|
||||
show_int( 8,65, nodes.Credit);
|
||||
show_int( 9,65, nodes.Debet);
|
||||
@ -445,16 +442,16 @@ void E_Files(void)
|
||||
|
||||
switch(select_menu(16)) {
|
||||
case 0: return;
|
||||
case 1: E_STR( 7,25,15,nodes.Fpasswd, "The ^TIC^ files ^password^ for this node")
|
||||
case 2: E_STR( 8,25,15,nodes.Apasswd, "The filemanager ^password^ for this node")
|
||||
case 3: E_STR( 9,25,8, nodes.UplFmgrPgm, "The name of the uplink ^filemanager^ program")
|
||||
case 4: E_STR( 10,25,15,nodes.UplFmgrPass,"The uplink filemanager ^password^")
|
||||
case 5: E_BOOL(11,25, nodes.AddPlus, "Add ^+^ in uplink manager requests for new areas")
|
||||
case 6: E_BOOL(12,25, nodes.Message, "Send ^messages^ with files send to this node")
|
||||
case 7: E_BOOL(13,25, nodes.Tic, "Send ^TIC^ files to this node")
|
||||
case 8: E_BOOL(14,25, nodes.AdvTic, "Send ^advanced^ TIC files to this node")
|
||||
case 9: E_BOOL(15,25, nodes.FileFwd, "^Forward TIC^ files for this node")
|
||||
case 10:E_BOOL(16,25, nodes.Billing, "Send ^bills^ to this node, Costsharing is active")
|
||||
case 1: E_STR( 7,26,15,nodes.Fpasswd, "The ^TIC^ files ^password^ for this node")
|
||||
case 2: E_STR( 8,26,15,nodes.Apasswd, "The filemanager ^password^ for this node")
|
||||
case 3: E_STR( 9,26,8, nodes.UplFmgrPgm, "The name of the uplink ^filemanager^ program")
|
||||
case 4: E_STR( 10,26,15,nodes.UplFmgrPass,"The uplink filemanager ^password^")
|
||||
case 5: E_BOOL(11,26, nodes.AddPlus, "Add ^+^ in uplink manager requests for new areas")
|
||||
case 6: E_BOOL(12,26, nodes.Message, "Send ^messages^ with files send to this node")
|
||||
case 7: E_BOOL(13,26, nodes.Tic, "Send ^TIC^ files to this node")
|
||||
case 8: E_BOOL(14,26, nodes.AdvTic, "Send ^advanced^ TIC files to this node")
|
||||
case 9: E_BOOL(15,26, nodes.FileFwd, "^Forward TIC^ files for this node")
|
||||
case 10:E_BOOL(16,26, nodes.Billing, "Send ^bills^ to this node, Costsharing is active")
|
||||
case 11:E_BOOL( 7,65, nodes.BillDirect, "Send bills ^direct^ after file processing")
|
||||
case 12:E_INT( 8,65, nodes.Credit, "The ^credit^ this node has for costsharing")
|
||||
case 13:E_INT( 9,65, nodes.Debet, "The ^debet^ in cents we have credit from this node")
|
||||
@ -476,7 +473,7 @@ void S_Stat(void)
|
||||
|
||||
clr_index();
|
||||
set_color(WHITE, BLACK);
|
||||
mvprintw( 5, 7, "7.18 NODE STATISTICS");
|
||||
mvprintw( 5, 6, "7.8 NODE STATISTICS");
|
||||
set_color(CYAN, BLACK);
|
||||
mvprintw( 8,18, " This week Last week This month Last month Total");
|
||||
mvprintw( 9,18, "---------- ---------- ---------- ---------- ----------");
|
||||
@ -498,12 +495,18 @@ void S_Stat(void)
|
||||
else
|
||||
LMiy = Miy - 1;
|
||||
|
||||
mvprintw(10,18, (char *)"%10lu %10lu %10lu %10lu %10lu", nodes.FilesSent.tweek, nodes.FilesSent.lweek, nodes.FilesSent.month[Miy], nodes.FilesSent.month[LMiy], nodes.FilesSent.total);
|
||||
mvprintw(11,18, (char *)"%10lu %10lu %10lu %10lu %10lu", nodes.F_KbSent.tweek, nodes.F_KbSent.lweek, nodes.F_KbSent.month[Miy], nodes.F_KbSent.month[LMiy], nodes.F_KbSent.total);
|
||||
mvprintw(12,18, (char *)"%10lu %10lu %10lu %10lu %10lu", nodes.FilesRcvd.tweek, nodes.FilesRcvd.lweek, nodes.FilesRcvd.month[Miy], nodes.FilesRcvd.month[LMiy], nodes.FilesRcvd.total);
|
||||
mvprintw(13,18, (char *)"%10lu %10lu %10lu %10lu %10lu", nodes.F_KbRcvd.tweek, nodes.F_KbRcvd.lweek, nodes.F_KbRcvd.month[Miy], nodes.F_KbRcvd.month[LMiy], nodes.F_KbRcvd.total);
|
||||
mvprintw(14,18, (char *)"%10lu %10lu %10lu %10lu %10lu", nodes.MailSent.tweek, nodes.MailSent.lweek, nodes.MailSent.month[Miy], nodes.MailSent.month[LMiy], nodes.MailSent.total);
|
||||
mvprintw(15,18, (char *)"%10lu %10lu %10lu %10lu %10lu", nodes.MailRcvd.tweek, nodes.MailRcvd.lweek, nodes.MailRcvd.month[Miy], nodes.MailRcvd.month[LMiy], nodes.MailRcvd.total);
|
||||
mvprintw(10,18, (char *)"%10lu %10lu %10lu %10lu %10lu", nodes.FilesSent.tweek,
|
||||
nodes.FilesSent.lweek, nodes.FilesSent.month[Miy], nodes.FilesSent.month[LMiy], nodes.FilesSent.total);
|
||||
mvprintw(11,18, (char *)"%10lu %10lu %10lu %10lu %10lu", nodes.F_KbSent.tweek,
|
||||
nodes.F_KbSent.lweek, nodes.F_KbSent.month[Miy], nodes.F_KbSent.month[LMiy], nodes.F_KbSent.total);
|
||||
mvprintw(12,18, (char *)"%10lu %10lu %10lu %10lu %10lu", nodes.FilesRcvd.tweek,
|
||||
nodes.FilesRcvd.lweek, nodes.FilesRcvd.month[Miy], nodes.FilesRcvd.month[LMiy], nodes.FilesRcvd.total);
|
||||
mvprintw(13,18, (char *)"%10lu %10lu %10lu %10lu %10lu", nodes.F_KbRcvd.tweek,
|
||||
nodes.F_KbRcvd.lweek, nodes.F_KbRcvd.month[Miy], nodes.F_KbRcvd.month[LMiy], nodes.F_KbRcvd.total);
|
||||
mvprintw(14,18, (char *)"%10lu %10lu %10lu %10lu %10lu", nodes.MailSent.tweek,
|
||||
nodes.MailSent.lweek, nodes.MailSent.month[Miy], nodes.MailSent.month[LMiy], nodes.MailSent.total);
|
||||
mvprintw(15,18, (char *)"%10lu %10lu %10lu %10lu %10lu", nodes.MailRcvd.tweek,
|
||||
nodes.MailRcvd.lweek, nodes.MailRcvd.month[Miy], nodes.MailRcvd.month[LMiy], nodes.MailRcvd.total);
|
||||
set_color(CYAN, BLACK);
|
||||
center_addstr(LINES - 4, (char *)"Press any key");
|
||||
readkey(LINES - 4, COLS / 2 + 8, LIGHTGRAY, BLACK);
|
||||
@ -615,44 +618,208 @@ void N_Akas(void)
|
||||
|
||||
|
||||
|
||||
void NScreen(void);
|
||||
void NScreen(void)
|
||||
void GeneralScreen(void);
|
||||
void GeneralScreen(void)
|
||||
{
|
||||
clr_index();
|
||||
set_color(WHITE, BLACK);
|
||||
mvprintw( 5, 2, "7. EDIT NODE");
|
||||
mvprintw( 5, 2, "7.1 EDIT NODE GENERAL");
|
||||
set_color(CYAN, BLACK);
|
||||
mvprintw( 7, 2, "1. Sysop name");
|
||||
mvprintw( 8, 2, "2. Fido aka's");
|
||||
mvprintw( 9, 2, "3. Dial command");
|
||||
mvprintw(10, 2, "4. Phone number 1");
|
||||
mvprintw(11, 2, "5. Phone number 2");
|
||||
mvprintw(12, 2, "6. Route via");
|
||||
mvprintw(13, 2, "7. Netmail direct");
|
||||
mvprintw(14, 2, "8. Netmail crash");
|
||||
mvprintw(15, 2, "9. Netmail hold");
|
||||
mvprintw(16, 2, "10. Pack netmail");
|
||||
mvprintw(17, 2, "11. Send notify");
|
||||
mvprintw(18, 2, "12. Language");
|
||||
mvprintw(19, 2, "13. Deleted");
|
||||
mvprintw( 8, 2, "2. Outbox dir");
|
||||
mvprintw( 9, 2, "3. Pvt. phone");
|
||||
mvprintw(10, 2, "4. Pvt. fax");
|
||||
mvprintw(11, 2, "5. Pvt. Cellphone");
|
||||
mvprintw(12, 2, "6. Pvt. e-mail");
|
||||
mvprintw(13, 2, "7. Pvt. remark");
|
||||
mvprintw(14, 2, "8. Route via");
|
||||
mvprintw(15, 2, "9. Netmail direct");
|
||||
mvprintw(16, 2, "10. Netmail crash");
|
||||
mvprintw(17, 2, "11. Netmail hold");
|
||||
mvprintw(18, 2, "12. Pack netmail");
|
||||
|
||||
mvprintw(14,31, "14. Mail setup");
|
||||
mvprintw(15,31, "15. Mail groups");
|
||||
mvprintw(16,31, "16. File setup");
|
||||
mvprintw(17,31, "17. File groups");
|
||||
mvprintw(18,31, "18. Statistics");
|
||||
mvprintw(19,31, "19. No EMSI");
|
||||
mvprintw(16,42, "13. Send notify");
|
||||
mvprintw(17,42, "14. Language");
|
||||
mvprintw(18,42, "15. Deleted");
|
||||
}
|
||||
|
||||
mvprintw(10,51, "20. No YooHoo/2U2");
|
||||
mvprintw(11,51, "21. No Filerequest");
|
||||
mvprintw(12,51, "22. Don't call");
|
||||
mvprintw(13,51, "23. No Zmodem");
|
||||
mvprintw(14,51, "24. No Zedzap");
|
||||
mvprintw(15,51, "25. No Hydra");
|
||||
mvprintw(16,51, "26. No TCP/IP IBN");
|
||||
mvprintw(17,51, "27. No TCP/IP IFC");
|
||||
mvprintw(18,51, "28. No TCP/IP ITN");
|
||||
mvprintw(19,51, "29. 8.3 names");
|
||||
|
||||
|
||||
void GeneralEdit(void);
|
||||
void GeneralEdit(void)
|
||||
{
|
||||
int i, count;
|
||||
char temp1[32];
|
||||
|
||||
GeneralScreen();
|
||||
for (;;) {
|
||||
set_color(WHITE, BLACK);
|
||||
show_str( 7,23,35, nodes.Sysop);
|
||||
show_str( 8,23,55, nodes.OutBox);
|
||||
show_str( 9,23,16, nodes.Ct_phone);
|
||||
show_str(10,23,16, nodes.Ct_fax);
|
||||
show_str(11,23,20, nodes.Ct_cellphone);
|
||||
show_str(12,23,30, nodes.Ct_email);
|
||||
show_str(13,23,55, nodes.Ct_remark);
|
||||
if (nodes.RouteVia.zone)
|
||||
show_aka(14,23,nodes.RouteVia);
|
||||
show_bool(15,23, nodes.Direct);
|
||||
show_bool(16,23, nodes.Crash);
|
||||
show_bool(17,23, nodes.Hold);
|
||||
show_bool(18,23, nodes.PackNetmail);
|
||||
|
||||
show_bool(16,63, nodes.Notify);
|
||||
sprintf(temp1, "%c", nodes.Language);
|
||||
show_str(17,63,1, temp1);
|
||||
show_bool(18,63, nodes.Deleted);
|
||||
|
||||
switch(select_menu(15)) {
|
||||
case 0: return;
|
||||
case 1: E_STR( 7,23,35, nodes.Sysop, "The name of the ^sysop^ for this node")
|
||||
case 2: if (strlen(nodes.OutBox) == 0) {
|
||||
if (nodes.Aka[0].zone) {
|
||||
sprintf(nodes.OutBox, "%s/var/boxes/node%d_%d_%d", getenv("MBSE_ROOT"),
|
||||
nodes.Aka[0].zone, nodes.Aka[0].net, nodes.Aka[0].node);
|
||||
} else {
|
||||
sprintf(nodes.OutBox, "%s/var/boxes/%s", getenv("MBSE_ROOT"), nodes.Sysop);
|
||||
for (i = (strlen(nodes.OutBox) - strlen(nodes.Sysop)); i < strlen(nodes.OutBox); i++) {
|
||||
nodes.OutBox[i] = tolower(nodes.OutBox[i]);
|
||||
if (nodes.OutBox[i] == ' ')
|
||||
nodes.OutBox[i] = '_';
|
||||
}
|
||||
}
|
||||
}
|
||||
E_PTH( 8,23,55, nodes.OutBox, "Private extra ^outbound directory^ for this node", 0770)
|
||||
case 3: E_STR( 9,23,16, nodes.Ct_phone, "Contact info: ^private phone number^")
|
||||
case 4: E_STR(10,23,16, nodes.Ct_fax, "Contact info: ^private fax number^")
|
||||
case 5: E_STR(11,23,20, nodes.Ct_cellphone, "Contact info: ^private cellphone/GSM^")
|
||||
case 6: E_STR(12,23,30, nodes.Ct_email, "Contact info: ^private e-mail address^")
|
||||
case 7: E_STR(13,23,55, nodes.Ct_remark, "Contact info: ^private remark^")
|
||||
case 8: nodes.RouteVia = e_a(nodes.RouteVia, 6); GeneralScreen(); break;
|
||||
case 9: E_BOOL(15,23, nodes.Direct, "Set the ^direct^ flag on netmail")
|
||||
case 10:nodes.Crash = edit_bool(16,23, nodes.Crash, (char *)"Set the ^crash^ flags for this node");
|
||||
if (nodes.Crash)
|
||||
nodes.Hold = FALSE;
|
||||
break;
|
||||
case 11:nodes.Hold = edit_bool(17,23, nodes.Hold, (char *)"Set the ^hold^ flag for this node");
|
||||
if (nodes.Hold)
|
||||
nodes.Crash = FALSE;
|
||||
break;
|
||||
case 12:E_BOOL(18,23, nodes.PackNetmail, "^Pack netmail^ for this node")
|
||||
case 13:E_BOOL(16,63, nodes.Notify, "Send ^notify^ messages to this node")
|
||||
case 14:i = PickLanguage((char *)"7.1.14");
|
||||
if (i != '\0')
|
||||
nodes.Language = i;
|
||||
GeneralScreen();
|
||||
break;
|
||||
case 15:count = 0;
|
||||
working(1, 0, 0);
|
||||
for (i = 0; i < 20; i++)
|
||||
if (nodes.Aka[i].zone)
|
||||
count += NodeInMarea(nodes.Aka[i]);
|
||||
if (count) {
|
||||
working(0, 0, 0);
|
||||
errmsg((char *)"Node is connected to %d message areas", count);
|
||||
break;
|
||||
}
|
||||
count = 0;
|
||||
for (i = 0; i < 20; i++)
|
||||
if (nodes.Aka[i].zone)
|
||||
count += NodeInTic(nodes.Aka[i]);
|
||||
working(0, 0, 0);
|
||||
if (count) {
|
||||
errmsg((char *)"Node is connected to %d tic areas", count);
|
||||
break;
|
||||
}
|
||||
E_BOOL(18,63, nodes.Deleted, "Is this node ^Deleted^")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void SessionScreen(void);
|
||||
void SessionScreen(void)
|
||||
{
|
||||
clr_index();
|
||||
set_color(WHITE, BLACK);
|
||||
mvprintw( 5, 6, "7.3 EDIT NODE SESSION");
|
||||
set_color(CYAN, BLACK);
|
||||
|
||||
mvprintw( 7, 6, "1. Session passwd");
|
||||
mvprintw( 8, 6, "2. Dial command");
|
||||
mvprintw( 9, 6, "3. Phone number 1");
|
||||
mvprintw(10, 6, "4. Phone number 2");
|
||||
// mvprintw(11, 6, "5. Nodelist flags");
|
||||
// mvprintw(12, 6, "6. Inet hostname");
|
||||
// mvprintw(13, 6, "7. Outbound sess.");
|
||||
// mvprintw(14, 6, "8. Inbound sess.");
|
||||
mvprintw(15, 6, "9. No EMSI");
|
||||
mvprintw(16, 6, "10. No YooHoo/2U2");
|
||||
mvprintw(17, 6, "11. No Filerequest");
|
||||
mvprintw(18, 6, "12. Don't call");
|
||||
mvprintw(19, 6, "13. 8.3 names");
|
||||
|
||||
mvprintw(14,41, "14. No Zmodem");
|
||||
mvprintw(15,41, "15. No Zedzap");
|
||||
mvprintw(16,41, "16. No Hydra");
|
||||
mvprintw(17,41, "17. No TCP/IP IBN");
|
||||
mvprintw(18,41, "18. No TCP/IP IFC");
|
||||
mvprintw(19,41, "19. No TCP/IP ITN");
|
||||
}
|
||||
|
||||
|
||||
|
||||
void SessionEdit(void);
|
||||
void SessionEdit(void)
|
||||
{
|
||||
SessionScreen();
|
||||
|
||||
for (;;) {
|
||||
set_color(WHITE, BLACK);
|
||||
show_str( 7,26,15, (char *)"***************");
|
||||
show_str( 8,26,40, nodes.dial);
|
||||
show_str( 9,26,20, nodes.phone[0]);
|
||||
show_str( 10,26,20, nodes.phone[1]);
|
||||
show_str( 11,26,54, nodes.Nl_flags);
|
||||
show_str( 12,26,40, nodes.Nl_hostname);
|
||||
|
||||
show_bool(15,26, nodes.NoEMSI);
|
||||
show_bool(16,26, nodes.NoWaZOO);
|
||||
show_bool(17,26, nodes.NoFreqs);
|
||||
show_bool(18,26, nodes.NoCall);
|
||||
show_bool(19,26, nodes.FNC);
|
||||
|
||||
show_bool(14,61, nodes.NoZmodem);
|
||||
show_bool(15,61, nodes.NoZedzap);
|
||||
show_bool(16,61, nodes.NoHydra);
|
||||
show_bool(17,61, nodes.NoIBN);
|
||||
show_bool(18,61, nodes.NoIFC);
|
||||
show_bool(19,61, nodes.NoITN);
|
||||
|
||||
switch(select_menu(19)) {
|
||||
case 0: return;
|
||||
case 1: E_STR( 7,26,15, nodes.Spasswd, "The ^Session password^ for this node")
|
||||
case 2: E_STR( 8,26,40, nodes.dial, "If needed, give a special modem ^dial command^ for this node")
|
||||
case 3: E_STR( 9,26,20, nodes.phone[0], "Enter ^phone number^ to override the nodelist")
|
||||
case 4: E_STR( 10,26,20, nodes.phone[1], "Enter ^phone number^ to override the nodelist")
|
||||
// case 5: E_STR( 11,26,54, nodes.Nl_flags, "^Nodelist flags^ override")
|
||||
// case 6: E_STR( 12,26,40, nodes.Nl_hostname, "Node internet ^hostname/IP address^ override")
|
||||
|
||||
case 9: E_BOOL(15,26, nodes.NoEMSI, "Disable ^EMSI handshake^ with this node")
|
||||
case 10:E_BOOL(16,26, nodes.NoWaZOO, "Disable ^YooHoo/2U2 handshake^ (FTSC-0006) with this node")
|
||||
case 11:E_BOOL(17,26, nodes.NoFreqs, "Disallow ^file requests^ from this node")
|
||||
case 12:E_BOOL(18,26, nodes.NoCall, "Don't ^call^ this node")
|
||||
case 13:E_BOOL(19,26, nodes.FNC, "Node needs ^DOS 8.3^ filenames")
|
||||
|
||||
case 14:E_BOOL(14,61, nodes.NoZmodem, "Disable ^Zmodem^ protocol with this node")
|
||||
case 15:E_BOOL(15,61, nodes.NoZedzap, "Disable ^Zedzap^ protocol with this node")
|
||||
case 16:E_BOOL(16,61, nodes.NoHydra, "Disable ^Hydra^ protocol with this node")
|
||||
case 17:E_BOOL(17,61, nodes.NoIBN, "Disable ^TCP/IP IBN binkp^ protocol with this node")
|
||||
case 18:E_BOOL(18,61, nodes.NoIFC, "Disable ^TCP/IP IFC ifcico^ protocol with this node")
|
||||
case 19:E_BOOL(19,61, nodes.NoITN, "Disable ^TCP/IP ITN telnet^ protocol with this node")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -669,8 +836,7 @@ int EditNodeRec(int Area)
|
||||
unsigned long crc, crc1;
|
||||
gr_list *fgr = NULL, *egr = NULL, *tmp;
|
||||
char group[13];
|
||||
int count, groups, i, j, GrpChanged = FALSE;
|
||||
char *temp, temp1[32];
|
||||
int groups, i, j, GrpChanged = FALSE;
|
||||
|
||||
clr_index();
|
||||
working(1, 0, 0);
|
||||
@ -742,49 +908,22 @@ int EditNodeRec(int Area)
|
||||
crc = 0xffffffff;
|
||||
crc = upd_crc32((char *)&nodes, crc, nodeshdr.recsize);
|
||||
working(0, 0, 0);
|
||||
NScreen();
|
||||
|
||||
for (;;) {
|
||||
clr_index();
|
||||
set_color(WHITE, BLACK);
|
||||
show_str( 7,21,35, nodes.Sysop);
|
||||
temp = xstrcpy((char *)"");
|
||||
for (i = 0; i < 7; i++) {
|
||||
if (nodes.Aka[i].zone) {
|
||||
if (nodes.Aka[i].point)
|
||||
sprintf(temp1, "%d:%d/%d.%d ", nodes.Aka[i].zone, nodes.Aka[i].net, nodes.Aka[i].node, nodes.Aka[i].point);
|
||||
else
|
||||
sprintf(temp1, "%d:%d/%d ", nodes.Aka[i].zone, nodes.Aka[i].net, nodes.Aka[i].node);
|
||||
temp = xstrcat(temp, temp1);
|
||||
}
|
||||
}
|
||||
show_str( 8,21,58, temp);
|
||||
free(temp);
|
||||
show_str( 9,21,40, nodes.dial);
|
||||
show_str(10,21,20, nodes.phone[0]);
|
||||
show_str(11,21,20, nodes.phone[1]);
|
||||
if (nodes.RouteVia.zone)
|
||||
show_aka(12,21,nodes.RouteVia);
|
||||
show_bool(13,21, nodes.Direct);
|
||||
show_bool(14,21, nodes.Crash);
|
||||
show_bool(15,21, nodes.Hold);
|
||||
show_bool(16,21, nodes.PackNetmail);
|
||||
show_bool(17,21, nodes.Notify);
|
||||
sprintf(temp1, "%c", nodes.Language);
|
||||
show_str(18,21,1, temp1);
|
||||
show_bool(19,21, nodes.Deleted);
|
||||
show_bool(19,47, nodes.NoEMSI);
|
||||
show_bool(10,70, nodes.NoWaZOO);
|
||||
show_bool(11,70, nodes.NoFreqs);
|
||||
show_bool(12,70, nodes.NoCall);
|
||||
show_bool(13,70, nodes.NoZmodem);
|
||||
show_bool(14,70, nodes.NoZedzap);
|
||||
show_bool(15,70, nodes.NoHydra);
|
||||
show_bool(16,70, nodes.NoIBN);
|
||||
show_bool(17,70, nodes.NoIFC);
|
||||
show_bool(18,70, nodes.NoITN);
|
||||
show_bool(19,70, nodes.FNC);
|
||||
mvprintw( 5, 6, "7. EDIT NODE - %s, %s", nodes.Sysop, aka2str(nodes.Aka[0]));
|
||||
set_color(CYAN, BLACK);
|
||||
mvprintw( 7, 6, "1. General setup");
|
||||
mvprintw( 8, 6, "2. Aka's setup");
|
||||
mvprintw( 9, 6, "3. Session setup");
|
||||
mvprintw(10, 6, "4. Mail setup");
|
||||
mvprintw(11, 6, "5. Mail groups");
|
||||
mvprintw(12, 6, "6. Files setup");
|
||||
mvprintw(13, 6, "7. Files groups");
|
||||
mvprintw(14, 6, "8. Statistics");
|
||||
|
||||
switch(select_menu(29)) {
|
||||
switch(select_menu(8)) {
|
||||
case 0: crc1 = 0xffffffff;
|
||||
crc1 = upd_crc32((char *)&nodes, crc1, nodeshdr.recsize);
|
||||
if ((crc != crc1) || GrpChanged) {
|
||||
@ -835,65 +974,24 @@ int EditNodeRec(int Area)
|
||||
tidy_grlist(&fgr);
|
||||
IsDoing("Browsing Menu");
|
||||
return 0;
|
||||
case 1: E_STR(7,21,35, nodes.Sysop, "The name of the ^sysop^ for this node")
|
||||
case 2: N_Akas(); NScreen(); break;
|
||||
case 3: E_STR( 9,21,40, nodes.dial, "If needed, give a special modem ^dial command^ for this node")
|
||||
case 4: E_STR(10,21,20, nodes.phone[0], "Enter ^phone number^ to override the nodelist")
|
||||
case 5: E_STR(11,21,20, nodes.phone[1], "Enter ^phone number^ to override the nodelist")
|
||||
case 6: nodes.RouteVia = e_a(nodes.RouteVia, 6); NScreen(); break;
|
||||
case 7: E_BOOL(13,21, nodes.Direct, "Set the ^direct^ flag on netmail")
|
||||
case 8: nodes.Crash = edit_bool(14,21, nodes.Crash, (char *)"Set the ^crash^ flags for this node");
|
||||
if (nodes.Crash)
|
||||
nodes.Hold = FALSE;
|
||||
case 1: GeneralEdit();
|
||||
break;
|
||||
case 9: nodes.Hold = edit_bool(15,21, nodes.Hold, (char *)"Set the ^hold^ flag for this node");
|
||||
if (nodes.Hold)
|
||||
nodes.Crash = FALSE;
|
||||
case 2: N_Akas();
|
||||
break;
|
||||
case 10:E_BOOL(16,21, nodes.PackNetmail, "^Pack netmail^ for this node")
|
||||
case 11:E_BOOL(17,21, nodes.Notify, "Send ^notify^ messages to this node")
|
||||
case 12:nodes.Language = PickLanguage((char *)"7.12"); NScreen(); break;
|
||||
case 13:count = 0;
|
||||
working(1, 0, 0);
|
||||
for (i = 0; i < 20; i++)
|
||||
if (nodes.Aka[i].zone)
|
||||
count += NodeInMarea(nodes.Aka[i]);
|
||||
if (count) {
|
||||
working(0, 0, 0);
|
||||
errmsg((char *)"Node is connected to %d message areas", count);
|
||||
case 3: SessionEdit();
|
||||
break;
|
||||
}
|
||||
count = 0;
|
||||
for (i = 0; i < 20; i++)
|
||||
if (nodes.Aka[i].zone)
|
||||
count += NodeInTic(nodes.Aka[i]);
|
||||
working(0, 0, 0);
|
||||
if (count) {
|
||||
errmsg((char *)"Node is connected to %d tic areas", count);
|
||||
case 4: E_Mail();
|
||||
break;
|
||||
}
|
||||
E_BOOL(19,21, nodes.Deleted, "Is this node ^Deleted^")
|
||||
case 14:E_Mail(); NScreen(); break;
|
||||
case 15:if (E_Group(&egr, (char *)"7.15 MAIL GROUPS"))
|
||||
case 5: if (E_Group(&egr, (char *)"7.5 MAIL GROUPS"))
|
||||
GrpChanged = TRUE;
|
||||
NScreen(); break;
|
||||
case 16:E_Files();
|
||||
NScreen(); break;
|
||||
case 17:if (E_Group(&fgr, (char *)"7.17 FILE GROUPS"))
|
||||
break;
|
||||
case 6: E_Files();
|
||||
break;
|
||||
case 7: if (E_Group(&fgr, (char *)"7.7 FILE GROUPS"))
|
||||
GrpChanged = TRUE;
|
||||
NScreen(); break;
|
||||
case 18:S_Stat(); NScreen(); break;
|
||||
case 19:E_BOOL(19,47, nodes.NoEMSI, "Disable ^EMSI handshake^ with this node")
|
||||
case 20:E_BOOL(10,70, nodes.NoWaZOO, "Disable ^YooHoo/2U2 handshake^ (FTSC-0006) with this node")
|
||||
case 21:E_BOOL(11,70, nodes.NoFreqs, "Disallow ^file requests^ from this node")
|
||||
case 22:E_BOOL(12,70, nodes.NoCall, "Don't ^call^ this node")
|
||||
case 23:E_BOOL(13,70, nodes.NoZmodem, "Disable ^Zmodem^ protocol with this node")
|
||||
case 24:E_BOOL(14,70, nodes.NoZedzap, "Disable ^Zedzap^ protocol with this node")
|
||||
case 25:E_BOOL(15,70, nodes.NoHydra, "Disable ^Hydra^ protocol with this node")
|
||||
case 26:E_BOOL(16,70, nodes.NoIBN, "Disable ^TCP/IP IBN binkp^ protocol with this node")
|
||||
case 27:E_BOOL(17,70, nodes.NoIFC, "Disable ^TCP/IP IFC ifcico^ protocol with this node")
|
||||
case 28:E_BOOL(18,70, nodes.NoITN, "Disable ^TCP/IP ITN telnet^ protocol with this node")
|
||||
case 29:E_BOOL(19,70, nodes.FNC, "Node needs ^DOS 8.3^ filenames")
|
||||
break;
|
||||
case 8: S_Stat();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -934,14 +1032,14 @@ void EditNodes(void)
|
||||
for (;;) {
|
||||
clr_index();
|
||||
set_color(WHITE, BLACK);
|
||||
mvprintw( 5, 4, "7. NODES SETUP");
|
||||
mvprintw( 5, 6, "7. NODES SETUP");
|
||||
set_color(CYAN, BLACK);
|
||||
if (records != 0) {
|
||||
sprintf(temp, "%s/etc/nodes.temp", getenv("MBSE_ROOT"));
|
||||
working(1, 0, 0);
|
||||
if ((fil = fopen(temp, "r")) != NULL) {
|
||||
fread(&nodeshdr, sizeof(nodeshdr), 1, fil);
|
||||
x = 2;
|
||||
x = 4;
|
||||
y = 7;
|
||||
set_color(CYAN, BLACK);
|
||||
for (i = 1; i <= 20; i++) {
|
||||
@ -1159,57 +1257,62 @@ int node_doc(FILE *fp, FILE *toc, int page)
|
||||
fprintf(fp, "\n\n");
|
||||
|
||||
fprintf(fp, " Sysop %s\n", nodes.Sysop);
|
||||
fprintf(fp, " Outbox dir %s\n", nodes.OutBox);
|
||||
fprintf(fp, " First date %s", ctime(&nodes.StartDate));
|
||||
fprintf(fp, " Last date %s\n", ctime(&nodes.LastDate));
|
||||
fprintf(fp, " Last date %s", ctime(&nodes.LastDate));
|
||||
for (i = 0; i < 20; i++)
|
||||
if (nodes.Aka[i].zone)
|
||||
fprintf(fp, " Aka %2d %s\n", i+1, aka2str(nodes.Aka[i]));
|
||||
if (nodes.RouteVia.zone)
|
||||
fprintf(fp, " Route via %s\n", aka2str(nodes.RouteVia));
|
||||
|
||||
fprintf(fp, " Language %c\n", nodes.Language);
|
||||
fprintf(fp, " Files passwd %s\n", nodes.Fpasswd);
|
||||
fprintf(fp, " Session pwd %s\n", nodes.Spasswd);
|
||||
fprintf(fp, " Dial command %s\n", nodes.dial);
|
||||
fprintf(fp, " Phone numbers %s %s\n", nodes.phone[0], nodes.phone[1]);
|
||||
fprintf(fp, " Nodelist flags %s\n", nodes.Nl_flags);
|
||||
fprintf(fp, " Hostname %s\n", nodes.Nl_hostname);
|
||||
fprintf(fp, " PKT password %s\n", nodes.Epasswd);
|
||||
fprintf(fp, " Files passwd %s\n", nodes.Fpasswd);
|
||||
fprintf(fp, " Areamgr pwd %s\n\n", nodes.Apasswd);
|
||||
|
||||
fprintf(fp, " Uplink mgrs Program Password\n");
|
||||
fprintf(fp, " ------------ --------- ---------------\n");
|
||||
fprintf(fp, " Files %s %s\n", padleft(nodes.UplFmgrPgm, 9, ' '), nodes.UplFmgrPass);
|
||||
fprintf(fp, " Mail %s %s\n\n", padleft(nodes.UplAmgrPgm, 9, ' '), nodes.UplAmgrPass);
|
||||
|
||||
fprintf(fp, " Mail direct %s", getboolean(nodes.Direct));
|
||||
fprintf(fp, " Mail crash %s", getboolean(nodes.Crash));
|
||||
fprintf(fp, " Mail hold %s\n", getboolean(nodes.Hold));
|
||||
fprintf(fp, " Send message %s", getboolean(nodes.Message));
|
||||
fprintf(fp, " Send .TIC %s", getboolean(nodes.Tic));
|
||||
fprintf(fp, " Send notify %s\n", getboolean(nodes.Notify));
|
||||
fprintf(fp, " File forward %s", getboolean(nodes.FileFwd));
|
||||
fprintf(fp, " Mail forward %s", getboolean(nodes.MailFwd));
|
||||
fprintf(fp, " Advanced TIC %s\n", getboolean(nodes.AdvTic));
|
||||
fprintf(fp, " Billing %s", getboolean(nodes.Billing));
|
||||
fprintf(fp, " Bill direct %s", getboolean(nodes.BillDirect));
|
||||
fprintf(fp, " Uplink add + %s\n", getboolean(nodes.AddPlus));
|
||||
fprintf(fp, " Check mailpwd %s", getboolean(nodes.MailPwdCheck));
|
||||
fprintf(fp, " Pack Netmail %s", getboolean(nodes.PackNetmail));
|
||||
fprintf(fp, " Send notify %s", getboolean(nodes.Notify));
|
||||
fprintf(fp, " Language %c\n", nodes.Language);
|
||||
fprintf(fp, " No EMSI %s", getboolean(nodes.NoEMSI));
|
||||
fprintf(fp, " No YooHoo/2U2 %s\n", getboolean(nodes.NoWaZOO));
|
||||
fprintf(fp, " No Requests %s", getboolean(nodes.NoFreqs));
|
||||
fprintf(fp, " No YooHoo/2U2 %s", getboolean(nodes.NoWaZOO));
|
||||
fprintf(fp, " No Requests %s\n", getboolean(nodes.NoFreqs));
|
||||
fprintf(fp, " Don't call %s", getboolean(nodes.NoCall));
|
||||
fprintf(fp, " 8.3 filenames %s", getboolean(nodes.FNC));
|
||||
fprintf(fp, " No Zmodem %s\n", getboolean(nodes.NoZmodem));
|
||||
fprintf(fp, " No Zedzap %s", getboolean(nodes.NoZedzap));
|
||||
fprintf(fp, " No Hydra %s", getboolean(nodes.NoHydra));
|
||||
fprintf(fp, " No TCP/IP IBN %s\n", getboolean(nodes.NoIBN));
|
||||
fprintf(fp, " No TCP/IP IFC %s", getboolean(nodes.NoIFC));
|
||||
fprintf(fp, " No TCP/IP ITN %s", getboolean(nodes.NoITN));
|
||||
fprintf(fp, " Pack Netmail %s\n", getboolean(nodes.PackNetmail));
|
||||
fprintf(fp, " Mail forward %s\n", getboolean(nodes.MailFwd));
|
||||
fprintf(fp, " Check mailpwd %s", getboolean(nodes.MailPwdCheck));
|
||||
fprintf(fp, " ARCmail comp. %s", getboolean(nodes.ARCmailCompat));
|
||||
fprintf(fp, " ACRmail a..z %s", getboolean(nodes.ARCmailAlpha));
|
||||
fprintf(fp, " 8.3 filenames %s\n\n", getboolean(nodes.FNC));
|
||||
fprintf(fp, " ACRmail a..z %s\n", getboolean(nodes.ARCmailAlpha));
|
||||
fprintf(fp, " Send message %s", getboolean(nodes.Message));
|
||||
fprintf(fp, " Send .TIC %s", getboolean(nodes.Tic));
|
||||
fprintf(fp, " File forward %s\n", getboolean(nodes.FileFwd));
|
||||
fprintf(fp, " Advanced TIC %s", getboolean(nodes.AdvTic));
|
||||
fprintf(fp, " Billing %s", getboolean(nodes.Billing));
|
||||
fprintf(fp, " Bill direct %s\n", getboolean(nodes.BillDirect));
|
||||
fprintf(fp, " Uplink add + %s\n\n", getboolean(nodes.AddPlus));
|
||||
|
||||
fprintf(fp, " Uplink mgrs Program Password\n");
|
||||
fprintf(fp, " ------------ --------- ---------------\n");
|
||||
fprintf(fp, " Files %s %s\n", padleft(nodes.UplFmgrPgm, 9, ' '), nodes.UplFmgrPass);
|
||||
fprintf(fp, " Mail %s %s\n\n", padleft(nodes.UplAmgrPgm, 9, ' '), nodes.UplAmgrPass);
|
||||
|
||||
fprintf(fp, " Statistics Send KBytes Received KBytes\n");
|
||||
fprintf(fp, " ------------ -------- -------- -------- --------\n");
|
||||
fprintf(fp, " Total files %-8lu %-8lu %-8lu %-8lu\n", nodes.FilesSent.total, nodes.F_KbSent.total, nodes.FilesRcvd.total, nodes.F_KbSent.total);
|
||||
fprintf(fp, " Total mail %-8lu %-8lu\n", nodes.MailSent.total, nodes.MailRcvd.total);
|
||||
fprintf(fp, " Total mail %-8lu %-8lu\n\n", nodes.MailSent.total, nodes.MailRcvd.total);
|
||||
|
||||
fprintf(fp, " Credit units %-8ld Warnlevel %ld\n", nodes.Credit, nodes.WarnLevel);
|
||||
fprintf(fp, " Debet units %-8ld Stoplevel %ld\n", nodes.Debet, nodes.StopLevel);
|
||||
|
@ -83,7 +83,7 @@ scanout.o: libs.h ../lib/structs.h taskutil.h scanout.h
|
||||
taskcomm.o: libs.h ../lib/structs.h taskstat.h taskregs.h taskdisk.h taskinfo.h taskutil.h taskcomm.h
|
||||
taskinfo.o: libs.h ../lib/structs.h taskinfo.h
|
||||
taskstat.o: libs.h ../lib/structs.h taskstat.h callstat.h outstat.h taskutil.h
|
||||
mbtask.o: libs.h ../lib/structs.h signame.h taskstat.h taskutil.h taskregs.h taskcomm.h callstat.h outstat.h nodelist.h ports.h calllist.h ping.h mbtask.h
|
||||
mbtask.o: libs.h ../lib/structs.h ../paths.h signame.h taskstat.h taskutil.h taskregs.h taskcomm.h callstat.h outstat.h nodelist.h ports.h calllist.h ping.h mbtask.h
|
||||
outstat.o: libs.h ../lib/structs.h taskutil.h taskstat.h scanout.h nodelist.h callstat.h ports.h outstat.h
|
||||
signame.o: signame.h
|
||||
taskdisk.o: libs.h ../lib/structs.h taskdisk.h taskutil.h
|
||||
|
@ -124,7 +124,7 @@ int check_calllist(void)
|
||||
}
|
||||
}
|
||||
}
|
||||
tasklog('o', "%d systems to call", call_work);
|
||||
tasklog('o', "%d system%s to call", call_work, (call_work == 1)?"":"s");
|
||||
} else {
|
||||
if (s_scanout)
|
||||
sem_set((char *)"scanout", FALSE);
|
||||
|
@ -30,6 +30,7 @@
|
||||
|
||||
#include "libs.h"
|
||||
#include "../lib/structs.h"
|
||||
#include "../paths.h"
|
||||
#include "signame.h"
|
||||
#include "taskstat.h"
|
||||
#include "taskutil.h"
|
||||
@ -417,6 +418,7 @@ void load_taskcfg(void)
|
||||
sprintf(TCFG.cmd_mailin, "%s/bin/mbfido tic toss web -quiet", getenv("MBSE_ROOT"));
|
||||
sprintf(TCFG.cmd_newnews, "%s/bin/mbfido news web -quiet", getenv("MBSE_ROOT"));
|
||||
sprintf(TCFG.cmd_mbindex1, "%s/bin/mbindex -quiet", getenv("MBSE_ROOT"));
|
||||
if (strlen(_PATH_GOLDNODE))
|
||||
sprintf(TCFG.cmd_mbindex2, "%s/bin/goldnode -f -q", getenv("MBSE_ROOT"));
|
||||
sprintf(TCFG.cmd_msglink, "%s/bin/mbmsg link -quiet", getenv("MBSE_ROOT"));
|
||||
sprintf(TCFG.cmd_reqindex, "%s/bin/mbfile index -quiet", getenv("MBSE_ROOT"));
|
||||
|
120
mbtask/outstat.c
120
mbtask/outstat.c
@ -82,7 +82,6 @@ int load_node(fidoaddr n)
|
||||
(n.node == nodes.Aka[i].node) && (n.point == nodes.Aka[i].point)) {
|
||||
fclose(fp);
|
||||
free(temp);
|
||||
// tasklog('-' , "Node record %d, aka nr %d", j, i+1);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
@ -188,13 +187,17 @@ int outstat()
|
||||
{
|
||||
int rc, first = TRUE, T_window, iszmh = FALSE;
|
||||
struct _alist *tmp, *old;
|
||||
char flstr[13];
|
||||
char temp[81];
|
||||
char as[6], be[6], utc[6];
|
||||
char flstr[13], *temp, as[6], be[6], utc[6], flavor;
|
||||
time_t now;
|
||||
struct tm *tm;
|
||||
int uhour, umin, thour, tmin;
|
||||
pp_list *tpl;
|
||||
faddr *fa;
|
||||
FILE *fp;
|
||||
DIR *dp = NULL;
|
||||
struct dirent *de;
|
||||
struct stat sb;
|
||||
struct passwd *pw;
|
||||
|
||||
now = time(NULL);
|
||||
tm = gmtime(&now); /* UTC time */
|
||||
@ -220,6 +223,90 @@ int outstat()
|
||||
return rc;
|
||||
}
|
||||
|
||||
/*
|
||||
* Check private outbound box for nodes in the setup.
|
||||
*/
|
||||
temp = calloc(PATH_MAX, sizeof(char));
|
||||
sprintf(temp, "%s/etc/nodes.data", getenv("MBSE_ROOT"));
|
||||
if ((fp = fopen(temp, "r")) == NULL) {
|
||||
tasklog('?', "Error open %s, aborting", temp);
|
||||
free(temp);
|
||||
return 1;
|
||||
}
|
||||
fread(&nodeshdr, sizeof(nodeshdr), 1, fp);
|
||||
fseek(fp, 0, SEEK_SET);
|
||||
fread(&nodeshdr, nodeshdr.hdrsize, 1, fp);
|
||||
pw = getpwnam((char *)"mbse");
|
||||
|
||||
while ((fread(&nodes, nodeshdr.recsize, 1, fp)) == 1) {
|
||||
if (strlen(nodes.OutBox)) {
|
||||
if (nodes.Crash)
|
||||
flavor = 'c';
|
||||
else if (nodes.Hold)
|
||||
flavor = 'h';
|
||||
else
|
||||
flavor = 'o';
|
||||
|
||||
fa = (faddr *)malloc(sizeof(faddr));
|
||||
fa->name = NULL;
|
||||
fa->domain = xstrcpy(nodes.Aka[0].domain);
|
||||
fa->zone = nodes.Aka[0].zone;
|
||||
fa->net = nodes.Aka[0].net;
|
||||
fa->node = nodes.Aka[0].node;
|
||||
fa->point = nodes.Aka[0].point;
|
||||
|
||||
if ((dp = opendir(nodes.OutBox)) != NULL) {
|
||||
while ((de = readdir(dp))) {
|
||||
if (strcmp(de->d_name, ".") && strcmp(de->d_name, "..")) {
|
||||
sprintf(temp, "%s/%s", nodes.OutBox, de->d_name);
|
||||
if (stat(temp, &sb) == 0) {
|
||||
if (S_ISREG(sb.st_mode)) {
|
||||
if (pw->pw_uid == sb.st_uid) {
|
||||
/*
|
||||
* We own the file
|
||||
*/
|
||||
if ((sb.st_mode & S_IRUSR) && (sb.st_mode & S_IWUSR)) {
|
||||
each(fa, flavor, OUT_FIL, temp);
|
||||
} else {
|
||||
tasklog('+', "No R/W permission on %s", temp);
|
||||
}
|
||||
} else if (pw->pw_gid == sb.st_gid) {
|
||||
/*
|
||||
* We own the file group
|
||||
*/
|
||||
if ((sb.st_mode & S_IRGRP) && (sb.st_mode & S_IWGRP)) {
|
||||
each(fa, flavor, OUT_FIL, temp);
|
||||
} else {
|
||||
tasklog('+', "No R/W permission on %s", temp);
|
||||
}
|
||||
} else {
|
||||
/*
|
||||
* No owner of file
|
||||
*/
|
||||
if ((sb.st_mode & S_IROTH) && (sb.st_mode & S_IWOTH)) {
|
||||
each(fa, flavor, OUT_FIL, temp);
|
||||
} else {
|
||||
tasklog('+', "No R/W permission on %s", temp);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
tasklog('+', "Not a regular file: %s", temp);
|
||||
}
|
||||
} else {
|
||||
tasklog('?', "Can't stat %s", temp);
|
||||
}
|
||||
}
|
||||
}
|
||||
closedir(dp);
|
||||
}
|
||||
if (fa->domain)
|
||||
free(fa->domain);
|
||||
free(fa);
|
||||
}
|
||||
fseek(fp, nodeshdr.filegrp + nodeshdr.mailgrp, SEEK_CUR);
|
||||
}
|
||||
fclose(fp);
|
||||
|
||||
/*
|
||||
* During processing the outbound list, determine when the next event will occur,
|
||||
* ie. the time when the callout status of a node changes because of starting a
|
||||
@ -309,7 +396,7 @@ int outstat()
|
||||
}
|
||||
}
|
||||
// tasklog('o', "T_window=%s, iszmh=%s", T_window?"true":"false", iszmh?"true":"false");
|
||||
strcpy(flstr,"...... ... ..");
|
||||
strcpy(flstr,"...... .... ..");
|
||||
|
||||
/*
|
||||
* If the node has internet and we have internet configured,
|
||||
@ -351,8 +438,11 @@ int outstat()
|
||||
flstr[5]='P';
|
||||
tmp->flavors |= F_CALL;
|
||||
}
|
||||
|
||||
if ((tmp->flavors) & F_ISFIL )
|
||||
flstr[7]='A';
|
||||
if ((tmp->flavors) & F_ISPKT ) {
|
||||
flstr[7]='M';
|
||||
flstr[8]='M';
|
||||
/*
|
||||
* Normal mail, send during ZMH or if node has a Txx window.
|
||||
*/
|
||||
@ -361,7 +451,7 @@ int outstat()
|
||||
}
|
||||
}
|
||||
if ((tmp->flavors) & F_ISFLO )
|
||||
flstr[8]='F';
|
||||
flstr[9]='F';
|
||||
|
||||
if (tmp->cst.tryno >= 30) {
|
||||
/*
|
||||
@ -370,11 +460,11 @@ int outstat()
|
||||
tmp->flavors &= ~F_CALL;
|
||||
}
|
||||
if ((tmp->flavors) & F_CALL)
|
||||
flstr[9]='C';
|
||||
flstr[10]='C';
|
||||
if (tmp->t1)
|
||||
flstr[11] = tmp->t1;
|
||||
flstr[12] = tmp->t1;
|
||||
if (tmp->t2)
|
||||
flstr[12] = tmp->t2;
|
||||
flstr[13] = tmp->t2;
|
||||
|
||||
/*
|
||||
* If forbidden to call from setup, clear callflag.
|
||||
@ -464,8 +554,9 @@ int outstat()
|
||||
/*
|
||||
* Log results
|
||||
*/
|
||||
tasklog('+', "Inet=%d, ISDN=%d, POTS=%d, Next event at %02d:%02d UTC",
|
||||
tasklog('+', "Systems to call: Inet=%d, ISDN=%d, POTS=%d, Next event at %02d:%02d UTC",
|
||||
inet_calls, isdn_calls, pots_calls, nxt_hour, nxt_min);
|
||||
free(temp);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -480,7 +571,7 @@ int each(faddr *addr, char flavor, int isflo, char *fname)
|
||||
node *nlent;
|
||||
callstat *cst;
|
||||
|
||||
if ((isflo != OUT_PKT) && (isflo != OUT_FLO) && (isflo != OUT_REQ) && (isflo != OUT_POL))
|
||||
if ((isflo != OUT_PKT) && (isflo != OUT_FLO) && (isflo != OUT_REQ) && (isflo != OUT_POL) && (isflo != OUT_FIL))
|
||||
return 0;
|
||||
|
||||
for (tmp = &alist; *tmp; tmp = &((*tmp)->next))
|
||||
@ -525,7 +616,7 @@ int each(faddr *addr, char flavor, int isflo, char *fname)
|
||||
(*tmp)->cst.tryno = cst->tryno;
|
||||
(*tmp)->cst.trystat = cst->trystat;
|
||||
|
||||
if ((isflo == OUT_FLO) || (isflo == OUT_PKT))
|
||||
if ((isflo == OUT_FLO) || (isflo == OUT_PKT) || (isflo == OUT_FIL))
|
||||
switch (flavor) {
|
||||
case '?': break;
|
||||
case 'i': (*tmp)->flavors |= F_IMM; break;
|
||||
@ -602,6 +693,9 @@ int each(faddr *addr, char flavor, int isflo, char *fname)
|
||||
(*tmp)->flavors |= F_FREQ;
|
||||
} else if (isflo == OUT_POL) {
|
||||
(*tmp)->flavors |= F_POLL;
|
||||
} else if (isflo == OUT_FIL) {
|
||||
(*tmp)->size += st.st_size;
|
||||
(*tmp)->flavors |= F_ISFIL;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -43,7 +43,8 @@ typedef struct _alist
|
||||
#define F_POLL 0x0020
|
||||
#define F_ISFLO 0x0040
|
||||
#define F_ISPKT 0x0080
|
||||
#define F_CALL 0x0100
|
||||
#define F_ISFIL 0x0100
|
||||
#define F_CALL 0x0200
|
||||
|
||||
|
||||
|
||||
|
@ -336,7 +336,7 @@ void check_ping(void)
|
||||
* Reply received.
|
||||
*/
|
||||
rc = time(NULL) - (pingtime - 20);
|
||||
if (rc != 1)
|
||||
if (rc > 2)
|
||||
tasklog('p', "ping: reply after %d seconds", rc);
|
||||
pingresult[pingnr] = TRUE;
|
||||
if (pingresult[1] || pingresult[2]) {
|
||||
|
@ -10,6 +10,7 @@
|
||||
#define OUT_ARC 3
|
||||
#define OUT_REQ 4
|
||||
#define OUT_POL 5
|
||||
#define OUT_FIL 6
|
||||
|
||||
extern int scanout(int (*)(faddr*,char,int,char*));
|
||||
|
||||
|
@ -40,3 +40,10 @@
|
||||
#define _PATH_SZ "@SZ@"
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* GoldED
|
||||
*/
|
||||
#define _PATH_GOLDED "@GOLDEDBIN@"
|
||||
#define _PATH_GOLDNODE "@GOLDNODE@"
|
||||
|
||||
|
Reference in New Issue
Block a user