aboutsummaryrefslogtreecommitdiffstats
path: root/dirmngr/dns.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Spelling fixes in docs and comments.NIIBE Yutaka2017-04-281-1/+1
| | | | | | | | | | -- In addition, fix trailing spaces in tests/inittests. GnuPG-bug-id: 3121 Reported-by: ka7 (klemens) Signed-off-by: NIIBE Yutaka <[email protected]>
* dirmngr: Fix aliasing problem in dns.c.NIIBE Yutaka2017-04-251-16/+18
| | | | | | | | | | * dirmngr/dns.c (dns_ai_setent): Care about aliasing. -- Co-authored-by: Tomas Mraz GnuPG-bug-id: 3105 Signed-off-by: NIIBE Yutaka <[email protected]>
* dirmngr: More fix for Windows.NIIBE Yutaka2017-04-131-1/+5
| | | | | | | * dirmngr/dns.c (socket_fd_t, STDCALL): New. (dns_te_initname): Use. Signed-off-by: NIIBE Yutaka <[email protected]>
* dirmngr: Fix possible null reference.NIIBE Yutaka2017-04-121-2/+3
| | | | | | * dirmngr/dns.c (dns_error_t dns_trace_fput): Check NULL. Signed-off-by: NIIBE Yutaka <[email protected]>
* dirmngr: Fix plus1_ns.NIIBE Yutaka2017-04-121-1/+4
| | | | | | | | | * dirmngr/dns.c (plus1_ns): Fix the initial implementation. -- Fixes-commit: 64904ce627b6b0661acf15b5b70103c4842bb0f3 Signed-off-by: NIIBE Yutaka <[email protected]>
* dirmngr: Use a function to increment network short.NIIBE Yutaka2017-04-121-4/+13
| | | | | | | | | | | | | * dirmngr/dns.c (plus1_ns): New. (dns_p_push): Use it. -- On OpenBSD, htons and ntohs are expanded to GCC's statement expressions where local variable is allowed. Consecutive use of htons and ntohs causes problem of variable name. Signed-off-by: NIIBE Yutaka <[email protected]>
* libdns: Hack to skip negation term.Gaetan Bisson2017-01-231-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | * dirmngr/dns.c (dns_nssconf_loadfile): Skip negation terms in nsswitch.conf parser. -- This small patch was submitted along with this comment: We've been having issues over at Arch Linux with the new libdns code. Our /etc/nsswitch.conf contains the following line: hosts: files mymachines resolve [!UNAVAIL=return] dns myhostname And it turns out dirmngr fails to parse the negation statement (the bang in !UNAVAIL). This results in gnupg not being able to resolve any name. Looking at dirmngr/dns.c it was unclear to me how to properly handle such negations. The dns_anyconf_scan calls used in dns_nssconf_loadfile do not allow to store a negation bit easily... In the meantime, I wrote the attached patch which ignores those statements altogether. It makes libdns work as expected for us. Commit log written by wk
* libdns: Silence -Wstrict-prototypes on some function ptrs.Werner Koch2017-01-121-0/+13
| | | | | | * dirmngr/dns.c (dns_rrtype): Ignore -Wstrict-prototypes warning. Signed-off-by: Werner Koch <[email protected]>
* libdns: Provide replacement for EPROTO.Werner Koch2017-01-121-0/+4
| | | | | | | | | | | * dirmngr/dns.c (EPROTO) ![EPROTO]: Define to EPROTONOSUPPORT. -- This is the same replacement we use in Libassuan (commit 8ab3b9273524bd344bdb90dd5d3bc8e5f53ead6e) to make it work on OpenBSD and may other BSD based OSes. Signed-off-by: Werner Koch <[email protected]>
* dirmngr,w32: Hack around a select problem.Werner Koch2016-12-191-2/+3
| | | | | | | | | | | | | | | | | * dirmngr/dns.c (FD_SETSIZE): Bump up to 1024. (dns_poll): Return an error instead of hitting an assertion failure. -- For unknown reasons socket() return fd with values 244, 252, 268. The latter is above the FD_SETSIZE of 256. It seems that select has been build with a highler FD_SETSIZE limit. Bump up to a reasonable large value. A better solution would be to grab some code from npth_eselect to replace select. We could also use npth_eselect direclty in dns-stuff.c instead of using dns_res_poll. Signed-off-by: Werner Koch <[email protected]>
* dirmngr: New libdns snapshotJustus Winter2016-12-141-61/+154
|
* dirmngr: Add basic libdns supportJustus Winter2016-12-141-0/+11152
* dirmngr/dns.c: New file. * dirmngr/dns.h: New file. * dirmngr/Makefile.am (dirmngr_SOURCES): Add new files. * dirmngr/dns-stuff.c: Include dns.h.xxx use libdns (libdns): New global var for the libdns state. (libdns_error_to_gpg_error): New. (libdns_init): New. (resolve_name_libdns): New. (get_dns_cert_libdns): New stub. (getsrv_libdns): New stub. (get_dns_cname_libdns): New stub. Signed-off-by: Justus Winter <[email protected]>