summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* debug: slprintf->snprintfVolker Lendecke2014-07-311-6/+7
| | | | | | | snprintf does not need the -1 in sizeof(buf)-1 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* debug: Use timeval_str_buf in dbghdrclassVolker Lendecke2014-07-311-12/+11
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* debug: Simplify dbghdrclass with an early returnVolker Lendecke2014-07-311-41/+43
| | | | | | | No code change, visible with "git diff -w" Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* lib: Create time_basic.[ch]Volker Lendecke2014-07-316-66/+130
| | | | | | | | | Make the two functions that debug.c needs a subsystem of their own. The goal is to put debug.c on a diet. Anybody who wants to use it should not be forced to pull in half of Samba :-) Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* lib: Use timeval_str_buf in timeval_stringVolker Lendecke2014-07-311-38/+17
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* lib: Add timeval_str_bufVolker Lendecke2014-07-312-0/+51
| | | | | | | Similarly to server_id_str_buf it does not do any allocation Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* debug: Statically allocate format_bufrVolker Lendecke2014-07-311-10/+2
| | | | | | | | Everybody needs this, so there's no point talloc'ing it. The side effect is that it removes a dependency on smb_panic() Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* debug: Fix debug_parse_paramsVolker Lendecke2014-07-311-1/+1
| | | | | | | | | | | | | | The additional check this patch removes potentially drops some debuglevel class settings. While not documented, it is possible to add a debug class like for example "tdb:10" multiple times with multiple values. Later settings overwrite earlier ones, but only if the overall number of settings does not exceed the total number of available debug classes. This patch changes our behaviour, but I can't imagine a situation where someone relies on this check. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* debug: Make Debug1 staticVolker Lendecke2014-07-312-2/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* debug: Remove a dependency on charconvVolker Lendecke2014-07-311-1/+1
| | | | | | | | | | | | | | | | util_str has: /* characters below 0x3F are guaranteed to not appear in non-initial position in multi-byte charsets */ if ((c & 0xC0) == 0) { return strrchr(s, c); } '/' is 0x2f, so there's no point in calling strrchr_m and thus pulling in a whole lot of stuff Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* debug: Add some readability to debug_logtypeVolker Lendecke2014-07-311-1/+8
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* debug: Factor out debug_parse_param()Volker Lendecke2014-07-311-8/+31
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* debug: Move variables where they are usedVolker Lendecke2014-07-311-2/+2
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* debug: Fix indentation in debug_parse_paramsVolker Lendecke2014-07-311-5/+6
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* param: remove a redundant (and wrong) comment frop lpcfg_service_ok()Michael Adam2014-07-311-1/+0
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:param: remove unused function lp_string_set()Michael Adam2014-07-311-1/+0
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* lib/param: change the default for "winbind expand groups" to "0"Stefan Metzmacher2014-07-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Expanding groups requires the usage of SAMR, which is often not possible with the trust account credentials. This has caused a lot of trouble in the past, as this is the only operation which requires a member to contact a dc of a trusted domain directly, which is not always possible. With this changed default, it should only be required to contact a dc of our own domain. This is the correct behavior for a domain member. As expanding groups is mostly cosmetic, we should avoid it. This is similar to "winbind enum users" and "winbind enum groups", which are also off by default. Only some broken applications calculate the group memberships of users by traversing groups, such applications will require "winbind expand groups = 1". Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Björn Jacke <bj@sernet.de> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Thu Jul 31 18:48:36 CEST 2014 on sn-devel-104
* debug: Remove thread-related code from debug.cVolker Lendecke2014-07-312-88/+0
| | | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Thu Jul 31 16:20:53 CEST 2014 on sn-devel-104
* param: Add errors for when an s3 context is used incorrectlyGarming Sam2014-07-311-0/+9
| | | | | | | | | | Change-Id: I176b4413769f41739639875ab874a3e340b6a184 Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Thu Jul 31 10:41:58 CEST 2014 on sn-devel-104
* param: get rid of unnecessary get_default_loadparm_service pointerGarming Sam2014-07-312-4/+0
| | | | | | | Change-Id: I9f512be671e5cd738c43fd97c9c3e0b4ee7a2736 Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* param: remove unused lp_do_parameter from s3 helpersGarming Sam2014-07-311-1/+0
| | | | | | | Change-Id: I0de55ee30beb6b94350700afcdb85155e913bda8 Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* param: remove unnecessary lp_do_parameter callGarming Sam2014-07-311-8/+2
| | | | | | Change-Id: I0cd1842bac3fcb6dde7236b87d5d235f10277e60 Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* param: remove lp_get_parameterGarming Sam2014-07-312-7/+4
| | | | | | | | | Ensure lpcfg_parm_struct, its counterpart is equivalent Change-Id: I127ce5d3cf7fe02ebf161aa011ec3b41bc32a656 Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* param: remove init printer values from s3-helpersGarming Sam2014-07-313-8/+2
| | | | | | | Change-Id: I2c4a85b4f5039158924982a277be20ebc2d6302e Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* param: move init_printer_values to lib/paramGarming Sam2014-07-311-0/+121
| | | | | | | Change-Id: I45df7d589c742d6e5572b0950daed563533cca3c Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* param: change init_printer_values to take an lp ctxGarming Sam2014-07-313-4/+5
| | | | | | | Change-Id: I55cda94bbf1daf276ec0c45b056bd81645eaa25f Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* param: add the necessary new line for the debug message in handle_copyGarming Sam2014-07-311-1/+1
| | | | | | | Change-Id: Ia6fc12b9d85032b6f501395cd82c31bcfe229822 Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* param: add missing talloc_free in lpcfg_file_list_changed which are present ↵Garming Sam2014-07-311-0/+2
| | | | | | | | | in s3 Change-Id: Ib363069f5ecc4fc743aadf143efd640e00d74543 Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* param: make is_default method static againGarming Sam2014-07-311-1/+1
| | | | | | | Change-Id: Icf509a5a8098efcc94e4372742ca9a20a987ad9e Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* param: use lpcfg_dump_globals in s3 loadparmGarming Sam2014-07-311-1/+1
| | | | | | | Change-Id: I7f7f5238a47e0c3634757b74f3f852ce36988614 Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* param: rename dump_globalsGarming Sam2014-07-311-2/+2
| | | | | | | Change-Id: Ia587b8c968dedfcf9b3374d4a4f87bfaa37b01be Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* param: allow dump_globals to check the actual defaultsGarming Sam2014-07-311-2/+10
| | | | | | | Change-Id: Ia5f30b6922b2e836d3e93403c61458ee58d993fd Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* param: remove is_default method in s3Garming Sam2014-07-311-1/+1
| | | | | | | Change-Id: Ia9c7422c5f7b56eb81ad644b369bfa36849e963e Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* param: make is_default more genericGarming Sam2014-07-311-2/+2
| | | | | | | Change-Id: Ie380bb7083d96e4ebb1574b7d1e3df0b34f70352 Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* param: use lpcfg_service_ok in s3 loadparmGarming Sam2014-07-311-2/+1
| | | | | | | Change-Id: Ic157d3f5ec7ac9a72db86239e76cd743149cb8e0 Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* param: add extra condition in lpcfg_service_okGarming Sam2014-07-311-0/+9
| | | | | | | Change-Id: Id9a95748904516fd34869fee61b1e85b6d14f083 Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:param: remove lp_string_set from the s3_fns.Garming Sam2014-07-311-1/+0
| | | | | | | | This is not used any more. Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* param: remove unnecessary uses of lp_string_setGarming Sam2014-07-311-24/+9
| | | | | | | Change-Id: I190e8b62dee24c998f388eae1cc9558e6b8bc925 Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* param: Use the correct flag locations with lpcfg_parm_is_cmdlineGarming Sam2014-07-311-8/+0
| | | | | | | | | | s3 flags are no longer being stored in the param table anymore. They shouldn't be used in this manner anymore. Change-Id: Ib97492fd9149e30d7756ca603f79321d7516f19b Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* lib/util: remove outdated comment from debug.cMichael Adam2014-07-301-4/+0
| | | | | | | These variables do not exist any more. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s3: winbindd: Add new parameter "winbind request timeout" set to 60 seconds ↵Jeremy Allison2014-07-292-0/+11
| | | | | | | | | | | | | | | | | with man page. "This parameter specifies the number of seconds the winbindd daemon will wait before disconnecting either a client connection with no outstanding requests (idle) or a client connection with a request that has remained outstanding (hung) for longer than this number of seconds." Bug 3204 winbindd: Exceeding 200 client connections, no idle connection found https://bugzilla.samba.org/show_bug.cgi?id=3204 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ira Cooper <ira@samba.org>
* Fix now erroneous comment for directory_create_or_exist()Jeremy Allison2014-07-291-1/+1
| | | | | | | | | | It doesn't do any checking that the permissions are correct. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Tue Jul 29 14:41:42 CEST 2014 on sn-devel-104
* lib: directory_create_or_exist() does not use "uid" parameterVolker Lendecke2014-07-283-6/+4
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: Simplify directory_create_or_exist with an early returnVolker Lendecke2014-07-281-23/+24
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* sys_poll_intr: fix timeout arithmeticDaniel Kobras2014-07-221-2/+12
| | | | | | | | | | | | | | Callers of sys_poll_intr() assume timeout to be in milliseconds like poll(2) expects, but implementation used nanosecond units. Also make sure timeout doesn't become infinite by mistake during time arithmetic. Signed-off-by: Daniel Kobras <d.kobras@science-computing.de> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue Jul 22 00:12:24 CEST 2014 on sn-devel-104
* lib/util: move memcache.[ch] to the toplevel 'samba-util' libraryStefan Metzmacher2014-07-183-1/+533
| | | | | | | | | | This is generic enough that it could be used in all code. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Fri Jul 18 15:43:33 CEST 2014 on sn-devel-104
* ldb-samba: fix a memory leak in ldif_canonicalise_objectCategory()Stefan Metzmacher2014-07-171-1/+6
| | | | | | | | | | | | | Searches for '(objectCategory=Person)' will leak a ldb_dn structure on the ldb_context. These searches are typically used by Zarafa. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10469 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Thu Jul 17 00:51:57 CEST 2014 on sn-devel-104
* lib/zlib: Remove undeeded files that trigger GPL issues.Ira Cooper2014-07-164-0/+0
| | | | | | | | | | | These files have been removed in upstream versions of zlib due to the fact that binaries tend to become GPL violations. Signed-off-by: Ira Cooper <ira@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Ira Cooper <ira@samba.org> Autobuild-Date(master): Wed Jul 16 19:14:56 CEST 2014 on sn-devel-104
* s3:smb2_negprot: change "smb max {read,write,trans}" to 8MiB (as default)Stefan Metzmacher2014-07-111-3/+3
| | | | | | | | | | This matches Windows 2012R2. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Fri Jul 11 04:59:29 CEST 2014 on sn-devel-104
* param: change snum parameter in special functions to a loadparm_service pointerGarming Sam2014-07-073-41/+50
| | | | | | | | | | | | | | Using either an snum or the current service for special functions depending where it was called is unnecessary and complicates the process of handling them generically. idmap parameters now call lpcfg_do_parameter_parametric and are now set like normal. Change-Id: I3eca89791274280f9d3c7b987fbd790c16ec7981 Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>