summaryrefslogtreecommitdiffstats
path: root/source3/smbd/msdfs.c
Commit message (Collapse)AuthorAgeFilesLines
* MSDFS referral shufflingRobin McCorkell2015-02-271-3/+26
| | | | | | | | | | Shuffle MSDFS referral list in smbd in accordance with [MS-DFSC] 3.2.1.1 When parsing an MSDFS symlink, the names are shuffled with a Fisher-Yates algorithm. Signed-off-by: Robin McCorkell <rmccorkell@karoshi.org.uk> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: Fix a typoVolker Lendecke2015-02-101-1/+1
| | | | | | | | 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 Feb 10 20:27:32 CET 2015 on sn-devel-104
* s3:smbd: move sconn->smb1.echo_handler.* to xconn->smb1.echo_handler.*Stefan Metzmacher2014-08-061-1/+0
| | | | | | | | 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:smbd: move sconn->sock to xconn->transport.sockStefan Metzmacher2014-08-061-1/+0
| | | | | | | | 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>
* smbd: Change logging level for denied share accessChristof Schmitt2014-07-311-1/+1
| | | | | | | | | | | | A user without access in the share acl can easily trigger those warnings. Change the logging level, so that they do not appear with the default logging level. 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): Thu Jul 31 01:17:30 CEST 2014 on sn-devel-104
* smbd: Use mutex instead of fcntl lock for echohandler coordinationChristof Schmitt2014-07-091-2/+1
| | | | | | | | | | | | | | 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
* loadparm: rename lp[cfg]_pathname to lp[cfg]_path for consistency with docsMichael Adam2014-02-031-5/+5
| | | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* dfs: always call create_conn_struct with root privilegesGarming Sam2014-01-101-1/+30
| | | | | | | | | | | | | | | | | | This fixes a bug in dfs_samba4 identified by Daniel Müller. create_conn_struct calls SMB_VFS_CONNECT which requires root privileges. SMB_VFS_CONNECT in turn calls dfs_samba4_connect which connects to samdb. Calls were made to this function without ever becoming root (notably via setup_dfs_referral) which resulted in an error and the VFS connect failing. This happens when you have an active directory domain controller with host msdfs = yes in smb.conf and dfs links in place. Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Bjoern Baumbach <bb@sernet.de> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Jan 10 20:11:03 CET 2014 on sn-devel-104
* smbd: Support multiple dfs targets for msdfs proxy sharesVolker Lendecke2013-10-311-26/+8
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Björn Jacke <bj@sernet.de>
* smbd: Convert remove_msdfs_link to synthetic_smb_fnameVolker Lendecke2013-04-171-7/+4
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: Convert create_msdfs_link to synthetic_smb_fnameVolker Lendecke2013-04-171-8/+6
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* Fix bug #9588 - ACLs are not inherited to directories for DFS shares.Jeremy Allison2013-01-281-0/+13
| | | | | | | | | | | | | | | We can return with NT_STATUS_OK in an error code path. This has a really strange effect in that it prevents the ACL editor in Windows XP from recursively changing ACE entries on sub-directories after a change in a DFS-root share (we end up returning a path that looks like: \\IPV4\share1\xptest/testdir with a mixture of Windows and POSIX pathname separators). Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Mon Jan 28 13:48:13 CET 2013 on sn-devel-104
* Allow create_conn_struct() to be called with snum == -1.Jeremy Allison2013-01-091-4/+9
| | | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* smbd: Rework create_conn_struct to use conn_new()Andrew Bartlett2013-01-091-22/+18
| | | | | | | | | | | This avoids issues with required structure elements not being initialised. In particular, once conn->vuid_cache becomes a pointer, this ensures that it is initalised in all cases. Andrew Bartlett Reviewed by: Jeremy Allison <jra@samba.org>
* smbd: Fix calls to create_conn_struct_cwd to be correctly indented.Andrew Bartlett2013-01-071-16/+16
| | | | | | | | These are whitespace changes only, left out of the previous commit to preserve clarity. Andrew Bartlett. Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: Split create_conn_struct into a fn that does not change the working dirAndrew Bartlett2013-01-071-14/+44
| | | | | | | | | | | The python bindings do not want the current working directory changed during operations, so we provide two functions, one providing the original behaviour, and other providing the python bindings with just the memory allocation and initilisation stuff. Andrew Bartlett Reviewed-by: Jeremy Allison <jra@samba.org>
* s3: Fix Coverity ID 710818 Resource leakVolker Lendecke2012-07-311-0/+1
| | | | Signed-off-by: Stefan Metzmacher <metze@samba.org>
* loadparm: make the source3/ lp_ functions take an explicit TALLOC_CTX *.Rusty Russell2012-07-181-20/+21
| | | | | | | | | | 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:smb: introduce a name TID_FIELD_INVALID for the invalid value for a cnum/tidMichael Adam2012-06-061-1/+1
| | | | Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
* s3:smbd/msdfs: pass allow_broken_path to resolve_dfspath_wcard()Stefan Metzmacher2012-05-241-1/+2
| | | | | | | metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Thu May 24 16:14:01 CEST 2012 on sn-devel-104
* s3:smbd/msdfs: pass 'allow_broken_path' to get_referred_path()Stefan Metzmacher2012-05-241-2/+2
| | | | | | | | Note the DCERPC code should not be smb2 specific! I wonder why this is at all smb2 specific... metze
* s3:smbd/msdfs: let create_conn_struct() also fake the 'smbd_server_connection'Stefan Metzmacher2012-05-241-12/+36
| | | | metze
* build: Remove SMB_STRUCT_DIR defineAndrew Bartlett2012-04-051-2/+2
|
* s3:smbd: keep 'num_connections' and 'connections' directly under ↵Stefan Metzmacher2012-03-061-1/+2
| | | | | | | | | 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:msdfs: set the 'cnum' field to invalid for faked connection_structsStefan Metzmacher2012-03-061-0/+1
| | | | metze
* s3:smbd/msdfs: enum_msdfs_links() doesn't need a smbd_server_connection anymoreStefan Metzmacher2011-12-131-2/+1
| | | | | | | metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Tue Dec 13 17:26:20 CET 2011 on sn-devel-104
* s3:smbd: use connections_snum_used() instead of conn_snum_used() for ↵Stefan Metzmacher2011-12-131-1/+1
| | | | | | | | | load_usershare_shares() Before removing the share security descriptor, we should make sure there're really no active users anymore. metze
* s3:param: don't reference conn_snum_used directly in load_usershare_shares()Stefan Metzmacher2011-12-131-1/+1
| | | | | | This uses the same logic as lp_killunused(). metze
* s3:msdfs: removed unused variablesStefan Metzmacher2011-10-081-209/+0
| | | | metze
* s3:msdfs: implement setup_dfs_referral() on top of SMB_VFS_GET_DFS_REFERRALS()Stefan Metzmacher2011-10-081-85/+31
| | | | metze
* Fix bug #8493 - DFS breaks zip file extracting unless "follow symlinks = no" setJeremy Allison2011-10-011-11/+2
| | | | | | | | If a client sends a mangled name as part of a DFS path, use the post-mangled name for the pathname walk, not the mangled name. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Sat Oct 1 00:45:59 CEST 2011 on sn-devel-104
* s3: Remove the smbd_server_conn ref from create_junctionVolker Lendecke2011-09-261-2/+3
| | | | | Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Mon Sep 26 16:33:30 CEST 2011 on sn-devel-104
* s3: Remove the smbd_server_conn ref from setup_dfs_referralVolker Lendecke2011-09-261-1/+1
|
* s3: Remove the smbd_server_conn ref from get_referred_pathVolker Lendecke2011-09-261-5/+6
|
* s3: Remove the smbd_server_conn ref from dfs_redirectVolker Lendecke2011-09-261-1/+3
|
* s3: Remove the smbd_server_conn ref from create_conn_structVolker Lendecke2011-09-261-8/+9
|
* s3: Remove the smbd_server_conn ref from parse_dfs_pathVolker Lendecke2011-09-261-5/+8
|
* s3-auth Use the common auth_session_infoAndrew Bartlett2011-07-201-1/+1
| | | | | | | | | | | This patch finally has the same structure being used to describe the authorization data of a user across the whole codebase. This will allow of our session handling to be accomplished with common code. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
* s3-auth Use struct auth_user_info_unix for unix_name and sanitized_usernameAndrew Bartlett2011-07-201-2/+2
| | | | | | | | 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-auth Use struct auth3_session_info outside the auth subsystemAndrew Bartlett2011-07-201-2/+2
| | | | | | | | | | | | | | | This seperation between the structure used inside the auth modules and in the wider codebase allows for a gradual migration from struct auth_serversupplied_info -> struct auth_session_info (from auth.idl) The idea here is that we keep a clear seperation between the structure before and after the local groups, local user lookup and the session key modifications have been processed, as the lack of this seperation has caused issues in the past. Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
* s3:smbd/msdfs: let create_conn_struct() check the share security descriptorStefan Metzmacher2011-07-111-0/+30
| | | | metze
* 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
* s3-talloc Change TALLOC_ZERO_ARRAY() to talloc_zero_array()Andrew Bartlett2011-06-091-1/+1
| | | | | Using the standard macro makes it easier to move code into common, as TALLOC_ZERO_ARRAY isn't standard talloc.
* s3-talloc Change TALLOC_ZERO_P() to talloc_zero()Andrew Bartlett2011-06-091-6/+6
| | | | | Using the standard macro makes it easier to move code into common, as TALLOC_ZERO_P isn't standard talloc.
* s3-talloc Change TALLOC_P() to talloc()Andrew Bartlett2011-06-091-3/+3
| | | | | Using the standard macro makes it easier to move code into common, as TALLOC_P isn't standard talloc.
* s3-talloc Change TALLOC_ARRAY() to talloc_array()Andrew Bartlett2011-06-091-3/+3
| | | | | Using the standard macro makes it easier to move code into common, as TALLOC_ARRAY isn't standard talloc.
* s3-smbd provide struct smbd_server_connection * to conn_snum_usedAndrew Bartlett2011-05-311-2/+3
| | | | | | | | | | | | | | | | This provides the 'sconn' parameter to this key functions, that is currently duplicated in dummysmbd.c, which causes duplicate symbol issues in the waf build. This has natrually caused a number of consequential changes across the codebase, includning not passing a messaging context into initial reload_services(): This causes problems because the global smbd_server_connection isn't yet set up, as there isn't a connection here, just the initial process. Andrew Bartlett
* More simple const fixes.Jeremy Allison2011-05-051-1/+1
|
* s3-auth: smbd needs auth.hGünther Deschner2011-03-301-0/+1
| | | | Guenther
* s3: include smbd/smbd.h where needed.Günther Deschner2011-03-301-0/+1
| | | | Guenther