ira/third_party.git
5 years agotalloc: inline talloc_get_name()
Stefan Metzmacher [Wed, 4 Dec 2013 22:22:04 +0000 (23:22 +0100)]
talloc: inline talloc_get_name()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agotalloc: inline more static functions
Stefan Metzmacher [Wed, 20 Nov 2013 08:57:58 +0000 (09:57 +0100)]
talloc: inline more static functions

We need the code to be as fast as possible.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agotalloc: Tune talloc_vasprintf
Volker Lendecke [Fri, 10 Jan 2014 09:45:22 +0000 (10:45 +0100)]
talloc: Tune talloc_vasprintf

vsnprintf is significantly more expensive than memcpy. For the
common case where the string we print is less than a kilobyte, avoid
the second vsnprintf.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu May 15 12:49:14 CEST 2014 on sn-devel-104

5 years agoldbsamba: Move pyldb-utils dependency to python_samba__ldb
Kai Blin [Tue, 13 May 2014 22:22:01 +0000 (00:22 +0200)]
ldbsamba: Move pyldb-utils dependency to python_samba__ldb

This allows to build smbd statically again.

Pair-programmed-with: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Kai Blin <kai@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Kai Blin <kai@samba.org>
Autobuild-Date(master): Wed May 14 04:01:46 CEST 2014 on sn-devel-104

5 years agotdb: return ENOSYS if the tdb was created with spinlocks.
Stefan Metzmacher [Tue, 6 May 2014 09:52:49 +0000 (11:52 +0200)]
tdb: return ENOSYS if the tdb was created with spinlocks.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Mon May 12 21:07:04 CEST 2014 on sn-devel-104

5 years agopytdb: avoid const warnings by using discard_const_p()
Stefan Metzmacher [Mon, 3 Feb 2014 10:29:38 +0000 (11:29 +0100)]
pytdb: avoid const warnings by using discard_const_p()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agoswrap: Update version to 1.0.2.
Andreas Schneider [Thu, 8 May 2014 12:07:36 +0000 (14:07 +0200)]
swrap: Update version to 1.0.2.

This makes sure we require version 1.0.2 of the system library.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri May  9 11:36:55 CEST 2014 on sn-devel-104

5 years agoswrap: Fall back to RTLD_NEXT if we can't find libc.
Andreas Schneider [Thu, 8 May 2014 12:07:16 +0000 (14:07 +0200)]
swrap: Fall back to RTLD_NEXT if we can't find libc.

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agoFix some typos.
Jakub Wilk [Thu, 8 May 2014 13:30:09 +0000 (15:30 +0200)]
Fix some typos.

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

Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agoswrap: Use the loaded libc open() directly.
Andreas Schneider [Thu, 8 May 2014 12:05:30 +0000 (14:05 +0200)]
swrap: Use the loaded libc open() directly.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agoswrap: Do not leak memory in swrap_recvmsg_after().
Andreas Schneider [Thu, 8 May 2014 12:04:11 +0000 (14:04 +0200)]
swrap: Do not leak memory in swrap_recvmsg_after().

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Reviewed-by: Simo Sorce <idra@samba.org>
5 years agoparam: replace P_OCTAL variable setting with s3 version which uses sscanf
Garming Sam [Tue, 25 Feb 2014 23:31:03 +0000 (12:31 +1300)]
param: replace P_OCTAL variable setting with s3 version which uses sscanf

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolib/param: change set_variable to be more consistent with s3 loadparm
Garming Sam [Tue, 25 Feb 2014 23:06:03 +0000 (12:06 +1300)]
lib/param: change set_variable to be more consistent with s3 loadparm

Correctly frees CMDLIST memory and uses lp_int instead of atoi.

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolib/param: change a comment regarding helper parametric functions
Garming Sam [Tue, 25 Feb 2014 04:12:14 +0000 (17:12 +1300)]
lib/param: change a comment regarding helper parametric functions

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolib/param: remove unnecessary get_parametric s3 helper function
Garming Sam [Tue, 25 Feb 2014 04:07:31 +0000 (17:07 +1300)]
lib/param: remove unnecessary get_parametric s3 helper function

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolib/param: use get_parametric_helper in lpcfg_get_parametric
Garming Sam [Tue, 25 Feb 2014 04:02:52 +0000 (17:02 +1300)]
lib/param: use get_parametric_helper in lpcfg_get_parametric

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoparam: copy parametric option helper to lib/param
Garming Sam [Tue, 25 Feb 2014 03:58:21 +0000 (16:58 +1300)]
param: copy parametric option helper to lib/param

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolib/param: clean up lpcfg_get_parametric
Garming Sam [Tue, 25 Feb 2014 03:36:57 +0000 (16:36 +1300)]
lib/param: clean up lpcfg_get_parametric

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolib/param: Remove unused static variable defaults_saved
Andrew Bartlett [Mon, 27 Jan 2014 02:41:48 +0000 (15:41 +1300)]
lib/param: Remove unused static variable defaults_saved

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolib/param: Make lpcfg_equal_parameter static (again)
Andrew Bartlett [Mon, 27 Jan 2014 02:34:06 +0000 (15:34 +1300)]
lib/param: Make lpcfg_equal_parameter static (again)

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolib/param: Make and use lpcfg_dump_a_service() in common
Andrew Bartlett [Mon, 27 Jan 2014 02:32:39 +0000 (15:32 +1300)]
lib/param: Make and use lpcfg_dump_a_service() in common

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoAdd a comment regarding strwicmp only being an ASCII string compare
Garming Sam [Wed, 19 Mar 2014 19:56:42 +0000 (08:56 +1300)]
Add a comment regarding strwicmp only being an ASCII string compare

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoparam: remove NUMPARAMETERS macro from lib/param
Garming Sam [Thu, 13 Mar 2014 22:17:27 +0000 (11:17 +1300)]
param: remove NUMPARAMETERS macro from lib/param

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolib/param: use strwicmp instead of strlower_talloc
Garming Sam [Tue, 25 Feb 2014 02:47:02 +0000 (15:47 +1300)]
lib/param: use strwicmp instead of strlower_talloc

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolib/param: fix an error in the is_default method in lib/param
Garming Sam [Thu, 27 Feb 2014 02:26:10 +0000 (15:26 +1300)]
lib/param: fix an error in the is_default method in lib/param

This means that list values stored by s3 loadparm can still be detected as
default or not.

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoparam: move parametric parameter dumping to lpcfg_dump_a_parameter
Garming Sam [Wed, 26 Feb 2014 00:22:33 +0000 (13:22 +1300)]
param: move parametric parameter dumping to lpcfg_dump_a_parameter

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoparam: fix copy service to copy over cmdlist
Garming Sam [Mon, 24 Feb 2014 00:08:52 +0000 (13:08 +1300)]
param: fix copy service to copy over cmdlist

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <abartlet@samba.org>
5 years agoparam: correctly use param_table.c as a regular C file
Garming Sam [Sun, 23 Feb 2014 23:31:43 +0000 (12:31 +1300)]
param: correctly use param_table.c as a regular C file

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoparam: use a single special handler for idmap parameters
Garming Sam [Sun, 23 Feb 2014 21:38:37 +0000 (10:38 +1300)]
param: use a single special handler for idmap parameters

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoparam: add lp_do_parameter to s3 helpers
Garming Sam [Sun, 23 Feb 2014 21:30:03 +0000 (10:30 +1300)]
param: add lp_do_parameter to s3 helpers

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoparam: use a single handle_netbios_aliases function
Garming Sam [Sun, 23 Feb 2014 21:12:48 +0000 (10:12 +1300)]
param: use a single handle_netbios_aliases function

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoparam: include set_netbios_aliases in s3 helpers
Garming Sam [Sun, 23 Feb 2014 20:58:05 +0000 (09:58 +1300)]
param: include set_netbios_aliases in s3 helpers

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoparam: setup ctx variable in loadparm globals
Garming Sam [Wed, 19 Mar 2014 20:09:58 +0000 (09:09 +1300)]
param: setup ctx variable in loadparm globals

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agomove str_list_make_v3 out of s3 code
Garming Sam [Mon, 24 Feb 2014 04:33:57 +0000 (17:33 +1300)]
move str_list_make_v3 out of s3 code

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoparam: have a single handle_ldap_debug_level function
Garming Sam [Sun, 23 Feb 2014 20:53:44 +0000 (09:53 +1300)]
param: have a single handle_ldap_debug_level function

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoparam: include init_ldap_debugging in the s3 helpers
Garming Sam [Sun, 23 Feb 2014 20:47:17 +0000 (09:47 +1300)]
param: include init_ldap_debugging in the s3 helpers

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoparam: make lp_do_parameter_parametric use set_param_opt
Garming Sam [Sun, 23 Feb 2014 20:34:45 +0000 (09:34 +1300)]
param: make lp_do_parameter_parametric use set_param_opt

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoparam: move handle printing into lib/param
Garming Sam [Fri, 21 Feb 2014 04:59:41 +0000 (17:59 +1300)]
param: move handle printing into lib/param

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoparam: setup more variables in for the temporary loadparm context for the special...
Garming Sam [Fri, 21 Feb 2014 04:59:19 +0000 (17:59 +1300)]
param: setup more variables in for the temporary loadparm context for the special functions

In doing so, the loadparm context definition is now also moved to the loadparm.h header.

This means that the loadparm context is no longer private to the
lib/param code and that the source3 code can now override the values
within it.

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoparam: add extra default parameter to get_parametrics_by_service
Garming Sam [Fri, 21 Feb 2014 04:16:15 +0000 (17:16 +1300)]
param: add extra default parameter to get_parametrics_by_service

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoparam: make init_printer_values use lpcfg functions
Garming Sam [Fri, 21 Feb 2014 03:09:01 +0000 (16:09 +1300)]
param: make init_printer_values use lpcfg functions

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolib/param: use lp_set_enum_parm
Garming Sam [Fri, 21 Feb 2014 02:47:27 +0000 (15:47 +1300)]
lib/param: use lp_set_enum_parm

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoparam: move lp_set_enum_parm to lib/param
Garming Sam [Fri, 21 Feb 2014 02:40:43 +0000 (15:40 +1300)]
param: move lp_set_enum_parm to lib/param

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoparam: remove duplicate lp_bool function
Garming Sam [Fri, 21 Feb 2014 02:18:33 +0000 (15:18 +1300)]
param: remove duplicate lp_bool function

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoparam: remove duplicate lp_ulong function
Garming Sam [Fri, 21 Feb 2014 02:16:26 +0000 (15:16 +1300)]
param: remove duplicate lp_ulong function

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoparam: remove duplicate lp_int function
Garming Sam [Fri, 21 Feb 2014 02:13:58 +0000 (15:13 +1300)]
param: remove duplicate lp_int function

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <abartlet@samba.org>
5 years agoparam: use a single handle_include function between the two loadparms
Garming Sam [Fri, 21 Feb 2014 02:13:28 +0000 (15:13 +1300)]
param: use a single handle_include function between the two loadparms

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoparam: fix a bug where set_cmdline doesn't ignore the whitespace
Garming Sam [Thu, 20 Feb 2014 03:53:28 +0000 (16:53 +1300)]
param: fix a bug where set_cmdline doesn't ignore the whitespace

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoparam: move special charset handlers to lib/param
Garming Sam [Thu, 20 Feb 2014 03:37:16 +0000 (16:37 +1300)]
param: move special charset handlers to lib/param

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoparam: add getservicebyname to s3_helpers
Garming Sam [Wed, 19 Feb 2014 05:08:47 +0000 (18:08 +1300)]
param: add getservicebyname to s3_helpers

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoparam: use a single init_copymap method in lib/param
Garming Sam [Thu, 20 Feb 2014 02:00:27 +0000 (15:00 +1300)]
param: use a single init_copymap method in lib/param

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoparam: move the declaration of the file_lists structure to a shared header
Garming Sam [Wed, 19 Feb 2014 22:07:28 +0000 (11:07 +1300)]
param: move the declaration of the file_lists structure to a shared header

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoparam: use a single add_to_file_list method
Garming Sam [Wed, 19 Feb 2014 22:01:52 +0000 (11:01 +1300)]
param: use a single add_to_file_list method

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolib/param: change add_to_file_list to not use a loadparm context
Garming Sam [Wed, 19 Feb 2014 21:58:15 +0000 (10:58 +1300)]
lib/param: change add_to_file_list to not use a loadparm context

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoparam: consolidate handle_copy method between the two loadparms
Garming Sam [Wed, 19 Feb 2014 21:24:00 +0000 (10:24 +1300)]
param: consolidate handle_copy method between the two loadparms

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolib/param: rename getservicebyname to lpcfg_getservicebyname to avoid conflicts
Garming Sam [Wed, 19 Feb 2014 05:03:57 +0000 (18:03 +1300)]
lib/param: rename getservicebyname to lpcfg_getservicebyname to avoid conflicts

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoparam: use a single copy_service function in lib/param
Garming Sam [Wed, 19 Feb 2014 00:47:38 +0000 (13:47 +1300)]
param: use a single copy_service function in lib/param

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoparam: duplicate the copy service in lib/param into source3 loadparm
Garming Sam [Wed, 19 Feb 2014 00:38:09 +0000 (13:38 +1300)]
param: duplicate the copy service in lib/param into source3 loadparm

Change-Id: I9ddd9ba9c05ab226a335d261554dd1587f7e59fc
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agolib/param: fix copy service to correctly free the memory used by P_LIST
Garming Sam [Tue, 18 Feb 2014 23:58:36 +0000 (12:58 +1300)]
lib/param: fix copy service to correctly free the memory used by P_LIST

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolib/param: remove some const warnings from using lists
Garming Sam [Tue, 18 Feb 2014 00:27:43 +0000 (13:27 +1300)]
lib/param: remove some const warnings from using lists

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolib/param: remove duplicated copy service in lpcfg_add_a_service
Garming Sam [Tue, 18 Feb 2014 00:26:22 +0000 (13:26 +1300)]
lib/param: remove duplicated copy service in lpcfg_add_a_service

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoparam: make lib/param copy_service use set_param_opt
Garming Sam [Mon, 17 Feb 2014 23:25:35 +0000 (12:25 +1300)]
param: make lib/param copy_service use set_param_opt

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoparam: move set_param_opt to lib/param
Garming Sam [Mon, 17 Feb 2014 23:06:57 +0000 (12:06 +1300)]
param: move set_param_opt to lib/param

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-on: https://gerrit.samba.org/109
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoparam: consolidate handle_realm between the two loadparms
Garming Sam [Mon, 17 Feb 2014 20:41:39 +0000 (09:41 +1300)]
param: consolidate handle_realm between the two loadparms

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-on: https://gerrit.samba.org/105
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoparam: attempt to consolidate handle_logfile between the two loadparms
Garming Sam [Mon, 17 Feb 2014 03:38:59 +0000 (16:38 +1300)]
param: attempt to consolidate handle_logfile between the two loadparms

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-on: https://gerrit.samba.org/104
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoparam: attempt to consolidate handle_debug_level between the two loadparms
Garming Sam [Mon, 17 Feb 2014 03:33:55 +0000 (16:33 +1300)]
param: attempt to consolidate handle_debug_level between the two loadparms

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-on: https://gerrit.samba.org/102
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoparam: Add an lp_string_set function
Garming Sam [Mon, 17 Feb 2014 02:55:35 +0000 (15:55 +1300)]
param: Add an lp_string_set function

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-on: https://gerrit.samba.org/100
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agobuild: unify and fix endian tests
Gustavo Zacarias [Mon, 21 Apr 2014 13:18:15 +0000 (10:18 -0300)]
build: unify and fix endian tests

Unify the endian tests out of lib/ccan/wscript into wafsamba since
they're almost cross-compile friendly.
While at it fix them to be so by moving the preprocessor directives out
of main scope since that will fail.
And keep the WORDS_BIGENDIAN, HAVE_LITTLE_ENDIAN and HAVE_BIG_ENDIAN
defines separate because of different codebases.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
5 years agobyteorder: do not assume PowerPC is big-endian
David Disseldorp [Mon, 5 May 2014 11:42:36 +0000 (13:42 +0200)]
byteorder: do not assume PowerPC is big-endian

byteorder.h currently uses reverse-indexing ASM instructions for little
endian multi-byte storage/retrieval on PowerPC. With Power8 this is an
incorrect assumption, as it can be big or little endian.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10590

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
5 years agoldb: make the successful ldb_transaction_start() message clearer
Andrew Bartlett [Wed, 16 Apr 2014 21:33:26 +0000 (09:33 +1200)]
ldb: make the successful ldb_transaction_start() message clearer

Change-Id: I00d0705484c3b53f55c4a8ec2953e92329b7408e
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Sat May  3 10:20:52 CEST 2014 on sn-devel-104

5 years agoldb: change version to 1.1.17
Stefan Metzmacher [Tue, 29 Apr 2014 07:37:54 +0000 (09:37 +0200)]
ldb: change version to 1.1.17

This adds some pyldb methods for ldb.Dn.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agoldb:pyldb: add some more helper functions for LdbDn
Stefan Metzmacher [Tue, 29 Apr 2014 07:35:31 +0000 (09:35 +0200)]
ldb:pyldb: add some more helper functions for LdbDn

This adds [g|s]et_component[|_name|_value]() and get_rdn_[name|value]().

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agoldb:pyldb: fix doc string for set_extended_component()
Stefan Metzmacher [Tue, 29 Apr 2014 07:34:48 +0000 (09:34 +0200)]
ldb:pyldb: fix doc string for set_extended_component()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agoldb:pyldb: add some const to PyObject_FromLdbValue()
Stefan Metzmacher [Tue, 29 Apr 2014 07:32:45 +0000 (09:32 +0200)]
ldb:pyldb: add some const to PyObject_FromLdbValue()

PyString_FromStringAndSize() makes a copy of the value...

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agoadd systemd integration
Alexander Bokovoy [Tue, 25 Mar 2014 10:53:04 +0000 (12:53 +0200)]
add systemd integration

Add --with-systemd / --without-systemd options to check whether
libsystemd-daemon library is available and use it to report service
startup status to systemd for smbd/winbindd/nmbd and AD DC.

The problem it solves is correct reporting of the Samba services
at the point when they are ready to serve clients, important for
high availability software integration.

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

Signed-off-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agolib: Remove socket wrapper python module.
Andreas Schneider [Thu, 13 Feb 2014 14:55:30 +0000 (15:55 +0100)]
lib: Remove socket wrapper python module.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Apr 17 17:12:50 CEST 2014 on sn-devel-104

5 years agolib: Change socket_wrapper to preloadable version.
Andreas Schneider [Mon, 7 Apr 2014 14:12:21 +0000 (16:12 +0200)]
lib: Change socket_wrapper to preloadable version.

This imports socket_wrapper 1.0.1.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agoRemove special socket_wrapper code.
Andreas Schneider [Mon, 7 Apr 2014 14:09:00 +0000 (16:09 +0200)]
Remove special socket_wrapper code.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agoreplace: Add socket_wrapper_enabled().
Andreas Schneider [Wed, 12 Feb 2014 15:24:26 +0000 (16:24 +0100)]
replace: Add socket_wrapper_enabled().

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agoldb: Add a env variable to disable RTLD_DEEPBIND.
Andreas Schneider [Tue, 4 Mar 2014 12:50:41 +0000 (13:50 +0100)]
ldb: Add a env variable to disable RTLD_DEEPBIND.

We need a way to disable this in order to allow the
ldb_*ldap modules to work with a preloaded socket wrapper.

The only known user is the bind_dlz module,
but symbol versioniong might be enough...

So in future we may remove this completely
or at least invert the default behavior.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agolib: Change nss_wrapper to preloadable version.
Andreas Schneider [Fri, 31 Jan 2014 14:57:43 +0000 (15:57 +0100)]
lib: Change nss_wrapper to preloadable version.

This imports nss_wrapper version 1.0.2.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agoRemove special nss_wrapper code
Andreas Schneider [Wed, 3 Jul 2013 12:04:57 +0000 (14:04 +0200)]
Remove special nss_wrapper code

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agoreplace: Add nss_wrapper_hosts_enabled().
Andreas Schneider [Tue, 8 Apr 2014 08:07:14 +0000 (10:07 +0200)]
replace: Add nss_wrapper_hosts_enabled().

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agoreplace: Add nss_wrapper_enabled().
Andreas Schneider [Mon, 7 Apr 2014 14:32:20 +0000 (16:32 +0200)]
replace: Add nss_wrapper_enabled().

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agolib: Add missing include for unistd.h in unix_privs.
Andreas Schneider [Mon, 7 Apr 2014 14:29:21 +0000 (16:29 +0200)]
lib: Add missing include for unistd.h in unix_privs.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agolib: Add missing include for unistd.h in setid.
Andreas Schneider [Mon, 7 Apr 2014 14:27:22 +0000 (16:27 +0200)]
lib: Add missing include for unistd.h in setid.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agoRemove uid_wrapper related code.
Andreas Schneider [Wed, 3 Jul 2013 10:52:52 +0000 (12:52 +0200)]
Remove uid_wrapper related code.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agolib: Change uid_wrapper to preloadable version.
Andreas Schneider [Fri, 17 Jan 2014 13:43:01 +0000 (14:43 +0100)]
lib: Change uid_wrapper to preloadable version.

This imports version 1.0.1 of uid_wrapper.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agoreplace: Add uid_wrapper_enabled().
Andreas Schneider [Fri, 17 Jan 2014 14:23:54 +0000 (15:23 +0100)]
replace: Add uid_wrapper_enabled().

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agolib-util: rename memdup to smb_memdup and fix all callers
Björn Baumbach [Mon, 14 Apr 2014 12:37:29 +0000 (14:37 +0200)]
lib-util: rename memdup to smb_memdup and fix all callers

Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 years agoauth: Remove plaintext OSF1 password support
Andrew Bartlett [Wed, 22 Jan 2014 02:40:19 +0000 (15:40 +1300)]
auth: Remove plaintext OSF1 password support

The WAF build does not have the code to detect getprpwnam on which
this is based, and so this is dead code.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
5 years agolibs: s3 and s4: make our dns lookup code signal-safe.
Jeremy Allison [Wed, 9 Apr 2014 22:27:45 +0000 (15:27 -0700)]
libs: s3 and s4: make our dns lookup code signal-safe.

Cope with -1,EINTR returns. Needed as this code can be
called from inside smbd.

Also fixes a bug in not checking the return from poll()
correctly.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Kai Blin <kai@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Apr 10 22:06:08 CEST 2014 on sn-devel-104

5 years agotdb: consolidate tdb allocation code - re-use dead records at hash top.
Michael Adam [Wed, 19 Mar 2014 12:38:17 +0000 (13:38 +0100)]
tdb: consolidate tdb allocation code - re-use dead records at hash top.

When in tdb_store we re-use a dead record reactivated from the
target hash chain itself, we currently leave it in its place in
the chain. When we re-use a dead record from a different chain or
from the freelist instead, we insert it at the beginning of the
target chain.

This patch changes the behaviour to always newly store a
record at the beginning of the hash chain. This removes
a special case and hence simplifies the allocation code.
On the other hand side, it introduces two additioal tdb_ofs_write
calls for the in-chain-case.

Note the subtelty of the patch that by moving the case of the candidate
record's chain as new case "i=0" into the for loop, we also reverse the
order of the two steps in the for-loop body (non blocking freelist alloc
and searching for dead record in a chain) in order to keep the overall
order of execution identical.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Wed Apr  9 10:37:08 CEST 2014 on sn-devel-104

5 years agotalloc: Update flags in pytalloc-util pkgconfig file
Lukas Slebodnik [Fri, 4 Apr 2014 11:29:39 +0000 (13:29 +0200)]
talloc: Update flags in pytalloc-util pkgconfig file

After exapnding, @LIB_RPATH@ will be -Wl,-rpatch,/usr/local/lib if rpath is
used on install. But "-Wl," will be passed to linker and should not be among
CFLAGS. Other pkgconfig files have @LIB_RPATH@ in the right place.
    @see commit 735c1cd2da15167748e92ba6de48fdb5169db587

Signed-off-by: Lukas Slebodnik <lslebodn@redhat.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Fri Apr  4 23:50:25 CEST 2014 on sn-devel-104

5 years agotevent: Update flags in tevent pkgconfig file
Lukas Slebodnik [Fri, 4 Apr 2014 11:27:35 +0000 (13:27 +0200)]
tevent: Update flags in tevent pkgconfig file

After exapnding, @LIB_RPATH@ will be -Wl,-rpatch,/usr/local/lib if rpath is
used on install. But "-Wl," will be passed to linker and should not be among
CFLAGS. Other pkgconfig files have @LIB_RPATH@ in the right place.
    @see commit 735c1cd2da15167748e92ba6de48fdb5169db587

Signed-off-by: Lukas Slebodnik <lslebodn@redhat.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agolib/param: Add new parameter "old password allowed period"
Andrew Bartlett [Mon, 9 Dec 2013 01:23:49 +0000 (14:23 +1300)]
lib/param: Add new parameter "old password allowed period"

Change-Id: I46228b492ba71ba4f3fee380a1ccadb328e3ade1
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agoldb_ildap: Map some wrong username/password errors on to LDB_ERR_INVALID_CREDENTIALS
Andrew Bartlett [Mon, 25 Nov 2013 01:09:26 +0000 (14:09 +1300)]
ldb_ildap: Map some wrong username/password errors on to LDB_ERR_INVALID_CREDENTIALS

This is better than just LDB_ERR_OPERATIONS_ERROR for all errors.

Andrew Bartlett

Change-Id: Id832cf02fcd1dc0347d5ab9eb9a2db78fda39dc6
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agodlinklist: Fix a typo
Volker Lendecke [Wed, 2 Apr 2014 12:52:01 +0000 (14:52 +0200)]
dlinklist: Fix a typo

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Wed Apr  2 17:11:37 CEST 2014 on sn-devel-104

5 years agolib/socket_wrapper: explicitly use allow_warnings=True
Stefan Metzmacher [Wed, 26 Feb 2014 06:35:22 +0000 (07:35 +0100)]
lib/socket_wrapper: explicitly use allow_warnings=True

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agolib/zlib: explicitly use allow_warnings=True
Stefan Metzmacher [Wed, 26 Feb 2014 06:35:22 +0000 (07:35 +0100)]
lib/zlib: explicitly use allow_warnings=True

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>