summaryrefslogtreecommitdiffstats
path: root/source3
Commit message (Collapse)AuthorAgeFilesLines
...
* torture: test_ntlm_auth.py now has a require-membership-of argumentGarming Sam2014-07-151-0/+7
| | | | | | | Change-Id: I90c2172af792a082fbf49ee0ab7d6eedf5471440 Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Kamen Mazdrashki <kamenim@samba.org>
* s3:smbd: initialize stat_ex buffer in smbd_dirptr_get_entry()Michael Adam2014-07-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This prevents random garbage in the vfs_private member. Usually it should not be a problem to leave initialization of the vfs_private to the vfs module who wants to use it, but further down in the directory listing code, in vfswrap_readdir, there is in optimization introduced with 2a65e8befef004fd18d17853a1b72155752346c8, to call fstatat if possible to already fill stat info in the readdir call. The problem is that this calls fstatat directly, not going through VFS, but still making the stat buffer valid, leaving vfs_private with random garbage. Hence a vfs module using vfs_private, like vfs_gpfs does for offline info (and winAttrs in general) does not have a chance to tell whether the vfs_private is valid if the stat buffer is marked valid. This is a reason for the "flapping offline flag" problem of the vfs_gpfs module. Initializing the vfs_private to 0 here will for the vfs_gpfs module result in files being marked online always in a directory listing. So this is not a real fix but it does at least make the problem less random. A real general fix might be to implement SMB_VFS_FSTATAT() and use it here. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org> Autobuild-User(master): Christof Schmitt <cs@samba.org> Autobuild-Date(master): Sun Jul 13 11:26:58 CEST 2014 on sn-devel-104
* s3:vfs:gpfs: log when winAttr-garbage is detected (by heuristics) in is_offlineMichael Adam2014-07-131-0/+5
| | | | | | | | | | In is_offline(), check whether the winAttrs are filled with bits outside 0xFFFF and log it prominently: Since GPFS only fills 0xFFFF, this could be due to an uninitialized buffer (or another vfs module filling vfs_private? ...). Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* s3:vfs:gpfs: fix flapping offline: always get winAttrs from gpfs for is_offlineMichael Adam2014-07-131-3/+1
| | | | | | | | | | | | | | | | | | There is a problem of flapping offline due to uninitialized stat buffers. Due to a optimization in vfswrap_readdir which directly calling fastatat (i.e. not through vfs), marking the stat buffer valid, there is nothing this module can do about it and hence can not currently not rely on the vaildity of the stat buffer. By always calling out to GPFS even when the stat buffer is flagged valid, we can always return correct offline information, thereby sacrificing the readdir optimization. Pair-Programmed-With: Volker Lendecke <vl@samba.org> Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* s3:vfs:gpfs: store the winAttrs in the struct_ex when we got them in ↵Michael Adam2014-07-131-0/+1
| | | | | | | | | vfs_gpfs_fstat() This may (e.g.) have lead to some occurrences of flapping offline bits. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* s3:smb2_read: let smb2_sendfile_send_data() behave like send_file_readX()Stefan Metzmacher2014-07-111-16/+53
| | | | | | | | | | | | | We now pass the header to SMB_VFS_SENDFILE(), so we have to handle that also in the fallback code. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10706 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Jul 11 22:57:17 CEST 2014 on sn-devel-104
* s3:winbindd: remove unused get[pw|gr]ent_initialized from winbindd_cli_stateStefan Metzmacher2014-07-111-4/+0
| | | | | | | | 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): Fri Jul 11 18:46:09 CEST 2014 on sn-devel-104
* s3:smb2_negprot: allow "smb max {read,write,trans}" up to 8MiBStefan Metzmacher2014-07-111-4/+4
| | | | | | | This matches Windows 2012R2. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s3:vfs:gpfs: remove extra empty lines.Michael Adam2014-07-101-2/+0
| | | | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Jul 10 02:50:44 CEST 2014 on sn-devel-104
* s3:smbd: make dptr_ReadDirName() static.Michael Adam2014-07-102-8/+4
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* dsdb: Always store and return the userParameters as a array of LE 16-bit valuesAndrew Bartlett2014-07-091-5/+26
| | | | | | | | | | | | | | | This is not allowed to be odd length, as otherwise we can not send it over the SAMR transport correctly. Allocating one byte less memory than required causes malloc() heap corruption and then a crash or lockup of the SAMR server. Andrew Bartlett Bug: https://bugzilla.samba.org/show_bug.cgi?id=10130 Change-Id: I5c0c531c1d660141e07f884a4789ebe11c1716f6 Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
* smbd: Use mutex instead of fcntl lock for echohandler coordinationChristof Schmitt2014-07-093-34/+173
| | | | | | | | | | | | | | This is based on a patch from Volker. When the system supports roboust mutexes, they will be used for the coordiations between worker and echohandler process. This avoids another aspect of the fcntl scalibility issue when handling many client connections. When mutexes are not available, the code falls back to the fcntl lock. Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Jul 9 00:56:50 CEST 2014 on sn-devel-104
* smbd: Avoid double-free in get_print_db_bynameVolker Lendecke2014-07-081-2/+2
| | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Tue Jul 8 22:27:03 CEST 2014 on sn-devel-104
* smbd: Factor out smbd_smb2_send_breakVolker Lendecke2014-07-081-22/+36
| | | | | | | | | | Most of this routine can be re-used for sending lease breaks 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): Tue Jul 8 19:54:09 CEST 2014 on sn-devel-104
* smbd: Rename smbd_smb2_send_oplock_break_state->buf to ->bodyVolker Lendecke2014-07-081-3/+3
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* smbd: no "dyn" in smbd_smb2_send_oplock_breakVolker Lendecke2014-07-081-6/+3
| | | | | | | | We don't need the assignment to state->vector[1+SMBD_SMB2_DYN_IOV_OFS], this is zero-initialized by talloc_zero Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* smbd: Make hdr a field of its own in smbd_smb2_send_oplock_breakVolker Lendecke2014-07-081-19/+20
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* smbd: Make tf a field of its own in smbd_smb2_send_oplock_breakVolker Lendecke2014-07-081-14/+15
| | | | | | | This actually saves a few bytes in .text. Maybe due to the struct assignments? Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* smbd: Make nbt_hdr a field of its own in smbd_smb2_send_oplock_breakVolker Lendecke2014-07-081-4/+7
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3: VFS modules: Ignore EPERM errors on [f]chmod in crossrename module.Jeremy Allison2014-07-081-2/+4
| | | | | | | This is already done for [f]chown errors. Fix from CurlyMo <curlymoo1@gmail.com> Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* param: change snum parameter in special functions to a loadparm_service pointerGarming Sam2014-07-071-4/+7
| | | | | | | | | | | | | | 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>
* s3:param: pass down lp_ctx in handle includeGarming Sam2014-07-071-1/+1
| | | | | | | | | | Currently the lp_ctx will never actually be used as it will still go through the current s3 code. Change-Id: Iff236aea79b2294deb8faf175c7425d075a0f4c4 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 instead of set_variable_helper in lp_do_parameterGarming Sam2014-07-071-39/+14
| | | | | | | | | | | | | This extends the usage of the temporary s3 context in lp_do_parameter to beyond the special functions. At least for now, this will be necessary for sorting out the differences between the do_parameter code. Change-Id: Iac380d11a927e466ab1a56d34cebe343c3608707 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 failure case for loadparm_init_s3Garming Sam2014-07-071-0/+6
| | | | | | | | | It allocates memory, so it should be possible for it to fail. Change-Id: Ib24f9718fb88790de23b78435866b9e79fe8c705 Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
* param: store the flags_list in the s3 lp context used for specialGarming Sam2014-07-071-0/+1
| | | | | | | | | Special function needs the flag list. Change-Id: I3c2f118704026913021e4399e89cc3583de9a743 Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
* param: mark non default options using flags in s3Garming Sam2014-07-071-3/+25
| | | | | | | | | | This change allows lib/param code to see which s3 parameters are currently set to defaults. Change-Id: Ic25b3f8e792a6d72705a7e5d7159ac8f87e18512 Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
* param: fix FLAG_CMDLINE to be stored outside of the param tableGarming Sam2014-07-071-6/+6
| | | | | | | | | | In s3, flags could only be stored once in the param table and this was global. The param table defines only the default flags however. Change-Id: Ie673ad60dd499d930432c106e795e2cbd42d497b 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 dump a serviceGarming Sam2014-07-071-11/+3
| | | | | | | Change-Id: I59b4edf929b4f8338e4c1a7116e0d1ef1bcad287 Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
* param: simplify lp_do_parameterGarming Sam2014-07-071-4/+2
| | | | | | | | | No longer checks for globals vs service twice. Change-Id: I065e732ddb1ca2dda63dd22e3caf291fce8d327b Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
* 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>