summaryrefslogtreecommitdiffstats
path: root/source/smbd/msdfs.c
Commit message (Collapse)AuthorAgeFilesLines
* Make create_conn_struct() publicVolker Lendecke2008-07-271-1/+1
|
* Move the responsibility to keep the cwd from srv_dfs_nt to msdfs.cVolker Lendecke2008-06-241-17/+53
|
* Remove the "exists" parameter from create_msdfs_linkVolker Lendecke2008-06-221-11/+11
| | | | | | | | | | Jeremy, setting "exists" to True in _dfs_Add prevented the initial creation of a new symlink for me, because the SMB_VFS_UNLINK failed. This also exists in 3.2. I only check it into 3.3 as I would like you to look at it first. Thanks, Volker
* Reduce memory usage in form_junctions() a little bitVolker Lendecke2008-06-221-0/+1
|
* Fix an abort in junction_to_local_pathVolker Lendecke2008-06-221-1/+1
|
* Fix a crash in _dfs_EnumVolker Lendecke2008-06-221-0/+2
| | | | (cherry picked from commit 4a996476297963d4cb300b4d45c23e83a493c339)
* Fix an uninitialized variable access in callers of parse_msdfs_symlinkVolker Lendecke2008-06-221-1/+2
| | | | | | | | At least form_junctions() does not initialize refcount, and I don't see it in get_referred_path(). For the latters, the callers might initialize it. But even if they did, I think parse_msdfs_symlink() should unconditionally return the number of referrals it found. I don't think it makes sense to count them up from somewhere else.
* Fix a double-closedir() in form_junctions()Volker Lendecke2008-06-211-1/+0
|
* Remove some references to get_current_username() and current_user_infoVolker Lendecke2008-05-251-0/+11
|
* Restructuring of code to fix #5460. Remove searchJeremy Allison2008-05-191-16/+12
| | | | | | | by name code from conn, we were already doing the same check in the dfs_redirect() function, so move it into parse_dfs_path() instead. Jeremy.
* Fix debug message.Jeremy Allison2008-05-131-2/+2
| | | | Jeremy.
* Second part of patch for bug #5460. Cope with pathnamesJeremy Allison2008-05-131-15/+39
| | | | | that don't look like \xxx\yyy, cope with arbitrary length. Jeremy.
* Fix bug #5460. The problem is RHEL5.0 shipped a CIFS clientJeremy Allison2008-05-131-0/+10
| | | | | | | | | | | | | | | | | that sets the DFS bit on pathnames but doesn't send DFS paths. This causes lookups to fail as the smbd/msdfs.c code now just eats the first two parts of the pathname and uses the rest as the local path. The previous hostname check used to protect us from that as we knew that when the hostname was invalid it was a local path (and a broken client). I didn't want to put that check back in, but came up with another idea - even though the hostname can be a different one, the sharename must be valid on this machine. So we can check for a valid sharename instead. Jeremy.
* Fix dfs_Enum: In form_junctions, correctly check for malloc failureVolker Lendecke2008-05-051-1/+1
|
* Remove connection_struct->mem_ctx, connection_struct is its own parentVolker Lendecke2008-05-051-45/+36
|
* Fix MSDFS bug noticed by Ofir Azoulay <Ofir.Azoulay@expand.com>.Jeremy Allison2008-04-021-30/+0
| | | | | | There is no reason to ensure the target host is ourselves, and this breaks MS clients in some cases. Jeremy.
* strtok -> strtok_rVolker Lendecke2008-01-231-2/+3
|
* Don't build rpctorture anymore - not maintained. Just remove.Jeremy Allison2007-12-071-1/+1
| | | | | | Remove all vestiges of pstring (except for smbctool as noted in previous commit). Jeremy
* Always define PATH_MAX. Makes code simpler (removesJeremy Allison2007-11-101-21/+41
| | | | | a bunch of #defines). Remove pstring from msdfs.c. Jeremy.
* RIP BOOL. Convert BOOL -> bool. I found a few interestingJeremy Allison2007-10-181-28/+28
| | | | | | | bugs in various places whilst doing this (places that assumed BOOL == int). I also need to fix the Samba4 pidl generation (next checkin). Jeremy.
* r25327: Normalize the path we return for 'msdfs proxy'Volker Lendecke2007-10-101-1/+11
| | | | | | We now accept both \\server\tmp and \server\tmp. There are other places where this might be necessary, but at least the functionality is a bit easier now.
* r25324: Fix "msdfs proxy"Volker Lendecke2007-10-101-1/+1
| | | | Jeremy, please check!
* r25184: Fix some C++ warnings and an uninitialized variableVolker Lendecke2007-10-101-1/+1
|
* r25173: Use the append_buffer version in a loop.Jeremy Allison2007-10-101-2/+2
| | | | Jeremy.
* r25138: More pstring elimination. Add a TALLOC_CTX parameterJeremy Allison2007-10-101-1/+1
| | | | | to unix_convert(). Jeremy.
* r25111: Move to talloced pathnames on most code paths.Jeremy Allison2007-10-101-10/+6
| | | | | | | | | There are now ony 17 pstrings left in reply.c, and these will be easy to remove (and I'll be doing that shortly). Had to fix an interesting bug in pull_ucs2_base_talloc() when a source string is not null terminated :-). Jeremy.
* r25102: Rewrite msdfs code to use talloced filenames. Passes make testJeremy Allison2007-10-101-252/+609
| | | | | | and make valgrindtest. Final step will be to change srvstr_get_path() to return talloced memory in the major codepaths. Jeremy.
* r25009: Large patch discussed with Volker. Move unix_convert to a talloc-basedJeremy Allison2007-10-101-3/+4
| | | | | | interface. More development will come on top of this. Remove the "mangled map" parameter. Jeremy.
* r24253: From Jan Martin <Jan.Martin@rwedea.com>.Jeremy Allison2007-10-101-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ---------------------------------------------------------- In rare cases, Samba 3.0.25b shows directory contents at the wrong position in the file tree when displaying a subdirectory of a DFS link. The problem occurs whenever Windows XP asks for a DFS referral for a subdirectory of a DFS link with a trailing backslash. Windows does not do this very often, but we saw it several times per day on our central DFS server. smbd/msdfs.c, dfs_path_lookup() does the following with the requested path: - in line 390, the local copy 'localpath' is 'unix_convert'ed; the trailing backslash is removed inside unix_convert - in lines 417-20, 'dfspath' (another copy of the requested path) is mangled another way without removing trailing backslashes That's why the following loop (lines 435-461) that is meant to synchronously cut off the last path component from both strings until it comes to a DFS link, does not handle both strings the same. When the original path ended with a backslash, 'canon_dfspath' has always one component more than 'localpath', so that *consumedcntp gets too big in line 446. This value is reported to the client. ---------------------------------------------------------- Bug #4860. Jeremy.
* r23843: Fix bug #4777, reported by Bill Marshall <bmarsh@us.ibm.com>.Jeremy Allison2007-10-101-1/+2
| | | | | | Doing a DFS traverse through a deep link could fail (not using explorer). Jeremy.
* r23784: use the GPLv3 boilerplate as recommended by the FSF and the license textAndrew Tridgell2007-10-101-2/+1
|
* r23779: Change from v2 or later to v3 or later.Jeremy Allison2007-10-101-1/+1
| | | | Jeremy.
* r23522: Save us a kilobyte stack space in a hot code path: I can't see a reasonVolker Lendecke2007-10-101-3/+5
| | | | | | | | | | | | | | why check_path_syntax should not be able to run in-line. The destination pointer either walks side by side with the source pointer or is decremented. So as far as I can see s>=d is true throughout the whole routine. Jeremy, I'm checking this only into 3_0 for now. Please review and ack or directly merge this to 3_0_26. Thanks, Volker
* r22590: Make TALLOC_ARRAY consistent across all uses.Jeremy Allison2007-10-101-4/+8
| | | | | That should be it.... Jeremy.
* r22064: Fix the DFS code to work better with Vista clients. AllowJeremy Allison2007-10-101-32/+36
| | | | | | | | "host msdfs = true" to be set in the [global] section and allow Vista to see shares with "msdfs root = yes" and "msdfs root = no" off the same server. Down to an error message really :-). Jeremy.
* r22001: change prototype of dump_data(), so that it takes unsigned char * now,Stefan Metzmacher2007-10-101-3/+3
| | | | | | | | which matches what samba4 has. also fix all the callers to prevent compiler warnings metze
* r21961: Repair bug introduced by rev. 21960.Jeremy Allison2007-10-101-0/+6
| | | | | We need to do the initial strtok to set up the internal state. Jeremy.
* r21960: Fix bugs 4463,4464,4465,4466. Thanks Jason :-)Volker Lendecke2007-10-101-2/+0
|
* r21942: Hoist by our own petard :-). Older smbclient binariesJeremy Allison2007-10-101-2/+2
| | | | | | | | | | | | | | were not able to connect to the rewritten dfs code as they set the dfs flag bit but then send local paths. Now that our dfs code is a *lot* more robust in detecting this sort of braindamage we can just call into it directly on getting a DFS flag and let the parser sort it out without having to check it's actually connecting to a dfs enabled share (I'm proud of this code :-). Jeremy.
* r21803: Missed part of patch to make self-referrals work.Jeremy Allison2007-10-101-0/+1
| | | | Jeremy.
* r21800: Check-in the DFS rewrite. I am still testing this but itJeremy Allison2007-10-101-370/+459
| | | | | | | | works from smbclient and Windows, and I am promising to support and fix both client and server code moving forward. Still need to test the RPC admin support but I haven't changed that code. Jeremy.
* r21759: Fix the same bug in a more elegant way, strrchr_mJeremy Allison2007-10-101-7/+12
| | | | | is an expensive call.... Jeremy.
* r21758: Fix a very specific dfs bug when passing in POSIXJeremy Allison2007-10-101-3/+6
| | | | | | | pathnames. When we're working out how much we've consumed we need to backtrack by either a '/' or '\\' component, as both are valid separators. Jeremy.
* r21756: An invarient the dfs code depended on for POSIX pathsJeremy Allison2007-10-101-4/+1
| | | | | is no longer true, so fix it. Jeremy.
* r21754: Volker is completely correct. There's no need forJeremy Allison2007-10-101-1/+31
| | | | | | | the RESOLVE_DFSPATH macros and their varients any more. Fix reporting profile bug with all error returns. Jeremy.
* r21251: Okay, after Jeremy has kindly tested this, check it in :-)Volker Lendecke2007-10-101-1/+5
| | | | | | | | | | | Attached find a workaround that works for me. This is not the "correct" fix, to me it seems our DFS referral marshalling is broken. Vista requests level 4, we reply with level 2, and Vista seems not to like that. If we reply with level 3 it seems more happy. Needs more work! Volker
* r21226: Fix bug #4377 (rename of "foo" -> "Foo" fails).Jeremy Allison2007-10-101-11/+29
| | | | | | | This is actually an interesting case as it exposed bad code in our DFS redirect module (that was where the bug was introduced). Caused by our turning on dfsroot be default. Jeremy.
* r20718: Sync up the filename path parsing changes from SAMBA_3_0_24.Jeremy Allison2007-10-101-2/+4
| | | | | | | The only difference between the two trees now w.r.t file serving are the changes to smbd/open.c in this branch I need to review. Jeremy.
* r19963: Add 'registry shares = yes' and registry key security descriptors.Volker Lendecke2007-10-101-0/+1
|
* r18481: Use pidl-generated server side code for dfs.Jelmer Vernooij2007-10-101-5/+6
|