[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [leafnode-list] 2.0b8_ma6, leafnode, file "is a directory"
Volker Apelt <volker_apelt@xxxxxxxx> writes:
> Hi,
>
> For each message originating from my server I recieve a strange line
> like the one below in my syslog.
>
> ### ---- log entry (line wrapped)
> <date> <server> leafnode[24244]: error linking \
> /var/spool/news/message.id/130/<x1-m3ofphnolb.fsf@xxxxxxxxxxxxxxxxx> \
> into de.comp.os.unix.linux.hardware/2898: Is a directory
> ### ----
Well, looks like this message is bogus. Would you try this patch and
report back? This patch contains more than the relevant parts, I just
extracted it from my current version against 2.0b8_ma6. Should apply
cleanly against all currently available later versions as well.
Index: artutil.c
===================================================================
RCS file: /home/emma/mycvsroot/leafnode/artutil.c,v
retrieving revision 1.7.2.19
diff -u -r1.7.2.19 artutil.c
--- artutil.c 2001/07/15 12:12:07 1.7.2.19
+++ artutil.c 2001/08/24 11:44:58
@@ -68,7 +68,7 @@
if (p && q) {
int i;
- value = critmalloc((size_t) (q - p + 1),
+ value = (char *)critmalloc((size_t) (q - p + 1),
"Allocating space for header value");
for (i = 0; i < q - p; i++) {
/* sort of strncpy, replacing LF by space */
@@ -324,20 +324,27 @@
strcpy(tmp, xrefno);
if (sync_link(outname, tmp) < 0 && errno != EEXIST) {
ln_log(LNLOG_SERR, LNLOG_CARTICLE,
- "error linking %s into %s/%s: %m",
+ "error (1) linking %s into %s/%s: %m",
outname, outname, tmp);
}
} else {
+ int res;
+
/* do crosspost */
do {
sprintf(tmp, "%ld", ++cg->last);
errno = 0;
- } while (sync_link(outname, tmp) < 0 && errno == EEXIST);
+ } while ((res = sync_link(outname, tmp)) && errno == EEXIST);
+
+ if (res < 0) {
+ char gdir[PATH_MAX];
- if (errno)
ln_log(LNLOG_SERR, LNLOG_CARTICLE,
- "error linking %s into %s/%s: %m",
- outname, p, tmp);
+ "error (2) linking %s to %s, cwd is %s: %m",
+ outname, tmp,
+ getcwd(gdir, sizeof(gdir))
+ ? gdir : "(unknown)");
+ }
else
ln_log_prt(LNLOG_SDEBUG, LNLOG_CARTICLE,
"stored %s as %s in %s\n",
@@ -596,7 +603,7 @@
&& errno == EEXIST);
if (linksuccess < 0) {
ln_log(LNLOG_SERR, LNLOG_CARTICLE,
- "error linking %s into %s: %m", filename, p);
+ "error (3) linking %s into %s: %m", filename, p);
raise (SIGSTOP);
} else {
ln_log(LNLOG_SDEBUG, LNLOG_CARTICLE,
--
Matthias Andree
begin dont_click_this_virus.exe
end
Site of the day: http://piology.org/ILOVEYOU-Signature-FAQ.html
--
leafnode-list@xxxxxxxxxxxxxxxxxxxxxxxxxxxx -- mailing list for leafnode
To unsubscribe, send mail with "unsubscribe" in the subject to the list