nss_wrapper.git
10 years agoUpdate to version 1.0.2. nss_wrapper-1.0.2
Andreas Schneider [Tue, 8 Apr 2014 07:58:01 +0000 (09:58 +0200)]
Update to version 1.0.2.

Signed-off-by: Andreas Schneider <asn@samba.org>
10 years agotestsuite: Fix NULL checks.
Andreas Schneider [Tue, 8 Apr 2014 07:52:40 +0000 (09:52 +0200)]
testsuite: Fix NULL checks.

Found by Coverity.

Signed-off-by: Andreas Schneider <asn@samba.org>
10 years agonwrap: Make nss_wrapper_hosts_enabled() public.
Andreas Schneider [Tue, 8 Apr 2014 07:44:15 +0000 (09:44 +0200)]
nwrap: Make nss_wrapper_hosts_enabled() public.

10 years agonwrap: Make nss_wrapper_enabled public.
Andreas Schneider [Tue, 8 Apr 2014 07:43:04 +0000 (09:43 +0200)]
nwrap: Make nss_wrapper_enabled public.

Signed-off-by: Andreas Schneider <asn@samba.org>
10 years agocmake: Only set policy in cmake 3.0.
Andreas Schneider [Tue, 8 Apr 2014 07:40:15 +0000 (09:40 +0200)]
cmake: Only set policy in cmake 3.0.

Signed-off-by: Andreas Schneider <asn@samba.org>
10 years agocmake: Fix configure warning with cmake 3.0.
Andreas Schneider [Mon, 7 Apr 2014 10:14:50 +0000 (12:14 +0200)]
cmake: Fix configure warning with cmake 3.0.

10 years agocmake: Create the compile command database by default.
Andreas Schneider [Fri, 4 Apr 2014 07:32:21 +0000 (09:32 +0200)]
cmake: Create the compile command database by default.

Signed-off-by: Andreas Schneider <asn@samba.org>
10 years agotests: Check that the address has the correct family.
Andreas Schneider [Tue, 1 Apr 2014 11:26:22 +0000 (13:26 +0200)]
tests: Check that the address has the correct family.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agonwrap: Set correct family for IPv6 address.
Andreas Schneider [Tue, 1 Apr 2014 11:27:11 +0000 (13:27 +0200)]
nwrap: Set correct family for IPv6 address.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agotests: Add test that getaddrinfo() returns the IPv6 address.
Andreas Schneider [Tue, 18 Mar 2014 08:00:36 +0000 (09:00 +0100)]
tests: Add test that getaddrinfo() returns the IPv6 address.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agosrc: Fix looking up a fqdn with getaddrinfo().
Andreas Schneider [Tue, 18 Mar 2014 07:43:21 +0000 (08:43 +0100)]
src: Fix looking up a fqdn with getaddrinfo().

This fixes 'getent ahostsv6'.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agotests: Add test for gethostbyname2().
Andreas Schneider [Mon, 17 Mar 2014 12:18:16 +0000 (13:18 +0100)]
tests: Add test for gethostbyname2().

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agosrc: Add gethostbyname2() for getent.
Andreas Schneider [Mon, 17 Mar 2014 09:34:42 +0000 (10:34 +0100)]
src: Add gethostbyname2() for getent.

This fixes 'getent hosts <fqdn>' with glibc.

Signed-Off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agosrc: Add address family filter to nwrap_files_gethostbyname().
Andreas Schneider [Mon, 17 Mar 2014 12:19:03 +0000 (13:19 +0100)]
src: Add address family filter to nwrap_files_gethostbyname().

Signed-Off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agoREADME: Fix prefix env variable name.
Andreas Schneider [Thu, 13 Mar 2014 13:58:23 +0000 (14:58 +0100)]
README: Fix prefix env variable name.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agotests: Add test_gethostent.c
Andreas Schneider [Thu, 13 Mar 2014 12:46:22 +0000 (13:46 +0100)]
tests: Add test_gethostent.c

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agotests: Add test_gethostent.
Andreas Schneider [Thu, 13 Mar 2014 09:35:47 +0000 (10:35 +0100)]
tests: Add test_gethostent.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agosrc: Fix segfault in 'getent hosts' without aliases.
Andreas Schneider [Thu, 13 Mar 2014 09:20:46 +0000 (10:20 +0100)]
src: Fix segfault in 'getent hosts' without aliases.

The glibc's 'getent' always dereferences he->h_aliases[i], so we need
to allocate it.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agoBump version to 1.0.1. nss_wrapper-1.0.1
Andreas Schneider [Tue, 4 Feb 2014 11:24:44 +0000 (12:24 +0100)]
Bump version to 1.0.1.

10 years agocmake: Add nss_wrapper-config.cmake.
Andreas Schneider [Tue, 4 Feb 2014 11:23:37 +0000 (12:23 +0100)]
cmake: Add nss_wrapper-config.cmake.

10 years agocmake: Use NSS_WRAPPER_LOCATION.
Andreas Schneider [Tue, 4 Feb 2014 11:41:26 +0000 (12:41 +0100)]
cmake: Use NSS_WRAPPER_LOCATION.

10 years agocmake: Add --libs output for pkg-config.
Andreas Schneider [Tue, 4 Feb 2014 11:22:37 +0000 (12:22 +0100)]
cmake: Add --libs output for pkg-config.

10 years agocpack: Don't package the obj directory.
Andreas Schneider [Tue, 4 Feb 2014 11:19:18 +0000 (12:19 +0100)]
cpack: Don't package the obj directory.

10 years agosrc: Remove the localhost shortcut. nss_wrapper-1.0.0
Andreas Schneider [Thu, 30 Jan 2014 15:15:07 +0000 (16:15 +0100)]
src: Remove the localhost shortcut.

If we do lookups for the hostname this could lead to wrong results if
socket_wrapper loaded and the libnss_myhostname module in use.

This could be tested with:

getent ahosts <myhostname>

Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agoAdd ChangeLog.
Andreas Schneider [Thu, 30 Jan 2014 17:06:56 +0000 (18:06 +0100)]
Add ChangeLog.

10 years agoAdd TODO.
Andreas Schneider [Fri, 24 Jan 2014 09:45:06 +0000 (10:45 +0100)]
Add TODO.

10 years agocmake: Update DefineInstallationPaths.cmake.
Andreas Schneider [Wed, 22 Jan 2014 09:33:40 +0000 (10:33 +0100)]
cmake: Update DefineInstallationPaths.cmake.

10 years agoUpdate README.
Andreas Schneider [Wed, 22 Jan 2014 09:33:06 +0000 (10:33 +0100)]
Update README.

10 years agocmake: Add cmake config mode file.
Andreas Schneider [Wed, 22 Jan 2014 09:29:07 +0000 (10:29 +0100)]
cmake: Add cmake config mode file.

10 years agocmake: Add pkgconfig file.
Andreas Schneider [Wed, 22 Jan 2014 09:28:11 +0000 (10:28 +0100)]
cmake: Add pkgconfig file.

10 years agonwrap: Fix fd checks.
Andreas Schneider [Fri, 20 Dec 2013 14:53:42 +0000 (15:53 +0100)]
nwrap: Fix fd checks.

10 years agocmake: Add a valgrind suppression file.
Andreas Schneider [Fri, 20 Dec 2013 12:33:29 +0000 (13:33 +0100)]
cmake: Add a valgrind suppression file.

10 years agonwrap: Don't call close on a fd of -1.
Andreas Schneider [Fri, 20 Dec 2013 12:32:50 +0000 (13:32 +0100)]
nwrap: Don't call close on a fd of -1.

valgrind complains about it.

10 years agonwrap: Fix loading the system libraries.
Andreas Schneider [Fri, 20 Dec 2013 12:21:31 +0000 (13:21 +0100)]
nwrap: Fix loading the system libraries.

Thanks metze!

10 years agotests: Add missing includes for test_nwrap_disabled.
Andreas Schneider [Fri, 20 Dec 2013 09:47:25 +0000 (10:47 +0100)]
tests: Add missing includes for test_nwrap_disabled.

This should fix the build on FreeBSD.

10 years agonwrap: Add a destructor to free resources.
Andreas Schneider [Fri, 20 Dec 2013 09:35:38 +0000 (10:35 +0100)]
nwrap: Add a destructor to free resources.

10 years agocmake: Check for printf format attribute.
Andreas Schneider [Fri, 20 Dec 2013 08:33:00 +0000 (09:33 +0100)]
cmake: Check for printf format attribute.

10 years agocmake: Fix the env name for the module variables.
Andreas Schneider [Fri, 20 Dec 2013 08:20:32 +0000 (09:20 +0100)]
cmake: Fix the env name for the module variables.

10 years agotests: Fix building nss module on Solaris.
Andreas Schneider [Fri, 20 Dec 2013 08:10:21 +0000 (09:10 +0100)]
tests: Fix building nss module on Solaris.

10 years agotests: Add a dummy nss module and load it.
Andreas Schneider [Thu, 19 Dec 2013 14:01:55 +0000 (15:01 +0100)]
tests: Add a dummy nss module and load it.

10 years agonwrap: Rename FN_NAME to FN_PREFIX.
Andreas Schneider [Thu, 19 Dec 2013 11:50:19 +0000 (12:50 +0100)]
nwrap: Rename FN_NAME to FN_PREFIX.

10 years agonwrap: Zero the allocated libc memory.
Andreas Schneider [Thu, 19 Dec 2013 10:18:40 +0000 (11:18 +0100)]
nwrap: Zero the allocated libc memory.

If not then this leads to setfaults cause the libc handle is pointing to
random memory.

10 years agonwrap: Fix function loading on Solaris.
Andreas Schneider [Thu, 19 Dec 2013 09:16:06 +0000 (10:16 +0100)]
nwrap: Fix function loading on Solaris.

10 years agotests: Load nss_wrapper for test_nwrap_disabled().
Andreas Schneider [Wed, 18 Dec 2013 16:27:17 +0000 (17:27 +0100)]
tests: Load nss_wrapper for test_nwrap_disabled().

We want to test the direct libc calls inside nss_wrapper.

10 years agonwrap: Only compile nwrap_getgrouplist if supported.
Andreas Schneider [Wed, 18 Dec 2013 08:42:17 +0000 (09:42 +0100)]
nwrap: Only compile nwrap_getgrouplist if supported.

10 years agonwrap: Fix loading posix functions on Solaris.
Andreas Schneider [Wed, 18 Dec 2013 08:40:14 +0000 (09:40 +0100)]
nwrap: Fix loading posix functions on Solaris.

10 years agonwrap: Remove copy and paste obsolete line.
Andreas Schneider [Wed, 18 Dec 2013 08:36:18 +0000 (09:36 +0100)]
nwrap: Remove copy and paste obsolete line.

10 years agonwrap: Remove obsolete nwrap_libc_fn().
Andreas Schneider [Tue, 17 Dec 2013 11:45:14 +0000 (12:45 +0100)]
nwrap: Remove obsolete nwrap_libc_fn().

10 years agonwrap: Add libc_getnameinfo().
Andreas Schneider [Tue, 17 Dec 2013 11:44:41 +0000 (12:44 +0100)]
nwrap: Add libc_getnameinfo().

10 years agotests: Add getaddrinfo libsocket test.
Andreas Schneider [Tue, 17 Dec 2013 11:40:52 +0000 (12:40 +0100)]
tests: Add getaddrinfo libsocket test.

10 years agonwrap: Add libc_getaddrinfo().
Andreas Schneider [Tue, 17 Dec 2013 11:40:41 +0000 (12:40 +0100)]
nwrap: Add libc_getaddrinfo().

10 years agonwrap: Add libc_gethostbyaddr_r().
Andreas Schneider [Tue, 17 Dec 2013 11:33:54 +0000 (12:33 +0100)]
nwrap: Add libc_gethostbyaddr_r().

10 years agonwrap: Add libc_gethostbyname_r().
Andreas Schneider [Tue, 17 Dec 2013 11:31:54 +0000 (12:31 +0100)]
nwrap: Add libc_gethostbyname_r().

10 years agotests: Add gethostname libnsl test.
Andreas Schneider [Tue, 17 Dec 2013 11:26:44 +0000 (12:26 +0100)]
tests: Add gethostname libnsl test.

10 years agonwrap: Add libc_gethostname().
Andreas Schneider [Tue, 17 Dec 2013 11:24:02 +0000 (12:24 +0100)]
nwrap: Add libc_gethostname().

10 years agonwrap: Add libc_gethostbyaddr().
Andreas Schneider [Tue, 17 Dec 2013 11:22:22 +0000 (12:22 +0100)]
nwrap: Add libc_gethostbyaddr().

10 years agonwrap: Add libc_gethostbyname().
Andreas Schneider [Tue, 17 Dec 2013 11:20:04 +0000 (12:20 +0100)]
nwrap: Add libc_gethostbyname().

10 years agotests: Add libnsl hostent test.
Andreas Schneider [Tue, 17 Dec 2013 11:17:42 +0000 (12:17 +0100)]
tests: Add libnsl hostent test.

10 years agonwrap: Add libc_gethostent().
Andreas Schneider [Tue, 17 Dec 2013 11:17:25 +0000 (12:17 +0100)]
nwrap: Add libc_gethostent().

10 years agonwrap: Add libc_sethostent().
Andreas Schneider [Tue, 17 Dec 2013 11:11:57 +0000 (12:11 +0100)]
nwrap: Add libc_sethostent().

10 years agonwrap: Add libc_getgrouplist().
Andreas Schneider [Tue, 17 Dec 2013 11:09:56 +0000 (12:09 +0100)]
nwrap: Add libc_getgrouplist().

10 years agonwrap: Add libc_entgrent().
Andreas Schneider [Tue, 17 Dec 2013 11:07:48 +0000 (12:07 +0100)]
nwrap: Add libc_entgrent().

10 years agonwrap: Add libc_getgrent_r().
Andreas Schneider [Tue, 17 Dec 2013 11:06:34 +0000 (12:06 +0100)]
nwrap: Add libc_getgrent_r().

10 years agonwrap: Add libc_getgrent().
Andreas Schneider [Tue, 17 Dec 2013 11:02:43 +0000 (12:02 +0100)]
nwrap: Add libc_getgrent().

10 years agonwrap: Add libc_setgrent().
Andreas Schneider [Tue, 17 Dec 2013 11:01:42 +0000 (12:01 +0100)]
nwrap: Add libc_setgrent().

10 years agonwrap: Add libc_getgrgid_r().
Andreas Schneider [Tue, 17 Dec 2013 10:59:45 +0000 (11:59 +0100)]
nwrap: Add libc_getgrgid_r().

10 years agonwrap: Add libc_getgrgid().
Andreas Schneider [Tue, 17 Dec 2013 10:57:10 +0000 (11:57 +0100)]
nwrap: Add libc_getgrgid().

10 years agonwrap: Add libc_getgrnam_r().
Andreas Schneider [Tue, 17 Dec 2013 10:55:55 +0000 (11:55 +0100)]
nwrap: Add libc_getgrnam_r().

10 years agotests: Add test to check if libc functions are loaded correctly.
Andreas Schneider [Tue, 17 Dec 2013 10:52:12 +0000 (11:52 +0100)]
tests: Add test to check if libc functions are loaded correctly.

10 years agocmake: Simplify test calling.
Andreas Schneider [Tue, 17 Dec 2013 10:45:43 +0000 (11:45 +0100)]
cmake: Simplify test calling.

10 years agonwrap: Add libc_getgrnam().
Andreas Schneider [Tue, 17 Dec 2013 10:40:18 +0000 (11:40 +0100)]
nwrap: Add libc_getgrnam().

10 years agonwrap: Add libc_initgroups().
Andreas Schneider [Tue, 17 Dec 2013 10:38:48 +0000 (11:38 +0100)]
nwrap: Add libc_initgroups().

10 years agonwrap: Add libc_endpwent().
Andreas Schneider [Tue, 17 Dec 2013 10:36:18 +0000 (11:36 +0100)]
nwrap: Add libc_endpwent().

10 years agonwrap: Add libc_getpwent_r().
Andreas Schneider [Tue, 17 Dec 2013 10:33:03 +0000 (11:33 +0100)]
nwrap: Add libc_getpwent_r().

10 years agonwrap: Add libc_getpwent().
Andreas Schneider [Tue, 17 Dec 2013 10:27:31 +0000 (11:27 +0100)]
nwrap: Add libc_getpwent().

10 years agonwrap: Add libc_setpwent().
Andreas Schneider [Tue, 17 Dec 2013 10:26:01 +0000 (11:26 +0100)]
nwrap: Add libc_setpwent().

10 years agonwrap: Add libc_getpwuid_r().
Andreas Schneider [Tue, 17 Dec 2013 10:23:12 +0000 (11:23 +0100)]
nwrap: Add libc_getpwuid_r().

10 years agonwrap: Add libc_getpwuid().
Andreas Schneider [Tue, 17 Dec 2013 10:17:20 +0000 (11:17 +0100)]
nwrap: Add libc_getpwuid().

10 years agonwrap: Add libc_getpwnam_r().
Andreas Schneider [Tue, 17 Dec 2013 10:14:34 +0000 (11:14 +0100)]
nwrap: Add libc_getpwnam_r().

10 years agonwrap: Add libc_getpwnam().
Andreas Schneider [Tue, 17 Dec 2013 10:09:45 +0000 (11:09 +0100)]
nwrap: Add libc_getpwnam().

10 years agonwrap: Add nwrap_load_lib_function().
Andreas Schneider [Tue, 17 Dec 2013 10:03:18 +0000 (11:03 +0100)]
nwrap: Add nwrap_load_lib_function().

10 years agonwrap: Add nwrap_load_lib_handle().
Andreas Schneider [Tue, 17 Dec 2013 09:54:52 +0000 (10:54 +0100)]
nwrap: Add nwrap_load_lib_handle().

10 years agoAdd more directories and definitons to .clang_complete.
Andreas Schneider [Tue, 17 Dec 2013 09:54:07 +0000 (10:54 +0100)]
Add more directories and definitons to .clang_complete.

10 years agocmake: Set _FORTIFY_SOURCE only for optimized builds.
Andreas Schneider [Wed, 4 Dec 2013 16:40:27 +0000 (17:40 +0100)]
cmake: Set _FORTIFY_SOURCE only for optimized builds.

10 years agotests: Use AF_INET6 for testing.
Andreas Schneider [Wed, 4 Dec 2013 15:49:38 +0000 (16:49 +0100)]
tests: Use AF_INET6 for testing.

10 years agocmake: Check for getnameinfo on older distributions.
Andreas Schneider [Wed, 4 Dec 2013 15:44:13 +0000 (16:44 +0100)]
cmake: Check for getnameinfo on older distributions.

This should fix the build on CentOS 5.5.

10 years agoAdd .gitignore.
Andreas Schneider [Wed, 4 Dec 2013 15:43:43 +0000 (16:43 +0100)]
Add .gitignore.

10 years agonwrap: Try to fix some compile warning.
Andreas Schneider [Sat, 9 Nov 2013 10:36:36 +0000 (11:36 +0100)]
nwrap: Try to fix some compile warning.

10 years agonwrap: Print the function in the debug statement.
Andreas Schneider [Thu, 7 Nov 2013 15:52:26 +0000 (16:52 +0100)]
nwrap: Print the function in the debug statement.

10 years agonwrap: Reformat debug messages.
Andreas Schneider [Thu, 7 Nov 2013 15:42:59 +0000 (16:42 +0100)]
nwrap: Reformat debug messages.

10 years agonwrap: Remove old logging functions.
Andreas Schneider [Wed, 6 Nov 2013 13:23:26 +0000 (14:23 +0100)]
nwrap: Remove old logging functions.

10 years agonwrap: Use new logging function.
Andreas Schneider [Wed, 6 Nov 2013 13:23:05 +0000 (14:23 +0100)]
nwrap: Use new logging function.

10 years agonwrap: Add new logging function.
Andreas Schneider [Wed, 6 Nov 2013 13:20:13 +0000 (14:20 +0100)]
nwrap: Add new logging function.

10 years agonwrap: Add macro for printf attribute checking.
Andreas Schneider [Wed, 6 Nov 2013 13:19:14 +0000 (14:19 +0100)]
nwrap: Add macro for printf attribute checking.

10 years agonwrap: Add __location__ definition.
Andreas Schneider [Wed, 6 Nov 2013 13:18:30 +0000 (14:18 +0100)]
nwrap: Add __location__ definition.

10 years agocmake: Set nightly start time to UTC.
Andreas Schneider [Wed, 24 Jul 2013 06:17:20 +0000 (08:17 +0200)]
cmake: Set nightly start time to UTC.

10 years agocmake: Fix project name.
Andreas Schneider [Tue, 23 Jul 2013 12:50:03 +0000 (14:50 +0200)]
cmake: Fix project name.

10 years agocmake: Fix drop location.
Andreas Schneider [Tue, 23 Jul 2013 12:48:30 +0000 (14:48 +0200)]
cmake: Fix drop location.

10 years agonwrap: Fix an infinite loop in loading libraries.
Andreas Schneider [Tue, 23 Jul 2013 12:38:26 +0000 (14:38 +0200)]
nwrap: Fix an infinite loop in loading libraries.

10 years agotests: Fix testsuite on Solaris.
Andreas Schneider [Tue, 23 Jul 2013 11:09:28 +0000 (13:09 +0200)]
tests: Fix testsuite on Solaris.