Article View: comp.mail.mush
Article #1Re: Strange things in mush (already patch#5 on SunOS4.1.2)
From: Bart Schaefer
Date: Tue, 27 Oct 1992 16:16
Date: Tue, 27 Oct 1992 16:16
150 lines
4608 bytes
4608 bytes
On Oct 21, 5:23pm, Christoph von Stuckrad wrote:
} Subject: Strange things in mush (already patch#5 on SunOS4.1.2)
}
} I tried a few times to install mush on a Sun4 (SunOS 4.1.2)
} and even after getting patch 5 (and installing it)
} The whole thing blew up !
} Everytime I started mush on an existing Mail-Folder
} with a little bit more then just a few lines in it,
} mush behaved as if it was feeding parts of its own screen output
} into its command input... going totaly wild that way...
} It looks like overwriting its own code or buffers...
On Oct 22, 4:09pm, Tim Wright wrote:
} Subject: Re: Strange things in mush (already patch#5 on SunOS4.1.2)
}
} The new xcreat() code has an off by one error which stops the lock
} code from working
Patch appended. There'll be a patch #6 soon including this and some
fixes to the POP3 files.
} I fixed these nasties, but ran into the problem of part of the mailbox
} being fed into standard input as you describe.
Mush 7.2.5 (without DOT_LOCK, sigh) passed cleanly through the "purify"
runtime memory corruption checker and did not exhibit this behavior on
my SunOS 4.1.1 system. Does this happen during loading of the folder
or after you try to read a message?
==============================================================================
*** 7.2.5/lock.c Sun Oct 11 18:14:56 1992
--- 7.2.6/lock.c Tue Oct 27 07:55:49 1992
***************
*** 154,160 ****
(void) sprintf(buf, "%s.lock", filename);
#endif /* M_XENIX */
on_intr();
! while ((lockfd = xcreat(buf, 0444)) == -1) {
if (errno != EEXIST) {
error("unable to lock %s", filename);
break;
--- 154,160 ----
(void) sprintf(buf, "%s.lock", filename);
#endif /* M_XENIX */
on_intr();
! while ((lockfd = xcreat(buf, 0444)) < 0) {
if (errno != EEXIST) {
error("unable to lock %s", filename);
break;
***************
*** 170,176 ****
}
}
off_intr();
! if (lockfd != -1) {
if (cnt)
print("done.\n");
(void) close(lockfd);
--- 170,176 ----
}
}
off_intr();
! if (lockfd < 0) {
if (cnt)
print("done.\n");
(void) close(lockfd);
***************
*** 185,191 ****
#else
setgid(getgid());
#endif /* BSD */
! return lockfd == -1? -1 : 0;
#endif /* LOCK_PROG */
}
--- 185,191 ----
#else
setgid(getgid());
#endif /* BSD */
! return lockfd < 0? -1 : 0;
#endif /* LOCK_PROG */
}
*** 7.2.5/xcreat.c Sat Aug 22 11:47:10 1992
--- 7.2.6/xcreat.c Tue Oct 27 07:54:04 1992
***************
*** 35,46 ****
#endif /* XCTEST */
#endif /* XCTEST_LOUDLY */
! #ifdef XCTEST
#define hostname() "xctest"
#else
extern char **ourname;
#define hostname() ourname[0]
! #endif /* XCTEST */
#ifdef DECLARE_ERRNO
extern int errno;
--- 35,46 ----
#endif /* XCTEST */
#endif /* XCTEST_LOUDLY */
! #if defined(XCTEST) || defined(LOCK_PROG)
#define hostname() "xctest"
#else
extern char **ourname;
#define hostname() ourname[0]
! #endif /* XCTEST || LOCK_PROG */
#ifdef DECLARE_ERRNO
extern int errno;
***************
*** 157,171 ****
int j = -2, i;
q = rindex(name, '/');
! if (q)
! i = q - name;
! else {
i = 0; /* Creating in the current directory */
}
p = strncpy(buf, name, i);
if (unique(p, p + i, mode))
j = myrename(p, name); /* try and rename it, fails if nonexclusive */
- free(p);
return j;
}
--- 157,170 ----
int j = -2, i;
q = rindex(name, '/');
! if (q) {
! i = (q - name) + 1;
! } else {
i = 0; /* Creating in the current directory */
}
p = strncpy(buf, name, i);
if (unique(p, p + i, mode))
j = myrename(p, name); /* try and rename it, fails if nonexclusive */
return j;
}
==============================================================================
--
Bart Schaefer schaefer@zigzag.z-code.com
Z-Code Software Corp. schaefer@z-code.com
Technical Details
Message-ID:
<9210270816.ZM5435@zigzag>Path:
arc1-ca.pugleaf.net!sparky!uunet!snorkelwacker.mit.edu!bloom-beacon!INTERNET!dont-send-mail-to-path-linesShow Full Headers
Complete Article Headers
Newsgroups: comp.mail.mush Path: arc1-ca.pugleaf.net!sparky!uunet!snorkelwacker.mit.edu!bloom-beacon!INTERNET!dont-send-mail-to-path-lines From: bart@zigzag.UUCP (Bart Schaefer) Subject: Re: Strange things in mush (already patch#5 on SunOS4.1.2) Message-ID: <9210270816.ZM5435@zigzag> Sender: root@athena.mit.edu (Wizard A. Root) Reply-To: bart@zigzag.z-code.com Organization: The Internet Date: Tue, 27 Oct 1992 16:16:49 GMT Lines: 150