[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[leafnode-list] Leafnode 1: Noticed a bug in xoverutil.c
- To: leafnode-list@xxxxxxxxxxxxxxxxxxxxxxxxxxx
- Subject: [leafnode-list] Leafnode 1: Noticed a bug in xoverutil.c
- From: "Gary R. Schmidt" <grschmidt@xxxxxxx>
- Date: Tue, 13 Dec 2016 16:00:46 +1100
- Delivery-date: Tue, 13 Dec 2016 06:01:10 +0100
- Ironport-phdr: 9a23:jMBRSxWIVZprEcLrqfoXeIwgIOjV8LGtZVwlr6E/grcLSJyIuqrYYxyHt8tkgFKBZ4jH8fUM07OQ6PG7HzJbqs3f+Fk5M7V0HycfjssXmwFySOWkMmbcaMDQUiohAc5ZX0Vk9XzoeWJcGcL5ekGA6ibqtW1aFRrwLxd6KfroEYDOkcu3y/qy+5rOaAlUmTaxe71/IRG4oAnLt8Qbj4RuJ6gwxxDUvnZGZuNayH9yK1mOhRj8/MCw/JBi8yRUpf0s8tNLXLv5caolU7FWFSwqPG8p6sLlsxnDVhaP6WAHUmoKiBpIAhPK4w/8U5zsryb1rOt92C2dPc3rUbA5XCmp4ql3RBP0jioMKjg0+3zVhMNtlqJWuAyvqRxizYDXbo+aOvVxcb/Sc94BWWpMXNxcWzBdDo6ybYYCCfcKM+ZCr4n6olsDtRWyCwi2C+P1yj5Dm2P40bcn2Oo8DQ7G3AkgH9MTv3TIotn+KaAfUe+vzKnT0TrDb/ZW2Tbg54jUaR0uu+2DXbdqfcrW00kvGBrIg1ONooLmJzOYzvoBv3SV4uZ6SO6jlXQrpxxwrzSz3Mshi5TFipoUx1zY7yl13ok4KcCiREN4YdOoCoVcuz2ZOoZwX8gsWXtnuDwgxb0DoZO7fDYFyJAgxxPHbvyIaYmI4hb+WOuROzt4mGpleL2+hxqo7Uegzej8WtOu31ZXtiZFk9/MuW4R1xHL9MSLVvVw8l281TqRzQzf9+BJLVwumafaNpIt2rswmYASsUTHEC/2gkL2jKqOe0Ur4Oio8PjoYrXjpp+dKoB0lhrzPb4ylcy6G+g4NRIOX2eD9eSmyLLj5VH5QKlNjvAulqnWrorVJcodpq6+HgBazJ8v6xK+Dze9zNQVhmQILE5fdB2ZloTpJ0/BL+z4Dfe5glSsky1nx+zbPrH4H5rNKWLDkKvkfbZg7U5T1RA/ws1B6MEcNrZUJP/6VEn2uNGdCh4iLyS436DqTclw3YMYWGHJHrLcPKTIrVqV4O5pL+TfSpUSvWO3BPE/9rbUyzcCkl8YfKW1l9NDZ2qjFfRjIkmFSXPnh5EGC2hc7Vl2d/DjlFDXCW0bXH21Ra9pvjw=
- List-id: Leafnode NNTP Server - Support and Technical discussions <leafnode-list.dt.e-technik.tu-dortmund.de>
- Sender: leafnode-list-bounces+list01=leafnode.de@xxxxxxxxxxxxxxxxxxxxxxxxxxx
- User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.24) Gecko/20100228 Thunderbird/2.0.0.24 Mnenhy/0.7.6.666
Hi,
In reviewing my various and sundry log files, I noticed the following
showing up:
fetchnews[19025]: [ID 702911 news.error] error: cannot
rmdir(/news/comp/databases): File exists
Which is true as /news/comp/database/xbase is still populated.
So I went looking and found that the rmdir(2) call in killcwd() checks
for ENOTEMPTY as a no error condition, and not EEXIST which Solaris 11.3
returns.
This turns out to be one of those "POSIX allows for ..." cases, so here
is the unified diff to add checking for EEXIST. (Against 1.11.10, but
xoverutil.c has not changed.)
Cheers,
Gary B-)
--- ./leafnode-1.11.10/xoverutil.c Sat Jan 31 02:02:52 2009
+++ ./leafnode-1.11.11/xoverutil.c Tue Dec 13 15:27:53 2016
@@ -386,7 +386,7 @@
if (chdir(spooldir)) {
ln_log(LNLOG_SERR, LNLOG_CTOP, "error: cannot chdir(%s):
%m", spooldir);
}
- if (rmdir(t) && errno != ENOTEMPTY) {
+ if (rmdir(t) && errno != ENOTEMPTY && errno != EEXIST) {
ln_log(LNLOG_SERR, LNLOG_CTOP, "error: cannot rmdir(%s):
%m", t);
}
free(t);
--
_______________________________________________
leafnode-list mailing list
leafnode-list@xxxxxxxxxxxxxxxxxxxxxxxxxxx
https://krusty.dt.e-technik.tu-dortmund.de/mailman/listinfo/leafnode-list
http://leafnode.sourceforge.net/