summaryrefslogtreecommitdiffstats
path: root/source3
Commit message (Collapse)AuthorAgeFilesLines
* param: replace lp_set_cmdline in s3 helpers to store_cmdlineGarming Sam2014-07-072-5/+9
| | | | | | | Change-Id: I9a6ac66eeb8e0dd9ba356f5201f7ac09784b476d Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* param: set the flags on a s3 loadparm contextGarming Sam2014-07-072-1/+15
| | | | | | | | | | By setting up the flags when we initialize the context, the flags can be accessed by lib/param at any time. Change-Id: I60d4f3a9108560e204cf5f37da9c7d995939e146 Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
* param: flag fixes in s3 loadparmGarming Sam2014-07-071-1/+25
| | | | | | | | | | In s3 loadparm, the flags are stored in the param table, while in lib/param, it is individual to a loadparm context. Change-Id: I23d72eeec6b935c1897b34b8fc49d5a9992f2993 Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
* param: attempt to start factoring out the bInGlobalSection parameterGarming Sam2014-07-071-2/+3
| | | | | | | | | | Eventually this parameter should be solely on the loadparm context. It should really only have meaning during the globals init. Change-Id: If0fd2037ce4e8399fbf00f63bc138d9c146d7570 Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
* param: add do_section to s3 helpersGarming Sam2014-07-072-2/+2
| | | | | | | Change-Id: Ib9cee580f46fcb6d5046e606b4bfbf9e68dab76a Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
* param: rename do_section in s3 to lp_do_section to avoid conflictsGarming Sam2014-07-071-5/+5
| | | | | | | Change-Id: I9bb090b3b501a1e958eec17988901baed16c58cb Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
* param: remove unnecessary calls to do_parameter in s3Garming Sam2014-07-071-4/+25
| | | | | | | | | | | This aim of this is to try to factor out do_parameter. Ideally, do_parameter should strictly be called from pm_process. Change-Id: I990b53d0884e828f523a3b40e4ca72cc1596b06c Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
* param: remove unnecessary lp_local_ptr_by_snum functionGarming Sam2014-07-071-11/+2
| | | | | | | | | | The function only appears twice and it can be easily inlined without any real loss to meaning or readability. Change-Id: Iabf6d202cedd95ad4f223e89c7d3be8dfbe36389 Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
* param: avoid the use of lp_do_parameter in poptGarming Sam2014-07-071-1/+1
| | | | | | | | | lp_do_parameter ideally should not be used outside of loadparm Change-Id: I310f1a0ff81867151accbda551751bafcdfd8c4d Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
* param: move defaults_saved global out of dump_globals functionGarming Sam2014-07-071-3/+3
| | | | | | | | | Removes an unnecessary dependency on a global variable. Change-Id: I87fc63190a3b8ceba5fb5606fa0e7d5e1f2633a4 Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
* param: use set_variable_helper in s3 loadparmGarming Sam2014-07-071-120/+1
| | | | | | | Change-Id: I1ed19ee7290f6b52f624e2aa700cf402cfcb255d Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
* param: finish the set_param_helper lineup by rearranging case orderGarming Sam2014-07-071-6/+7
| | | | | | | | | Attempting to make the code match exactly before moving it over. Change-Id: If05fccd11d245176b5793e59d1b92317b25fd2c8 Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
* param: make some more changes to lp_do_parameter to match set_variable_helperGarming Sam2014-07-071-18/+30
| | | | | | | | | Attempting to make the code match exactly before moving it over. Change-Id: Ie7a30d5477f3fbf95f8f43e1ac1f76b581d87709 Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
* param: attempt to align the set_variable_helper with lp_do_parameterGarming Sam2014-07-071-3/+2
| | | | | | | | | This should allow some of it to be factored out into lib/param. Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org> Change-Id: I7d0b3b4114c73aeaf9bf63e8c5fcd0a9d00cfc00
* param: pre-emptively correct use of str_list_make_v3 in lib/paramGarming Sam2014-07-071-0/+4
| | | | | | | | | | | | | | | lib/param uses str_list_make, while, s3 uses str_list_make_v3. These differ slightly and should be made the same. Notably it returns NULL when given a null or empty string Also, includes the null check in s3 code to be consistent for merging this section of code later on. Change-Id: Ib543a5a5307e06989621ea16bfe87e315d66a7ef Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
* param: Use the plus/minus syntax for reading in lists in s3 loadparmGarming Sam2014-07-071-0/+31
| | | | | | | | | | | | | | This changes the behaviour the following parameters: server services, dcerpc endpoint servers and ntvfs handler These parameters were introduced with samba4 and are the parameters which should utilize the newer list syntax. This allows merging between the setting of parameters. Change-Id: Id6226b5bede5cd4908f6718bd1b799faf881927d Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
* param: ensure CMD_LIST is freed when freeing a parameterGarming Sam2014-07-071-1/+1
| | | | | | | | | | | As well as correctly deallocating the memory, this prevents a potential bug where s3 globals struct may be freed, but it can be referred to elsewhere. Change-Id: I92fc9baa26aee5b4a35b767bed901928cbb7c74f Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
* smbcacls: parse config file argument prior to loadDavid Disseldorp2014-07-071-2/+3
| | | | | | | | | | Fixes usage with the common "-s|--configfile" parameter. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Mon Jul 7 23:30:50 CEST 2014 on sn-devel-104
* smbd: Use BVALVolker Lendecke2014-07-071-8/+4
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* auth: Fix an incompatible pointer assignmentVolker Lendecke2014-07-071-1/+1
| | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Mon Jul 7 10:58:30 CEST 2014 on sn-devel-104
* idl:drsuapi: Manage all possible lengths of drsuapi_DsBindInfoSamuel Cabrero2014-07-072-1/+24
| | | | | | | Signed-off-by: Samuel Cabrero <scabrero@zentyal.com> Reviewed-by: Kamen Mazdrashki <kamenim@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Kamen Mazdrashki <kamenim@samba.org>
* smbd: do_lock_cancel does not need "blr" anymoreVolker Lendecke2014-07-043-6/+3
| | | | | | | | 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): Fri Jul 4 08:52:31 CEST 2014 on sn-devel-104
* smbd: brl_lock_cancel does not need "blr" anymoreVolker Lendecke2014-07-045-16/+8
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: Remove unused blocking_lock_record* from VFS_BRL_CANCEL_WINDOWSVolker Lendecke2014-07-046-20/+14
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: do_lock does not need "blr" anymoreVolker Lendecke2014-07-046-18/+8
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: brl_lock does not need "blr" anymoreVolker Lendecke2014-07-045-12/+6
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: Remove unused blocking_lock_record* from VFS_BRL_LOCK_WINDOWSVolker Lendecke2014-07-046-20/+14
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: Remove two outdated commentsVolker Lendecke2014-07-041-5/+0
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: Use brl_delete_lock_struct in brl_lock_cancel_defaultVolker Lendecke2014-07-041-6/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: Factor out unlocking from smbd_do_lockingVolker Lendecke2014-07-043-49/+62
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: Remove an outdated commentVolker Lendecke2014-07-041-4/+0
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4-winbind: Use winbindd in the AD DC by defaultAndrew Bartlett2014-07-041-1/+1
| | | | | | | | | | | (Including changes to knownfail to match the new winbindd in use in each environment) Change-Id: I9e08086eba98e95e05a99afef28315e2857aae56 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Kamen Mazdrashki <kamenim@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Fri Jul 4 05:19:54 CEST 2014 on sn-devel-104
* winbindd: Use a remote RPC server when we are an RODC when neededAndrew Bartlett2014-07-047-35/+72
| | | | | | | | | | | | | This allows us to operate against the local cache where possible, but to forward some operations to the read-write DC. Andrew Bartlett Change-Id: Idc78ae379a402969381758919fcede17568f094e Pair-programmed-with: Garming Sam <garming@catalyst.net.nz> Signed-off-by: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
* s4-auth: Do not override the NT_STATUS_NOT_IMPLEMENTED error for winbinddAndrew Bartlett2014-07-042-2/+21
| | | | | | | | | This changes the auth code in winbindd to use this as a flag, and to therefore contact the RW DC. Change-Id: If4164d27b57b453b398642fdf7d46d03cd0e65f2 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
* winbindd: Allow the AD-DC to call getdcnameGarming Sam2014-07-041-6/+16
| | | | | | | | This is particularly useful for RODC and eliminates a knownfail. Change-Id: Ia5089761dcabb1620eadd530dbc9b05580cddd1f Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
* secrets: Ensure we store the secureChannelType when written to secrets.ldbAndrew Bartlett2014-07-042-7/+20
| | | | | | | | | This will allow winbindd to know when we are an RODC without needing to dig into sam.ldb. Change-Id: Ibdfa37fe6269305ccc5db42479f4a8db5eea53f3 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
* s3: smbd: Locking - re-add pending lock records if we fail to acquire a lock ↵Jeremy Allison2014-07-031-17/+80
| | | | | | | | | | | | | | | | | | (and the lock hasn't timed out). Keep the blocking lock record and the pending lock records consistent if we are dealing with multiple blocking lock requests in one SMB1 LockingX request. Ensure we re-add the records under the record lock, to avoid race conditions. Bug #10684 - SMB1 blocking locks can fail notification on unlock, causing client timeout. https://bugzilla.samba.org/show_bug.cgi?id=10684 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
* s3: smbd: Locking - treat lock timeout the same as any other error.Jeremy Allison2014-07-031-53/+38
| | | | | | | | | | | | Allows the special case in process_blocking_lock_queue() that talks back to the client to be removed. Bug #10684 - SMB1 blocking locks can fail notification on unlock, causing client timeout. https://bugzilla.samba.org/show_bug.cgi?id=10684 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
* s3: smbd: Locking - add and use utility function lock_timed_out().Jeremy Allison2014-07-031-3/+21
| | | | | | | | | Bug #10684 - SMB1 blocking locks can fail notification on unlock, causing client timeout. https://bugzilla.samba.org/show_bug.cgi?id=10684 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
* s3: smbd: Locking - convert to using utility macro used elsewhere.Jeremy Allison2014-07-031-2/+1
| | | | | | | | | Bug #10684 - SMB1 blocking locks can fail notification on unlock, causing client timeout. https://bugzilla.samba.org/show_bug.cgi?id=10684 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
* torture3: Fix bug 10687Volker Lendecke2014-07-031-1/+1
| | | | | | | | 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 Jul 3 19:07:15 CEST 2014 on sn-devel-104
* s3-libnet: Improve error message.Andreas Schneider2014-07-021-1/+3
| | | | | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Wed Jul 2 16:54:10 CEST 2014 on sn-devel-104
* s3: smbd: Locking, fix off-by one calculation in brl_pending_overlap().Jeremy Allison2014-07-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Consider: lock = start=110,size=10 pend_lock = 100, size=10 Do not overlap. However, (lock->start <= pend_lock->start + pend_lock->size) 110 100 10 is true, so it returns true (overlap). lock->start <= pend_lock->start + pend_lock->size should be: lock->start < pend_lock->start + pend_lock->size BUG: https://bugzilla.samba.org/show_bug.cgi?id=10685 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Wed Jul 2 10:18:17 CEST 2014 on sn-devel-104
* s3:winbindd - fix bad bugfix for bug #10280 - winbind panic if AD server is ↵Jeremy Allison2014-07-021-2/+2
| | | | | | | | | | | down. Previous bug fix reversed the sense of the test for out of memory. BUG: https://bugzilla.samba.org/show_bug.cgi?id=10280 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* smbd: Fix some typosVolker Lendecke2014-07-021-3/+3
| | | | | | | | 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): Wed Jul 2 02:25:47 CEST 2014 on sn-devel-104
* smbd: Remove an unused variableVolker Lendecke2014-07-021-1/+0
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: Clarify smb2 lock checksVolker Lendecke2014-07-021-5/+18
| | | | | | | | | | When reading the code it was not immediately clear to me how one of the conditions in [MS-SMB2] 3.3.5.14.2 was satisfied. A separate loop to me is clearer and given that we don't expect thousands of locks in a single call also not significantly less efficient. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: validate_lock_entries does not need mem_ctx anymoreVolker Lendecke2014-06-301-4/+3
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: Simplify validate_lock_entriesVolker Lendecke2014-06-301-36/+10
| | | | Signed-off-by: Volker Lendecke <vl@samba.org>
* smbd: Factor out brl_delete_lock_structVolker Lendecke2014-06-301-6/+12
| | | | | | | | memmove calculations are never nice, and this is going to be used in validate_lock_entries soon :-) Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>