summaryrefslogtreecommitdiffstats
path: root/src/tests/cmocka/test_dyndns.c
Commit message (Collapse)AuthorAgeFilesLines
* test_dyndns: sss_iface_addr_list_get can return more valuesLukas Slebodnik2014-08-221-0/+46
| | | | | | | Resolves: https://fedorahosted.org/sssd/ticket/2405 Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* test_dyndns: Use different talloc context in wrapped functions.Lukas Slebodnik2014-08-221-2/+21
| | | | | | | | | | | | 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>
* dyndns_test: Use right socket length of for IPv4 address.Lukas Slebodnik2014-08-221-1/+1
| | | | | | | | | | | | | | 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>
* TOOLS: Always debug to stderrJakub Hrozek2014-07-091-1/+1
| | | | | | | | | 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>
* TESTS: Add confdb domain base DN to sss_test_ctxJakub Hrozek2014-07-011-4/+1
| | | | | | | | 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>
* TEST: Remove unused argument sysdb_pathLukas Slebodnik2014-03-121-4/+3
| | | | | | | | | 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>
* test_dyndns: Test right variable after allocation.Lukas Slebodnik2014-02-171-1/+1
| | | | Reviewed-by: Pavel Březina <pbrezina@redhat.com>
* Make DEBUG macro invocations variadicNikolai Kondrashov2014-02-121-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* tests: Silence alignment warning in tests.Michal Zidek2013-10-171-5/+9
|
* dyndns timeout test: catch SIGCHLD handler eventsPavel Březina2013-07-171-0/+12
| | | | | | https://fedorahosted.org/sssd/ticket/1992 dyndns test will crash with this patch
* Fix dyndns timer initializationJakub Hrozek2013-05-271-1/+5
| | | | | | | 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.
* tests: Do not set cwd twiceJakub Hrozek2013-05-131-1/+0
| | | | The tests_set_cwd() function was called twice in the dyndns unit test.
* dyndns: new option dyndns_authJakub Hrozek2013-05-031-0/+3
| | | | | | 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.
* dyndns: new option dyndns_force_tcpJakub Hrozek2013-05-031-3/+3
| | | | | | | 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.
* dyndns: new option dyndns_refresh_intervalJakub Hrozek2013-05-031-2/+83
| | | | | | | 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.
* Convert IPA-specific options to be back-end agnosticJakub Hrozek2013-05-031-1/+1
| | | | | | 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.
* Refactor dynamic DNS updatesJakub Hrozek2013-05-031-0/+339
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.