346d6d8bf5fdb446921d754c07c8a7d913a048d5 |
|
29-Jan-2018 |
René Genz <liebundartig@freenet.de> |
Fix minor spelling mistakes
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
58a9b4f0b195f6ea1271d24990bf4df04eccd6ed |
|
25-Sep-2017 |
Fabiano Fidêncio <fidencio@redhat.com> |
RESOLV: Fix "-Werror=null-dereference" caught by GCC
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
0f058b3156f584b21cffb0c9725e8082fbee47d0 |
|
08-Jun-2017 |
Lukas Slebodnik <lslebodn@redhat.com> |
UTIL: Remove limits.h from util/util.h
limits.h is not used directly by util/util.h. The header file limits.h
must be included in 17 files and after removing it from util.h it had to be
added only to 4 missing files
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com> |
9676b464dd428557ff5a648e1351a3972440396f |
|
08-Dec-2016 |
Carl Henrik Lunde <chlunde@ifi.uio.no> |
Prevent use after free in fd_input_available
When both TEVENT_FD_WRITE and TEVENT_FD_READ are set, and an error/EOF
occurs when reading from the socket, we will get a use after free
in the second call ares_process_fd. The first call will free the watch
structure via a callback.
Prevent this by calling ares_process_fd only once.
Invalid read of size 4
at fd_input_available (async_resolv.c:147)
by epoll_event_loop (tevent_epoll.c:728)
by epoll_event_loop_once (tevent_epoll.c:926)
by std_event_loop_once (tevent_standard.c:114)
by _tevent_loop_once (tevent.c:533)
by tevent_common_loop_wait (tevent.c:637)
by std_event_loop_wait (tevent_standard.c:140)
by server_loop (server.c:702)
by main (data_provider_be.c:587)
Address ... is 112 bytes inside a block of size 136 free'd
at free (vg_replace_malloc.c:530)
by _talloc_free_internal (talloc.c:1116)
by _talloc_free (talloc.c:1647)
by ares__close_sockets (ares__close_sockets.c:50)
by handle_error (ares_process.c:679)
by read_tcp_data (ares_process.c:391)
by processfds (ares_process.c:138)
by fd_input_available (async_resolv.c:144)
by epoll_event_loop (tevent_epoll.c:728)
by epoll_event_loop_once (tevent_epoll.c:926)
by std_event_loop_once (tevent_standard.c:114)
by _tevent_loop_once (tevent.c:533)
by tevent_common_loop_wait (tevent.c:637)
by std_event_loop_wait (tevent_standard.c:140)
by server_loop (server.c:702)
Resolves:
https://fedorahosted.org/sssd/ticket/3250
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
00f3fbb66e882213a78a7ad0a4f9190d0838c830 |
|
16-Aug-2016 |
Justin Stephenson <jstephen@redhat.com> |
Make resolv_is_address() function public and create some basic tests
Resolves:
https://fedorahosted.org/sssd/ticket/2789
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
a0c764a36f2f432e6063de84be6f6af7e96ec159 |
|
11-Feb-2016 |
Sumit Bose <sbose@redhat.com> |
Just return NULL if tevent_req_create() fails
In general we just return NULL if tevent_req_create() fails because
there is nothing we can do with the request anyway. Especially
tevent_req_error() should not be called because it tries to dereference
req.
Reviewed-by: Pavel Březina <pbrezina@redhat.com> |
eafbc66c2ff6365478e62a8df3fd005bf80e5c7b |
|
03-Mar-2015 |
Jakub Hrozek <jhrozek@redhat.com> |
resolv: Use the same default timeout for SRV queries as previously
When we changed the resolver code to use the TTL values from the DNS
queries instead of harcoded ones, we changed the default value by
accident.
Add a separate SRV TTL that is backwards-compatible with the old
harcoded value.
Reviewed-by: Pavel Březina <pbrezina@redhat.com> |
5594736ea2618bb3e487f47fd199e1d2cf4c58fd |
|
11-Feb-2015 |
Jakub Hrozek <jhrozek@redhat.com> |
RESOLV: Remove obsolete in-tree implementation of SRV and TXT parsing
SSSD contained several backwards-compatible definitions of SRV and TXT
APIs as well as structures that carry TTL data. These were intended for
RHEL-5 and older releases. Since we don't support those upstream, it's
better to remove the code -- it has drifted apart from upstream anyway.
Reviewed-by: Pavel Březina <pbrezina@redhat.com> |
bf54fbed126ec3d459af40ea370ffadacd31c76d |
|
11-Feb-2015 |
Jakub Hrozek <jhrozek@redhat.com> |
RESOLV: Add an internal function to read TTL from a DNS packet
Related:
https://fedorahosted.org/sssd/ticket/1884
Adds an internal resolver function that reads the TTL for SRV records as
specified by RFC-2181. Several internal c-ares definitions are used
until c-ares contains a function that exposes all this information via a
parsing function.
Reviewed-by: Pavel Březina <pbrezina@redhat.com> |
2be2220f15b2a819a80b07c8881822ef87053c69 |
|
14-Jul-2014 |
Pavel Březina <pbrezina@redhat.com> |
resolv: fix server sort by weight
When the server list consist only from servers with zero weight the
output list contained only one server.
Resolves:
https://fedorahosted.org/sssd/ticket/2357
Reviewed-by: Pavel Reichl <preichl@redhat.com> |
7aaf9138ccf7ab73883f28cfafd6e508d29ffa67 |
|
20-May-2014 |
Lukas Slebodnik <lslebodn@redhat.com> |
resolv: Do not try to free addrinfo in case of error
We should call freeaddrinfo only in situation if getaddrinfo succeeds.
It is not specified in RFC2553 the behaviour of calling freeaddrinfo
with the NULL argument. It is more portable to do not rely on undocumented
behaviour of glibc.
http://www.ietf.org/rfc/rfc2553.txt [Page 28]
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
a2633fd69609f16e2972013713bf8eeb6802b990 |
|
07-Apr-2014 |
Lukas Slebodnik <lslebodn@redhat.com> |
Remove unused argument from resolv_gethostbyname_dns_parse
Reviewed-by: Pavel Reichl <preichl@redhat.com> |
a51ab133bb91caf219ebc459375e9a55ebf2b123 |
|
17-Feb-2014 |
Pavel Březina <pbrezina@redhat.com> |
resolv_gethostbyname_dns_parse(): remove tmp_ctx
Resolves:
https://fedorahosted.org/sssd/ticket/2198
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
83bf46f4066e3d5e838a32357c201de9bd6ecdfd |
|
12-Feb-2014 |
Nikolai Kondrashov <Nikolai.Kondrashov@redhat.com> |
Update DEBUG* invocations to use new levels
Use a script to update DEBUG* macro invocations, which use literal
numbers for levels, to use bitmask macros instead:
grep -rl --include '*.[hc]' DEBUG . |
while read f; do
mv "$f"{,.orig}
perl -e 'use strict;
use File::Slurp;
my @map=qw"
SSSDBG_FATAL_FAILURE
SSSDBG_CRIT_FAILURE
SSSDBG_OP_FAILURE
SSSDBG_MINOR_FAILURE
SSSDBG_CONF_SETTINGS
SSSDBG_FUNC_DATA
SSSDBG_TRACE_FUNC
SSSDBG_TRACE_LIBS
SSSDBG_TRACE_INTERNAL
SSSDBG_TRACE_ALL
";
my $text=read_file(\*STDIN);
my $repl;
$text=~s/
^
(
.*
\b
(DEBUG|DEBUG_PAM_DATA|DEBUG_GR_MEM)
\s*
\(\s*
)(
[0-9]
)(
\s*,
)
(
\s*
)
(
.*
)
$
/
$repl = $1.$map[$3].$4.$5.$6,
length($repl) <= 80
? $repl
: $1.$map[$3].$4."\n".(" " x length($1)).$6
/xmge;
print $text;
' < "$f.orig" > "$f"
rm "$f.orig"
done
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Reviewed-by: Stephen Gallagher <sgallagh@redhat.com>
Reviewed-by: Simo Sorce <simo@redhat.com> |
a3c8390d19593b1e5277d95bfb4ab206d4785150 |
|
12-Feb-2014 |
Nikolai Kondrashov <Nikolai.Kondrashov@redhat.com> |
Make DEBUG macro invocations variadic
Use a script to update DEBUG macro invocations to use it as a variadic
macro, supplying format string and its arguments directly, instead of
wrapping them in parens.
This script was used to update the code:
grep -rwl --include '*.[hc]' DEBUG . |
while read f; do
mv "$f"{,.orig}
perl -e \
'use strict;
use File::Slurp;
my $text=read_file(\*STDIN);
$text=~s#(\bDEBUG\s*\([^(]+)\((.*?)\)\s*\)\s*;#$1$2);#gs;
print $text;' < "$f.orig" > "$f"
rm "$f.orig"
done
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Reviewed-by: Stephen Gallagher <sgallagh@redhat.com>
Reviewed-by: Simo Sorce <simo@redhat.com> |
87158890d6e7239167d7c8089070f3d2cdf5e58d |
|
05-Sep-2013 |
Pavel Březina <pbrezina@redhat.com> |
resolv_sort_srv_reply: remove unnecessary mem_ctx |
867174c9d98d703e746b3fde7e48be682b589053 |
|
24-Jul-2013 |
Michal Zidek <mzidek@redhat.com> |
Lower timeout to contact DNS server
c-ares timeout to wait for response from DNS server
before moving to next DNS server is lowered from 5s
to 2s.
Partially solves https://fedorahosted.org/sssd/ticket/1966 |
7486dea9f5f7b2a6fbbacc6db740a82140b6377c |
|
20-May-2013 |
Lukas Slebodnik <lslebodn@redhat.com> |
Fixing critical format string issues.
--missing arguments.
--format '%s', but argument is integer.
--wrong format string, examle: '%\n' |
7c091610f5b35e8ba89da839322f6591f1e7619b |
|
07-May-2013 |
Jakub Hrozek <jhrozek@redhat.com> |
Actually use the index parameter in resolv_get_sockaddr_address_index |
38ebc764eeb7693e0c4f0894d6687e54fbba871b |
|
03-May-2013 |
Jakub Hrozek <jhrozek@redhat.com> |
dyndns: New option dyndns_update_ptr
https://fedorahosted.org/sssd/ticket/1832
While some servers, such as FreeIPA allow the PTR record to be
synchronized when the forward record is updated, other servers,
including Active Directory, require that the PTR record is synchronized
manually.
This patch adds a new option, dyndns_update_ptr that automatically
generates appropriate DNS update message for updating the reverse zone.
This option is off by default in the IPA provider.
Also renames be_nsupdate_create_msg to be_nsupdate_create_fwd_msg |
a398adc5b40381fc567a2aee1841b26af78aea17 |
|
03-May-2013 |
Jakub Hrozek <jhrozek@redhat.com> |
resolver: Return PTR record as string
This is a requirement to update the PTR records.
Includes a unit test. |
44fc7e53b403d45576ab61d2dea4608e323ed332 |
|
03-Apr-2013 |
Jakub Hrozek <jhrozek@redhat.com> |
Centralize resolv_init, remove resolv context list |
584eda085e83a428f2c39dadf0d7adeaff5c87f4 |
|
03-Apr-2013 |
Jakub Hrozek <jhrozek@redhat.com> |
Init failover with be_res options |
274fe6a4f8bcb23e31929430110c0b52e9ce233a |
|
03-Apr-2013 |
Jakub Hrozek <jhrozek@redhat.com> |
Check for correct variable name
https://fedorahosted.org/sssd/ticket/1864 |
47c676a3ae558b87837955cf1a801c7b434d748e |
|
19-Dec-2012 |
Pavel Březina <pbrezina@redhat.com> |
use talloc_zfree when freeing rhostent in resolver
We should use talloc_zfree() when freeing state variables, so we
can later avoid undesirable access after free. |
4f945b6b3646fb982cc8e3c41c38059052f2240f |
|
18-Dec-2012 |
Jakub Hrozek <jhrozek@redhat.com> |
RESOLV: Do not steal the resulting hostent on error
https://fedorahosted.org/sssd/ticket/1706 |
73ea053bace5c63d61f7b949e5e0bb35f2463cb8 |
|
05-Dec-2012 |
Jakub Hrozek <jhrozek@redhat.com> |
RESOLV: return ENOENT if the address list is empty |
58b335985e75672e4de699351ab1182cbd7aa990 |
|
16-Jul-2012 |
Pavel Březina <pbrezina@redhat.com> |
resolv_gethostbyname_send: strdup hostname to work properly when hostname is allocated on stack
If we provide a hostname that was allocated on stack, it may contain
invalid data in the time when it is actually resolved.
This patch fixes it. |
64f398dca52df6313169f33cfc20a69d51c3bc2b |
|
29-Mar-2012 |
Jakub Hrozek <jhrozek@redhat.com> |
Return correct resolv_status on resolver timeout
https://fedorahosted.org/sssd/ticket/1274 |
f82ea00868e8917a9fb4f8e820817d8657370e46 |
|
20-Dec-2011 |
Jakub Hrozek <jhrozek@redhat.com> |
Resolver: Introduce a per-request timeout |
8db778c4a34b38224712bec0701303550781dcd5 |
|
31-Oct-2011 |
Jakub Hrozek <jhrozek@redhat.com> |
resolver: Free the whole hostent structure
We would only free the hostent structure itself, not its contents. Use a
wrapper provided by c-ares to do so. |
55a89b86267239fc4a8bd62a2496ddbc36d9a024 |
|
13-Jul-2011 |
Jakub Hrozek <jhrozek@redhat.com> |
Use ares_search instead of ares_query for hostname resolution
ares_query does not take search or domain directives from
/etc/resolv.conf into account
https://fedorahosted.org/sssd/ticket/922 |
19c6d0bf5346dc1862d14f7f3d886895cfb4d548 |
|
11-Jul-2011 |
Jakub Hrozek <jhrozek@redhat.com> |
Allow returning arbitrary address from resolv_hostent as string |
3136a82b9d76283b10244a9768e1f325503995d5 |
|
11-Jul-2011 |
Jakub Hrozek <jhrozek@redhat.com> |
Split reading resolver family order into a separate function |
7087d51975f4059591c04718def24ba7b753644c |
|
30-Jun-2011 |
Sumit Bose <sbose@redhat.com> |
Add sockaddr_storage to sdap_service |
fde4194a9bc18932c6cfdc44e69a4376feb26208 |
|
17-Jun-2011 |
Jakub Hrozek <jhrozek@redhat.com> |
Provide TTL structure names for c-ares < 1.7
https://fedorahosted.org/sssd/ticket/898
In c-ares 1.7, the upstream renamed the addrttl/addr6ttl structures to
ares_addrttl/ares_addr6ttl so they are in the ares_ namespace.
Because they are committed to stable ABI, the contents are the same, just
the name changed -- so it is safe to just #define the new name for older
c-ares version in case the new one is not detected in configure time. |
1240496176a07e804c57d43926509d5ccbf0fc41 |
|
15-Jun-2011 |
Jakub Hrozek <jhrozek@redhat.com> |
Switch resolver to using resolv_hostent and honor TTL |
3d334807f302603b81996b41f2a365ce75f36d17 |
|
15-Jun-2011 |
Jakub Hrozek <jhrozek@redhat.com> |
Resolve hosts by name from DNS into resolv_hostent |
b32ff5bfbca039aaffbe07b85312362f7f6e69cd |
|
15-Jun-2011 |
Jakub Hrozek <jhrozek@redhat.com> |
Resolve hosts by name from files into resolv_hostent |
58bddcfd77bf21290c42321dbf314b9e1f532e81 |
|
15-Jun-2011 |
Jakub Hrozek <jhrozek@redhat.com> |
Add new resolv_hostent data structure and utility functions |
bfdcff2b28f399d236b592d13663c7283d6eac2c |
|
02-Jun-2011 |
Jakub Hrozek <jhrozek@redhat.com> |
Add utility function to return IP address as string |
4ebd399129fa64cd3d789bf98b8587c2351d4d3e |
|
12-May-2011 |
Jakub Hrozek <jhrozek@redhat.com> |
Set c-ares to retry nameservers
https://fedorahosted.org/sssd/ticket/867 |
3241a0b89ea769c9d01b316136880cf2a8d3407f |
|
14-Dec-2010 |
Stephen Gallagher <sgallagh@redhat.com> |
Reschedule the fd timeout for secondary lookups
We were unscheduling the timeout handler after the first lookup
(A or AAAA) returned, but not rescheduling it if we went on to
check the secondary record type. This resulted in the resolver
never returning a result for the secondary lookup, which can mean
that logins/screen unlocks after VPN drop or suspend/resume might
never complete.
Fixes https://fedorahosted.org/sssd/ticket/729 |
aa5e1008d46f63c5317c890bc9a849e02939cf23 |
|
14-Dec-2010 |
Stephen Gallagher <sgallagh@redhat.com> |
Fix timeouts for DNS resolver
options.tries specifies the number of retries. Setting this to
zero means to try exactly once. Previously we were always trying
twice (internally). We want to simply honor the SSSD configuration
and fail over to the next server (or go offline) after one try. |
09f6d093d38744fc1ba8db5e031ac0f16282210d |
|
24-Nov-2010 |
Jakub Hrozek <jhrozek@redhat.com> |
Internal DNS resolver should check /etc/hosts
https://fedorahosted.org/sssd/ticket/686 |
83bc461f812b3c3df260b5f75d84b34bb1135062 |
|
30-Apr-2010 |
Stephen Gallagher <sgallagh@redhat.com> |
Add dns_resolver_timeout option
We had a hard-coded timeout of five seconds for DNS lookups in the
async resolver. This patch adds an option 'dns_resolver_timeout'
to specify this value (Default: 5) |
0d72f05cc87f42a8c2856c96501c64d69541be00 |
|
30-Apr-2010 |
Jakub Hrozek <jhrozek@redhat.com> |
Support SRV servers in failover
Adds a new failover API call fo_add_srv_server that allows the caller
to specify a server that is later resolved into a list of specific
servers using SRV requests.
Also adds a new failover option that specifies how often should the
servers resolved from SRV query considered valid until we need a
refresh.
The "real" servers to connect to are returned to the user as usual,
using the fo_resolve_service_{send,recv} calls.
Make SRV resolution work with c-ares 1.6 |
fbae85bcb4b3940024f8e3c127fac9da3671302d |
|
30-Apr-2010 |
Jakub Hrozek <jhrozek@redhat.com> |
Sort SRV replies according to RFC 2782
RFC 2782 defines a way to sort replies to a SRV query. In short, the
algorithm sorts all replies by priority and then does a weight-based
selection for every priority level.
For details, please see the sections "Usage rules" for overview of the
algorithm and section "The 'Weight' field" for description on the weight
selection. |
74ff3d42d38feab9aaf1db86f228c41418b8b592 |
|
26-Apr-2010 |
Jakub Hrozek <jhrozek@redhat.com> |
Do not mark a request as failed twice |
7c837ddd5b1737b56fc475f7e347efdb067e2330 |
|
25-Mar-2010 |
Sumit Bose <sbose@redhat.com> |
Fix warnings from -Wmissing-field-initializers
This patch removes some tab-indentations from pamsrv.c, too. |
e0bb119bdc1549d731f371202428c0cb667d3388 |
|
22-Feb-2010 |
Jakub Hrozek <jhrozek@redhat.com> |
Restrict family lookups
Adds a new option that tells resolver which address family to prefer or
use exclusively.
Fixes: #404 |
1c48b5a62f73234ed26bb20f0ab345ab61cda0ab |
|
18-Feb-2010 |
Stephen Gallagher <sgallagh@redhat.com> |
Rename server/ directory to src/
Also update BUILD.txt |