Andreas Schneider [Mon, 7 Aug 2023 12:22:54 +0000 (14:22 +0200)]
tests: Fix fake socket_wrapper_syscall_valid()
We want to return errno = ENOSYS in socket_wrapper_syscall_va(). However if we
do not handle __FAKE_SOCKET_WRAPPER_SYSCALL_NO+1 then we will call
libc_syscall() for __FAKE_SOCKET_WRAPPER_SYSCALL_NO+1.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15445
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15448
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Andreas Schneider [Fri, 17 Feb 2023 16:51:27 +0000 (17:51 +0100)]
cmake: Fix cmocka >= 1.1.6 find_package() in CONFIG mode
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
Andreas Schneider [Tue, 24 Jan 2023 10:03:43 +0000 (11:03 +0100)]
cmake: Print a message that uid_wrapper was found with find_package()
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
Andreas Schneider [Tue, 24 Jan 2023 10:03:18 +0000 (11:03 +0100)]
cmake: Improve version detection to support ranges
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
Andreas Schneider [Tue, 17 Jan 2023 13:39:42 +0000 (14:39 +0100)]
Bump version to 1.3.0
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Andreas Schneider [Tue, 17 Jan 2023 13:36:14 +0000 (14:36 +0100)]
Rename to CHANGELOG
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Stefan Metzmacher [Sat, 14 Jan 2023 10:28:54 +0000 (11:28 +0100)]
gitlab-ci: run .gitlab-ci.yml also on branches@metze/uid_wrapper
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Andreas Schneider [Sat, 14 Jan 2023 08:39:44 +0000 (09:39 +0100)]
gitlab-ci: Add runner with ThreadSanitizer
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Andreas Schneider [Sat, 14 Jan 2023 08:36:26 +0000 (09:36 +0100)]
gitlab-ci: Introduce stages
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Andreas Schneider [Sat, 14 Jan 2023 08:33:45 +0000 (09:33 +0100)]
gitlab-ci: Format yml correctly that ymllint is happy
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Andreas Schneider [Sat, 14 Jan 2023 08:30:17 +0000 (09:30 +0100)]
cmake: Disable deepbind if we run with sanitizers
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Andreas Schneider [Sat, 14 Jan 2023 08:21:55 +0000 (09:21 +0100)]
cmake: Add -DCMAKE_BUILD_TYPE=ThreadSanitizer
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Stefan Metzmacher [Mon, 16 Jan 2023 20:41:09 +0000 (21:41 +0100)]
tests: test socket_wrapper_syscall_{valid,va} interaction using uwrap_fake_socket_wrapper.so
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Stefan Metzmacher [Mon, 16 Jan 2023 10:22:02 +0000 (11:22 +0100)]
src/uid_wrapper.c: make use of socket_wrapper_syscall_{valid,va}()
If we find socket_wrapper_syscall_{valid,va}() symbols in the already
loaded libraries, we'll try to hand over syscall() invocations to
socket_wrapper.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Stefan Metzmacher [Mon, 16 Jan 2023 10:42:05 +0000 (11:42 +0100)]
src/uid_wrapper.c: export uid_wrapper_syscall_{valid,va}()
We need to hook into syscall() from uid_wrapper as well as
from socket_wrapper() (and maybe others in future).
But the assumption is that only one wrapper will take care
of a single syscall number.
So we provide uid_wrapper_syscall_valid() in order to allow
external consumers (e.g. socket_wrapper.so) to check if
uid_wrapper wants to handle a specified syscall number.
And we provide uid_wrapper_syscall_va() in order to allow
calling into uwrap_syscall().
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Stefan Metzmacher [Tue, 8 Nov 2022 19:31:35 +0000 (20:31 +0100)]
src/uid_wrapper.c: fix mutex fork handling
We need to use pthread_mutex_init in the child handler...
See https://sourceware.org/bugzilla/show_bug.cgi?id=2745
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Stefan Metzmacher [Mon, 16 Jan 2023 10:27:32 +0000 (11:27 +0100)]
src/uid_wrapper.c: check for uid_wrapper related syscall numbers before uid_wrapper_enabled()
On FreeBSD syscall() is called after the pthread_atfork() 'prepare'
hooks. So we need to avoid calling uid_wrapper_enabled() as it would
deadlock.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Stefan Metzmacher [Mon, 16 Jan 2023 14:20:00 +0000 (15:20 +0100)]
src/uid_wrapper.c: force RTLD_NEXT for pthread_create/exit() if available
This is needed as thread sanatizer also overloads pthread_create and
pthread_exit().
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Stefan Metzmacher [Fri, 13 Jan 2023 19:48:25 +0000 (20:48 +0100)]
src/uid_wrapper.c: fix RTLD_NEXT handling for libpthread
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15228
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Samuel Thibault [Thu, 10 Nov 2022 18:34:12 +0000 (18:34 +0000)]
src/uid_wrapper.c: Avoid dclose(RTLD_NEXT)
In case the libc was not found and RTLD_NEXT is used instead, we should not
dlclose it, otherwise mayhem happens.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15228
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Stefan Metzmacher [Tue, 8 Nov 2022 19:08:40 +0000 (20:08 +0100)]
src/uid_wrapper.c: always go through uwrap_bind_symbol_all() protected by pthread_once()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15227
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Stefan Metzmacher [Mon, 16 Jan 2023 15:23:36 +0000 (16:23 +0100)]
tests: fix data race in test_thread_sync_setreuid.c
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Stefan Metzmacher [Mon, 16 Jan 2023 14:43:21 +0000 (15:43 +0100)]
tests: fix locking in test_thread_setuid.c
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Stefan Metzmacher [Tue, 8 Nov 2022 20:30:18 +0000 (21:30 +0100)]
src/uid_wrapper.c: also log the process name
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Andreas Schneider [Sat, 14 Jan 2023 08:57:13 +0000 (09:57 +0100)]
cmake: Check for getprogname()
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Stefan Metzmacher [Tue, 8 Nov 2022 19:40:44 +0000 (20:40 +0100)]
src/uid_wrapper.c: remove unused UWRAP_LIBSOCKET and UWRAP_LIBNSL
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Andreas Schneider [Tue, 17 Jan 2023 10:11:04 +0000 (11:11 +0100)]
Add clang-format config file
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Andreas Schneider [Tue, 17 Jan 2023 10:10:28 +0000 (11:10 +0100)]
Add editorconfig
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Andreas Schneider [Thu, 2 Dec 2021 13:41:28 +0000 (14:41 +0100)]
Bump version to 1.2.9
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Andreas Schneider [Mon, 8 Nov 2021 15:19:12 +0000 (16:19 +0100)]
uwrap: Add support for getgroups_chk()
This is required by software built with FORTIFY_SOURCE=2.
https://bugzilla.redhat.com/show_bug.cgi?id=
2021214
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Andreas Schneider [Wed, 24 Nov 2021 09:49:01 +0000 (10:49 +0100)]
config: Add missing define for HAVE_GETGROUPS
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Andreas Schneider [Mon, 8 Nov 2021 15:33:46 +0000 (16:33 +0100)]
Update README.install
This is detected automatically in the meantime.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Andreas Schneider [Wed, 25 Mar 2020 07:22:00 +0000 (08:22 +0100)]
Update README
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Björn Jacke [Fri, 30 Oct 2020 17:18:05 +0000 (18:18 +0100)]
tests: fix unused-result error in tests/test_uwrap_disabled.c
Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Björn Jacke [Fri, 30 Oct 2020 17:03:08 +0000 (18:03 +0100)]
tests: fix unused-result error in tests/test_setresgid_unprivileged.c
Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Björn Jacke [Fri, 30 Oct 2020 14:23:02 +0000 (15:23 +0100)]
uid_wrapper.c: fall back to pragma init/fini for constructor/destructor if possible
Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Björn Jacke [Fri, 30 Oct 2020 14:05:36 +0000 (15:05 +0100)]
configure: check for pragma init/fini for constructors/destructors
Signed-off-by: Bjoern Jacke <bjacke@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Andreas Schneider [Tue, 24 Mar 2020 09:45:45 +0000 (10:45 +0100)]
gitlab-ci: Add Ubuntu runner
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Andreas Schneider [Tue, 24 Mar 2020 09:44:38 +0000 (10:44 +0100)]
gitlab-ci: Remove debian cross mips build
This isn't supported by Debian anymore.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Andreas Schneider [Thu, 5 Mar 2020 14:43:49 +0000 (15:43 +0100)]
Bump version to 1.2.8
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Andreas Schneider [Tue, 3 Mar 2020 09:55:33 +0000 (10:55 +0100)]
cmake: Fix path in cmake config
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Andreas Schneider [Wed, 12 Feb 2020 08:52:40 +0000 (09:52 +0100)]
pkg-config: Fix installation path
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Andreas Schneider [Thu, 17 Oct 2019 15:36:36 +0000 (17:36 +0200)]
cmake: Remove unsed dir definitions
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Andreas Schneider [Thu, 17 Oct 2019 15:36:05 +0000 (17:36 +0200)]
cmake: Fix BINARYDIR and SOURCEDIR
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Andreas Schneider [Thu, 17 Oct 2019 13:41:06 +0000 (15:41 +0200)]
cmake: Remove unused variable
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Andreas Schneider [Thu, 17 Oct 2019 13:33:46 +0000 (15:33 +0200)]
cmake: Add missing PICKY_DEVELOPER option
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Andreas Schneider [Mon, 15 Jul 2019 14:17:52 +0000 (16:17 +0200)]
Bump version to 1.2.7
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Andreas Schneider [Mon, 15 Jul 2019 11:58:44 +0000 (13:58 +0200)]
uwrap: Fix unsetting the the envname of initial XIDs
This issue got introduced by:
1c793e19f1cb8cb33defb171c9ae719ec8a820da
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Andreas Schneider [Mon, 15 Jul 2019 08:57:31 +0000 (10:57 +0200)]
Bump version to 1.2.6
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Andreas Schneider [Mon, 15 Jul 2019 08:56:27 +0000 (10:56 +0200)]
gitlab-ci: Also test installation
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Andreas Schneider [Mon, 15 Jul 2019 08:53:53 +0000 (10:53 +0200)]
cmake: Fix cmake config files install
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Andreas Schneider [Mon, 15 Jul 2019 08:53:32 +0000 (10:53 +0200)]
doc: Fix manpage installation
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Andreas Schneider [Mon, 15 Jul 2019 06:15:22 +0000 (08:15 +0200)]
Bump version to 1.2.5
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Andreas Schneider [Sat, 1 Sep 2018 17:43:20 +0000 (19:43 +0200)]
doc: Document UID_WRAPPER_DISABLE_DEEPBIND
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Andreas Schneider [Tue, 7 May 2019 11:03:37 +0000 (13:03 +0200)]
gitlab-ci: Setup CI for uid_wrapper
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Gary Lockyer <gary@samba.org>
Andreas Schneider [Tue, 7 May 2019 11:02:04 +0000 (13:02 +0200)]
cmake: Use GNUInstallDirs
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Gary Lockyer <gary@samba.org>
Andreas Schneider [Tue, 7 May 2019 10:58:49 +0000 (12:58 +0200)]
tests: Don't run test_uwrap_disabled with sanitizers
or on cross compiled hosts (Debian MIPS).
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Gary Lockyer <gary@samba.org>
Andreas Schneider [Tue, 7 May 2019 10:57:32 +0000 (12:57 +0200)]
cmake: Correctly set _GNU_SOURCE
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Gary Lockyer <gary@samba.org>
Andreas Schneider [Tue, 7 May 2019 10:46:47 +0000 (12:46 +0200)]
cmake: Fix configure check for libdl
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Gary Lockyer <gary@samba.org>
Andreas Schneider [Tue, 7 May 2019 10:45:48 +0000 (12:45 +0200)]
cmake: Use target_include_directories()
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Gary Lockyer <gary@samba.org>
Andreas Schneider [Tue, 7 May 2019 10:39:55 +0000 (12:39 +0200)]
cmake: Update AddCMockaTest.cmake
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Gary Lockyer <gary@samba.org>
Andreas Schneider [Tue, 7 May 2019 10:33:15 +0000 (12:33 +0200)]
cmake: Update cmocka requirement
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Gary Lockyer <gary@samba.org>
Andreas Schneider [Tue, 7 May 2019 10:32:29 +0000 (12:32 +0200)]
cmake: Support running the tests with AddressSanitizer
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Gary Lockyer <gary@samba.org>
Andreas Schneider [Tue, 7 May 2019 10:16:11 +0000 (12:16 +0200)]
cmake: Add AddressSanitizer and UndefinedSanitizer
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Gary Lockyer <gary@samba.org>
Andreas Schneider [Tue, 7 May 2019 10:15:16 +0000 (12:15 +0200)]
cmake: Move Compiler flags to new file
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Gary Lockyer <gary@samba.org>
Andreas Schneider [Tue, 7 May 2019 10:12:30 +0000 (12:12 +0200)]
cmake: Remove obsolete DefineCompilerFlags.cmake
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Gary Lockyer <gary@samba.org>
Andreas Schneider [Tue, 7 May 2019 10:11:45 +0000 (12:11 +0200)]
cmake: Improve checks for compiler flags
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Gary Lockyer <gary@samba.org>
Andreas Schneider [Tue, 7 May 2019 10:06:25 +0000 (12:06 +0200)]
cmake: Update CMake defaults
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Gary Lockyer <gary@samba.org>
Andreas Schneider [Tue, 7 May 2019 10:05:16 +0000 (12:05 +0200)]
cmake: Do not misuse CMAKE_REQUIRED_LIBRARIES
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Gary Lockyer <gary@samba.org>
Andreas Schneider [Tue, 7 May 2019 10:03:12 +0000 (12:03 +0200)]
cmake: Require at least cmake 3.5.0
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Gary Lockyer <gary@samba.org>
Andreas Schneider [Tue, 7 May 2019 10:00:30 +0000 (12:00 +0200)]
cpack: Fix description and vendor
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Gary Lockyer <gary@samba.org>
Andreas Schneider [Tue, 7 May 2019 09:55:49 +0000 (11:55 +0200)]
README: Rename to a markdown file
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Gary Lockyer <gary@samba.org>
Andreas Schneider [Tue, 7 May 2019 11:07:01 +0000 (13:07 +0200)]
uwrap: Remove problematic FALL_THROUGH in uwrap_load_lib_handle()
src/uid_wrapper.c:93:24: error: a label can only be part of a statement
and a declaration is not a statement
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Gary Lockyer <gary@samba.org>
Andreas Schneider [Sat, 1 Sep 2018 17:43:20 +0000 (19:43 +0200)]
uwrap: Don't do a deep bind if we run with libasan
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Gary Lockyer <gary@samba.org>
Andreas Schneider [Thu, 5 Jul 2018 08:15:50 +0000 (10:15 +0200)]
ctest: Move to new dashboard
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Andreas Schneider [Fri, 22 Jun 2018 06:50:38 +0000 (08:50 +0200)]
Rename COPYING to LICENSE
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Andreas Schneider [Thu, 3 Aug 2017 08:48:45 +0000 (10:48 +0200)]
uwrap: Suppress fall through warnings
Suppress fall through warning in switch statement where the fall trough
is intentional.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Andreas Schneider [Fri, 22 Jun 2018 06:59:32 +0000 (08:59 +0200)]
cpack: Do not package build dirs in source tarball
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Andreas Schneider [Fri, 22 Jun 2018 06:56:02 +0000 (08:56 +0200)]
cmake: Replace deprecated get_target_property()
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Andreas Schneider [Tue, 1 Aug 2017 06:14:30 +0000 (08:14 +0200)]
uwrap: Improve parsing IDs from env variables
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Andreas Schneider [Tue, 1 Aug 2017 06:11:28 +0000 (08:11 +0200)]
uwrap: Fix integer overflowed argument
The previous fix did not address the conversion from 64bit to 32bit.
CID 165232
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Andreas Schneider [Thu, 27 Jul 2017 13:55:58 +0000 (15:55 +0200)]
uwrap: Use calloc to allocate groups array
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Volker Lendecke [Thu, 27 Jul 2017 13:55:18 +0000 (15:55 +0200)]
uwrap: Fix integer overflowed argument
Found by Coverity
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Andreas Schneider [Fri, 21 Jul 2017 09:58:08 +0000 (11:58 +0200)]
Bump version to 1.2.4
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Andreas Schneider [Fri, 21 Jul 2017 08:54:05 +0000 (10:54 +0200)]
uwrap: Add a workaround for glibc malloc mutex deadlock bug
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Andreas Schneider [Wed, 19 Jul 2017 14:27:05 +0000 (16:27 +0200)]
uwrap: First do garbage collection before exporting ids
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Andreas Schneider [Wed, 19 Jul 2017 14:22:39 +0000 (16:22 +0200)]
tests: Add setgroups to test_fork_exec
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Andreas Schneider [Wed, 19 Jul 2017 13:57:34 +0000 (15:57 +0200)]
uwrap: Improve groups string creation
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Andreas Schneider [Wed, 19 Jul 2017 13:44:32 +0000 (15:44 +0200)]
uwrap: Make the unsigned_str smaller
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Andreas Schneider [Wed, 19 Jul 2017 13:43:13 +0000 (15:43 +0200)]
uwrap: Fix type of len value
snprintf return an 'int'.
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Andreas Schneider [Wed, 19 Jul 2017 10:15:16 +0000 (12:15 +0200)]
uwrap: Fix two error messages
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Andreas Schneider [Wed, 19 Jul 2017 10:14:15 +0000 (12:14 +0200)]
uwrap: Fix a typo
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Andreas Schneider [Fri, 21 Jul 2017 06:28:50 +0000 (08:28 +0200)]
uwrap: Fix a deadlock if uid_wrapper is not enabled
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Andreas Schneider [Fri, 21 Jul 2017 09:39:59 +0000 (11:39 +0200)]
uwrap: Fix logging on optimized build
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Andreas Schneider [Fri, 14 Jul 2017 08:39:53 +0000 (10:39 +0200)]
Bump version to 1.2.3
Signed-off-by: Andreas Schneider <asn@samba.org>
Blessed-by: Stefan Metzmacher <metze@samba.org>
Andreas Schneider [Fri, 14 Jul 2017 08:34:48 +0000 (10:34 +0200)]
uwrap: Do an early return if log level doesn't match
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Andreas Schneider [Fri, 14 Jul 2017 08:33:46 +0000 (10:33 +0200)]
uwrap: Always enable logging
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Andreas Schneider [Fri, 14 Jul 2017 08:31:05 +0000 (10:31 +0200)]
uwrap: Add log message before exit
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Andreas Schneider [Fri, 14 Jul 2017 07:05:26 +0000 (09:05 +0200)]
uwrap: Add mamximum for groups we can handle while forking
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Andreas Schneider [Fri, 14 Jul 2017 07:07:19 +0000 (09:07 +0200)]
uwrap: Do not leak groups_str
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>