uid_wrapper.git
6 years agoBump version to 1.2.4 uid_wrapper-1.2.4
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>
6 years agouwrap: Add a workaround for glibc malloc mutex deadlock bug
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>
6 years agouwrap: First do garbage collection before exporting ids
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>
6 years agotests: Add setgroups to test_fork_exec
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>
6 years agouwrap: Improve groups string creation
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>
6 years agouwrap: Make the unsigned_str smaller
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>
6 years agouwrap: Fix type of len value
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>
6 years agouwrap: Fix two error messages
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>
6 years agouwrap: Fix a typo
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>
6 years agouwrap: Fix a deadlock if uid_wrapper is not enabled
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>
6 years agouwrap: Fix logging on optimized build
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>
6 years agoBump version to 1.2.3 uid_wrapper-1.2.3
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>
6 years agouwrap: Do an early return if log level doesn't match
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>
6 years agouwrap: Always enable logging
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>
6 years agouwrap: Add log message before exit
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>
6 years agouwrap: Add mamximum for groups we can handle while forking
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>
6 years agouwrap: Do not leak groups_str
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>
6 years agoBump version to 1.2.2 uid_wrapper-1.2.2
Andreas Schneider [Wed, 12 Jul 2017 11:03:35 +0000 (13:03 +0200)]
Bump version to 1.2.2

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
6 years agotests: Add a fork and exec test
Andreas Schneider [Wed, 12 Jul 2017 07:16:30 +0000 (09:16 +0200)]
tests: Add a fork and exec test

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
6 years agouwrap: Add support to initialize groups while forking
Andreas Schneider [Tue, 11 Jul 2017 09:59:33 +0000 (11:59 +0200)]
uwrap: Add support to initialize groups while forking

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
7 years agotests: fix a comment typo
Michael Adam [Thu, 22 Sep 2016 00:29:34 +0000 (02:29 +0200)]
tests: fix a comment typo

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
7 years agotests: Use alpha-specific syscalls.
Matt Turner [Tue, 5 Apr 2016 20:28:56 +0000 (13:28 -0700)]
tests: Use alpha-specific syscalls.

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

Signed-off-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
7 years agouwrap: Use alpha-specific syscalls.
Matt Turner [Tue, 5 Apr 2016 20:28:30 +0000 (13:28 -0700)]
uwrap: Use alpha-specific syscalls.

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

Signed-off-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
7 years agouwrap: Attempt to dlopen libc.so.*.1 as a fallback.
Matt Turner [Tue, 5 Apr 2016 20:41:13 +0000 (13:41 -0700)]
uwrap: Attempt to dlopen libc.so.*.1 as a fallback.

glibc on Alpha and IA64 is libc.so.6.1.

Without this, uwrap.libc.handle is set to RTLD_NEXT, leading to a
segmentation fault in the unit tests when dlclose() is called.

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

Signed-off-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
8 years agoBump version to 1.2.1 uid_wrapper-1.2.1
Andreas Schneider [Wed, 16 Mar 2016 13:53:37 +0000 (14:53 +0100)]
Bump version to 1.2.1

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agouwrap: Make sure prefix is not used uninitialized
Andreas Schneider [Fri, 13 Nov 2015 12:46:24 +0000 (13:46 +0100)]
uwrap: Make sure prefix is not used uninitialized

Signed-off-by: Andreas Schneider <asn@samba.org>
8 years agodoc: Document missing options
Andreas Schneider [Tue, 3 Nov 2015 09:54:07 +0000 (10:54 +0100)]
doc: Document missing options

Signed-off-by: Andreas Schneider <asn@samba.org>
8 years agoBump version to 1.2.0 uid_wrapper-1.2.0
Andreas Schneider [Thu, 29 Oct 2015 07:21:21 +0000 (08:21 +0100)]
Bump version to 1.2.0

Signed-off-by: Andreas Schneider <asn@samba.org>
8 years agotests: Add checks for return values in test_thread_setreuid
Andreas Schneider [Thu, 29 Oct 2015 07:16:32 +0000 (08:16 +0100)]
tests: Add checks for return values in test_thread_setreuid

CID #131817

Signed-off-by: Andreas Schneider <asn@samba.org>
8 years agotests: Rename test_syscall_gid32 to test_syscall_setgroups32
Andreas Schneider [Wed, 28 Oct 2015 08:34:18 +0000 (09:34 +0100)]
tests: Rename test_syscall_gid32 to test_syscall_setgroups32

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agotests: Move syscall setregid32 test to own executable
Andreas Schneider [Wed, 28 Oct 2015 08:33:16 +0000 (09:33 +0100)]
tests: Move syscall setregid32 test to own executable

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agotests: Move syscall setregid32 test to own executable
Andreas Schneider [Wed, 28 Oct 2015 08:23:23 +0000 (09:23 +0100)]
tests: Move syscall setregid32 test to own executable

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agotests: Move syscall setgid32 test to own executable
Andreas Schneider [Wed, 28 Oct 2015 07:36:53 +0000 (08:36 +0100)]
tests: Move syscall setgid32 test to own executable

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agotests: Rename syscall setresuid32 test and improve it
Andreas Schneider [Wed, 28 Oct 2015 07:26:32 +0000 (08:26 +0100)]
tests: Rename syscall setresuid32 test and improve it

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agotests: Move syscall setreuid32 test to own executable
Andreas Schneider [Wed, 28 Oct 2015 07:19:43 +0000 (08:19 +0100)]
tests: Move syscall setreuid32 test to own executable

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agotests: Move syscall setuid32 test to own executable
Andreas Schneider [Wed, 28 Oct 2015 07:15:37 +0000 (08:15 +0100)]
tests: Move syscall setuid32 test to own executable

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agouwrap: Fix build warning with release build
Andreas Schneider [Wed, 28 Oct 2015 07:05:11 +0000 (08:05 +0100)]
uwrap: Fix build warning with release build

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agoIgnore build and all obj* directories
Andreas Schneider [Wed, 28 Oct 2015 08:24:08 +0000 (09:24 +0100)]
Ignore build and all obj* directories

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agocmake: Run threaded tests also on BSD and Solaris
Andreas Schneider [Mon, 12 Oct 2015 16:41:16 +0000 (18:41 +0200)]
cmake: Run threaded tests also on BSD and Solaris

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agotests: Get the tests working on BSD
Andreas Schneider [Thu, 8 Oct 2015 15:03:48 +0000 (17:03 +0200)]
tests: Get the tests working on BSD

The setuid and seteuid behaviour is different to Linux and Solaris.

The setuid euid tests on BSD look like a bug?

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agotests: Rename test_gid to test_setgroups
Andreas Schneider [Fri, 9 Oct 2015 11:22:35 +0000 (13:22 +0200)]
tests: Rename test_gid to test_setgroups

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agotests: Add setresgid unprivileged user test
Andreas Schneider [Tue, 27 Oct 2015 09:42:35 +0000 (10:42 +0100)]
tests: Add setresgid unprivileged user test

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agotests: Move setresgid test to own executable
Andreas Schneider [Fri, 9 Oct 2015 11:21:20 +0000 (13:21 +0200)]
tests: Move setresgid test to own executable

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agotests: Move setregid test to own executable
Andreas Schneider [Fri, 9 Oct 2015 11:10:23 +0000 (13:10 +0200)]
tests: Move setregid test to own executable

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agotests: Move setegid test to own executable
Andreas Schneider [Fri, 9 Oct 2015 07:40:14 +0000 (09:40 +0200)]
tests: Move setegid test to own executable

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agotests: Move setgid test to own executable
Andreas Schneider [Fri, 9 Oct 2015 07:31:10 +0000 (09:31 +0200)]
tests: Move setgid test to own executable

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agotests: Add new test_setuid_euid1 and test_setuid_euid2
Andreas Schneider [Thu, 8 Oct 2015 13:23:24 +0000 (15:23 +0200)]
tests: Add new test_setuid_euid1 and test_setuid_euid2

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
8 years agotests: Create a test for threaded SYS_setuid
Andreas Schneider [Tue, 27 Oct 2015 09:19:57 +0000 (10:19 +0100)]
tests: Create a test for threaded SYS_setuid

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agotests: Fix test_syscall_setuid to work with privilege checks
Andreas Schneider [Tue, 27 Oct 2015 09:18:54 +0000 (10:18 +0100)]
tests: Fix test_syscall_setuid to work with privilege checks

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agotests: Create a test for threaded sync SYS_setreuid
Andreas Schneider [Wed, 23 Sep 2015 12:06:20 +0000 (14:06 +0200)]
tests: Create a test for threaded sync SYS_setreuid

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agotests: Create a test for threaded SYS_setreuid
Andreas Schneider [Tue, 27 Oct 2015 09:21:26 +0000 (10:21 +0100)]
tests: Create a test for threaded SYS_setreuid

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agotests: Fix test_syscall_setreuid to work with privilege checks
Andreas Schneider [Tue, 27 Oct 2015 09:20:53 +0000 (10:20 +0100)]
tests: Fix test_syscall_setreuid to work with privilege checks

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agotests: Make syscall setresuid test from test_syscall_uid
Andreas Schneider [Tue, 22 Sep 2015 15:41:04 +0000 (17:41 +0200)]
tests: Make syscall setresuid test from test_syscall_uid

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agotests: Move syscall setreuid test to own executable
Andreas Schneider [Tue, 22 Sep 2015 15:33:04 +0000 (17:33 +0200)]
tests: Move syscall setreuid test to own executable

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agotests: Add test_getresuid out of test_uid
Andreas Schneider [Tue, 22 Sep 2015 15:21:11 +0000 (17:21 +0200)]
tests: Add test_getresuid out of test_uid

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agotests: Move setresuid test to own executable
Andreas Schneider [Tue, 22 Sep 2015 14:55:43 +0000 (16:55 +0200)]
tests: Move setresuid test to own executable

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agotests: Move setreuid test to own executable
Andreas Schneider [Tue, 22 Sep 2015 12:29:49 +0000 (14:29 +0200)]
tests: Move setreuid test to own executable

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agotests: Move seteuid test to own executable
Andreas Schneider [Tue, 22 Sep 2015 12:21:17 +0000 (14:21 +0200)]
tests: Move seteuid test to own executable

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agotests: Move setuid test to own executable
Andreas Schneider [Tue, 22 Sep 2015 12:17:28 +0000 (14:17 +0200)]
tests: Move setuid test to own executable

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agocmake: Always set UID_WRAPPER_ROOT=1 for tests
Andreas Schneider [Fri, 18 Sep 2015 14:23:17 +0000 (16:23 +0200)]
cmake: Always set UID_WRAPPER_ROOT=1 for tests

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agouwrap: Add the EINVAL check to setegid()
Andreas Schneider [Fri, 9 Oct 2015 07:14:34 +0000 (09:14 +0200)]
uwrap: Add the EINVAL check to setegid()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agouwrap: Allow setgid calls only for privileged users
Andreas Schneider [Fri, 9 Oct 2015 07:17:16 +0000 (09:17 +0200)]
uwrap: Allow setgid calls only for privileged users

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agouwrap: Allow setregid calls only for privileged users
Andreas Schneider [Fri, 9 Oct 2015 07:13:27 +0000 (09:13 +0200)]
uwrap: Allow setregid calls only for privileged users

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agouwrap: Allow setresgid calls only for privileged users
Andreas Schneider [Fri, 9 Oct 2015 07:08:21 +0000 (09:08 +0200)]
uwrap: Allow setresgid calls only for privileged users

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agouwrap: Move the EINVAL check down in seteuid()
Andreas Schneider [Thu, 8 Oct 2015 14:52:00 +0000 (16:52 +0200)]
uwrap: Move the EINVAL check down in seteuid()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agouwrap: Allow setuid calls only for privileged users
Andreas Schneider [Thu, 8 Oct 2015 14:55:01 +0000 (16:55 +0200)]
uwrap: Allow setuid calls only for privileged users

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
8 years agouwrap: Allow setreuid calls only for privileged users
Andreas Schneider [Thu, 8 Oct 2015 14:50:01 +0000 (16:50 +0200)]
uwrap: Allow setreuid calls only for privileged users

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
8 years agouwrap: Allow setresuid calls only for privileged users
Andreas Schneider [Thu, 8 Oct 2015 14:46:27 +0000 (16:46 +0200)]
uwrap: Allow setresuid calls only for privileged users

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
8 years agouwrap: Fix a possible null pointer dereference
Andreas Schneider [Tue, 20 Oct 2015 13:06:02 +0000 (15:06 +0200)]
uwrap: Fix a possible null pointer dereference

If uid_wrapper is loaded but not enabled (UID_WRAPPER environment
variable not set), then we dereference a NULL pointer while forking.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agouwrap: Improve debug output
Andreas Schneider [Tue, 22 Sep 2015 15:11:57 +0000 (17:11 +0200)]
uwrap: Improve debug output

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agouwrap: Fix debug line in uwrap_init()
Andreas Schneider [Tue, 22 Sep 2015 15:06:01 +0000 (17:06 +0200)]
uwrap: Fix debug line in uwrap_init()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agoBump version to 1.1.1 uid_wrapper-1.1.1
Andreas Schneider [Thu, 20 Aug 2015 08:20:31 +0000 (10:20 +0200)]
Bump version to 1.1.1

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agodoc: Make the manpage reproducible
Andreas Schneider [Tue, 18 Aug 2015 10:32:03 +0000 (12:32 +0200)]
doc: Make the manpage reproducible

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
8 years agotests: Fix tests on Solaris
Andreas Schneider [Tue, 18 Aug 2015 08:10:41 +0000 (10:10 +0200)]
tests: Fix tests on Solaris

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
8 years agouwrap: Removed double newline
Andreas Schneider [Mon, 17 Aug 2015 08:43:55 +0000 (10:43 +0200)]
uwrap: Removed double newline

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agotests: Add 32bit syscall gid tests
Andreas Schneider [Fri, 14 Aug 2015 07:04:13 +0000 (09:04 +0200)]
tests: Add 32bit syscall gid tests

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agotests: Improve syscall gid tests
Andreas Schneider [Fri, 14 Aug 2015 07:01:02 +0000 (09:01 +0200)]
tests: Improve syscall gid tests

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agotests: Add 32bit syscall uid tests
Andreas Schneider [Fri, 14 Aug 2015 06:52:08 +0000 (08:52 +0200)]
tests: Add 32bit syscall uid tests

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agotests: Improve syscall uid tests
Andreas Schneider [Fri, 14 Aug 2015 06:43:55 +0000 (08:43 +0200)]
tests: Improve syscall uid tests

The plan is to have a 32bit version compiled dependent on the support
for it.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agotests: Rename testsuite to test_syscall_gid
Andreas Schneider [Fri, 14 Aug 2015 06:27:14 +0000 (08:27 +0200)]
tests: Rename testsuite to test_syscall_gid

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agotests: Move syscall uid tests to own test
Andreas Schneider [Fri, 14 Aug 2015 06:26:17 +0000 (08:26 +0200)]
tests: Move syscall uid tests to own test

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agotests: Move syscall test to own test
Andreas Schneider [Fri, 14 Aug 2015 06:20:57 +0000 (08:20 +0200)]
tests: Move syscall test to own test

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agotests: Move set(re)gid function to own test
Andreas Schneider [Fri, 14 Aug 2015 06:17:34 +0000 (08:17 +0200)]
tests: Move set(re)gid function to own test

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agotests: Move set(re)uid function to own test
Andreas Schneider [Fri, 14 Aug 2015 06:11:58 +0000 (08:11 +0200)]
tests: Move set(re)uid function to own test

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agocmake: Do not optimize the code by default
Andreas Schneider [Wed, 12 Aug 2015 08:21:36 +0000 (10:21 +0200)]
cmake: Do not optimize the code by default

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agotests: Add test_uwrap_syscall_setresuid()
Andreas Schneider [Fri, 31 Jul 2015 12:25:21 +0000 (14:25 +0200)]
tests: Add test_uwrap_syscall_setresuid()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agotests: Fix syscall detection
Andreas Schneider [Fri, 31 Jul 2015 12:11:45 +0000 (14:11 +0200)]
tests: Fix syscall detection

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agotests: Add test for syscall SYS_setresgid
Andreas Schneider [Fri, 31 Jul 2015 12:07:20 +0000 (14:07 +0200)]
tests: Add test for syscall SYS_setresgid

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agotests: Update to new cmocka test runner
Andreas Schneider [Fri, 31 Jul 2015 12:03:19 +0000 (14:03 +0200)]
tests: Update to new cmocka test runner

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
8 years agouwrap: Fix build if getres(uid|gid) are not available.
Andreas Schneider [Fri, 23 Jan 2015 15:01:49 +0000 (16:01 +0100)]
uwrap: Fix build if getres(uid|gid) are not available.

Signed-off-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:21:19 +0000 (11:21 +0100)]
cmake: Drop test results via https.

Signed-off-by: Andreas Schneider <asn@samba.org>
9 years agoBump version to 1.1.0. uid_wrapper-1.1.0
Andreas Schneider [Mon, 19 Jan 2015 16:06:10 +0000 (17:06 +0100)]
Bump version to 1.1.0.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agouwrap: Make sure we leave if the id is NULL.
Andreas Schneider [Thu, 8 Jan 2015 09:10:52 +0000 (10:10 +0100)]
uwrap: Make sure we leave if the id is NULL.

CID #97616

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agotests: Add new test_thread_create_thread_setgid.
Robin Hack [Fri, 5 Dec 2014 09:51:15 +0000 (10:51 +0100)]
tests: Add new test_thread_create_thread_setgid.

Test aims case where thread change uid/gid and then create new thread.

Signed-off-by: Robin Hack <hack.robin@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agouwrap: Support scenario where threads fork or creates threads.
Robin Hack [Tue, 21 Oct 2014 06:55:56 +0000 (08:55 +0200)]
uwrap: Support scenario where threads fork or creates threads.

When fork() is called here there is no need to disable uwrap as a whole.
This change disables only uwrap for the thread which called fork().

uwrap catches calls of pthread_create() and pthread_exit() functions
from libpthread library now.

Pair-Programmed-With: Andreas Schneider <asn@samba.org>
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Robin Hack <hack.robin@gmail.com>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agouwrap: Prepare for overload of libpthread functions.
Robin Hack [Tue, 16 Dec 2014 11:09:55 +0000 (12:09 +0100)]
uwrap: Prepare for overload of libpthread functions.

uwrap_bind_symbol are now renamed to uwrap_bind_symbol_libc
and simlilar uwrap_bind_symbol_libpthread are introduced.

Signed-off-by: Robin Hack <hack.robin@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agouwrap: Introduce UWRAP_LOCK_ALL and UWRAP_UNLOCK_ALL macros
Robin Hack [Tue, 16 Dec 2014 11:00:31 +0000 (12:00 +0100)]
uwrap: Introduce UWRAP_LOCK_ALL and UWRAP_UNLOCK_ALL macros

Introduce UWRAP_LOCK_ALL and UWRAP_UNLOCK_ALL which make
locking easier.

Signed-off-by: Robin Hack <hack.robin@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agouwrap: Rewrite uwrap_libc_fns struct to pass strict aliasing rules.
Robin Hack [Wed, 29 Oct 2014 09:29:27 +0000 (10:29 +0100)]
uwrap: Rewrite uwrap_libc_fns struct to pass strict aliasing rules.

Now uwrap is compiled with -O2 -fstrict-aliasing -Wstrict-aliasing=2
C compiler flags.

Also rename struct uwrap_libc_fns fns to uwrap_libc_symbols and
uwrap_load_lib_function to uwrap_bind_symbol (same for _uwrap_load_...
variant.

Signed-off-by: Robin Hack <hack.robin@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agouwrap: Fix wrong data types in syscalls switch.
Robin Hack [Thu, 16 Oct 2014 10:23:53 +0000 (12:23 +0200)]
uwrap: Fix wrong data types in syscalls switch.

Signed-off-by: Robin Hack <hack.robin@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agotests: Add new test_uwrap_getresuid().
Robin Hack [Tue, 21 Oct 2014 06:54:04 +0000 (08:54 +0200)]
tests: Add new test_uwrap_getresuid().

Signed-off-by: Robin Hack <hack.robin@gmail.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>