summaryrefslogtreecommitdiffstats
path: root/source3/rpc_server
Commit message (Collapse)AuthorAgeFilesLines
* s3-auth: Pass mem_ctx to auth_check_ntlm_password().Andreas Schneider2014-02-191-2/+4
| | | | | | | | | | 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: printing: Fix problem with server taking too long to respond to a ↵Jeremy Allison2014-02-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* 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: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: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>
* param: change fstype to use a constant stringGarming Sam2014-02-121-1/+1
| | | | | | | | 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>
* s3:srv_epmapper: only replace ipv4 addresses in _epm_Lookup() and _epm_Map()Stefan Metzmacher2014-02-111-2/+6
| | | | | | | | The floor data for EPM_PROTOCOL_IP only handles a 4 byte ipv4 address. "0.0.0.0" is used for ipv6 and hostnames. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s3:srv_epmapper: fix logic in endpoints_match()Stefan Metzmacher2014-02-111-6/+18
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s3:rpc_server: initialize struct dcerpc_binding completelyStefan Metzmacher2014-02-111-0/+1
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s3:rpc_server: check verification trailerGregor Beck2014-02-111-0/+44
| | | | | | Signed-off-by: Gregor Beck <gbeck@sernet.de> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s3:rpc_server: check header of each packet fragmentGregor Beck2014-02-112-0/+14
| | | | | | Signed-off-by: Gregor Beck <gbeck@sernet.de> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s3:rpc_server: only become the user if we have a valid context_idStefan Metzmacher2014-02-111-21/+20
| | | | | | | | Pair-Programmed-With: Gregor Beck <gbeck@sernet.de> Signed-off-by: Gregor Beck <gbeck@sernet.de> Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s3:rpc_server: minor refactoring of process_request_pdu()Gregor Beck2014-02-111-15/+10
| | | | | | Signed-off-by: Gregor Beck <gbeck@sernet.de> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* param: rename lp function and variable from "ms_add_printer_wizard" to ↵Garming Sam2014-02-071-1/+1
| | | | | | | | "show_add_printer_wizard" Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: rename lp function and variable from "enumports_cmd" to ↵Garming Sam2014-02-071-1/+1
| | | | | | | | "enumports_command" Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: rename lp function and variable from "deleteprinter_cmd" to ↵Garming Sam2014-02-071-1/+1
| | | | | | | | "deleteprinter_command" Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: rename lp function and variable from "addprinter_cmd" to ↵Garming Sam2014-02-071-3/+3
| | | | | | | | "addprinter_command" Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: rename lp function and variable from "addport_cmd" to "addport_command"Garming Sam2014-02-071-1/+1
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: rename lp function and variable from "delete_share_cmd" to ↵Garming Sam2014-02-071-2/+2
| | | | | | | | "delete_share_command" Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: rename lp function and variable from "change_share_cmd" to ↵Garming Sam2014-02-071-3/+3
| | | | | | | | "change_share_command" Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: rename lp function and variable from "add_share_cmd" to ↵Garming Sam2014-02-071-2/+2
| | | | | | | | "add_share_command" Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: rename lp function and variable from "serverstring" to "server_string"Garming Sam2014-02-072-4/+4
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: rename lp function and variable from 'passwordserver' to ↵Garming Sam2014-02-071-1/+1
| | | | | | | | 'password_server' Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: rename lp function and variable from 'guestaccount' to 'guest_account'Garming Sam2014-02-071-1/+1
| | | | | | Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3: rpc_server/srvsvc: NetShareSetInfo - let CSC policy be settable.Shekhar Amlekar2014-02-061-8/+24
| | | | | | | | | | The current code simply denies changing the csc policy through RPC calls. Change that to allow changing the csc policy and call the 'change share command' when a SetInfo RPC call changes the setting. Signed-off-by: Shekhar Amlekar <samlekar@in.ibm.com> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* s3: rpc_server/srvsvc: NetShareSetInfo - Correctly initialize ↵Shekhar Amlekar2014-02-061-0/+2
| | | | | | | | max_connections for info levels != 2 before calling the change share script. Signed-off-by: Shekhar Amlekar <samlekar@in.ibm.com> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
* loadparm: rename lp[cfg]_print_ok to lp[cfg]_printable for consistency with docsMichael Adam2014-02-033-8/+8
| | | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* loadparm: rename lp[cfg]_hostsdeny to lp[cfg]_hosts_deny for consistency ↵Michael Adam2014-02-031-1/+1
| | | | | | | | | with docs Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* loadparm: rename lp[cfg]_hostsallow to lp[cfg]_hosts_allow for consistency ↵Michael Adam2014-02-031-1/+1
| | | | | | | | | with docs Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* loadparm: rename lp[cfg]_pathname to lp[cfg]_path for consistency with docsMichael Adam2014-02-032-14/+14
| | | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* s3:rpc_server/netlogon: return a zero return_authenticator on errorStefan Metzmacher2014-01-221-0/+1
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3: rpc_server/srvsvc: Avoiding the loop around locking tdb traversal.Shekhar Amlekar2014-01-181-49/+6
| | | | | | | | | | | | | | | | The current code for determining the number of open files iterates over the session list and for each session it traverses the locking tdb to get the open files. This scales badly for a large server with many sessions and open files. Instead, get the list of sessions first, and then determine the number of open files on all sessions in a single traversal of locking tdb. Signed-off-by: Shekhar Amlekar <samlekar@in.ibm.com> Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sat Jan 18 01:11:32 CET 2014 on sn-devel-104
* s3: rpc_server/srvsvc: Adding functions to determine open files on all sessions.Shekhar Amlekar2014-01-171-0/+55
| | | | | | | | | Introduce helper functions for counting the number of open files on an array of sessions. Signed-off-by: Shekhar Amlekar <samlekar@in.ibm.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3: rpc_server/srvsvc: Ensure we don't continually realloc inside ↵Jeremy Allison2014-01-171-11/+22
| | | | | | | | | init_srv_sess_info_1(). Just allocate the return value directly. Makes iteration of open files much easier. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* dcerpc.idl: make use of union dcerpc_bind_ack_reason and fix all callers.Stefan Metzmacher2014-01-161-4/+4
| | | | | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org> Autobuild-User(master): Günther Deschner <gd@samba.org> Autobuild-Date(master): Thu Jan 16 18:21:40 CET 2014 on sn-devel-104
* s3:rpc_server: add support for DCERPC_PFC_FLAG_SUPPORT_HEADER_SIGNStefan Metzmacher2014-01-071-3/+22
| | | | | | | If the backend supports it there's no reason to avoid it. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:rpc_server: use make_session_info_guest() directlyStefan Metzmacher2013-12-231-16/+6
| | | | | | | | | This removes the useless static auth_anonymous_session_info() wrapper. auth_anonymous_session_info() is also a public function in source4. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3/rpc_server: don't unmarshall PDUs twiceDavid Disseldorp2013-12-115-453/+28
| | | | | | | | | | | | | DCE/RPC PDUs are currently unmarshalled firstly by the generic librpc dcerpc_read_ncacn_packet_[send/recv] functions, and subsequently a second time by the source3 rpc_server, which ignores the unmarshalled packet and re-parses the receive buffer. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Wed Dec 11 22:24:31 CET 2013 on sn-devel-104
* CVE-2013-4408:s3:Ensure LookupNames replies arrays are range checked.Jeremy Allison2013-12-091-1/+1
| | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=10185 Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Jeremy Allison <jra@samba.org>
* spoolss: accept XPS_PASS datatype used by Windows 8Arvid Requate2013-11-211-1/+7
| | | | | | | | | | | The new v4 driver model used in Windows 8 declares print jobs intended to bypass the XPS processing layer by setting datatype to "XPS_PASS" instead of "RAW". BUG: https://bugzilla.samba.org/show_bug.cgi?id=10267 Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* printing: return WERROR from print_access_checkDavid Disseldorp2013-11-201-8/+8
| | | | | | | | | | print_access_check() currently returns a bool based on whether access is granted or denied. Errno is set on failure, but none of the callers use it. This change converts print_access_check() to return a WERROR. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* spoolss: return the spoolss job ID in notificationsDavid Disseldorp2013-11-181-6/+26
| | | | | | | | | | | | | | | | | Print job notifications currently carry the system print job identifier from the queue structure. Instead, the spoolss job identifier should be resolved and returned. Print clients can use notification job-ids in subsequent spoolss SetJob requests. Returning an incorrect identifier can result in the failure of such requests, e.g. spoolss_SetJob(SPOOLSS_JOB_CONTROL_DELETE). BUG: https://bugzilla.samba.org/show_bug.cgi?id=10271 Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Günther Deschner <gd@samba.org>
* s3:rpc_server: rpc_create_tcpip_sockets() may leak talloc_stackframe on failureGregor Beck2013-11-041-6/+9
| | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=10241 Signed-off-by: Gregor Beck <gbeck@sernet.de> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Mon Nov 4 12:30:27 CET 2013 on sn-devel-104
* rpc_server: Fix a typoVolker Lendecke2013-10-301-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s3-rpc_server: Remove obsolete make_internal_rpc_pipe().Andreas Schneider2013-10-292-90/+0
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3-rpc_server: Remove obsolete FAKE_FILE_TYPE_NAMED_PIPE handling.Andreas Schneider2013-10-291-37/+1
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>