summaryrefslogtreecommitdiffstats
path: root/source3/smbd/trans2.c
Commit message (Collapse)AuthorAgeFilesLines
* 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
* We now pass the Microsoft SMB2 fileio test with EA's and streams...Jeremy Allison2009-09-171-0/+59
| | | | Jeremy.
* Fix bug 6494 - Incorrect FileStatus returned in NT_CREATE_ANDX.Jeremy Allison2009-09-141-2/+8
| | | | | Lookup the EA and Stream status on CreateX. Jeremy.
* s3:smbd: Add a "hidden" parameter "share:fake_fscaps"Volker Lendecke2009-09-091-0/+3
| | | | | | | | | | | This is needed to support some special app I've just come across where I had to set the SPARSE_FILES bit (0x40) to make it work against Samba at all. There might be others to fake. This is definitely a "Don't touch if you don't know what you're doing" thing, so I decided to make this an undocumented parametric parameter. I know this sucks, so feel free to beat me up on this. But I don't think it will hurt.
* Second attempt at fix for bug 6529 - Offline files conflict with Vista and ↵Jeremy Allison2009-08-241-59/+47
| | | | | | | | Office 2003. Confirmation from reporter that this fixes the issue in master on ext3/ext4. Back-ports to follow. Jeremy.
* Second part of fix for 6529 - Offline files conflict with Vista and Office 2003.Jeremy Allison2009-08-241-0/+11
| | | | | | ext4 may be able to store ns timestamps, but the only API to *set* timestamps takes usec, not nsec. Round to usec on set requests. Jeremy.
* Fix bug 6529 - Offline files conflict with Vista and Office 2003Jeremy Allison2009-08-211-0/+9
| | | | | | | | On filesystems that can't store less than one second timestamps, round the incoming timestamp set requests so the client can't discover that a time set request has been truncated by the filesystem. Needs backporting to 3.4, 3.3, 3.2 and (even) 3.0. Jeremy
* s3:smbd: add a generic smbd_dirptr_lanman2_entry() functionStefan Metzmacher2009-08-191-46/+193
| | | | | | | | This can we used by SMB2, the key difference between SMB1 and SMB2 is that with SMB2 entries are aligned to 8 bytes and there's no padding at the end of the last entry. metze
* Fix BASE-DELAYWRITE test by removing const from struct smb_filenameJeremy Allison2009-08-121-20/+18
| | | | | | | | in smbd_do_qfilepathinfo(). update_stat_ex_mtime() modifies the stat struct inside the smb_fname so don't make a copy of that stat struct, use it directly - it's meant to be updated and represent the state of the file we're returning. Jeremy.
* Add "store create time" parameter (docs to follow)Jeremy Allison2009-08-121-4/+5
| | | | | that stores the create time in the user.DosTimestamps EA. Jeremy.
* Refactor the use of create_time and change time to goJeremy Allison2009-08-101-15/+23
| | | | | through functions. Will aid in making us pass RAW-SETFILEINFO. Jeremy.
* Move the checks for null timestamps down below the VFS_NTIMESJeremy Allison2009-08-071-30/+3
| | | | | | layer (as it's done in onefs). This simplifies greatly the code in smb_set_file_time() w.r.t. changenotify messages. Jeremy.
* Correctly send out notify messages for timestamp changes.Jeremy Allison2009-08-071-5/+3
| | | | | | | "change time" has no notify message, so don't send anything out when we change it. Use FILE_NOTIFY_CHANGE_CREATION correctly when changing the create time. Jeremy.
* s3:smbd: split the dir entry marshalling into smbd_marshall_dir_entry()Stefan Metzmacher2009-08-071-443/+482
| | | | | | So that we can reuse it for SMB2 Find. metze
* s3:smbd: move dptr globals into struct smbd_server_connectionStefan Metzmacher2009-08-071-10/+13
| | | | metze
* s3:smbd: remove dirptr and dirpath from connection_structStefan Metzmacher2009-08-071-22/+24
| | | | | | | They're both only used in the context of a function, so we can make them stack variables. metze
* s3:smbd: implement get_lanman2_dir_entry() on top of smbd_dirptr_get_entry()Stefan Metzmacher2009-08-071-229/+215
| | | | metze
* Put SMB_INFO_STANDARD back into setfileinfo, but do it rightJeremy Allison2009-08-061-0/+45
| | | | | this time :-). Jeremy.
* We're not changing last write, but setting this to be ↵Jeremy Allison2009-07-311-1/+1
| | | | | | | | FILE_NOTIFY_CHANGE_CREATION doesn't work. So use FILE_NOTIFY_CHANGE_LAST_WRITE (now seems to reliably fix bug #6529 - Offline files conflict with Vista and Office 2003. Jeremy.
* Tidy up treatment of ctime.Jeremy Allison2009-07-301-5/+7
| | | | Jeremy.
* Fix bug #6529 - Offline files conflict with Vista and Office 2003.Jeremy Allison2009-07-301-0/+16
| | | | | | We need to send a notify message when a timestamp is changed that can't be reflected in the underlying POSIX filesystem. Jeremy.
* Remove the extraneous logic in smb_set_info_standard - weJeremy Allison2009-07-301-26/+8
| | | | | do the time twiddling logic at the smb_set_file_time level. Jeremy.
* SMB_INFO_STANDARD is not a valid info level on set,Jeremy Allison2009-07-301-42/+0
| | | | | and was being read incorrectly anyway. Remove. Jeremy.
* s3: Convert a few callers of unix_convert() over to filename_convert()Tim Prouty2009-07-241-19/+9
| | | | | | This patch also changes the unix convert flags to make sure the correct semantics are preservered for allowing/disallowing wildcards in the last component of the path.
* s3: Remove a few callers of get_full_smb_filename()Tim Prouty2009-07-241-24/+50
|
* s3: Simplify rename_internals() by passing in smb_filename structsTim Prouty2009-07-241-35/+36
|
* s3: Allow filename_convert() to pass through unix_convert_flags and let the ↵Tim Prouty2009-07-241-0/+10
| | | | | | caller know if the path has a wildcard This also eliminates the need for resolve_dfspath().
* s3: Convert some callers of vfs_stat_smb_fname to SMB_VFS_STAT()Tim Prouty2009-07-221-9/+19
|
* s3: plumb smb_filename through some of the trans2 posix_* functionsTim Prouty2009-07-211-60/+38
|