obnox/cwrap/nss_wrapper.git
8 years agonwrap: Add function nwrap_add_ai
Robin Hack [Wed, 15 Jul 2015 13:04:32 +0000 (15:04 +0200)]
nwrap: Add function nwrap_add_ai

This adds an ip to the hash table.

Signed-off-by: Robin Hack <hack.robin@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agonwrap: Add a hash table to the nwrap structure
Robin Hack [Wed, 15 Jul 2015 13:01:48 +0000 (15:01 +0200)]
nwrap: Add a hash table to the nwrap structure

The hash table will hold hostnames and ips internally. The new
environment variable which is introduced is NSS_WRAPPER_MAX_HOSTENTS. It
sets the maximum count of hostent (hostnames and ips) structs which the
hash table can hold.

Signed-off-by: Robin Hack <hack.robin@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agonwrap: Simplify file loading.
Robin Hack [Mon, 23 Mar 2015 13:39:28 +0000 (14:39 +0100)]
nwrap: Simplify file loading.

Lines are stored into vectors now.

Signed-off-by: Robin Hack <hack.robin@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agonwrap: Add nwrap vector memory management functions
Robin Hack [Mon, 23 Mar 2015 13:10:18 +0000 (14:10 +0100)]
nwrap: Add nwrap vector memory management functions

Nwrap vectors  are just more inteligent arrays.
They can look like very simple version of
vectors from C++.

TESTS: Add nwrap_vector tests.

Signed-off-by: Robin Hack <hack.robin@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agotests: Only run shadow test when shadow.h is available master-getspnam
Andreas Schneider [Tue, 6 Oct 2015 08:53:00 +0000 (10:53 +0200)]
tests: Only run shadow test when shadow.h is available

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agonwrap: Check for setspent and getspnam functions
Andreas Schneider [Tue, 6 Oct 2015 08:34:20 +0000 (10:34 +0200)]
nwrap: Check for setspent and getspnam functions

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agosrc: Add configure check for shadow.h
Andreas Schneider [Tue, 6 Oct 2015 08:19:48 +0000 (10:19 +0200)]
src: Add configure check for shadow.h

This is the first part to fix FreeBSD.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agotests: Add test for getspnam() function
Andreas Schneider [Mon, 14 Sep 2015 16:26:41 +0000 (18:26 +0200)]
tests: Add test for getspnam() function

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agonwrap: Add support for getspnam()
Andreas Schneider [Thu, 17 Sep 2015 08:39:15 +0000 (10:39 +0200)]
nwrap: Add support for getspnam()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agotests: Add test for (set|get|end)spent functions
Andreas Schneider [Thu, 17 Sep 2015 08:44:30 +0000 (10:44 +0200)]
tests: Add test for (set|get|end)spent functions

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agonwrap: Add (set|get|end)spent functions
Andreas Schneider [Thu, 17 Sep 2015 08:38:49 +0000 (10:38 +0200)]
nwrap: Add (set|get|end)spent functions

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agonwrap: Add nss_wrapper_shadow_enabled() function
Andreas Schneider [Thu, 17 Sep 2015 08:37:50 +0000 (10:37 +0200)]
nwrap: Add nss_wrapper_shadow_enabled() function

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agonwrap: Add shadow file parser
Andreas Schneider [Thu, 17 Sep 2015 08:33:58 +0000 (10:33 +0200)]
nwrap: Add shadow file parser

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agonwrap: Remove unused struct member in nwrap_main
Andreas Schneider [Thu, 17 Sep 2015 08:32:46 +0000 (10:32 +0200)]
nwrap: Remove unused struct member in nwrap_main

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agonwrap: Implement nwrap_files_initgroups()
Andreas Schneider [Fri, 11 Sep 2015 11:37:57 +0000 (13:37 +0200)]
nwrap: Implement nwrap_files_initgroups()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agonwrap: Remove unneeded memcpy in getgrouplist()
Andreas Schneider [Mon, 14 Sep 2015 12:57:40 +0000 (14:57 +0200)]
nwrap: Remove unneeded memcpy in getgrouplist()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agonwrap: Avoid a string comparsion in getgrouplist()
Andreas Schneider [Mon, 14 Sep 2015 12:52:51 +0000 (14:52 +0200)]
nwrap: Avoid a string comparsion in getgrouplist()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agoTESTS: Add assertions to tests.
Robin Hack [Tue, 24 Mar 2015 10:59:53 +0000 (11:59 +0100)]
TESTS: Add assertions to tests.

When function returns NULL then test raise assert fail istead of
SIGSEGV now.

Signed-off-by: Robin Hack <hack.robin@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agoTESTS: Switch tests to new CMocka API.
Robin Hack [Wed, 25 Mar 2015 10:30:35 +0000 (11:30 +0100)]
TESTS: Switch tests to new CMocka API.

Signed-off-by: Robin Hack <hack.robin@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agoTESTS: Fix some memory leaks in testsuite.
Robin Hack [Tue, 24 Mar 2015 11:02:24 +0000 (12:02 +0100)]
TESTS: Fix some memory leaks in testsuite.

Signed-off-by: Robin Hack <hack.robin@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agonwrap: Use ssize_t for aliases_count
Robin Hack [Wed, 15 Jul 2015 13:00:02 +0000 (15:00 +0200)]
nwrap: Use ssize_t for aliases_count

Signed-off-by: Robin Hack <hack.robin@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agonwrap: Prevent compilation failure on machine without IPv4
Robin Hack [Wed, 25 Mar 2015 08:36:10 +0000 (09:36 +0100)]
nwrap: Prevent compilation failure on machine without IPv4

Signed-off-by: Robin Hack <hack.robin@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agonwrap: Replace free() calls by SAFE_FREE macro where possible.
Robin Hack [Sat, 29 Nov 2014 12:22:46 +0000 (13:22 +0100)]
nwrap: Replace free() calls by SAFE_FREE macro where possible.

Signed-off-by: Robin Hack <hack.robin@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agocmake: Add compilation flags
Robin Hack [Wed, 25 Mar 2015 11:50:16 +0000 (12:50 +0100)]
cmake: Add compilation flags

Flags added:
    -Wbad-function-cast
    -fstrict-aliasing
    -Wstrict-aliasing=3

Signed-off-by: Robin Hack <hack.robin@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agocmake: Add detection of -fstack-protector-strong compiler flag
Robin Hack [Wed, 25 Mar 2015 11:34:53 +0000 (12:34 +0100)]
cmake: Add detection of -fstack-protector-strong compiler flag

Signed-off-by: Robin Hack <hack.robin@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agocmake: Drop test results via https.
Andreas Schneider [Wed, 25 Feb 2015 10:20:24 +0000 (11:20 +0100)]
cmake: Drop test results via https.

Signed-off-by: Andreas Schneider <asn@samba.org>
9 years agonwrap: Fix the handle loops for older gcc versions.
Andreas Schneider [Wed, 1 Oct 2014 15:15:35 +0000 (17:15 +0200)]
nwrap: Fix the handle loops for older gcc versions.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agoBump version to 1.0.3.
Andreas Schneider [Wed, 10 Sep 2014 11:53:13 +0000 (13:53 +0200)]
Bump version to 1.0.3.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agonwrap: Make sure addr is initialized.
Andreas Schneider [Wed, 10 Sep 2014 06:30:22 +0000 (08:30 +0200)]
nwrap: Make sure addr is initialized.

CID #72755

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agonwrap: Use DNS_NAME_MAX cause it is not available on BSD.
Andreas Schneider [Wed, 10 Sep 2014 06:26:34 +0000 (08:26 +0200)]
nwrap: Use DNS_NAME_MAX cause it is not available on BSD.

Also HOST_NAME_MAX is only for the value returned by gethostname(). It
is normally limited to 64 chars on Linux.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agonwrap: Don't overflow the in_addr if convert IPv6.
Andreas Schneider [Tue, 9 Sep 2014 09:03:24 +0000 (11:03 +0200)]
nwrap: Don't overflow the in_addr if convert IPv6.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agotests: Add test for hostnames with a trailing dot.
Andreas Schneider [Wed, 3 Sep 2014 11:08:03 +0000 (13:08 +0200)]
tests: Add test for hostnames with a trailing dot.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agonwrap: Fix resolving hostnames with a trailing dot.
Andreas Schneider [Wed, 3 Sep 2014 11:07:31 +0000 (13:07 +0200)]
nwrap: Fix resolving hostnames with a trailing dot.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agotests: use return code of copy_group() in test_nwrap_getgrgid()
Michael Adam [Fri, 15 Aug 2014 09:57:12 +0000 (11:57 +0200)]
tests: use return code of copy_group() in test_nwrap_getgrgid()

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
9 years agotests: reduce indentation in test_nwrap_getgrgid() by using early returns.
Michael Adam [Fri, 15 Aug 2014 09:56:11 +0000 (11:56 +0200)]
tests: reduce indentation in test_nwrap_getgrgid() by using early returns.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
9 years agotests: use return value of copy_group() in test_nwrap_getgrnam().
Michael Adam [Fri, 15 Aug 2014 09:55:09 +0000 (11:55 +0200)]
tests: use return value of copy_group() in test_nwrap_getgrnam().

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
9 years agotests: reduce indentation in test_nwrap_getgrnam() by using early returns.
Michael Adam [Fri, 15 Aug 2014 09:54:06 +0000 (11:54 +0200)]
tests: reduce indentation in test_nwrap_getgrnam() by using early returns.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
9 years agotests: use return value of copy_passwd() in test_nwrap_getpwuid()
Michael Adam [Fri, 15 Aug 2014 09:51:51 +0000 (11:51 +0200)]
tests: use return value of copy_passwd() in test_nwrap_getpwuid()

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
9 years agotests: reduce indentation in test_nwrap_getpwuid() by using early returns.
Michael Adam [Fri, 15 Aug 2014 09:50:33 +0000 (11:50 +0200)]
tests: reduce indentation in test_nwrap_getpwuid() by using early returns.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
9 years agotests: use return code of copy_passwd() in test_nwrap_getpwnam().
Michael Adam [Fri, 15 Aug 2014 10:03:46 +0000 (12:03 +0200)]
tests: use return code of copy_passwd() in test_nwrap_getpwnam().

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
9 years agotests: reduce indentation in test_nwrap_getpwnam() by using early returns.
Michael Adam [Fri, 15 Aug 2014 09:09:40 +0000 (11:09 +0200)]
tests: reduce indentation in test_nwrap_getpwnam() by using early returns.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
9 years agotests: Fix possible null pointer dereference in testsuite.
Andreas Schneider [Fri, 15 Aug 2014 08:48:10 +0000 (10:48 +0200)]
tests: Fix possible null pointer dereference in testsuite.

Signed-off-by: Andreas Schneider <asn@samba.org>
9 years agodoc: Add nss_wrapper manpage.
Andreas Schneider [Wed, 9 Jul 2014 15:29:12 +0000 (17:29 +0200)]
doc: Add nss_wrapper manpage.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agonss_wrapper: Fix some "discarding const" warnings
Volker Lendecke [Sat, 21 Jun 2014 08:48:56 +0000 (10:48 +0200)]
nss_wrapper: Fix some "discarding const" warnings

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agonss_wrapper: Align indentation with the rest of Samba
Volker Lendecke [Sat, 21 Jun 2014 08:47:28 +0000 (10:47 +0200)]
nss_wrapper: Align indentation with the rest of Samba

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agonwrap: Fall back to RTLD_NEXT if we can't find libc.
Andreas Schneider [Tue, 29 Apr 2014 13:10:00 +0000 (15:10 +0200)]
nwrap: Fall back to RTLD_NEXT if we can't find libc.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agotests: getaddrinfo() should use 0 as ai_flags.
Andreas Schneider [Thu, 22 May 2014 13:10:46 +0000 (15:10 +0200)]
tests: getaddrinfo() should use 0 as ai_flags.

This fixes an issue for the test platform configuration with IPv4 only
addresses.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=10597

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agocmake: Fix a typo in nss_wrapper-config.cmake.in.
Andreas Schneider [Thu, 22 May 2014 13:11:10 +0000 (15:11 +0200)]
cmake: Fix a typo in nss_wrapper-config.cmake.in.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agoAdd README.install - instructions for building and installing.
Michael Adam [Tue, 27 May 2014 12:07:17 +0000 (14:07 +0200)]
Add README.install - instructions for building and installing.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agocmake: Fix policy check.
Andreas Schneider [Fri, 25 Apr 2014 11:59:00 +0000 (13:59 +0200)]
cmake: Fix policy check.

10 years agocmake: Install cmake config into the correct directory.
Andreas Schneider [Wed, 16 Apr 2014 13:46:55 +0000 (15:46 +0200)]
cmake: Install cmake config into the correct directory.

10 years agocmake: Set version to 2.8.13.
Andreas Schneider [Wed, 9 Apr 2014 09:56:44 +0000 (11:56 +0200)]
cmake: Set version to 2.8.13.

10 years agoUpdate to version 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.
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.
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().