bad17a253bf979f23b2294c3720300d1053744b1 |
|
10-Aug-2016 |
Lukas Slebodnik <lslebodn@redhat.com> |
dyndns-tests: Fix false positive failures
The child process finished faster then it has handled by parent
and therefore it timed out. It's the similar solution as in
b3074dca3acebd91437ef13d3329d6d65d655215
[ RUN ] dyndns_test_error
(Fri Jul 29 16:12:00:621444 2016) [sssd] [nsupdate_child_timeout] (0x0020):
Timeout reached for dynamic DNS update
Could not run the test - check test fixtures
[ ERROR ] dyndns_test_error
Reviewed-by: Petr Čech <pcech@redhat.com> |
0429e21a45aa26c133cb4d8285a60446a0611e44 |
|
20-Jun-2016 |
Pavel Březina <pbrezina@redhat.com> |
Rename dp_dyndns.c to be_dyndns.c
Reviewed-by: Sumit Bose <sbose@redhat.com>
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
892ddeb5190dd5c1ffa26a95142a10a0034fc5e3 |
|
20-Jun-2016 |
Pavel Březina <pbrezina@redhat.com> |
Rename dp_dyndns.h to be_dyndns.h
Reviewed-by: Sumit Bose <sbose@redhat.com>
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
a741d0c4345dceb27dfbb20b81fd858a514b47cd |
|
05-Oct-2015 |
Pavel Reichl <preichl@redhat.com> |
DYNDNS: improve nsupdate_msg_add_fwd()
Update nsupdate_msg_add_fwd() to group commands by address family
processed IP address belongs to.
It's better to group removing old A addresses and adding new A
addresses in a single transaction. Same goes for AAAA addresses.
Separate transaction for A and AAAA addresses updates are important
because server might block updates for one of these families and thus
the update even for the non-blocked address family would unnecessarily
fail.
For more details please see:
https://fedorahosted.org/sssd/wiki/DesignDocs/DDNSMessagesUpdate
Resolves:
https://fedorahosted.org/sssd/ticket/2495
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
eeac17ebbe38f16deaa8599231cccfc97aaac85c |
|
22-Sep-2015 |
Pavel Reichl <preichl@redhat.com> |
DDNS: execute nsupdate for single update of PTR rec
nsupdate fails definitely if any of update request fails when GSSAPI is used.
As tmp solution nsupdate is executed for each update.
Resolves:
https://fedorahosted.org/sssd/ticket/2783
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
50c9d542e8bf641412debaa82a4dcf67ddb72258 |
|
18-Sep-2015 |
Lukas Slebodnik <lslebodn@redhat.com> |
tests: Use unique name for TEST_PATH
We had a cases in patch where two tests were using the same TEST_PATH
and therefore they were stepping each other to the same files
which caused failures. These failures are not easy to reproduce.
This patch uses macro BASE_FILE_STEM for unique name. It should prevent
copy&paste problem resulting to intermittent failures.
@see also
https://www.gnu.org/software/make/manual/html_node/Automatic-Variables.html
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
b3074dca3acebd91437ef13d3329d6d65d655215 |
|
14-Sep-2015 |
Lukas Slebodnik <lslebodn@redhat.com> |
dyndns-tests: Simulate job in wrapped execv
The function be_nsupdate_send fork a child for execution of the utility
nsupdate.
The child process builds nsupdate args in the function
be_nsupdate_args and then execute the utility.
Meanwhile the parent process register handlers for child and timeout
for canceling the long lasting child.
nsupdate_child_send -> child_handler_setup
You can see in following log file that the wrapped version of execv
function might be very fast and therefore parent can register handlers
after finishing child. This is a reason why there is a child timeout.
(10:18:48:556001 2015) [sssd] [be_nsupdate_args] (0x0200): nsupdate auth type: GSS-TSIG
(10:18:48:556126 2015) [sssd] [__wrap_execv] (0x0200): nsupdate success test case
(10:18:48:556200 2015) [sssd] [__wrap_execv] (0x1000): Child exiting with status 0
(10:18:48:557218 2015) [sssd] [child_handler_setup] (0x2000): Setting up signal handler up for pid [3957]
(10:18:48:560987 2015) [sssd] [child_handler_setup] (0x2000): Signal handler set up for pid [3957]
(10:18:50:608520 2015) [sssd] [nsupdate_child_timeout] (0x0020): Timeout reached for dynamic DNS update
(10:18:50:681525 2015) [sssd] [be_nsupdate_done] (0x0040): nsupdate child execution failed [1432158233]: Dynamic DNS update timed out
(10:18:50:687031 2015) [sssd] [dyndns_test_ok] (0x1000): Child request returned [1432158233]: Unknown error 1432158233
The patch simulate a work in wrapped function with small delay.
It should be enough time for the parent process to registering a child.
Based on patch from Jurica Stanojkovic <jurica.stanojkovic@rt-rk.com>
Thank you.
Resolves:
https://fedorahosted.org/sssd/ticket/2283
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
6fd5306145d98ea3bab7f32aa66475f610f388ce |
|
14-Aug-2015 |
Pavel Reichl <preichl@redhat.com> |
TESTS: UT for sss_iface_addr_list_as_str_list()
Resolves:
https://fedorahosted.org/sssd/ticket/2495
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
b0a8ed519554f8896e35812e0759862c33f157fe |
|
24-Jul-2015 |
Pavel Reichl <preichl@redhat.com> |
DYNDNS: support for dualstack
When dyndns_iface option was not used, address of connection to LDAP
was used. This patch proposes following change:
* Interface containing address of connection is found.
* All A and AAAA addresses of this interface are collected.
* Collected addresses are sent during DDNS update.
* Function sss_iface_addr_add() is removed.
Resolves:
https://fedorahosted.org/sssd/ticket/2558 |
1112e84494bcfd0f658e073d25f15ed877d047aa |
|
24-Jul-2015 |
Pavel Reichl <preichl@redhat.com> |
TESTS: dyndns tests support AAAA addresses
Resolves:
https://fedorahosted.org/sssd/ticket/2558 |
aa3fd6fde3888c0e333cad852ae5b4f671d55f58 |
|
24-Jul-2015 |
Pavel Reichl <preichl@redhat.com> |
DYNDNS: sss_iface_addr_list_get return ENOENT
If none of eligible interfaces matches ifname then ENOENT is returned.
Resolves:
https://fedorahosted.org/sssd/ticket/2549 |
d43c9d18fb263b1ea4071b20e93ce4994583f62f |
|
14-Jun-2015 |
Jakub Hrozek <jhrozek@redhat.com> |
TESTS: Add a common mock_be_ctx function
Reduces code duplication between tests.
Reviewed-by: Sumit Bose <sbose@redhat.com> |
4e5e846de22407f825fe3b4040d79606818a2419 |
|
11-Mar-2015 |
Jakub Hrozek <jhrozek@redhat.com> |
tests: convert all unit tests to cmocka 1.0 or later
All tests now use the cmocka-1.0-compatible API.
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
cb4742876508a08ba90c82466c9dba708e4bf999 |
|
09-Jan-2015 |
Pavel Březina <pbrezina@redhat.com> |
tests: remove code duplication in single domain cleanup
Reviewed-by: Michal Židek <mzidek@redhat.com> |
1a783fb0be9a48a0abdfe8b52fce551d530487ce |
|
22-Aug-2014 |
Lukas Slebodnik <lslebodn@redhat.com> |
test_dyndns: sss_iface_addr_list_get can return more values
Resolves:
https://fedorahosted.org/sssd/ticket/2405
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
12e7e87ccbae0d5c2f338cd019ca51556cbcd3ae |
|
22-Aug-2014 |
Lukas Slebodnik <lslebodn@redhat.com> |
test_dyndns: Use different talloc context in wrapped functions.
Real functions use own allocation strategy. We use talloc in wrapped functions.
But wrapped functions should not use global_talloc_context,
leak_check_teardown will report false positive memory leaks.
leak_check_teardown()
./src/tests/cmocka/test_dyndns.c:378: error: Failure!
[ FAILED ] dyndns_test_ok_dyndns_test_teardown
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
e210ed5da220acebb6751db4466fe352de08eaeb |
|
22-Aug-2014 |
Lukas Slebodnik <lslebodn@redhat.com> |
dyndns_test: Use right socket length of for IPv4 address.
man inet_ntop says:
The caller specifies the number of bytes available in this buffer
in the argument size.
AF_INET
src points to a struct in_addr (in network byte order) which is
converted to an IPv4 network address in the dotted-decimal
format, "ddd.ddd.ddd.ddd". The buffer dst must be at least
INET_ADDRSTRLEN bytes long.
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
6b57784f0f175275fd900eca21c77415e3a5ea52 |
|
09-Jul-2014 |
Jakub Hrozek <jhrozek@redhat.com> |
TOOLS: Always debug to stderr
https://fedorahosted.org/sssd/ticket/2348
Programs that are supposed to only be executed on the foreground should
log to stderr automatically.
Reviewed-by: Michal Židek <mzidek@redhat.com> |
919cfb623e9b725eaa654c6e1b513d1305057314 |
|
01-Jul-2014 |
Jakub Hrozek <jhrozek@redhat.com> |
TESTS: Add confdb domain base DN to sss_test_ctx
Creation of the path to the domain's confdb entry was duplicated in the
tests. Rather than adding yet another duplication, I added the path as
another field of the sss_test_ctx structure.
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com> |
a95c006f748fa9df0dd81509b51974133d2786af |
|
12-Mar-2014 |
Lukas Slebodnik <lslebodn@redhat.com> |
TEST: Remove unused argument sysdb_path
Name of sysdb file is automatically generated from domain name and db_path
in function sysdb_domain_init.
talloc_asprintf is called with arguments "%s/cache_%s.ldb", db_path, dom->name
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com> |
828cc04cd1ed9076faa6e1545055ae69a04f0f0f |
|
17-Feb-2014 |
Lukas Slebodnik <lslebodn@redhat.com> |
test_dyndns: Test right variable after allocation.
Reviewed-by: Pavel Březina <pbrezina@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> |
4cae8609b513c267af11c0409bfe1d17d3a5da2f |
|
17-Oct-2013 |
Michal Zidek <mzidek@redhat.com> |
tests: Silence alignment warning in tests. |
a7401bf72db3a6eb62b1628f9dd141f7118e3510 |
|
17-Jul-2013 |
Pavel Březina <pbrezina@redhat.com> |
dyndns timeout test: catch SIGCHLD handler events
https://fedorahosted.org/sssd/ticket/1992
dyndns test will crash with this patch |
3bd78eb2faf09635b8d307e4440ccb1420f80716 |
|
27-May-2013 |
Jakub Hrozek <jhrozek@redhat.com> |
Fix dyndns timer initialization
The dyndns init function was starting the timer even if the updates were
set to False. This patch splits the init of dynamic updates and the
timer into two functions so that the back end can start the updates
separately from reading the options. |
7aadf5bc2dff51a72878ed07cedd8e9e7646e96e |
|
13-May-2013 |
Jakub Hrozek <jhrozek@redhat.com> |
tests: Do not set cwd twice
The tests_set_cwd() function was called twice in the dyndns unit test. |
e15a9f81eb33066937710d7dee6976a3646d119c |
|
03-May-2013 |
Jakub Hrozek <jhrozek@redhat.com> |
dyndns: new option dyndns_auth
This options is mostly provided for future expansion. Currently it is
undocumented and both IPA and AD dynamic DNS updates default to
GSS-TSIG. Allowed values are GSS-TSIG and none. |
e45b81abe0aafa8a04bd64ac31a2fac63ce675b7 |
|
03-May-2013 |
Jakub Hrozek <jhrozek@redhat.com> |
dyndns: new option dyndns_force_tcp
https://fedorahosted.org/sssd/ticket/1831
Adds a new option that can be used to force nsupdate to only use TCP to
communicate with the DNS server. |
5a4239490c7fb7d732180a9d40f27f0247c56631 |
|
03-May-2013 |
Jakub Hrozek <jhrozek@redhat.com> |
dyndns: new option dyndns_refresh_interval
This new options adds the possibility of updating the DNS entries
periodically regardless if they have changed or not. This feature
will be useful mainly in AD environments where the Windows clients
periodically update their DNS records. |
04868f1573f4b26ef34610b6d7069172f93bd8ab |
|
03-May-2013 |
Jakub Hrozek <jhrozek@redhat.com> |
Convert IPA-specific options to be back-end agnostic
This patch introduces new options for dynamic DNS updates that are not
specific to any back end. The current ipa dyndns options are still
usable, just with a deprecation warning. |
9cb46bc62f22e0104f1b41a423b014c281ef5fc2 |
|
03-May-2013 |
Jakub Hrozek <jhrozek@redhat.com> |
Refactor dynamic DNS updates
Provides two new layers instead of the previous IPA specific layer:
1) dp_dyndns.c -- a very generic dyndns layer on the DP level. Its
purpose it to make it possible for any back end to use dynamic DNS
updates.
2) sdap_dyndns.c -- a wrapper around dp_dyndns.c that utilizes some
LDAP-specific features like autodetecting the address from the LDAP
connection.
Also converts the dyndns code to new specific error codes. |