summaryrefslogtreecommitdiffstats
path: root/src/tests/cmocka/test_utils.c
Commit message (Collapse)AuthorAgeFilesLines
* Add add_strings_lists() utility functionSumit Bose2014-11-051-0/+111
| | | | Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* UTIL: Add functions for replacing whitespaces.Lukas Slebodnik2014-07-281-0/+2
| | | | | Reviewed-by: Pavel Reichl <preichl@redhat.com> Reviewed-by: Michal Židek <mzidek@redhat.com>
* test_utils: Use common header file for libsss_util tests.Lukas Slebodnik2014-07-281-1/+1
| | | | | Reviewed-by: Pavel Reichl <preichl@redhat.com> Reviewed-by: Michal Židek <mzidek@redhat.com>
* UTIL: rename find_subdomain_by_namePavel Reichl2014-07-221-23/+23
| | | | | | | | | The function was named "find_subdomain" yet it could find both main domain and subdomain. sed 's/find_subdomain_by_name/find_domain_by_name/' -i `find . -name "*.[ch]"` Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
* UTIL: rename find_subdomain_by_sidPavel Reichl2014-07-221-14/+14
| | | | | | | | | The function was named "find_subdomain" yet it could find both main domain and subdomain. sed 's/find_subdomain_by_sid/find_domain_by_sid/' -i `find . -name "*.[ch]"` 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: sss_ssh - textual public key formatPavel Reichl2014-06-181-0/+3
| | | | Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
* TEST: Add test for expand homedirLukas Slebodnik2014-06-021-0/+190
|
* Make DEBUG macro invocations variadicNikolai Kondrashov2014-02-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* NSS: Don't use printf(3) on user provided strings.Stef Walter2014-01-121-4/+2
| | | | | | | | | | | | | | | | | | | | This also fixes several corner cases and crashers. It's not prudent to pass user input to (even admin) input as a format string to printf, and various distros now check for this. This can cause accessing memory incorrectly, and various also various libc abort()'s. In addition various assumptions were made about full_name_format that aren't necessarily the case if the user uses a more complex format. Use safe-printf.c implementation for formatting full_name_format. Adapt the NSS resolver so it doesn't barf on formatted strings that are shorter than expected given a full_name_format. Tests added and updated appropriately.
* Use lower-case name for case-insensitive searchesSumit Bose2013-12-191-0/+38
| | | | | | | | | | | | The patch makes sure that a completely lower-cased version of a fully qualified name is used for case insensitive searches. Currently there are code paths where the domain name was used as configured and was not lower-cased. To make sure this patch does not break with old entries in the cache or case sensitive domains a third template was added to the related filters templates which is either filled with a completely lower-cased version or with the old version. The other two template values are unchanged.
* TESTS: Remove test dir after successful testsLukas Slebodnik2013-11-181-1/+6
| | | | | test_utils removed files from test_dir before test execution, but files wasn't clean up after successful test execution.
* Add utility to handle Well-Known SIDsSumit Bose2013-11-151-0/+110
|
* sss_names_init: allow empty domain nameSumit Bose2013-11-151-0/+122
| | | | | If no domain name is specified the global name pattern and regular expression will be returned.
* Enhance/add unit tests for find_subdomain_by_sid/nameSumit Bose2013-11-041-0/+263
|
* tests: Use right format string for type size_tLukas Slebodnik2013-10-251-3/+3
| | | | | | | | This patch fixes few format string warnings in the file test_utils.c src/tests/cmocka/test_utils.c:54:56: warning: format specifies type 'unsigned int' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat]
* find_subdomain_by_sid: skip domains with missing domain_idSumit Bose2013-10-251-0/+221