summaryrefslogtreecommitdiffstats
path: root/source3/smbd/msdfs.c
Commit message (Collapse)AuthorAgeFilesLines
* 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
* s3-includes: only include system/filesys.h when needed.Günther Deschner2011-03-301-0/+1
| | | | Guenther
* s3-msdfs: avoid global inclusion of msdfs.h.Günther Deschner2011-03-161-0/+1
| | | | Guenther
* s3-printing: vfs_connect prior to driver/dfs IODavid Disseldorp2011-03-021-10/+24
| | | | | | | | | | | | | | | | | | | | | | samba3.posix_s3.rpc.spoolss.driver fails with the xattr_tdb vfs module loaded as a part of make test. The (now checked) create_directory() call in move_driver_to_download_area() fails, uncovering another bug in the printer driver upload code path. move_driver_to_download_area() creates a new conn_struct for manipulating files in [print$]. The VFS layer is plumbed through with the call to create_conn_struct(), however SMB_VFS_CONNECT() is never called. Many vfs modules expect state stored at connect time with SMB_VFS_HANDLE_SET_DATA() to be available on any IO operation and fail if this is not the case. This fix adds a call to SMB_VFS_CONNECT() in create_conn_struct() prior to IO. https://bugzilla.samba.org/show_bug.cgi?id=7976 Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Wed Mar 2 01:16:30 CET 2011 on sn-devel-104
* s3-auth Rename auth_serversupplied_info varaiables: server_info -> session_infoAndrew Bartlett2011-02-221-5/+5
| | | | | | | | | | | | | | | | | | | | | These variables, of type struct auth_serversupplied_info were poorly named when added into 2001, and in good consistant practice, this has extended all over the codebase in the years since. The structure is also not ideal for it's current purpose. Originally intended to convey the results of the authentication modules, it really describes all the essential attributes of a session. This rename will reduce the volume of a future patch to replaced these with a struct auth_session_info, with auth_serversupplied_info confined to the lower levels of the auth subsystem, and then eliminated. (The new structure will be the output of create_local_token(), and the change in struct definition will ensure that this is always run, populating local groups and privileges). Andrew Bartlett Signed-off-by: Stefan Metzmacher <metze@samba.org>
* Fix bug 7781 - Samba transforms ShareName to lowercase (sharename) when ↵Jeremy Allison2010-11-101-3/+5
| | | | | | | | | adding new share via MMC Change the find_service() interface to not depend on fstring, and create a useable talloc-based interface. Jeremy.
* Move tcons.num_open from smb1 to sconn->num_tcons_open as this is needed for ↵Jeremy Allison2010-10-191-1/+1
| | | | SMB2 also.