[sisyphus] Re: fetchmail
Alexey Tourbin
=?iso-8859-1?q?at_=CE=C1_turbinal=2Eorg?=
Вт Сен 17 19:15:02 MSD 2002
On Tue, Sep 17, 2002 at 06:22:04PM +0400, Dmitry V. Levin wrote:
> $ fetchmail
> fetchmail: no mailservers have been specified.
У меня как раз всё настроено. Проблема появилась после некорректной
перезагрузки. Как удалось выяснить, fetchmail некорректно реагирует на
мусор в конфигурационных файлах, в данном случае в ~/.fetchids.
Проблема воспроизводится так:
$ cat /usr/bin/perl > .fetchids
$ chmod 0700 .fetchids
$ fetchmail
Segmentation fault
$
(gdb) r
Starting program: /home/at/RPM/BUILD/fetchmail-5.9.12/./fetchmail
Program received signal SIGSEGV, Segmentation fault.
0x2ac854c1 in strchr () from /lib/libc.so.6
(gdb) bt
#0 0x2ac854c1 in strchr () from /lib/libc.so.6
#1 0x7ffff398 in ?? ()
#2 0x08056686 in load_params (argc=1, argv=0x7ffff6f4, optind=1) at fetchmail.c:1159
#3 0x08053a74 in main (argc=1, argv=0x7ffff6f4) at fetchmail.c:235
#4 0x2ac1e727 in __libc_start_main (main=0x8053800 <main>, argc=1, ubp_av=0x7ffff6f4,
init=0x8049f90 <_init>, fini=0x8070870 <_fini>, rtld_fini=0x2aab5f04 <_dl_fini>,
stack_end=0x7ffff6ec) at ../sysdeps/generic/libc-start.c:129
(gdb) b fetchmail.c:1159
Breakpoint 2 at 0x8056672: file fetchmail.c, line 1159.
(gdb) b uid.c:145
Breakpoint 1 at 0x8064d4f: file uid.c, line 145.
(gdb) r
Starting program: /home/at/RPM/BUILD/fetchmail-5.9.12/./fetchmail
Breakpoint 2, load_params (argc=1, argv=0x7ffff6f4, optind=1) at fetchmail.c:1159
1159 initialize_saved_lists(querylist, run.idfile);
(gdb) c
Continuing.
Breakpoint 1, initialize_saved_lists (hostlist=0x8091390, idfile=0x808cf20 "/home/at/.fetchids")
at uid.c:145
145 delimp1 = strchr(user, '@');
(gdb) n
146 id = strchr(delimp1,' ');
(gdb) p user
$1 = 0x7ffff110 "\230УR+\206#ТFґ\215 Мs3"
(gdb) p delimp1
$2 = 0x0
(gdb) n
Program received signal SIGSEGV, Segmentation fault.
0x2ac854c1 in strchr () from /lib/libc.so.6
(gdb)
--- uid.c~ Fri Sep 28 18:31:13 2001
+++ uid.c Tue Sep 17 18:59:19 2002
@@ -143,6 +143,8 @@
* host will follow with the ' ' seperator finaly id.
*/
delimp1 = strchr(user, '@');
+ if (!delimp1)
+ continue;
id = strchr(delimp1,' ');
for (delimp1 = id; delimp1 >= user; delimp1--)
if ((*delimp1 != ' ') && (*delimp1 != '\t'))
Подробная информация о списке рассылки Sisyphus