summaryrefslogtreecommitdiffstats
path: root/source3/smbd/reply.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix bug #7033 - SMBrmdir call always returns true, even on failure to delete ↵Jeremy Allison2010-01-121-2/+6
| | | | | | | | | | | a directory. There is a codepath missing to propagate back error returns from the rmdir POSIX call inside close_directory when delete on close is set. This means doing an rmdir on a Windows command line will always report success, even when the directory was not deleted. This fix adds that codepath back into Samba. Jeremy.
* Rename reply_doserror() -> reply_force_doserror().Jeremy Allison2009-12-211-12/+12
| | | | | | | 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-46/+47
| | | | | | | correct reply_nterror calls. Next rename reply_doserror -> reply_force_doserror and plumb in when NT_STATUS_DOS is used. Jeremy.
* reply_doserror() doesn't force DOS errors on the wire.Jeremy Allison2009-12-181-10/+10
| | | | | | | | | | | Start migrating uses of reply_doserror() to reply_nterror() with the correct mapping. Eventually we'll get to the point where we can change reply_doserror() to force a DOS error code on the wire, and can change calls to reply_nterror(req, NT_STATUS_DOS()) - which *does* force DOS errors on the wire - to reply_doserror(). Which might actually make the server code look like it's making sense. Jeremy.
* Make Samba3 pass the RAW-LOCK test as Windows.Jeremy Allison2009-12-041-0/+24
| | | | | | | Implement the win7 NT_STATUS_INVALID_LOCK_RANGE. Make smbd behave as Windows does in canceling locks. Jeremy.
* Refactor reply_rmdir to use handle based code. AllJeremy Allison2009-12-031-260/+40
| | | | | | calls are now handle based. Put rmdir into close.c and make it private. Jeremy.
* Remove unneeded argument from can_set_delete_on_close(). EnsureJeremy Allison2009-12-021-19/+11
| | | | | | can_set_delete_on_close() is correctly called before any setting of the disposition bit (clean up the do_unlink() call). Jeremy.
* Revert "s3: Make the implicit reference to Protocol in mask_match() explicit"Volker Lendecke2009-11-231-4/+3
| | | | This reverts commit e23d8a3d1f558a7e98ef2afd71e1d15c5b3a71bc.
* Revert "s3: Make the implicit reference to Protocol in is_in_path() explicit"Volker Lendecke2009-11-231-2/+1
| | | | This reverts commit f7b4151a64d8c6851e62255a7139fd00a5fc63a3.
* Revert "s3: Make the implicit reference to get_Protocol in lp_use_sendfile() ↵Volker Lendecke2009-11-231-4/+2
| | | | | | explicit" This reverts commit 6a149022976fe6a5579ec9afc7a4d2dcb44dc8af.
* Revert "s3: Move the global variable Protocol to struct smbd_server_connection"Volker Lendecke2009-11-231-17/+11
| | | | This reverts commit c85a4c9ba4a7de65a7850f6f9708df66bd24deea.
* s3: Move the global variable Protocol to struct smbd_server_connectionVolker Lendecke2009-11-211-11/+17
|
* s3: Make the implicit reference to get_Protocol in lp_use_sendfile() explicitVolker Lendecke2009-11-211-2/+4
|
* s3: Make the implicit reference to Protocol in is_in_path() explicitVolker Lendecke2009-11-211-1/+2
|
* s3: Make the implicit reference to Protocol in mask_match() explicitVolker Lendecke2009-11-211-3/+4
|
* s3: Tune if-conditions in a very hot codepathVolker Lendecke2009-11-211-1/+1
| | | | | | This looks innocent, but it is visible in a netbench run. Due to boolean short-circuiting we don't have to execute the conditions on the right-hand side of the &&. So putting the less likely condition left gains a bit.
* s3: Do not talloc in readdirVolker Lendecke2009-11-181-43/+51
| | | | This is a hot codepath (called from the stat cache)
* Start removing SMB_STRUCT_STAT variables except forJeremy Allison2009-11-171-15/+13
| | | | | the directory enumeration code (which needs it). Jeremy.
* Remove "store create time" code, cause create time to be storedJeremy Allison2009-11-171-2/+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.
* Don't overwrite a dynamic pointer with the address of a stackJeremy Allison2009-11-161-8/+5
| | | | | variable. Jeremy.
* Got the logic simplification worked out so we still passJeremy Allison2009-11-051-3/+3
| | | | | BASE-DELAYWRITE and also RAW-CLOSE. Jeremy.
* Revert commit "0551284dc08eb93ef7b2b2227a45e5ec21d482fb" - simplifyJeremy Allison2009-11-051-3/+3
| | | | | the logic. This was incorrect (I'll revisit this tomorrow). Jeremy.
* Simplify the logic - remove extraneous argument and calls to ↵Jeremy Allison2009-11-051-3/+3
| | | | | | | | set_close_write_time(). We were treating a file time set on close as a sticky write time set, and I don't think it is. I will add a torture test later to RAW-CLOSE to confirm this. Jeremy.
* Get closer to an accurate model of Windows timestamp changes.Jeremy Allison2009-11-051-3/+3
| | | | | | | | "Normal" non truncate writes always cause the timestamp to be set on close. Once a close is done on a handle this can reset the sticky write time to current time also. Updated smbtorture4 confirms this. Jeremy.
* Remove "Protocol" as an extern, and add accessor functions.Jeremy Allison2009-11-041-7/+5
| | | | Jeremy.
* Cope with old CIFSFS clients that use SMBunlink to removeJeremy Allison2009-10-081-2/+11
| | | | | symlinks instead of trans2:posix_unlink. Jeremy.
* Remove lots of duplicate code and move it into oneJeremy Allison2009-10-021-60/+21
| | | | | | function vfs_stat_fsp(). Stops code looking at fsp->posix_open except for exceptional circumstances. Jeremy.
* s3: Add a new VFS op called SMB_VFS_TRANSLATE_NAMEAravind Srinivasan2009-08-281-8/+42
| | | | | | | | | | | This vop is designed to work in tandem with SMB_VFS_READDIR to allow vfs modules to make modifications to arbitrary filenames before they're consumed by callers. Subsequently the core directory enumeration code in smbd is now changed to free the memory that may be allocated in a module. This vop enables the new version of catia in the following patch. Signed-off-by: Tim Prouty <tprouty@samba.org>
* s3:streams: check for :$DATA only in the backend (fix bug #6642)Stefan Metzmacher2009-08-271-3/+0
| | | | | | | We need to allow "\\$Extend\\$Quota:$Q:$INDEX_ALLOCATION" to pass check_path(), so that the Quota Dialog works. metze
* Add "store create time" parameter (docs to follow)Jeremy Allison2009-08-121-1/+1
| | | | | 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-1/+1
| | | | | through functions. Will aid in making us pass RAW-SETFILEINFO. Jeremy.
* s3:smbd: move dptr globals into struct smbd_server_connectionStefan Metzmacher2009-08-071-12/+15
| | | | metze
* s3:smbd: remove dirptr and dirpath from connection_structStefan Metzmacher2009-08-071-14/+19
| | | | | | | They're both only used in the context of a function, so we can make them stack variables. metze
* s3:smbd: add a smbd_server_connection pointer to connection_structStefan Metzmacher2009-08-071-3/+2
| | | | | | | This can be NULL for faked connection structs used in the rpc server or printing code. metze
* Added prefer_ipv4 bool parameter to resolve_name().Jeremy Allison2009-07-281-1/+1
| | | | | | | | | | W2K3 DC's can have IPv6 addresses but won't serve krb5/ldap or cldap on those addresses. Make sure when we're asking for DC's we prefer IPv4. If you have an IPv6-only network this prioritizing code will be a no-op. And if you have a mixed network then you need to prioritize IPv4 due to W2K3 DC's. Jeremy.
* s3: Convert a few callers of unix_convert() over to filename_convert()Tim Prouty2009-07-241-73/+39
| | | | | | 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: Simplify rename_internals() by passing in smb_filename structsTim Prouty2009-07-241-51/+37
|
* s3: Allow filename_convert() to pass through unix_convert_flags and let the ↵Tim Prouty2009-07-241-0/+18
| | | | | | caller know if the path has a wildcard This also eliminates the need for resolve_dfspath().
* s3: Remove unnecessary callers of get_full_smb_filenameTim Prouty2009-07-211-59/+27
| | | | | | | This often times means explicitly denying certain operations on a stream as they are not supported or don't make sense at a particular level. At some point in the future these can be enabled, but for now it's better to remove ambiguity
* s3: Remove the now unused fname parameter from filename_convert()Tim Prouty2009-07-211-18/+9
|
* s3: Plumb smb_filename through map_open_params_to_ntcreateTim Prouty2009-07-211-9/+10
|
* s3: Change fsp->fsp_name to be an smb_filename struct!Tim Prouty2009-07-201-82/+57
|
* Fix bug #6551 - win98 clients cannot connect after server upgrade to ↵Jeremy Allison2009-07-151-0/+2
| | | | | | | | samba-3.4.0. The values of vuid and tid were not being correctly updated in the struct smb_request when passed to chain_reply inside sessionsetupX and tconX. Jeremy.
* Create a talloc_stackframe for each file in wildcard unlinkVolker Lendecke2009-07-141-0/+10
| | | | There might be *many* files to delete
* Remove reply_unixerror() - no longer needed. Should make Metze's refactoring ↵Jeremy Allison2009-07-101-30/+42
| | | | | | a lot easier. Jeremy.
* s3:smbd: make smbd_do_locking() non staticStefan Metzmacher2009-07-101-16/+9
| | | | metze
* s3:smbd: abstract the main locking logic from the LockingAndX parsingStefan Metzmacher2009-07-101-178/+254
| | | | | | This prepares SMB2 Lock support. metze
* s3: Repace a char * with an smb_filename struct in reply_rmdirTim Prouty2009-07-081-3/+8
|
* s3: Change the share_mode_lock struct to store a base_name and stream_nameTim Prouty2009-07-081-8/+9
|
* s3: Plumb smb_filename through dos_mode() and related funtionsTim Prouty2009-07-081-28/+37
|