summaryrefslogtreecommitdiffstats
path: root/source3/smbd/reply.c
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* Rename update_stat_ex_writetime() -> update_stat_ex_mtime()Jeremy Allison2009-07-081-2/+2
| | | | | to better describe what we're doing here. Jeremy
* The migration to struct stat_ex broke the calculation ofJeremy Allison2009-07-081-0/+28
| | | | | | | | | | | | | | | | create time from the existing timestamps (for systems that need to do this). Once the write time is changed via a sticky write, the create time might need to be recalculated. To do this I needed to add a bool into struct stat_ex to remember if the st_ex_btime field was calculated, or read from the OS. Also fixed the returning of modified write timestamps in the return from NTCreateX, SMBattr and SMBattrE (which weren't taking into account the modified timestamp stored in the open file table). Attempting to fix an issue with Excel 2003 and offline files. Volker and Metze, please review. Jeremy
* s3:smbd: cancel all locks that are made before the first failureStefan Metzmacher2009-07-071-6/+6
| | | | | | | | s3:smbd: cancel all locks that are made before the first failure We never reached the cleanup code and directly returned the error. metze
* s3: Plumb smb_filename through SMB_VFS_NTIMESTim Prouty2009-07-061-27/+29
|
* s3: Plumb smb_filename around SMB_VFS_CHFLAGSTim Prouty2009-07-061-1/+1
| | | | | | | | | | | SMB_VFS_CHFLAGS isn't actually getting the smb_filename struct for now since it only operates on the basefile. This is the strategy for all path-based operations that will never actually operate on a stream. By clarifying the meaning of path based operations that don't take an smb_filename struct, modules that implement streams such as vfs_onefs no longer need to implement SMB_VFS_CHFLAGS to ensure it's only called on the base_name.
* s3: Change some filename_convert to pass in NULL for char **fname argumentTim Prouty2009-07-061-5/+6
|
* s3: Plumb smb_filename through SMB_VFS_UNLINKTim Prouty2009-07-061-45/+82
|
* s3: Plumb smb_filename through SMB_VFS_RENAMETim Prouty2009-07-061-104/+210
|
* s3:smbd: remove unused variables passed to parent_dirname()Stefan Metzmacher2009-07-011-3/+2
| | | | metze
* s3: Plumb smb_filename through SMB_VFS_STAT and SMB_VFS_LSTATTim Prouty2009-06-241-75/+58
| | | | | | | | | | | | | This patch introduces two new temporary helper functions vfs_stat_smb_fname and vfs_lstat_smb_fname. They basically allowed me to call the new smb_filename version of stat, while avoiding plumbing it through callers that are still too inconvenient. As the conversion moves along, I will be able to remove callers of this, with the goal being to remove all callers. There was also a bug in create_synthetic_smb_fname_split (also a temporary utility function) that caused it to incorrectly handle filenames with ':'s in them when in posix mode. This is now fixed.
* Add some const to the stat struct in the dosmode calls.Jeremy Allison2009-06-181-18/+18
| | | | | | | | Fix a couple more unix_convert uses to filename_convert. Fix bug in acl_group_override() where an uninitialized struct could be used. Move unix_convert with wildcard use in SMBsearch reply to boilerplate code. Jeremy.
* Replace the boilerplate calls to :Jeremy Allison2009-06-181-133/+35
| | | | | | | | | | | | resolve_dfspath() -> unix_convert() -> get_full_smb_filename() -> check_name() with a new function filename_convert(). This restores the check_name() calls that had gone missing since the default create_file was changed. All "standard" pathname processing now goes through filename_convert(). I'll take a look at the non-standard pathname processing next. As a benefit, fixed a missing resolve_dfspath() in the trans2 mkdir call. Jeremy.
* Fix msdfs after the change to smb_filename struct. We must *always*Jeremy Allison2009-06-161-16/+63
| | | | | pull the pathname, then call resolve_dfspath(), before unix_convert(). Jeremy.
* s3: Plumb smb_filename through SMB_VFS_CREATE_FILETim Prouty2009-06-121-92/+57
|
* s3: Prepare the rename path for passing smb_filename to SMB_VFS_CREATE_FILETim Prouty2009-06-111-106/+133
|
* s3: Prepare the do_unlink path for passing smb_filname to SMB_VFS_CREATE_FILETim Prouty2009-06-111-72/+77
|
* s3: refactor utility function to handle splitting the directory from the maskTim Prouty2009-06-111-11/+35
|
* s3: Prepare the first set of SMB_VFS_CREATE_FILE callers to take an ↵Tim Prouty2009-06-101-130/+192
| | | | | | | | | | | | | smb_filename struct Some of the callers required minimal changes, while others (copy_internals) required significant changes. The task is simplified a little bit because we are able to do operations and checks on the base_name when a stream isn't used. This patch should cause no functional changes. Volker, Jeremy: Please check
* s3: Make all callers of SMB_VFS_CREATEFILE call unix_convert firstTim Prouty2009-06-101-60/+82
| | | | | This step is a requirement to change SMB_VFS_CREATEFILE to take an smb_filename struct.
* s3:smbd: fix potential fsp leak if print_fsp_open() failsStefan Metzmacher2009-06-041-0/+1
| | | | metze
* s3:smbd: move tcon specific globals to struct smbd_server_connectionStefan Metzmacher2009-06-031-3/+5
| | | | metze
* s3:smbd: move more session specific globals to struct smbd_server_connectionStefan Metzmacher2009-06-031-5/+7
| | | | metze
* s3:smbd: move some session specific globals to struct smbd_server_connectionStefan Metzmacher2009-06-031-0/+1
| | | | metze
* s3:smbd: move already_got_session to struct smbd_server_connectionStefan Metzmacher2009-06-031-2/+2
| | | | metze
* s3:smbd: move max_recv to struct smbd_server_connectionStefan Metzmacher2009-06-031-7/+12
| | | | metze
* s3:smbd: move negprot related globals to struct smbd_server_connectionStefan Metzmacher2009-06-031-1/+2
| | | | metze
* Introduce "struct stat_ex" as a replacement for SMB_STRUCT_STATVolker Lendecke2009-05-261-33/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces struct stat_ex { dev_t st_ex_dev; ino_t st_ex_ino; mode_t st_ex_mode; nlink_t st_ex_nlink; uid_t st_ex_uid; gid_t st_ex_gid; dev_t st_ex_rdev; off_t st_ex_size; struct timespec st_ex_atime; struct timespec st_ex_mtime; struct timespec st_ex_ctime; struct timespec st_ex_btime; /* birthtime */ blksize_t st_ex_blksize; blkcnt_t st_ex_blocks; }; typedef struct stat_ex SMB_STRUCT_STAT; It is really large because due to the friendly libc headers playing macro tricks with fields like st_ino, so I renamed them to st_ex_xxx. Why this change? To support birthtime, we already have quite a few #ifdef's at places where it does not really belong. With a stat struct that we control, we can consolidate the nanosecond timestamps and the birthtime deep in the VFS stat calls. At this moment it is triggered by a request to support the birthtime field for GPFS. GPFS does not extend the system level struct stat, but instead has a separate call that gets us the additional information beyond posix. Without being able to do that within the VFS stat calls, that support would have to be scattered around the main smbd code. It will very likely break all the onefs modules, but I think the changes will be reasonably easy to do.