summaryrefslogtreecommitdiff
path: root/source3/smbd/smb2_tcon.c
Commit message (Collapse)AuthorAgeFilesLines
* smbd: remove using vuser from smbd_smb2_tree_connect()Ralph Boehme2020-01-131-3/+4
| | | | | Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: remove unused vuser arg from make_connection_smb2()Ralph Boehme2020-01-131-1/+0
| | | | | Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: move homes_snum from struct user_struct to struct smbXsrv_sessionRalph Boehme2020-01-131-5/+6
| | | | | | | No change in behaviour. A first step in removing user_struct. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:param: make "servicename" a substituted optionRalph Boehme2019-11-271-1/+2
| | | | | Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* smbdotconf: mark "msdfs proxy" with substitution="1"Ralph Boehme2019-11-271-1/+3
| | | | | Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* smb2_tcon: avoid STATUS_PENDING completely on tdisStefan Metzmacher2019-03-281-3/+3
| | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=10344 BUG: https://bugzilla.samba.org/show_bug.cgi?id=13698 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smb2_tcon: avoid STATUS_PENDING responses for tree connectStefan Metzmacher2019-03-281-1/+5
| | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=12844 BUG: https://bugzilla.samba.org/show_bug.cgi?id=13698 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* Revert "smbd: add an effective {smb,smbd_smb2}_request->ev_ctx that holds ↵Ralph Boehme2019-01-111-2/+2
| | | | | | | | | | | | | | | | the event context used for the request processing" This reverts commit 894e5001c747ce765dad5517778dda55d7d1f4d9. See the discussion in https://lists.samba.org/archive/samba-technical/2018-December/131731.html for the reasoning behind this revert. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* smbd: add an effective {smb,smbd_smb2}_request->ev_ctx that holds the event ↵Stefan Metzmacher2018-06-181-2/+2
| | | | | | | | | | context used for the request processing In future this will an impersonation wrapper tevent_context based on the user session. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* s3:smb2_tcon: Add check to prevent non-DFS clients from connecting to an ↵Ralph Wuerthner2018-04-071-0/+15
| | | | | | | | | | | msdfs proxy. Signed-off-by: Ralph Wuerthner <ralph.wuerthner@de.ibm.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sat Apr 7 05:05:22 CEST 2018 on sn-devel-144
* s3: debug: smb2: Create a new DBGC_SMB2 debug class and mark all ↵Jeremy Allison2018-03-221-0/+3
| | | | | | | | | | | smbd/smb2_*.c files with it. Will allow easier smb2-specific debugging. https://bugzilla.samba.org/show_bug.cgi?id=13347 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
* s3:smb2_tcon: allow a compound request after a TreeConnectStefan Metzmacher2017-06-171-0/+2
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=12844 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3/smbd: ensure global "smb encrypt = off" is effective for share with "smb ↵Ralph Boehme2017-01-271-1/+2
| | | | | | | | | | | | | | | | | | | | | | encrypt = desired" If encryption is disabled globally, per definition we shouldn't allow enabling encryption on individual shares. The behaviour of specifying [Global] smb encrypt = off [share] smb encrypt = desired must be an unecrypted tree connect to the share "share". Bug: https://bugzilla.samba.org/show_bug.cgi?id=12520 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:smb2_server: convert encryption desired and required bools to flagsRalph Boehme2016-01-221-4/+8
| | | | | | | | | | | | | This adds a bitmap smbXsrv_encrpytion_flags with flags to the smbXsrv_session_global.tdb and smbXsrv_tcon_global.tdb that we use instead of bools for desired and required. We need this info in the smbXsrv tdbs for smbstatus. Subsequent commits for smbstatus will use it. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd:smb2: only enable encryption in tcon if desiredMichael Adam2015-07-071-3/+6
| | | | | | | | | | Don't enforce it but only announce DATA_ENCRYPT, making use of encryption_desired in tcon. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11372 Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s3:smb2_tcon: require a signed request when authentication is used for SMB ↵Stefan Metzmacher2015-06-061-9/+40
| | | | | | | | | | | | >= 3.11 Disconnect the client if the request is not signed. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sat Jun 6 03:19:33 CEST 2015 on sn-devel-104
* s3:smb2_tcon: cancel pending requests on all connections on tdisStefan Metzmacher2015-05-061-31/+35
| | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=11182 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: Make SMB3 clients use encryption with "smb encrypt = auto"Volker Lendecke2015-03-031-0/+5
| | | | | | | | 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 Mar 3 10:40:42 CET 2015 on sn-devel-104
* s3:smb2_server: check xconn->smb2.server.cipher instead of ↵Stefan Metzmacher2014-10-161-1/+1
| | | | | | | | | | | xconn->smb2.server.capabilities SMB 3.10 and later won't have SMB2_CAP_ENCRYPTION anymore. xconn->smb2.server.cipher == 0 is the indication that we don't support encryption on the connection. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:smbd: pass smbd_smb2_request to make_connection_smb2()Stefan Metzmacher2014-09-191-1/+1
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smb2_server: pass smbXsrv_connection to smbd_server_connection_terminate*()Stefan Metzmacher2014-08-061-6/+6
| | | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smb2_*: make use of smb2req->xconn where possibleStefan Metzmacher2014-08-061-2/+2
| | | | | | | | We need to use the connection that is used by the current request. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smb2_server: move sconn->smb2.requests to xconn->smb2.requestsStefan Metzmacher2014-08-061-1/+2
| | | | | | | | This prepares the structures for multi-channel support. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:smb2_tcon: cancel and wait for pending requests on tdisStefan Metzmacher2014-03-121-4/+78
| | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=10344 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:smb2_tcon: split smbd_smb2_tdis into an async *_send/recv pair.Jeremy Allison2014-03-121-16/+89
| | | | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=10344 Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Jeremy Allison <jra@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:smb2_tcon: make use of smbd_smb2_generate_outbody()Stefan Metzmacher2014-03-051-2/+2
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* param: rename lp function and variable from "hideunwriteable_files" to ↵Garming Sam2014-02-071-1/+1
| | | | | | | | "hide_unwriteable_files" 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 "hideunreadable" to ↵Garming Sam2014-02-071-1/+1
| | | | | | | | "hide_unreadable" Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:smbd: fill tcon->global->session_global_idStefan Metzmacher2012-10-191-0/+2
| | | | | | metze Signed-off-by: Michael Adam <obnox@samba.org>
* Correctly check for errors in strlower_m() returns.Jeremy Allison2012-08-091-1/+4
|
* s3:smb2_tcon: set global->encryption_required and enforce itStefan Metzmacher2012-08-091-5/+29
| | | | | | | This the account or client doesn't support encryption we should reject the tree connect. metze
* s3:smb2_tcon: make use of SMBD_SMB2_* macrosStefan Metzmacher2012-08-051-7/+5
| | | | metze
* s3:smb2_tcon: reject access to shares mark as "smb encrypt = required"Stefan Metzmacher2012-07-231-0/+8
| | | | | | We do not support SMB2 transport encryption yet. metze
* loadparm: make the source3/ lp_ functions take an explicit TALLOC_CTX *.Rusty Russell2012-07-181-4/+3
| | | | | | | | | | They use talloc_tos() internally: hoist that up to the callers, some of whom don't want to us talloc_tos(). A simple patch, but hits a lot of files. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* s3:smbd: make use of smbXsrv_tcon and smbXsrv_session for smb2Stefan Metzmacher2012-06-251-53/+47
| | | | | | | | | The removes the protocol specific smbd_smb2_session and smbd_smb2_tcon. Pair-Programmed-With: Michael Adam <obnox@samba.org> metze
* s3:smbd: use 'struct user_struct' instead of typedef'ed 'user_struct'Stefan Metzmacher2012-06-061-1/+1
| | | | metze
* s3:smb2_tcon: make the top level code async usingStefan Metzmacher2012-05-141-24/+58
| | | | metze
* s3:smb2_tcon: add smbd_smb2_tree_connect_send/recv as wrapperStefan Metzmacher2012-05-141-0/+79
| | | | metze
* s3:smbd: keep 'num_connections' and 'connections' directly under ↵Stefan Metzmacher2012-03-061-3/+0
| | | | | | | | | smbd_server_connection The plan is to have connection_struct as some kind of low level abstraction for a smb1/smb2 tree connects, that can be used by SMB_VFS modules. metze
* s3-auth: Remove security=share (depricated since 3.6).Andrew Bartlett2012-03-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes security=share, which Samba implemented by matching the per-share password provided by the client in the Tree Connect with a selection of usernames supplied by the client, the smb.conf or guessed from the environment. The rationale for the removal is that for the bulk of security=share users, we just we need a very simple way to run a 'trust the network' Samba server, where users mark shares as guest ok. This is still supported, and the smb.conf options are documented at https://wiki.samba.org/index.php/Public_Samba_Server At the same time, this closes the door on one of the most arcane areas of Samba authentication. Naturally, full user-name/password authentication remain available in security=user and above. This includes documentation updates for username and only user, which now only do a small amount of what they used to do. Andrew Bartlett -------------- / \ / REST \ / IN \ / PEACE \ / \ | SEC_SHARE | | security=share | | | | | | 5 March | | | | 2012 | *| * * * | * _________)/\\_//(\/(/\)/\//\/\///|_)_______
* Fix bug 8710 - connections.tdb - major leak with SMB2.Jeremy Allison2012-01-181-3/+3
| | | | | | | | | Ensure the cnum used to claim the connection for SMB2 is the id that will be used for the SMB2 tcon. Based on code from Ira Cooper <ira@wakeful.net>. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Wed Jan 18 23:14:32 CET 2012 on sn-devel-104
* s3:smb2 report access_based_dir_enum in tcon replyChristian Ambach2011-11-241-0/+5
| | | | | let the client know when hide unreadable or hide unwriteable files is set for a share
* s3:smb2 do not set allow_namespace_caching flag for a shareChristian Ambach2011-11-241-1/+1
| | | | | this matches Win7/2002R2 behavior and clients also must ignore this flag when set (MS-SMB 2.2.10), so we should not set it at all
* s3:smb2_server: return BAD_NETWORK_NAME if the path is terminated in SMB2_TCONStefan Metzmacher2011-09-071-0/+8
| | | | metze
* s3:smb2_server: use smbd_smb2_request_verify_sizes() in smb2_tcon.cStefan Metzmacher2011-09-071-24/+8
| | | | metze
* s3-auth Use struct auth_user_info_unix for unix_name and sanitized_usernameAndrew Bartlett2011-07-201-1/+1
| | | | | | | | This is closer to the layout of struct auth_session_info in auth.idl Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
* s3:smb2_tcon: return the correct maximal_access on the shareStefan Metzmacher2011-07-111-1/+1
| | | | metze
* Move smbd_smb2_request_check_tcon() smbd_smb2_request_check_session() next ↵Jeremy Allison2011-07-081-60/+0
| | | | | | | to their only user and make them static. Add comments. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Fri Jul 8 21:01:40 CEST 2011 on sn-devel-104
* param: Merge param headers into lib/param/loadparm.hAndrew Bartlett2011-06-291-0/+1
| | | | | | | This defines a common table format, so we can in future define a common table. Andrew Bartlett
* More simple const fixes.Jeremy Allison2011-05-051-1/+1
|