uid_wrapper.git
10 years agotests: Use a bool for the test_uwrap_enabled test. uid_wrapper-1.0.0
Andreas Schneider [Sun, 2 Feb 2014 07:54:27 +0000 (08:54 +0100)]
tests: Use a bool for the test_uwrap_enabled test.

Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agosrc: Use a bool for uid_wrapper_enabled().
Andreas Schneider [Sat, 1 Feb 2014 13:32:03 +0000 (14:32 +0100)]
src: Use a bool for uid_wrapper_enabled().

Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agoAdd ChangeLog.
Andreas Schneider [Thu, 30 Jan 2014 17:15:14 +0000 (18:15 +0100)]
Add ChangeLog.

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

10 years agocmake: Add cmake version file.
Andreas Schneider [Mon, 20 Jan 2014 11:43:21 +0000 (12:43 +0100)]
cmake: Add cmake version file.

10 years agocmake: Add a pkg-config file.
Andreas Schneider [Mon, 20 Jan 2014 11:43:08 +0000 (12:43 +0100)]
cmake: Add a pkg-config file.

10 years agoUpdate README.
Andreas Schneider [Sun, 19 Jan 2014 19:23:01 +0000 (20:23 +0100)]
Update README.

10 years agouwrap: Rename uwrap_enabled() to uid_wrapper_enabled().
Andreas Schneider [Fri, 17 Jan 2014 14:30:32 +0000 (15:30 +0100)]
uwrap: Rename uwrap_enabled() to uid_wrapper_enabled().

10 years agouwrap: Rename the variable to get myuid from geteuid().
Andreas Schneider [Tue, 7 Jan 2014 12:31:58 +0000 (13:31 +0100)]
uwrap: Rename the variable to get myuid from geteuid().

10 years agouwrap: Make uwrap_enabled public so we can use it.
Andreas Schneider [Tue, 7 Jan 2014 12:30:06 +0000 (13:30 +0100)]
uwrap: Make uwrap_enabled public so we can use it.

10 years agotests: Fix some memory leaks.
Andreas Schneider [Fri, 20 Dec 2013 12:18:46 +0000 (13:18 +0100)]
tests: Fix some memory leaks.

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

10 years agouwrap: Pass bool values to uwrap_new_id().
Andreas Schneider [Fri, 20 Dec 2013 12:03:04 +0000 (13:03 +0100)]
uwrap: Pass bool values to uwrap_new_id().

10 years agouwrap: Fix a memory leak when we reuse an allocated id.
Andreas Schneider [Fri, 20 Dec 2013 12:02:37 +0000 (13:02 +0100)]
uwrap: Fix a memory leak when we reuse an allocated id.

10 years agouwrap: Add a destructor to free resources.
Andreas Schneider [Fri, 20 Dec 2013 12:02:03 +0000 (13:02 +0100)]
uwrap: Add a destructor to free resources.

10 years agocmake: Add check for HAVE_DESTRUCTOR_ATTRIBUTE.
Andreas Schneider [Fri, 20 Dec 2013 12:01:27 +0000 (13:01 +0100)]
cmake: Add check for HAVE_DESTRUCTOR_ATTRIBUTE.

10 years agouwrap: Use realloc for setgroups().
Andreas Schneider [Fri, 20 Dec 2013 11:54:14 +0000 (12:54 +0100)]
uwrap: Use realloc for setgroups().

10 years agouwrap: Fix loading the system libraries.
Andreas Schneider [Fri, 20 Dec 2013 10:09:15 +0000 (11:09 +0100)]
uwrap: Fix loading the system libraries.

Thanks metze!

10 years agotests: Add test_uwrap_disabled.
Andreas Schneider [Thu, 19 Dec 2013 08:52:22 +0000 (09:52 +0100)]
tests: Add test_uwrap_disabled.

10 years agotestsuite: Add missing include.
Andreas Schneider [Thu, 19 Dec 2013 08:52:05 +0000 (09:52 +0100)]
testsuite: Add missing include.

10 years agocmake: Fix HAVE_SETRESUID and HAVE_SETRESGID.
Andreas Schneider [Thu, 19 Dec 2013 07:46:45 +0000 (08:46 +0100)]
cmake: Fix HAVE_SETRESUID and HAVE_SETRESGID.

10 years agotests: Add test_uwrap_syscall_setgroups().
Andreas Schneider [Wed, 18 Dec 2013 16:23:31 +0000 (17:23 +0100)]
tests: Add test_uwrap_syscall_setgroups().

10 years agotests: Add test_uwrap_setresuid().
Andreas Schneider [Wed, 18 Dec 2013 16:11:14 +0000 (17:11 +0100)]
tests: Add test_uwrap_setresuid().

10 years agotests: Add test_uwrap_setreuid().
Andreas Schneider [Wed, 18 Dec 2013 16:09:15 +0000 (17:09 +0100)]
tests: Add test_uwrap_setreuid().

10 years agotests: Add test_uwrap_setresgid().
Andreas Schneider [Wed, 18 Dec 2013 16:06:46 +0000 (17:06 +0100)]
tests: Add test_uwrap_setresgid().

10 years agotests: Add test_uwrap_setregid().
Andreas Schneider [Wed, 18 Dec 2013 15:59:54 +0000 (16:59 +0100)]
tests: Add test_uwrap_setregid().

10 years agotests: The tests should always be executed with uid_wrapper.
Andreas Schneider [Wed, 18 Dec 2013 15:53:17 +0000 (16:53 +0100)]
tests: The tests should always be executed with uid_wrapper.

10 years agonwrap: Fix prototype of libc_setresuid().
Andreas Schneider [Wed, 18 Dec 2013 16:05:57 +0000 (17:05 +0100)]
nwrap: Fix prototype of libc_setresuid().

10 years agocmake: Fix defines for setres(u|g)id.
Andreas Schneider [Wed, 18 Dec 2013 16:02:08 +0000 (17:02 +0100)]
cmake: Fix defines for setres(u|g)id.

10 years agouwrap: Remove obsolete uwrap_libc_fn().
Andreas Schneider [Tue, 17 Dec 2013 12:39:42 +0000 (13:39 +0100)]
uwrap: Remove obsolete uwrap_libc_fn().

10 years agouwrap: Load libc_syscall correctly.
Andreas Schneider [Tue, 17 Dec 2013 12:38:30 +0000 (13:38 +0100)]
uwrap: Load libc_syscall correctly.

10 years agouwrap: Add libc_getgroups().
Andreas Schneider [Tue, 17 Dec 2013 12:36:15 +0000 (13:36 +0100)]
uwrap: Add libc_getgroups().

10 years agouwrap: Add libc_getgroups().
Andreas Schneider [Tue, 17 Dec 2013 12:35:21 +0000 (13:35 +0100)]
uwrap: Add libc_getgroups().

10 years agouwrap: Add libc_getegid().
Andreas Schneider [Tue, 17 Dec 2013 12:33:57 +0000 (13:33 +0100)]
uwrap: Add libc_getegid().

10 years agouwrap: Add libc_setregid().
Andreas Schneider [Tue, 17 Dec 2013 12:31:28 +0000 (13:31 +0100)]
uwrap: Add libc_setregid().

10 years agouwrap: Add libc_setregid().
Andreas Schneider [Tue, 17 Dec 2013 12:28:37 +0000 (13:28 +0100)]
uwrap: Add libc_setregid().

10 years agouwrap: Add libc_setgeid().
Andreas Schneider [Tue, 17 Dec 2013 12:27:12 +0000 (13:27 +0100)]
uwrap: Add libc_setgeid().

10 years agouwarp: Add libc_getgid().
Andreas Schneider [Tue, 17 Dec 2013 12:26:04 +0000 (13:26 +0100)]
uwarp: Add libc_getgid().

10 years agouwrap: Add libc_setgid().
Andreas Schneider [Tue, 17 Dec 2013 12:24:59 +0000 (13:24 +0100)]
uwrap: Add libc_setgid().

10 years agouwrap: Add libc_geteuid().
Andreas Schneider [Tue, 17 Dec 2013 12:20:02 +0000 (13:20 +0100)]
uwrap: Add libc_geteuid().

10 years agouwrap: Add libc_setresuid().
Andreas Schneider [Tue, 17 Dec 2013 12:10:08 +0000 (13:10 +0100)]
uwrap: Add libc_setresuid().

10 years agouwrap: Add libc_setreuid().
Andreas Schneider [Tue, 17 Dec 2013 12:08:16 +0000 (13:08 +0100)]
uwrap: Add libc_setreuid().

10 years agouwrap: Add libc_seteuid().
Andreas Schneider [Tue, 17 Dec 2013 12:06:49 +0000 (13:06 +0100)]
uwrap: Add libc_seteuid().

10 years agouwrap: Add libc_getuid().
Andreas Schneider [Tue, 17 Dec 2013 12:05:34 +0000 (13:05 +0100)]
uwrap: Add libc_getuid().

10 years agouwrap: Add libc_setuid().
Andreas Schneider [Tue, 17 Dec 2013 12:03:40 +0000 (13:03 +0100)]
uwrap: Add libc_setuid().

10 years agouwrap: Add uwrap_load_lib_function().
Andreas Schneider [Tue, 17 Dec 2013 11:59:49 +0000 (12:59 +0100)]
uwrap: Add uwrap_load_lib_function().

10 years agouwrap: Add uwrap_load_lib_handle().
Andreas Schneider [Tue, 17 Dec 2013 11:57:29 +0000 (12:57 +0100)]
uwrap: Add uwrap_load_lib_handle().

10 years agotests: Add a test for getgroups().
Andreas Schneider [Wed, 4 Dec 2013 17:07:54 +0000 (18:07 +0100)]
tests: Add a test for getgroups().

10 years agotests: Add a test for setgroups().
Andreas Schneider [Wed, 4 Dec 2013 16:58:44 +0000 (17:58 +0100)]
tests: Add a test for setgroups().

10 years agotests: Add a test for setgid().
Andreas Schneider [Wed, 4 Dec 2013 16:44:53 +0000 (17:44 +0100)]
tests: Add a test for setgid().

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

10 years agotests: Use SYS_gettimeofday for testing.
Andreas Schneider [Wed, 4 Dec 2013 16:08:19 +0000 (17:08 +0100)]
tests: Use SYS_gettimeofday for testing.

SYS_stat is a bad idea cause you need to know kernel internals.

10 years agotests: Fix testsuite on Solaris.
Andreas Schneider [Wed, 20 Nov 2013 15:27:25 +0000 (16:27 +0100)]
tests: Fix testsuite on Solaris.

10 years agouwrap: Fix build on Solaris.
Andreas Schneider [Wed, 20 Nov 2013 15:24:22 +0000 (16:24 +0100)]
uwrap: Fix build on Solaris.

10 years agocmake: Fix dashboard drop location.
Andreas Schneider [Wed, 20 Nov 2013 15:07:48 +0000 (16:07 +0100)]
cmake: Fix dashboard drop location.

10 years agocmake: Detect OSX.
Andreas Schneider [Fri, 15 Nov 2013 09:23:27 +0000 (10:23 +0100)]
cmake: Detect OSX.

10 years agoconfig: Add missing define for APPLE.
Andreas Schneider [Fri, 15 Nov 2013 09:21:20 +0000 (10:21 +0100)]
config: Add missing define for APPLE.

10 years agouwrap: Move pthread_atfork() to correct position.
Andreas Schneider [Fri, 15 Nov 2013 09:19:06 +0000 (10:19 +0100)]
uwrap: Move pthread_atfork() to correct position.

10 years agouwarp: Load libc functions on OSX.
Andreas Schneider [Fri, 15 Nov 2013 09:07:14 +0000 (10:07 +0100)]
uwarp: Load libc functions on OSX.

10 years agocmake: Add environment variables for OSX.
Andreas Schneider [Fri, 15 Nov 2013 08:47:32 +0000 (09:47 +0100)]
cmake: Add environment variables for OSX.

10 years agocmake: Build getuids only on Linux.
Andreas Schneider [Fri, 15 Nov 2013 08:44:19 +0000 (09:44 +0100)]
cmake: Build getuids only on Linux.

10 years agouwrap: Fix build on OSX.
Andreas Schneider [Fri, 15 Nov 2013 08:43:06 +0000 (09:43 +0100)]
uwrap: Fix build on OSX.

10 years agocmake: Add check for syscall prototype.
Andreas Schneider [Fri, 15 Nov 2013 08:41:41 +0000 (09:41 +0100)]
cmake: Add check for syscall prototype.

10 years agocmake: Add check for setgroups prototype.
Andreas Schneider [Fri, 15 Nov 2013 08:36:54 +0000 (09:36 +0100)]
cmake: Add check for setgroups prototype.

10 years agouwrap: Prevent deadlocks if the application forks.
Andreas Schneider [Mon, 11 Nov 2013 18:43:02 +0000 (19:43 +0100)]
uwrap: Prevent deadlocks if the application forks.

10 years agotests: Test the threading support of the syscalls.
Andreas Schneider [Mon, 11 Nov 2013 16:31:46 +0000 (17:31 +0100)]
tests: Test the threading support of the syscalls.

10 years agouwrap: Add UID_WRAPPER_ROOT=2 mode.
Andreas Schneider [Thu, 7 Nov 2013 18:15:55 +0000 (19:15 +0100)]
uwrap: Add UID_WRAPPER_ROOT=2 mode.

10 years agouwrap: Add a nwrap_setgroup which syncs all threads.
Andreas Schneider [Tue, 30 Jul 2013 15:17:24 +0000 (17:17 +0200)]
uwrap: Add a nwrap_setgroup which syncs all threads.

10 years agouwrap: Make initialization check faster.
Andreas Schneider [Tue, 30 Jul 2013 15:10:38 +0000 (17:10 +0200)]
uwrap: Make initialization check faster.

10 years agouwrap: Add mutexes to make it thread safe.
Andreas Schneider [Tue, 30 Jul 2013 14:56:12 +0000 (16:56 +0200)]
uwrap: Add mutexes to make it thread safe.

10 years agouwrap: Add support for thread safe functions.
Andreas Schneider [Tue, 30 Jul 2013 13:04:34 +0000 (15:04 +0200)]
uwrap: Add support for thread safe functions.

This is not fully working yet, but a start.

10 years agotests: Add test for setuid().
Andreas Schneider [Tue, 30 Jul 2013 13:59:01 +0000 (15:59 +0200)]
tests: Add test for setuid().

10 years agotests: Fix the testsuite to correctly work.
Andreas Schneider [Tue, 30 Jul 2013 13:05:09 +0000 (15:05 +0200)]
tests: Fix the testsuite to correctly work.

10 years agouwrap: Remove wrong SYS_initgroups.
Andreas Schneider [Mon, 29 Jul 2013 16:38:10 +0000 (18:38 +0200)]
uwrap: Remove wrong SYS_initgroups.

10 years agouwrap: Check the value of UID_WRAPPER env variable.
Andreas Schneider [Mon, 29 Jul 2013 10:07:01 +0000 (12:07 +0200)]
uwrap: Check the value of UID_WRAPPER env variable.

10 years agouwrap: Fix a typo in getgid().
Andreas Schneider [Mon, 29 Jul 2013 10:06:49 +0000 (12:06 +0200)]
uwrap: Fix a typo in getgid().

10 years agouwrap: Add UID_WRAPPER_ROOT environment variable.
Andreas Schneider [Fri, 26 Jul 2013 06:27:06 +0000 (08:27 +0200)]
uwrap: Add UID_WRAPPER_ROOT environment variable.

If UID_WRAPPER_ROOT is set then uid_wrapper is initialized with root.
This mean we fake that the process is started as root.

10 years agouwrap: Refactor uid and gid initialization.
Andreas Schneider [Fri, 26 Jul 2013 06:25:19 +0000 (08:25 +0200)]
uwrap: Refactor uid and gid initialization.

10 years agouwrap: Add support for real/save uid/gid changing.
Andreas Schneider [Thu, 25 Jul 2013 16:23:42 +0000 (18:23 +0200)]
uwrap: Add support for real/save uid/gid changing.

10 years agouwrap: Add ruid, suid, rgid and sgid.
Andreas Schneider [Thu, 25 Jul 2013 16:05:12 +0000 (18:05 +0200)]
uwrap: Add ruid, suid, rgid and sgid.

10 years agotests: Add a getuids helper.
Andreas Schneider [Thu, 25 Jul 2013 16:04:34 +0000 (18:04 +0200)]
tests: Add a getuids helper.

10 years agouwrap: Add error handling for seteuid().
Andreas Schneider [Thu, 25 Jul 2013 14:57:43 +0000 (16:57 +0200)]
uwrap: Add error handling for seteuid().

10 years agouwrap: Remove unneeded gid wrappers.
Andreas Schneider [Wed, 24 Jul 2013 10:00:57 +0000 (12:00 +0200)]
uwrap: Remove unneeded gid wrappers.

10 years agouwrap: Remove unneeded uid wrappers.
Andreas Schneider [Wed, 24 Jul 2013 09:58:27 +0000 (11:58 +0200)]
uwrap: Remove unneeded uid wrappers.

10 years agocmake: Check for thread local storage support.
Andreas Schneider [Wed, 24 Jul 2013 08:39:26 +0000 (10:39 +0200)]
cmake: Check for thread local storage support.

10 years agouwrap: Make sure we have the id syscalls.
Andreas Schneider [Wed, 24 Jul 2013 08:38:35 +0000 (10:38 +0200)]
uwrap: Make sure we have the id syscalls.

10 years agoAdd .clang_complete.
Andreas Schneider [Thu, 7 Nov 2013 10:37:52 +0000 (11:37 +0100)]
Add .clang_complete.

10 years agoAdd .gitignore
Andreas Schneider [Sat, 9 Nov 2013 10:41:48 +0000 (11:41 +0100)]
Add .gitignore

10 years agosrc: Add support for 32bit linux syscalls.
Andreas Schneider [Wed, 3 Jul 2013 11:27:40 +0000 (13:27 +0200)]
src: Add support for 32bit linux syscalls.

10 years agocmake: Fix ctest config.
Andreas Schneider [Tue, 2 Jul 2013 15:53:16 +0000 (17:53 +0200)]
cmake: Fix ctest config.

10 years agoAdd README, AUTHORS and ChangeLog.
Andreas Schneider [Tue, 2 Jul 2013 09:57:39 +0000 (11:57 +0200)]
Add README, AUTHORS and ChangeLog.

10 years agocmake: Fill out version numbers.
Andreas Schneider [Tue, 2 Jul 2013 09:57:23 +0000 (11:57 +0200)]
cmake: Fill out version numbers.

10 years agoFix the license of the source code.
Andreas Schneider [Tue, 2 Jul 2013 09:50:47 +0000 (11:50 +0200)]
Fix the license of the source code.

10 years agosrc: Make sure nothing overrides libc symbols.
Andreas Schneider [Fri, 28 Jun 2013 19:12:55 +0000 (21:12 +0200)]
src: Make sure nothing overrides libc symbols.

10 years agotests: Fix the test after setting the correct initial uid.
Andreas Schneider [Fri, 7 Jun 2013 11:10:19 +0000 (13:10 +0200)]
tests: Fix the test after setting the correct initial uid.

10 years agosrc: Fix setting the initial uid and gid.
Andreas Schneider [Fri, 7 Jun 2013 11:09:54 +0000 (13:09 +0200)]
src: Fix setting the initial uid and gid.

10 years agotests: Add as syscall stat test.
Andreas Schneider [Fri, 7 Jun 2013 08:15:27 +0000 (10:15 +0200)]
tests: Add as syscall stat test.

10 years agosrc: Remove unused header.
Andreas Schneider [Fri, 7 Jun 2013 08:15:14 +0000 (10:15 +0200)]
src: Remove unused header.

10 years agosrc: Add some debug output.
Andreas Schneider [Fri, 7 Jun 2013 08:14:59 +0000 (10:14 +0200)]
src: Add some debug output.

10 years agosrc: Add a libc_vsyscall() function.
Andreas Schneider [Thu, 6 Jun 2013 14:13:44 +0000 (16:13 +0200)]
src: Add a libc_vsyscall() function.