summaryrefslogtreecommitdiffstats
path: root/getdomain.c
AgeCommit message (Collapse)Author
2020-03-31Convert mutt_init() to use buffer pool for path operations.Kevin McCarthy
Convert getdnsdomainname(), called by mutt_init(), to accept a BUFFER parameter instead.
2018-12-31Remove trailing whitespace.Kevin McCarthy
The result of find . -name "*.[ch]" -exec emacs -batch {} \ --eval="(progn (delete-trailing-whitespace) (and (buffer-modified-p) (save-buffer)))" \;
2017-02-18Prevent null pointer exception for h->ai_canonnameAthanasios Douitsis
The getaddrinfo call in line 54 sets &h to a struct addrinfo. If a canonical name cannot be found for the node argument of getaddrinfo, h->ai_canonname is set to NULL. In that case, the strchr call in line 58 can lead to segfault. This behavior was observed on a macos sierra while the hostname was 192.168.1.3 (unfortunately this happens quite often in macos). The fix is simple, just check h->ai_canonname for the NULL value.
2016-09-05Stub out getdnsdomainname() unless HAVE_GETADDRINFO.Kevin McCarthy
It seems unlikely there are systems without it (given that this mistake has been in since 1.6.0), but for correctness we should stub out the function for those without it.
2016-08-05Update copyright notices.Kevin McCarthy
2016-05-09Back out wrapper sys_socket.h workaround (23334e967dd7)Kevin McCarthy
After renaming all internal macros from M_* to MUTT_*, the sys_socket.h workaround is no longer necessary.
2016-04-27Create a wrapper sys_socket.h to work around Solaris namespace issues. ↵Kevin McCarthy
(closes #3833) Solaris includes "sys/stream.h" inside their "sys/socket.h". This include file adds many non-reserved macros to Mutt's namespace, two of which conflict with existing Mutt macros. The simplest fix would be to rename those macros in Mutt, however this will cause difficulty with out-of-tree patches. This fix creates a wrapper include file that preserves those existing macros and prevents the Solaris values from entering Mutt's namespace.
2016-03-08Improve method of determining FQDN. (closes #3298)Derek Martin
Rather than reading /etc/resolv.conf, use gethostname() and getaddrinfo() to get the canonical domain. Thanks to Vincent Lefèvre for the memory leak fix.
2013-04-11Backed out changeset 1142ed8974faMichael Elkins
2013-04-10use gethostname() to determine the system host nameMichael Elkins
use getaddrinfo() to look up canonical DNS name, and fall back to hinting from /etc/resolv.conf see #3298
2005-02-03Add config.h to the top of every C file that could possibly want it.Brendan Cully
Remove it from mutt.h
2001-10-09A different fix for #767.Thomas Roessler
1999-01-07Get rid of RCS ids in source files. They are getting in our wayThomas Roessler
when merging changes.
1998-11-10Introduce or rewrite mutt_{str*cmp,strlen} and use them all over theThomas Roessler
place. If there are still segmentation faults due to missing NONULLs over, they are gone now.
1998-10-15Change "static char rcsid[]" to "static const char rcsid[]" to makemutt-0-94-13-relThomas Roessler
gcc shut up about this.
1998-10-13Add RCS $Id$ strings to (hopefully) all source files.Thomas Roessler
1998-06-08Initial revisionThomas Roessler