diff --git a/ChangeLog b/ChangeLog index 4c5cdf54..1c524062 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +v1.0.6.9 28-Sep-2016 - Andrew Leary + + 1. Fixed compiler warnings while building the BBS. Thanks to + Ken Bowley for the patches. + v1.0.6.8 20-Jul-2016 - Andrew Leary 1. Fixed the SETUP.sh script to handle installing on fresh diff --git a/Makefile b/Makefile index f2ccbdf2..859a9b43 100644 --- a/Makefile +++ b/Makefile @@ -148,7 +148,9 @@ dist tar: ${TARFILE} clean: rm -f .filelist core ${TARFILE} paths.h config.h + rm -f FILE_ID.DIZ INSTALL config.log config.status stamp-h for d in ${SUBDIRS}; do (cd $$d && ${MAKE} $@) || exit; done; + rm -f Makefile.global ${TARFILE}: .filelist cd ..; ln -s ${PACKAGE} ${PACKAGE}-${VERSION} ; rm -f ${TARFILE}; \ diff --git a/configure b/configure index d36393b7..ae40e983 100755 --- a/configure +++ b/configure @@ -2309,10 +2309,10 @@ SUBDIRS="lib mbcico mbfido mbmon mbsebbs mbutils mbnntp mbtask mbsetup unix lang PACKAGE="mbsebbs" MAJOR="1" MINOR="0" -REVISION="6.8" +REVISION="6.9" VERSION="$MAJOR.$MINOR.$REVISION" -COPYRIGHT="Copyright (C) 1997-2016 Michiel Broek, All Rights Reserved" -SHORTRIGHT="Copyright (C) 1997-2016 M. Broek" +COPYRIGHT="Copyright (C) 1997-2016 MBSE Development Team, All Rights Reserved" +SHORTRIGHT="Copyright (C) 1997-2016 MBSE DevTm" GROUP="bbs" OWNER="mbse" ROWNER="`id -un root`" diff --git a/configure.ac b/configure.ac index 64c09c3d..6db8ebb6 100644 --- a/configure.ac +++ b/configure.ac @@ -12,10 +12,10 @@ AC_SUBST(SUBDIRS) PACKAGE="mbsebbs" MAJOR="1" MINOR="0" -REVISION="6.8" +REVISION="6.9" VERSION="$MAJOR.$MINOR.$REVISION" -COPYRIGHT="Copyright (C) 1997-2016 Michiel Broek, All Rights Reserved" -SHORTRIGHT="Copyright (C) 1997-2016 M. Broek" +COPYRIGHT="Copyright (C) 1997-2016 MBSE Development Team, All Rights Reserved" +SHORTRIGHT="Copyright (C) 1997-2016 MBSE DevTm" GROUP="bbs" OWNER="mbse" ROWNER="`id -un root`" diff --git a/html/Makefile b/html/Makefile index 59fedaf1..33db3dc0 100644 --- a/html/Makefile +++ b/html/Makefile @@ -115,6 +115,7 @@ install: clean: rm -f filelist + rm -f basic.html index.html upgrade.html filelist: Makefile BASE=`pwd`; \ diff --git a/lib/clcomm.c b/lib/clcomm.c index 6bc4e2cc..551f7beb 100644 --- a/lib/clcomm.c +++ b/lib/clcomm.c @@ -619,7 +619,7 @@ char *printable(char *s, int l) case '\b': *p++='\\'; *p++='b'; break; default: snprintf(p, 5, "\\%02x", (*s & 0xff)); p+=3; break; } - s++; + s++; } *p='\0'; return pbuff; diff --git a/lib/ftn.c b/lib/ftn.c index 345dc74e..87ac425d 100644 --- a/lib/ftn.c +++ b/lib/ftn.c @@ -594,7 +594,7 @@ fidoaddr *faddr2fido(faddr *aka) fidoaddr *Sys; Sys = (fidoaddr *)malloc(sizeof(fidoaddr)); - memset(Sys, 0, sizeof(Sys)); + memset(Sys, 0, sizeof(*Sys)); Sys->zone = aka->zone; Sys->net = aka->net; Sys->node = aka->node; diff --git a/lib/mbdiesel.c b/lib/mbdiesel.c index 1e0c91d6..1bdb2479 100644 --- a/lib/mbdiesel.c +++ b/lib/mbdiesel.c @@ -245,7 +245,7 @@ void html_massage(char *inbuf, char *outbuf, size_t size) char *inptr = inbuf; char *outptr = outbuf; - memset(outbuf, 0, sizeof(outbuf)); + memset(outbuf, 0, sizeof(*outbuf)); while (*inptr) { diff --git a/lib/msg.c b/lib/msg.c index 5b8974f4..78f21e6f 100644 --- a/lib/msg.c +++ b/lib/msg.c @@ -518,8 +518,8 @@ char *Fgets(char *l, int size, FILE *f) { eol = TRUE; break; } else - cr = (c=='\r'); - if ( cr ) + cr = (c=='\r'); + if ( cr ) continue; --size; if (c=='\n') { eol = TRUE; break; } diff --git a/lib/nodelist.c b/lib/nodelist.c index f250287a..aeb45ab4 100644 --- a/lib/nodelist.c +++ b/lib/nodelist.c @@ -862,7 +862,7 @@ node *getnlent(faddr *addr) * Parse the IP flag for a optional port number. */ if ((r = strrchr(p, ':'))) { - *r++; + r++; for (tmps = &nl_service; *tmps; tmps=&((*tmps)->next)) { if (strncmp(p, (*tmps)->flag, 3) == 0) { /* diff --git a/lib/rearc.c b/lib/rearc.c index be79cffa..a08f3baf 100644 --- a/lib/rearc.c +++ b/lib/rearc.c @@ -88,7 +88,7 @@ int rearc(char *filename, char *arctype, int do_quiet) newname = calloc(PATH_MAX, sizeof(char)); strcpy(newname, filename); p = strrchr(newname, '.'); - *p++; + p++; *p = '\0'; if (!getarchiver(arctype)) { diff --git a/lib/virscan.c b/lib/virscan.c index d5d6703d..18b2c66d 100644 --- a/lib/virscan.c +++ b/lib/virscan.c @@ -161,7 +161,7 @@ int clam_stream_check(char *servname, char *servport, char *filename) /* fwrite(buf, 1, buf_len, stderr); */ buf_c = buf + buf_len; while(*buf_c=='\r' || *buf_c == '\r' || *buf_c == ' ') - *buf_c --; + buf_c --; if (buf_c - buf >= sizeof(" FOUND") && strncasecmp(buf_c - sizeof(" FOUND"), " FOUND", sizeof(" FOUND")-1) == 0) { char *buf_s = buf; buf_c -= sizeof(" FOUND"); diff --git a/mbcico/emsidat.c b/mbcico/emsidat.c index 232884f1..8b3018dd 100644 --- a/mbcico/emsidat.c +++ b/mbcico/emsidat.c @@ -175,7 +175,7 @@ char *mkemsidat(int caller) p=xstrcat(p,(char *)"ZAP,"); if (emsi_local_protos & PROT_ZMO) p=xstrcat(p,(char *)"ZMO,"); - if (emsi_local_protos & PROT_DZA); + if (emsi_local_protos & PROT_DZA) p=xstrcat(p,(char *)"DZA,"); if (emsi_local_protos & PROT_KER) p=xstrcat(p,(char *)"KER,"); diff --git a/mbcico/filelist.c b/mbcico/filelist.c index 20557f3b..3a696f77 100644 --- a/mbcico/filelist.c +++ b/mbcico/filelist.c @@ -491,9 +491,9 @@ 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:%u floff:%u", + Syslog('o',"flist: \"%s\" -> \"%s\" dsp:%d flofp:%p floff:%p", MBSE_SS(tmpf->local), MBSE_SS(tmpf->remote), tmpf->disposition, - (unsigned int)tmpf->flofp, (unsigned int)tmpf->floff); + tmpf->flofp, tmpf->floff); return st; } diff --git a/mbcico/ftsc.c b/mbcico/ftsc.c index d8edfcf5..5fa0e98e 100644 --- a/mbcico/ftsc.c +++ b/mbcico/ftsc.c @@ -241,7 +241,7 @@ SM_STATE(send_mail) tmpfl = tosend; tosend = request; for (; request->next; request = request->next); - request->next = tmpfl; + request->next = tmpfl; request = NULL; } diff --git a/mbcico/hydra.c b/mbcico/hydra.c index 16d58bca..a7ff1eb4 100644 --- a/mbcico/hydra.c +++ b/mbcico/hydra.c @@ -1807,7 +1807,7 @@ int hydra(int role) tmpfl = tosend; tosend = request; for (; request->next; request = request->next); - request->next = tmpfl; + request->next = tmpfl; request = NULL; } @@ -1823,7 +1823,7 @@ int hydra(int role) if (emsi_remote_lcodes & LCODE_RH1) { for (tmpfl = tosend; tmpfl->next; tmpfl = tmpfl->next); - tmpfl->next = respond; + tmpfl->next = respond; rc = hydra_batch(role, tosend); tmpfl->next = NULL; /* split filelist into tosend and respond again */ diff --git a/mbcico/mbcico.c b/mbcico/mbcico.c index 9839e7bf..4384047e 100644 --- a/mbcico/mbcico.c +++ b/mbcico/mbcico.c @@ -312,8 +312,8 @@ int main(int argc, char *argv[]) if (execl(temp, "mblogin", (char *)NULL) == -1) perror("FATAL: Error loading BBS!"); - InitClient(pw->pw_name, (char *)"mbcico", CFG.location, CFG.logfile, - CFG.cico_loglevel, CFG.error_log, CFG.mgrlog, CFG.debuglog); + InitClient(pw->pw_name, (char *)"mbcico", CFG.location, CFG.logfile, + CFG.cico_loglevel, CFG.error_log, CFG.mgrlog, CFG.debuglog); /* * If this happens, nothing is logged! */ diff --git a/mbcico/outstat.c b/mbcico/outstat.c index 6220ada8..522ca04e 100644 --- a/mbcico/outstat.c +++ b/mbcico/outstat.c @@ -388,8 +388,8 @@ int each(faddr *addr, char flavor, int isflo, char *fname) if (*p == '\\') *p='/'; for (p = buf; *p && isspace(*p); p++); - if (*p == '~') - continue; + if (*p == '~') + continue; if ((*p == '#') || (*p == '-') || (*p == '^') || (*p == '@') || (*p == '~')) p++; if (stat(p, &st) != 0) { diff --git a/mbcico/tcp.c b/mbcico/tcp.c index 07ef6d56..2fd0763a 100644 --- a/mbcico/tcp.c +++ b/mbcico/tcp.c @@ -73,7 +73,7 @@ int rxtcp(void) if ((rc=tcprcvfiles()) == 0) { if ((emsi_local_opts & OPT_NRQ) == 0) { for (tmpfl = &tosend; *tmpfl; tmpfl = &((*tmpfl)->next)); - *tmpfl = respond_wazoo(); + *tmpfl = respond_wazoo(); } if ((tosend != NULL) || ((emsi_remote_lcodes & LCODE_NPU) == 0)) diff --git a/mbfido/ftn2rfc.c b/mbfido/ftn2rfc.c index b5f44be0..b55f6a87 100644 --- a/mbfido/ftn2rfc.c +++ b/mbfido/ftn2rfc.c @@ -305,7 +305,7 @@ void Send(int newsmode, char *outstr) int ftn2rfc(faddr *f, faddr *t, char *subj, char *origline, time_t mdate, int flags, FILE *pkt) { int rrq, result = 1, waskludge = FALSE, badkludge; - int bNeedToGetAddressFromMsgid = (int)NULL, newsmode = 0, lines, pass, count, first; + int bNeedToGetAddressFromMsgid = 0, newsmode = 0, lines, pass, count, first; char *newsgroup = NULL, *charset = NULL; char *temp, *p, *q, *r, *l, *b, *To = NULL, buf[4096], c, MailFrom[128], MailTo[128]; time_t now; diff --git a/mbfido/mbfido.c b/mbfido/mbfido.c index b00a5631..4994a134 100644 --- a/mbfido/mbfido.c +++ b/mbfido/mbfido.c @@ -202,7 +202,7 @@ void editor_configs(void) for (i = 1; i < 40; i++) if (CFG.akavalid[i]) fprintf(fp, "AKA %s\n", aka2str(CFG.aka[i])); - fprintf(fp, "\n"); + fprintf(fp, "\n"); gold_akamatch(fp); fprintf(fp, "; JAM MessageBase Setup\n;\n"); diff --git a/mbfido/mbindex.c b/mbfido/mbindex.c index ab93f6e0..ed538876 100644 --- a/mbfido/mbindex.c +++ b/mbfido/mbindex.c @@ -444,8 +444,8 @@ int compile(char *nlname, unsigned short zo, unsigned short ne, unsigned short n */ if ((*(buf+strlen(buf) -1) != '\n') && (*(buf + strlen(buf) -1) != '\012')) { while (fgets(buf, sizeof(buf) -1, nl) && (*(buf + strlen(buf) -1) != '\n')) /*void*/; - if (strlen(buf) > 1) /* Suppress EOF character */ - Syslog('-', "Nodelist: too long line junked (%d)", lineno); + if (strlen(buf) > 1) /* Suppress EOF character */ + Syslog('-', "Nodelist: too long line junked (%d)", lineno); continue; } diff --git a/mbfido/mgrutil.c b/mbfido/mgrutil.c index 2128c1ca..af170a7a 100644 --- a/mbfido/mgrutil.c +++ b/mbfido/mgrutil.c @@ -69,7 +69,7 @@ void MacroRead(FILE *fi, FILE *fp) /* * Empty lines are just written */ - fprintf(fp, "\r"); + fprintf(fp, "\n"); } else { strncpy(temp, ParseMacro(line,&res), 254); if (res) @@ -78,7 +78,7 @@ void MacroRead(FILE *fi, FILE *fp) * Only output if something was evaluated */ if (strlen(temp)) - fprintf(fp, "%s\r", temp); + fprintf(fp, "%s\n", temp); } } } diff --git a/mbfido/rfc2ftn.c b/mbfido/rfc2ftn.c index 47af30e9..3780385e 100644 --- a/mbfido/rfc2ftn.c +++ b/mbfido/rfc2ftn.c @@ -373,8 +373,8 @@ int rfc2ftn(FILE *fp, faddr *recipient) fprintf(ofp, "\001TOPT %d\n", fmsg->to->point); if (fmsg->from->point != 0) fprintf(ofp, "\001FMPT %d\n", fmsg->from->point); - fprintf(ofp, "\001INTL %d:%d/%d %d:%d/%d\n", fmsg->to->zone, fmsg->to->net, fmsg->to->node, - fmsg->from->zone, fmsg->from->net, fmsg->from->node); + fprintf(ofp, "\001INTL %d:%d/%d %d:%d/%d\n", fmsg->to->zone, fmsg->to->net, fmsg->to->node, + fmsg->from->zone, fmsg->from->net, fmsg->from->node); } if ((fmsg->msgid_a == NULL) || (fmsg->msgid_n == 0)) { @@ -673,10 +673,10 @@ int rfc2ftn(FILE *fp, faddr *recipient) for (tmp = msg; tmp; tmp = tmp->next) if (!strcasecmp(tmp->key,"X-FTN-PATH")) fill_path(&ptl,tmp->val); - if (msgs.Aka.point == 0) { - snprintf(sbe,128,"%u/%u",msgs.Aka.net, msgs.Aka.node); - fill_path(&ptl,sbe); - } + if (msgs.Aka.point == 0) { + snprintf(sbe,128,"%u/%u",msgs.Aka.net, msgs.Aka.node); + fill_path(&ptl,sbe); + } /* * Only add PATH line if there is something diff --git a/mbfido/tosspkt.c b/mbfido/tosspkt.c index 15f4075c..160af5e3 100644 --- a/mbfido/tosspkt.c +++ b/mbfido/tosspkt.c @@ -463,9 +463,9 @@ int getmessage(FILE *pkt, faddr *p_from, faddr *p_to) } else if (*(l=p+strlen(p)-1) == '\n') *l='\0'; - for (l=p+strlen(p)-1;*l == ' ';l--) - *l='\0'; - orig = xstrcpy(p); + for (l=p+strlen(p)-1;*l == ' ';l--) + *l='\0'; + orig = xstrcpy(p); } } diff --git a/mbfido/tracker.c b/mbfido/tracker.c index 781b340b..ffd6abee 100644 --- a/mbfido/tracker.c +++ b/mbfido/tracker.c @@ -89,7 +89,7 @@ void ParseMask(char *s, fidoaddr *addr) else if (strcmp(str, "All")) good = FALSE; - str = p; + str = p; } if ((p=strchr(str, '.'))) { @@ -101,7 +101,7 @@ void ParseMask(char *s, fidoaddr *addr) addr->node = 65535; else good = FALSE; - str = p; + str = p; } else { if (strspn(str, "0123456789") == strlen(str)) addr->node = atoi(str); @@ -110,7 +110,7 @@ void ParseMask(char *s, fidoaddr *addr) addr->node = 65535; else good = FALSE; - str = NULL; + str = NULL; } if (str) { diff --git a/mbnntp/commands.c b/mbnntp/commands.c index 5bc8a935..6e97596c 100644 --- a/mbnntp/commands.c +++ b/mbnntp/commands.c @@ -406,7 +406,7 @@ int get_post(char *buf, int max) int c, len; len = 0; - memset(buf, 0, sizeof(buf)); + memset(buf, 0, sizeof(*buf)); while (TRUE) { c = tty_getc(180); if (c <= 0) { diff --git a/mbnntp/mbnntp.c b/mbnntp/mbnntp.c index 5848b4ba..560e1679 100644 --- a/mbnntp/mbnntp.c +++ b/mbnntp/mbnntp.c @@ -263,7 +263,7 @@ int get_nntp(char *buf, int max) int c, len; len = 0; - memset(buf, 0, sizeof(buf)); + memset(buf, 0, sizeof(*buf)); while (TRUE) { c = tty_getc(180); if (c <= 0) { diff --git a/mbnntp/rfc2ftn.c b/mbnntp/rfc2ftn.c index 41f6876c..84755724 100644 --- a/mbnntp/rfc2ftn.c +++ b/mbnntp/rfc2ftn.c @@ -652,10 +652,10 @@ int rfc2ftn(FILE *fp) for (tmp = msg; tmp; tmp = tmp->next) if (!strcasecmp(tmp->key,"X-FTN-PATH")) fill_path(&ptl,tmp->val); - if (msgs.Aka.point == 0) { - snprintf(sbe,16,"%u/%u",msgs.Aka.net, msgs.Aka.node); - fill_path(&ptl,sbe); - } + if (msgs.Aka.point == 0) { + snprintf(sbe,16,"%u/%u",msgs.Aka.net, msgs.Aka.node); + fill_path(&ptl,sbe); + } /* * Only add PATH line if there is something diff --git a/mbsebbs/email.c b/mbsebbs/email.c index b47ee03c..a383f1f2 100644 --- a/mbsebbs/email.c +++ b/mbsebbs/email.c @@ -1042,7 +1042,7 @@ void Choose_Mailbox(char *Option) SetEmailArea((char *)"trash"); else if (!strcmp(sMailbox, "trash")) SetEmailArea((char *)"archive"); - else if (!strcmp(sMailbox, "archive")); + else if (!strcmp(sMailbox, "archive")) SetEmailArea((char *)"mailbox"); } Syslog('+', "Emailarea: %s", sMailbox); diff --git a/mbsebbs/menu.c b/mbsebbs/menu.c index 55879fc3..c84d6f6c 100644 --- a/mbsebbs/menu.c +++ b/mbsebbs/menu.c @@ -328,7 +328,7 @@ void DoMenu(int Type) case 7: /* Run external program */ if (strlen(menus.DoorName) && !menus.HideDoor) { - memset(temp, 0, sizeof(temp)); + memset(temp, 0, sizeof(*temp)); strcpy(temp, menus.DoorName); ExtDoor(menus.OptionalData, menus.NoDoorsys, menus.Y2Kdoorsys, menus.Comport, menus.NoSuid, menus.NoPrompt, menus.SingleUser, temp); diff --git a/mbsetup/m_marea.c b/mbsetup/m_marea.c index f270a5d8..49afa2a1 100644 --- a/mbsetup/m_marea.c +++ b/mbsetup/m_marea.c @@ -892,28 +892,28 @@ void MsgGlobal(void) Found = TRUE; break; } - if (Found) - break; - fseek(tfil, 0, SEEK_SET); - while (fread(&Sc, sizeof(sysconnect), 1, tfil) == 1) { - if (Sc.aka.zone == 0) { - fseek(tfil, - sizeof(sysconnect), SEEK_CUR); - memset(&Sc, 0, sizeof(sysconnect)); - Sc.aka.zone = a2.zone; - Sc.aka.net = a2.net; - Sc.aka.node = a2.node; - Sc.aka.point = a2.point; - Sc.sendto = TRUE; - Sc.receivefrom = TRUE; - snprintf(Sc.aka.domain, 13, "%s", a2.domain); - fwrite(&Sc, sizeof(sysconnect), 1, tfil); - if (SaveMsgRec(marea, FALSE) == 0) { - Done++; - Syslog('+', "Added %s to area %s", aka2str(a2), msgs.Tag); - } - break; + if (Found) + break; + fseek(tfil, 0, SEEK_SET); + while (fread(&Sc, sizeof(sysconnect), 1, tfil) == 1) { + if (Sc.aka.zone == 0) { + fseek(tfil, - sizeof(sysconnect), SEEK_CUR); + memset(&Sc, 0, sizeof(sysconnect)); + Sc.aka.zone = a2.zone; + Sc.aka.net = a2.net; + Sc.aka.node = a2.node; + Sc.aka.point = a2.point; + Sc.sendto = TRUE; + Sc.receivefrom = TRUE; + snprintf(Sc.aka.domain, 13, "%s", a2.domain); + fwrite(&Sc, sizeof(sysconnect), 1, tfil); + if (SaveMsgRec(marea, FALSE) == 0) { + Done++; + Syslog('+', "Added %s to area %s", aka2str(a2), msgs.Tag); } + break; } + } break; case 3: fseek(tfil, 0, SEEK_SET); while (fread(&Sc, sizeof(sysconnect), 1, tfil) == 1) { diff --git a/mbsetup/m_ol.c b/mbsetup/m_ol.c index c70689d9..dde6fd99 100644 --- a/mbsetup/m_ol.c +++ b/mbsetup/m_ol.c @@ -474,7 +474,7 @@ void ImportOneline(void) mbse_mvprintw(5, 6, "8.7.3 IMPORT ONELINERS"); set_color(CYAN, BLACK); temp = calloc(PATH_MAX, sizeof(char)); - memset(temp, 0, sizeof(temp)); + memset(temp, 0, sizeof(*temp)); strcpy(temp, edit_str(21, 6,64, temp, (char *)"The ^full path and filename^ of the file to import")); if (strlen(temp) == 0) { free(temp); diff --git a/mbsetup/mbsetup.c b/mbsetup/mbsetup.c index 6b11c5bc..aef60aa8 100644 --- a/mbsetup/mbsetup.c +++ b/mbsetup/mbsetup.c @@ -117,7 +117,7 @@ static void die(int onsig) for (i = 1; i < 40; i++) if (CFG.akavalid[i]) fprintf(fp, "AKA %s\n", aka2str(CFG.aka[i])); - fprintf(fp, "\n"); + fprintf(fp, "\n"); gold_akamatch(fp); fprintf(fp, "; JAM MessageBase Setup\n;\n"); diff --git a/mbtask/outstat.c b/mbtask/outstat.c index e0472ad6..703ff0a5 100644 --- a/mbtask/outstat.c +++ b/mbtask/outstat.c @@ -837,8 +837,8 @@ int each(faddr *addr, char flavor, int isflo, char *fname) if (*p == '\\') *p='/'; for (p = buf; *p && isspace(*p); p++); - if (*p == '~') - continue; + if (*p == '~') + continue; if ((*p == '#') || (*p == '-') || (*p == '^') || (*p == '@')) p++; if (stat(p, &st) != 0) { diff --git a/mbtask/ports.c b/mbtask/ports.c index cb5001dc..f81d609d 100644 --- a/mbtask/ports.c +++ b/mbtask/ports.c @@ -84,7 +84,7 @@ void fill_portlist(pp_list **fdp, pp_list *new) pp_list *tmp, *ta; tmp = (pp_list *)malloc(sizeof(pp_list)); - memset(tmp, 0, sizeof(tmp)); + memset(tmp, 0, sizeof(*tmp)); tmp->next = NULL; strncpy(tmp->tty, new->tty, 6); tmp->mflags = new->mflags; diff --git a/mbtask/taskdisk.c b/mbtask/taskdisk.c index 9e296f3d..14cbafb0 100644 --- a/mbtask/taskdisk.c +++ b/mbtask/taskdisk.c @@ -309,7 +309,7 @@ void disk_getfs_r(char *buf) if (ans != NULL) free(ans); - ans = NULL; + ans = NULL; return; } diff --git a/script/Makefile b/script/Makefile index 66647497..f35f137e 100644 --- a/script/Makefile +++ b/script/Makefile @@ -14,6 +14,7 @@ all: clean: rm -f core filelist Makefile.bak + rm -f editor install: @if [ "`id -un`" != "root" ] ; then \ diff --git a/script/init.Debian b/script/init.Debian index 9c64c461..6e2cdfd9 100644 --- a/script/init.Debian +++ b/script/init.Debian @@ -35,11 +35,11 @@ case "$1" in rm -f $MBSE_ROOT/var/sema/* rm -f $MBSE_ROOT/var/*.LCK rm -f $MBSE_ROOT/tmp/mb* - su mbse -c '$MBSE_ROOT/bin/mbtask' >/dev/null + su -m mbse -c '$MBSE_ROOT/bin/mbtask' >/dev/null echo -n "mbtask " sleep 2 if [ -f $MBSE_ROOT/etc/config.data ]; then - su mbse -c '$MBSE_ROOT/bin/mbstat open -quiet' + su -m mbse -c '$MBSE_ROOT/bin/mbstat open -quiet' echo -n "opened " fi echo "done." @@ -48,7 +48,7 @@ case "$1" in echo -n "Stopping $DESC: " if [ -f $MBSE_ROOT/var/run/mbtask ]; then echo -n "logoff users " - su mbse -c '$MBSE_ROOT/bin/mbstat close wait -quiet' >/dev/null + su -m mbse -c '$MBSE_ROOT/bin/mbstat close wait -quiet' >/dev/null echo -n " stopping mbtask" pid=$( cat $MBSE_ROOT/var/run/mbtask ) kill $pid diff --git a/unix/Makefile b/unix/Makefile index 6efae5cb..4684c9ad 100644 --- a/unix/Makefile +++ b/unix/Makefile @@ -30,6 +30,7 @@ all: ${TARGET} clean: rm -f ${TARGET} *.o *.h~ *.c~ core filelist Makefile.bak + rm -f login.defs mbuseradd: ${MBUSERADD_OBJS} ${CC} -o mbuseradd ${MBUSERADD_OBJS} ${LDFLAGS} ${LIBS} diff --git a/unix/log.c b/unix/log.c index ca5a94ae..208f52ff 100644 --- a/unix/log.c +++ b/unix/log.c @@ -85,7 +85,7 @@ void dolastlog(struct lastlog *ll, const struct passwd *pw, const char *line, co if (ll) *ll = newlog; - time(&newlog.ll_time); + time((time_t *) &newlog.ll_time); strncpy(newlog.ll_line, line, sizeof newlog.ll_line); #ifdef HAVE_LL_HOST strncpy(newlog.ll_host, host, sizeof newlog.ll_host); diff --git a/unix/utmp.c b/unix/utmp.c index db5822b9..63345277 100644 --- a/unix/utmp.c +++ b/unix/utmp.c @@ -120,7 +120,7 @@ void checkutmp(int picky) /* XXX - assumes /dev/tty?? */ strncpy(utent.ut_id, utent.ut_line + 3, sizeof utent.ut_id); strcpy(utent.ut_user, "LOGIN"); - time(&utent.ut_time); + time((time_t *) &utent.ut_time); } } @@ -294,7 +294,7 @@ void setutmp(const char *name, const char *line, const char *host) { utent.ut_type = USER_PROCESS; strncpy(utent.ut_user, name, sizeof utent.ut_user); - time(&utent.ut_time); + time((time_t *) &utent.ut_time); /* other fields already filled in by checkutmp above */ setutent(); pututline(&utent);