summaryrefslogtreecommitdiffstats
path: root/source3
Commit message (Collapse)AuthorAgeFilesLines
* client.c, clitar.c: rename process_tar to tar_process, prepare codeAurélien Aptel2014-02-193-8/+18
| | | | | | Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* clitar.c, client.c: add flag to know if there's a tar operation to do.Aurélien Aptel2014-02-193-10/+16
| | | | | | | | | - remove tar_type global. Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> [ddiss@samba.org: rebase against lp_cli_maxprotocol() changes] Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* clitar.c: fix path name when adding themAurélien Aptel2014-02-191-1/+39
| | | | | | Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* clitar: use lowercase for bool valueAurélien Aptel2014-02-191-22/+22
| | | | | | Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* clitar.c: add tar_dump() debug function, fix bugsAurélien Aptel2014-02-191-11/+57
| | | | | | Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* client.c: remove unused extern declarationAurélien Aptel2014-02-191-6/+0
| | | | | | Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* implement argument parsing, split client_proto.hAurélien Aptel2014-02-194-61/+160
| | | | | | Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* client.c: remove trailing whitespaceAurélien Aptel2014-02-191-7/+7
| | | | | | Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* clitar.c: start of argument parsingAurélien Aptel2014-02-191-22/+187
| | | | | | Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* clitar.c: add doc, remove _t suffix in enum nameAurélien Aptel2014-02-191-15/+28
| | | | | | Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* clitar.c: add cmd_setmode(), remove typedefAurélien Aptel2014-02-191-28/+162
| | | | | | Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* clitar.c: expand context structure and implement cmd_block()Aurélien Aptel2014-02-191-14/+67
| | | | | | Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* clitar.c: fresh new compilable file.Aurélien Aptel2014-02-191-1905/+9
| | | | | | Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3-auth: Pass mem_ctx to do_map_to_guest_server_info().Andreas Schneider2014-02-193-11/+16
| | | | | | | | Change-Id: If53117023e3ab37c810193edd00a81d247fdde7a Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Wed Feb 19 01:28:14 CET 2014 on sn-devel-104
* s3-auth: Pass mem_ctx to auth_check_ntlm_password().Andreas Schneider2014-02-195-27/+48
| | | | | | | | | | Coverity-Id: 1168009 BUG: https://bugzilla.samba.org/show_bug.cgi?id=8598 Signed-off-by: Andreas Schneider <asn@samba.org> Change-Id: Ie01674561a6a75239a13918d3190c2f21c3efc7a Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3-auth: Pass mem_ctx to make_server_info_sam().Andreas Schneider2014-02-194-28/+47
| | | | | | | | | | Coverity-Id: 1168009 BUG: https://bugzilla.samba.org/show_bug.cgi?id=8598 Signed-off-by: Andreas Schneider <asn@samba.org> Change-Id: Ie614b0654c3a7eec1ebb10dbb9763696eec795bd Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3: printing: Fix problem with server taking too long to respond to a ↵Jeremy Allison2014-02-183-2/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MSG_PRINTER_DRVUPGRADE message. Receiving a MSG_PRINTER_DRVUPGRADE causes smbd to iterate over all printers looking for ones that uses the driver. This is a very expensive operation requiring a read of all registry printer parameters. On a system with a large number of printers, this causes the clients to timeout (smbd can take longer than 60 seconds to respond). This patch fixes the problem by forwarding the MSG_PRINTER_DRVUPGRADE to the background lpq queue updater process and allowing it to take care of the updating of the changeid in the registry, allowing the smbd connected to the client to return to processing requests immediately. https://bugzilla.samba.org/show_bug.cgi?id=9942 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Tue Feb 18 17:48:30 CET 2014 on sn-devel-104
* winbindd: Use the right flags in dsgetdcnameVolker Lendecke2014-02-141-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): Fri Feb 14 21:59:22 CET 2014 on sn-devel-104
* regedit_valuelist.c: Coverity fix; Initialize a variable.Christopher R. Hertel (crh)2014-02-141-1/+1
| | | | | | | | | | | | | | The <tmp> variable is tested at the end of the function to determine the return value, but <tmp> is never initialized and there are conditions under which it may be tested before a value is set. This patch initializes <tmp> to NULL, which means that WERR_NOMEM will be returned if the registry lookups fail. CID: 1168007 Signed-off-by: Christopher R. Hertel (crh) <crh@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:smb2_notify: fix use after free on long living notify requestsStefan Metzmacher2014-02-141-0/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a hack, but it should fix the bug: change_notify_add_request() talloc moves smb_request away, which is not expected by the smb2_notify.c code... smbd_smb2_notify_reply() uses tevent_req_defer_callback() (in older versions an immediate event) to defer the response. This is needed as change_notify_reply() will do more things after calling reply_fn() (smbd_smb2_notify_reply is this case) and often change_notify_remove_request() is called after change_notify_reply(). change_notify_remove_request() implicitly free's the smb_request that was passed to change_notify_add_request(). smbd_smb2_fake_smb_request() added the smb_request as smb2req->smb1req, which is expected to be available after smbd_smb2_notify_recv() returned. The long term solution would be the following interface: struct tevent_req *change_notify_request_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, struct files_struct *fsp, uint32_t max_length, uint32_t filter, bool recursive); NTSTATUS change_notify_request_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx, DATA_BLOB *buffer); Bug: https://bugzilla.samba.org/show_bug.cgi?id=10442 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Fri Feb 14 11:18:15 CET 2014 on sn-devel-104
* s3-dsgetdcname: print IP address for LDAP ping.Günther Deschner2014-02-131-1/+3
| | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3:srv_epmapper: make use of dcerpc_binding_get_abstract_syntax()Stefan Metzmacher2014-02-131-1/+1
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s3:srv_epmapper: make use of dcerpc_binding_*() functions in build_ep_list()Stefan Metzmacher2014-02-131-6/+34
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s3:srv_epmapper: use dcerpc_binding_get_abstract_syntax() in _epm_Insert()Stefan Metzmacher2014-02-131-1/+1
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s3:srv_epmapper: use dcerpc_binding_get_transport() in _epm_Insert() and ↵Stefan Metzmacher2014-02-131-2/+7
| | | | | | | _epm_Delete() Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s3:srv_epmapper: make use of dcerpc_binding_*() functions in endpoints_match()Stefan Metzmacher2014-02-131-11/+26
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s3:dcerpc_ep: make use of dcerpc_binding_set_abstract_syntax()Stefan Metzmacher2014-02-131-2/+11
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s3:dcerpc_ep: make use of dcerpc_binding helper functionsStefan Metzmacher2014-02-131-20/+57
| | | | | | | We should not dereference 'struct dcerpc_binding'. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s3:rpc_server: make use of dcerpc_binding_set_abstract_syntax()Stefan Metzmacher2014-02-131-1/+7
| | | | | | | This is better than accessing the dcerpc_binding internals. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s3:rpcclient: make use of dcerpc_binding_get_string_option("host")Stefan Metzmacher2014-02-131-2/+4
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s3:rpcclient: make use of dcerpc_binding_set_abstract_syntax() in cmd_epmapper.cStefan Metzmacher2014-02-131-1/+7
| | | | | | | We should not use dcerpc_binding internals. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s3:rpcclient: make use of dcerpc_binding_[g|s]et_*() in rpcclient.cStefan Metzmacher2014-02-131-9/+18
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s3:rpc_client: avoid using dcerpc_binding internals in rpc_pipe_get_tcp_port()Stefan Metzmacher2014-02-131-10/+21
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s3:rpc_server: make use of dcerpc_parse_binding() to create a binding.Stefan Metzmacher2014-02-131-7/+10
| | | | | | | This makes sure binding is talloc'ed. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s3:rpcclient: make use of dcerpc_parse_binding() to create the bindingStefan Metzmacher2014-02-131-7/+12
| | | | | | | This makes sure the binding is talloc'ed. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* smbXsrv_open.c: Initialize local variable.Christopher R. Hertel (crh)2014-02-121-1/+1
| | | | | | | | | | | | | | Coverity fix. Initialize status to NT_STATUS_OK. Otherwise, there are code paths that would cause the smbXsrv_open_cleanup() function to return an uninitialized value. Cov: 1168008 Signed-off-by: Christopher R. Hertel (crh) <crh@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Wed Feb 12 23:57:05 CET 2014 on sn-devel-104
* auth: Make new_server_id_task() static to auth_samba4Volker Lendecke2014-02-123-43/+42
| | | | | | | | This is not used in other parts of source3, so this patch improves modularity and isolation of features. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* smbd: Slightly simplify vfswrap_fsctlVolker Lendecke2014-02-121-1/+2
| | | | | | | We have the MIN macro, so use it :-) Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* smbd: Fix an uninitialized readVolker Lendecke2014-02-121-0/+1
| | | | | | | We have to ship 64 bytes, and we have to initialize the whole thing. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* cmdline: Remove dynconfig hooks in command line processingAndrew Bartlett2014-02-122-146/+0
| | | | | | | | | | | | | | | | | | | | | | This removes the ability to set paths like the sbindir, bindir, and changes the tool for setting lockdir statedir etc to be via --option="lock dir=/var/lock". These were originally added by commit 90a6873b0570f2691ba8d8fd11154c856bdd4415 by James Peach <jpeach@samba.org> The important use case, qemu, does not use these options, but specifies these directories via an smb.conf. They are being removed to remove a layer from the loadparm system, now that options can be specified from the command line. It will also make it easier to generate the affected parameters from the XML documentation if this layer of indirection is removed. Andrew Bartlett Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Wed Feb 12 16:42:14 CET 2014 on sn-devel-104
* param: change fstype to use a constant stringGarming Sam2014-02-125-7/+7
| | | | | | | | Substitution isn't really necessary for this parameter. 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 LOADPARM_EXTRA_GLOBALS to lib/param/loadparm.h to be shared ↵Garming Sam2014-02-121-17/+0
| | | | | | | | between loadparms 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 SMB2 defaults to lib/param and use in loadparm_initGarming Sam2014-02-121-5/+0
| | | | | | 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 special cases for tls filesGarming Sam2014-02-121-9/+4
| | | | | | 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 generate_param.py to generate loadparm_ctx_table.cGarming Sam2014-02-121-2/+2
| | | | | | | Pair-programmed-with: Andrew Bartlett <abartlet@samba.org> 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 generate_param.py to generate s3_param.hGarming Sam2014-02-121-1/+1
| | | | | | | Pair-programmed-with: Andrew Bartlett <abartlet@samba.org> 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 generate_param.py to generate param_local.hGarming Sam2014-02-121-1/+1
| | | | | | | Pair-programmed-with: Andrew Bartlett <abartlet@samba.org> 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 generate_param.py to generate param_global.hGarming Sam2014-02-123-8/+2
| | | | | | | Pair-programmed-with: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* param: No longer have a special case for lp_configfileAndrew Bartlett2014-02-125-6/+3
| | | | | | | | | | | | | | This parameter is renamed because it does not normally return the current smb.conf file, but instead returns the next one, as found in a config file = directive, to be loaded. This avoids a conflict with the lpcfg_configfile from lib/param, which does refer to the current smb.conf path. Andrew Bartlett Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Michael Adam <obnox@samba.org>
* param: use generate_param.py to generate param_proto.hGarming Sam2014-02-122-2/+7
| | | | | | | Pair-programmed-with: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>