Bug#767584: segfaults when a dot is used in the config as part of the hostname

2014-11-20 Thread Simon Kainz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512


Hello,

just wanted to let you know i am working on this bug. I have already
found the reason for the SIGTRAP (incorrect usage of g_error()).

I'll submit a patch soon.

Regards,

Simon


- -- 

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.12 (GNU/Linux)

iQIcBAEBCgAGBQJUbdUGAAoJEBy08PeN7K/pVW8P/3jhevXNizsZhzJwYXvG2Gi6
75o6nPRtpU2UsQG4tpK+LgjoTzEX/NmGTACJY90fkQgWPnQakyNczDgAgt7+YUUb
E7UqO0WpSH6ZzHbqccqJcZaU763J4UCwQBxPkEpxWuwVJbVzTX6dHD9bJhESHHhK
6gI9leEdH86ZGPx9cDBDfkznSbXtJkwLFEsQ+Eii6ujoSME4VCs6cbMucpONNXtK
b3CwGuEznvPmJ0v90Yx5DlWJRznfn14YQZ3JCCfR3UcMbWZjesPmO+xe6osEDNXX
u+t74+6kYwOg1xZIA9qYEAy/ZE1w0+JcfUiLs+ubqRKgYMkPgLfpLocGkzLXWV6z
ByNjLkkTjObVQGMWbBgFBvcEOIYHIIDLyy5jks9vneXcySKYeskEckik3LzyaiMN
HxRmNjPlYmqErnV1HyF2NqBD7svjqkFdUvqjCPeqSjOo7bKUUPRY4B9N84mQfof0
jp0JgfD8+xq3ESV1lQil1Zym9xVXGwhecWQ2UteS0+4ZydlxPsmQkcv8ue3uhD6d
bLXusCDlr9nEXnt4rIB4stNYtXHRdz7Gtjcf694ZWPkXtWb047glBGZF4fGMnuQF
VMROuVUyBRsKN9EgDH3P668olJO93UfpocpFtBPMx4KfLgWkTr4ye5LjK1rN1CUk
J9g3EJCCGirbioYALWVP
=cnsf
-END PGP SIGNATURE-


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#767584: segfaults when a dot is used in the config as part of the hostname

2014-11-01 Thread Evgeni Golov
Package: apt-dater
Version: 1.0.1-1
Severity: grave

Hi,

after the upgrade to 1.0.0 I first what surprised by a new configuration, w/o
an import of my old one, thanks :/
After rewriting the config, apt-dater segfaults on me.

Minimal config to reproduce the issue (based on your example):
Hosts:
{
localnet:
{
Title="local hosts";

localhost: {}
node1.ibh.net: {}
}
}


GDB backtrace:
evgeni@nana ~ % gdb apt-dater  
GNU gdb (Debian 7.7.1+dfsg-3) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
.
Find the GDB manual and other documentation resources online at:
.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from apt-dater...Reading symbols from 
/usr/lib/debug/.build-id/0d/b0e0825ca8396749052e4555417b2144d17f01.debug...done.
done.
(gdb) run
Starting program: /usr/bin/apt-dater 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

** (apt-dater:30187): ERROR **: Error reading host file 
[/home/evgeni/.config/apt-dater/hosts.config:40]: syntax error

Program received signal SIGTRAP, Trace/breakpoint trap.
g_logv (log_domain=0x0, log_level=G_LOG_LEVEL_ERROR, format=, 
args=args@entry=0x7fffdf40) at 
/build/glib2.0-dt6trg/glib2.0-2.42.0/./glib/gmessages.c:1046
1046/build/glib2.0-dt6trg/glib2.0-2.42.0/./glib/gmessages.c: No such file 
or directory.
(gdb) bt full
#0  g_logv (log_domain=0x0, log_level=G_LOG_LEVEL_ERROR, format=, args=args@entry=0x7fffdf40)
at /build/glib2.0-dt6trg/glib2.0-2.42.0/./glib/gmessages.c:1046
domain = 0x0
data = 0x0
depth = 0
log_func = 0x77b1d5c0 
domain_fatal_mask = 
masquerade_fatal = 0
test_level = 
was_fatal = 
was_recursion = 
msg = 0x620f00 "Error reading host file 
[/home/evgeni/.config/apt-dater/hosts.config:40]: syntax error"
msg_alloc = 0x620f00 "Error reading host file 
[/home/evgeni/.config/apt-dater/hosts.config:40]: syntax error"
i = 2
#1  0x77b1df6f in g_log (log_domain=log_domain@entry=0x0, 
log_level=log_level@entry=G_LOG_LEVEL_ERROR, 
format=format@entry=0x414d08 "Error reading host file [%s:%d]: %s") at 
/build/glib2.0-dt6trg/glib2.0-2.42.0/./glib/gmessages.c:1079
args = {{gp_offset = 48, fp_offset = 48, overflow_arg_area = 
0x7fffe020, reg_save_area = 0x7fffdf60}}
#2  0x004074b8 in loadHosts (filename=0x621dc0 
"/home/evgeni/.config/apt-dater/hosts.config") at keyfiles.c:298
efn = 
hcfg = {root = 0x621d30, destructor = 0x0, flags = 0, tab_width = 2, 
default_format = 0, include_dir = 0x0, error_text = 0x76fb7da5 "syntax 
error", 
  error_file = 0x6213c0 "/home/evgeni/.config/apt-dater/hosts.config", 
error_line = 40, error_type = CONFIG_ERR_PARSE, filenames = 0x621fc0, 
num_filenames = 1}
cfghosts = 
hosts = 
i = 
cfggroup = 
#3  0x00405446 in main (argc=1, argv=0x7fffe208, 
envp=0x7fffe218) at apt-dater.c:130
opts = 
cfgfilename = 0x620fa0 "/home/evgeni/.config/apt-dater/apt-dater.config"
cfgdirname = 0x620f70 "/home/evgeni/.config/apt-dater"
hosts = 0x0
report = 0
refresh = 1
(gdb) 


Renaming node1.ibh.net to node1ibhnet solves the issue, but then I
have to add SSHHost to every node and that sounds wrong.

Regards
Evgeni

-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 
'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.16-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages apt-dater depends on:
ii  libc6   2.19-12
ii  libconfig9  1.4.9-2
ii  libglib2.0-02.42.0-2
ii  libncursesw55.9+20140913-1
ii  libpopt01.16-10
ii  libtcl8.5   8.5.17-1
ii  libtinfo5   5.9+20140913-1
ii  libxml2 2.9.2+dfsg1-1
ii  lockfile-progs  0.1.17
ii  openssh-client  1:6.7p1-2
ii  screen  4.2.1-3

apt-dater recommends no packages.

Versions of packages apt-dater suggests:
pn  apt-dater-host  
ii  xsltproc1.1.28-2+b1

-- no debconf information


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact l