summaryrefslogtreecommitdiffstats
path: root/source3/smbd/trans2.c
Commit message (Collapse)AuthorAgeFilesLines
* s3: Explicitly pass sconn to blocking_lock_was_deferred_smb1Volker Lendecke2010-06-121-1/+1
|
* s3: Remove smbd_server_conn from reply_findcloseVolker Lendecke2010-06-121-1/+1
|
* s3: Remove smbd_server_conn from call_trans2setfsinfoVolker Lendecke2010-06-121-1/+1
|
* s3: Remove smbd_server_conn from smbd_do_qfsinfoVolker Lendecke2010-06-121-2/+2
|
* s3: Remove smbd_server_conn from call_trans2findnextVolker Lendecke2010-06-121-1/+1
|
* s3: Remove smbd_server_conn from call_trans2findfirstVolker Lendecke2010-06-121-1/+1
|
* s3: Remove smbd_server_conn from send_trans2_repliesVolker Lendecke2010-06-121-1/+1
|
* SMB2: Fix rename on Windows 7.Ira Cooper2010-06-011-8/+0
| | | | | | | This removes some code Jeremy (jra) suspected was bad. It turns out that the command window rename command will not work with the offending code in place. With it removed the bug is gone, and rename works.
* s3-build: only use ndr_security.h where needed.Günther Deschner2010-05-311-0/+1
| | | | Guenther
* s3:smbd Use the right num_sidsSimo Sorce2010-05-291-1/+1
| | | | | We use s_i->ptok->num_sids everywhere else in this call and then suddenly we reference s_i->num_sids
* Fix bug #7410 - samba sends "raw" inode number as uniqueid with unix ↵Jeremy Allison2010-05-201-7/+26
| | | | | | | | | | | | | | | extensions. Move to a consistent get_FileIndex() function for all inode returns, that checks if st_dev on the file is identical to the top directory dev_t of the exported share, and if so uses the raw 64-bit inode number. If it isn't (we've traversed a mount point) - return what we used to do for Windows which is the concatination of the bottom 32-bits of the inode with the 32-bit device number. We can get more creative with this over time (hashing?) if we want as now all inode returns go through this single function. Jeremy.
* Fix bug 7442 - Samba returns incorrect SMB2 QFS device info.Jeremy Allison2010-05-191-2/+9
| | | | | | Add the correct devicetype and characteristics for this info level. Jeremy.
* Implement missing info level SMB_FILE_LINK_INFORMATION.Jeremy Allison2010-05-181-5/+99
| | | | | | | Fix bug #7435 - SMB2 hardlink fails (invalid level). Found at the Microsoft plugsharing plugfest. Jeremy.
* s3: Remove use of iconv_convenience.Jelmer Vernooij2010-05-181-2/+0
|
* Fix bug 7399 - SMB2: QUERY_DIRECTORY is returning invalid values.Jeremy Allison2010-05-131-0/+10
| | | | | | | | | The end_data argument to smbd_dirptr_lanman2_entry() must include the safety margin, as internally it's actually used to allow detection of string name pushes that were truncated. Ensure space_remaining can never go negative due to padding. Jeremy.
* Fix more SMB2-OPLOCK bugs. Only 3 more issues to address then we're good to ↵Jeremy Allison2010-05-111-1/+9
| | | | | | go on this test. Jeremy.
* This patch looks bigger than it is. It does 2 things. 1). Renames smbpid -> ↵Jeremy Allison2010-05-071-14/+14
| | | | | | smblctx in our locking code. 2). Widens smblctx to 64-bits internally. Preparing to use the SMB2 handle as the locking context. Jeremy.
* s3: only include gen_ndr headers where needed.Günther Deschner2010-05-061-0/+1
| | | | | | | | | | | | | | | | | This shrinks include/includes.h.gch by the size of 7 MB and reduces build time as follows: ccache build w/o patch real 4m21.529s ccache build with patch real 3m6.402s pch build w/o patch real 4m26.318s pch build with patch real 3m6.932s Guenther
* Carefully label SMB1-specific locking calls.Jeremy Allison2010-04-291-1/+1
| | | | Jeremy.
* Attempt to fix bug #7399 - SMB2: QUERY_DIRECTORY is returning invalid values.Jeremy Allison2010-04-291-6/+17
| | | | | | Based on an initial patch from Ira Cooper <samba@ira.wakeful.net>. Jeremy.
* s3-smbd: group print relate data in own structureSimo Sorce2010-04-231-1/+6
|
* Simplify call_trans2qfilepathinfo() and smbd_do_qfilepathinfo()Jeremy Allison2010-04-081-17/+4
| | | | | | | | | | | | Remove the bool ms_dfs_link parameter from smbd_do_qfilepathinfo. It is not possible for this to be a DFS link. Remove the check_msdfs_link() call from call_trans2qfilepathinfo() - the call to filename_convert() above with a ucf_flags of zero *MUST* catch a DFS link and return NT_STATUS_PATH_NOT_COVERED in this case, so the code below checking for msdfs links is redundent. Don't add this to 3.5.x, as it's an optimization but not needed to fix bug #7339 - MSDFS is non-functional in 3.5.x. Jeremy.
* Fix bug #7339 - MSDFS is non-functional in 3.5.xJeremy Allison2010-04-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | In the refactoring around filename_convert, the split between the functions resolve_dfspath() and resolve_dfspath_wcard() was lost, leaving us only with resolve_dfspath_wcard(). Internally resolve_dfspath_wcard() calls dfs_redirect() only with a "allow_wcards" flag of true, wheras the old resolve_dfspath() would call with a value of false. The loss of this case causes dfs_redirect to always masquerade DFS links as directories, even when they are being queried directly by a trans2 QPATHINFO call. We should only masquerade DFS links as directories when called from a SMBsearch or trans2 findfirst/findnext - which was the intent of the "allow_wcards" flag. This patch adds back an allow_wcards bool parameter to resolve_dfspath_wcard(). This bool is set from the state of the ucf_flags when filename_convert() is called. I will follow this up with a new smbclient-based torture test that will prevent us from ever regressing our DFS support again. Jeremy.
* s3:smbd: disable SMB encryption when the echo handler is activeStefan Metzmacher2010-03-221-0/+10
| | | | metze
* Fix bug #7188 - Logic error in check of total_data for call_trans2mkdir()Jeremy Allison2010-03-151-16/+13
| | | | | | Make ea data checks identical for trans2open and trans2mkdir. Jeremy.
* Fix for bug #7189 - Open txt files with notepad on samba shares creates problem.Jeremy Allison2010-03-051-2/+10
| | | | | | | | | | Ensure we don't use any of the create_options for Samba private use. Add a new parameter to the VFS_CREATE call (private_flags) which is only used internally. Renumber NTCREATEX_OPTIONS_PRIVATE_DENY_DOS and NTCREATEX_OPTIONS_PRIVATE_DENY_FCB to match the S4 code). Rev. the VFS interface to version 28. Jeremy.
* Fix up debug info on smb2_rename code.Jeremy Allison2010-02-251-9/+3
| | | | Jeremy.
* Implement rename/move in SMB2 from Windows7.Jeremy Allison2010-02-251-0/+109
| | | | Jeremy.
* Remove now unused variable.Jeremy Allison2010-02-051-1/+0
| | | | Jeremy.
* Fix bug 7104 - "wide links" and "unix extensions" are incompatible.Jeremy Allison2010-02-051-36/+0
| | | | | | | | | | | | | | | Change parameter "wide links" to default to "no". Ensure "wide links = no" if "unix extensions = yes" on a share. Fix man pages to refect this. Remove "within share" checks for a UNIX symlink set - even if widelinks = no. The server will not follow that link anyway. Correct DEBUG message in check_reduced_name() to add missing "\n" so it's really clear when a path is being denied as it's outside the enclosing share path. Jeremy.
* Rename reply_doserror() -> reply_force_doserror().Jeremy Allison2009-12-211-1/+1
| | | | | | | Rewrite all calls to reply_nterror(NT_STATUS_DOS()) to reply_force_doserror() and update the comment in smbd/error.c Jeremy.
* Remove all calls to reply_doserror - turn them intoJeremy Allison2009-12-211-17/+17
| | | | | | | correct reply_nterror calls. Next rename reply_doserror -> reply_force_doserror and plumb in when NT_STATUS_DOS is used. Jeremy.
* Ensure dos_mode can return FILE_ATTRIBUTE_NORMAL, then filter the returned ↵Jeremy Allison2009-12-151-10/+5
| | | | | | | attributes by protocol level. This makes us consistant in returning DOS attrs across all replies. Tested on OS/2 by Günter Kukkukk. Jeremy.
* Remove unneeded argument from can_set_delete_on_close(). EnsureJeremy Allison2009-12-021-4/+5
| | | | | | can_set_delete_on_close() is correctly called before any setting of the disposition bit (clean up the do_unlink() call). Jeremy.
* Ensure we don't see the xattr used to store NT security (visible when xattr_tdbJeremy Allison2009-12-011-1/+1
| | | | | is used). Allows make test to pass with acl_xattr.so prepended to the vfs modules. Jeremy.
* s3: Fix smbd to correctly return INVALID_LEVEL on set_file_end_of_file_info ↵Tim Prouty2009-12-011-5/+26
| | | | | | | for paths This allows smbd to pass the freshly updated RAW-SFILEINFO-END-OF-FILE torture test.
* s3 setfileinfo: Open with FILE_WRITE_DATA when setting the file sizeTim Prouty2009-11-251-1/+1
| | | | | | | | This matches what is outlined here: http://msdn.microsoft.com/en-us/library/ms804363.aspx This is also inline with how winXP/win7 handle this. See RAW-SFILEINFO-END-OF-FILE* in smbtorture4.
* Revert "s3: Make the implicit reference to Protocol in mask_match() explicit"Volker Lendecke2009-11-231-2/+1
| | | | This reverts commit e23d8a3d1f558a7e98ef2afd71e1d15c5b3a71bc.
* Revert "s3: Move the global variable Protocol to struct smbd_server_connection"Volker Lendecke2009-11-231-8/+6
| | | | This reverts commit c85a4c9ba4a7de65a7850f6f9708df66bd24deea.
* s3: Move the global variable Protocol to struct smbd_server_connectionVolker Lendecke2009-11-211-6/+8
|
* s3: Make the implicit reference to Protocol in mask_match() explicitVolker Lendecke2009-11-211-1/+2
|
* s3: Replace some create_synthetic_smb_fname() callsVolker Lendecke2009-11-181-22/+9
| | | | | In very hot codepaths like the statcache copy_smb_filename and the subsequent recursive talloc_free is noticable in the CPU load.
* Remove "store create time" code, cause create time to be storedJeremy Allison2009-11-171-1/+1
| | | | | | | | | | | | in the "user.DOSATTRIB" EA. From the docs: In Samba 3.5.0 and above the "user.DOSATTRIB" extended attribute has been extended to store the create time for a file as well as the DOS attributes. This is done in a backwards compatible way so files created by Samba 3.5.0 and above can still have the DOS attribute read from this extended attribute by earlier versions of Samba, but they will not be able to read the create time stored there. Storing the create time separately from the normal filesystem meta-data allows Samba to faithfully reproduce NTFS semantics on top of a POSIX filesystem. Passes make test but will need more testing. Jeremy.
* Remove "Protocol" as an extern, and add accessor functions.Jeremy Allison2009-11-041-4/+2
| | | | Jeremy.
* Fix debug statements to use correct function name.Jeremy Allison2009-11-031-13/+13
| | | | Jeremy.
* requires_resume_key is a bool not int.Jeremy Allison2009-11-031-7/+2
| | | | Jeremy.
* Fix more of the RAW-SEARCH test. Older info levels areJeremy Allison2009-11-031-2/+9
| | | | | not 4 byte aligned (levels 1 - 3). Jeremy.
* Fix bug 6867 - trans2findnext returns reply_nterror(req, ntstatus) In a ↵Jeremy Allison2009-11-021-12/+16
| | | | | | directory with a lot of files. Jeremy.
* Start fixing the RAW-STREAMS test - ensure that the xattrJeremy Allison2009-10-291-0/+1
| | | | | | used to store the stream info in streams_depot.so is not seen in when enumerating EAs. Jeremy.
* s3-smbd: fix get_ea_names_from_file() and check for pnames pointer.Günther Deschner2009-09-181-1/+3
| | | | | | | | This fixes smbd from crashing all the time. Jeremy, Volker, please check. Guenther