summaryrefslogtreecommitdiffstats
path: root/source3/smbd
Commit message (Collapse)AuthorAgeFilesLines
...
* Rename parent_dirname_talloc() to parent_dirname()Volker Lendecke2008-12-316-17/+8
|
* Use parent_dirname_talloc instead of parent_dirname in smb_unix_mknodVolker Lendecke2008-12-311-3/+7
|
* Use parent_dirname_talloc instead of parent_dirname in copy_internalsVolker Lendecke2008-12-311-2/+6
|
* recvfile can't be used for printing so farVolker Lendecke2008-12-311-0/+4
|
* Fix an ancient uninitialized variable readVolker Lendecke2008-12-312-2/+3
| | | | The callers of open_file_ntcreate expect *psbuf to be filled correctly
* s3 build: Fix warningTim Prouty2008-12-301-0/+2
|
* s3:cluster: register the client connection via CTDB_CONTROL_TCP_ADDStefan Metzmacher2008-12-301-3/+6
| | | | | | | This means we correctly pass IPv6 addresses too. (CTDB_CONTROL_TCP_CLIENT was IPv4 only) metze
* Second part of the bugfix for #5933Volker Lendecke2008-12-301-7/+13
| | | | | | | | Incrementing the next vuid did not correctly overflow Now we survive BENCH-SESSSETUP with -o 100000. Takes a while though :-) Thanks a lot to Ofer Tal <otsmb@shmoop.org> for reporting #5933
* First part of bugfix for #5933Volker Lendecke2008-12-301-3/+0
| | | | | | | | | | Ofer Tal <otsmb@shmoop.org> fully correctly noted that we're incrementing num_validated_vuids twice per session setup, but decrement it only once. Looking at sesssetup.c we always call register_initial_vuid() before register_existing_vuid(), so there's no point in incrementing it in register_existing_vuid(). Jeremy, please check!
* Move a comment to its placeVolker Lendecke2008-12-301-5/+5
|
* Simplify invalidate_vuid slightlyVolker Lendecke2008-12-301-4/+0
| | | | get_valid_user_struct_internal() checks for UID_FIELD_INVALID itself
* Simplify is_partial_auth_vuid slightlyVolker Lendecke2008-12-301-5/+1
|
* Simplify invalidate_all_vuids() slightlyVolker Lendecke2008-12-301-5/+2
| | | | invalidate_vuid takes care of removing the user_struct from validated_users
* Fix more asprintf warnings and some error path errors.Jeremy Allison2008-12-232-5/+7
| | | | Jeremy.
* s3: Fix stream marshalling to return the correct streaminfo statusTim Prouty2008-12-231-10/+1
| | | | | | | | | | | | | | | | When there are enough streams on a file to fill up the max_data_count when responding to a trans2 streaminfo, samba is returning NT_STATUS_BUFFER_TOO_SMALL. Windows handles this by returning NT_STATUS_BUFFER_OVERFLOW while still sending as much of the data that it can fit into the buffer. When the windows client sees BUFFER_OVERFLOW, it retries the streaminfo with a larger buffer (2x). The windows client starts at 2K and will continue increasing the buffer size by two until it reaches 64K. If the streams don't fit in 64K the windows client seems to give up. This patch fixes marshall_stream_info to overfill the buffer by 1 stream so that send_trans2_replies can properly detect the overflow and return the correct status.
* Fix bug #5986 - Editing a stream is broken (rename problems).Jeremy Allison2008-12-192-11/+14
| | | | Jeremy.
* Remove the direct inbuf reference from construct_reply_common()Volker Lendecke2008-12-191-8/+11
|
* Fix bug #5980 - Race condition when granting level2 oplocks can cause break ↵Jeremy Allison2008-12-181-4/+27
| | | | | | notify to be missed. Jeremy.
* Fix bug #5979 - Level 2 oplocks being granted improperly,Jeremy Allison2008-12-172-70/+114
| | | | Jeremy.
* Fix a valgrind error in get_relative_fid_filenameVolker Lendecke2008-12-131-1/+1
| | | | | | | It doesn't really make sense to check the length of a not-yet-allocated string :-) Volker
* Fix error code when smbclient puts a file over an existing directoryVolker Lendecke2008-12-121-1/+1
| | | | | | | | | | | | | | | | | Windows returns NT_STATUS_FILE_IS_A_DIRECTORY, as does Samba 3.0. 3.2 and following returned NT_STATUS_INVALID_PARAMETER which is wrong. Before I converted reply_open_and_X to create_file() we called open_file_ntcreate directly. Passing through open&X for a filename that exists as a directory ends up in open_directory after having tried open_file_ntcreate. Some check in there returns NT_STATUS_INVALID_PARAMETER. With this additional FILE_NON_DIRECTORY_FILE flag we get the correct error message back from create_file_unixpath before trying open_directory(). Survives make test, but as this also touches the other open variants I would like others to review this. Volker
* s3 sesssetup.c: Add missing line break to debug message.root2008-12-121-1/+1
| | | | Karolin
* Pass the get_real_filename operation through the VFSVolker Lendecke2008-12-101-4/+1
| | | | | | | | | | | | | | This is done to help file systems that can tell us about the real upper/lower case combination given a case-insensitive file name. The sample I will soon push is the gpfs module (recent gpfs has a get_real_filename function), others might have a similar function to help alleviate the 1million files in a single directory problem. Jeremy, please comment! Thanks, Volker
* Change get_real_filename() to unix syscall conventions, make it non-staticVolker Lendecke2008-12-101-13/+14
| | | | It sets errno, so it might as well return 0/-1.
* Apply some constVolker Lendecke2008-12-101-2/+2
|
* Rename "scan_directory" to "get_real_filename"Volker Lendecke2008-12-101-12/+12
|
* s3: [3/3]: Fix a delete on close divergence from windows and the associated ↵Tim Prouty2008-12-092-5/+2
| | | | | | | torture test This third patch cleans up by removing all of the code that is made obsolete by the first patch. It should cause no functional changes.
* s3: [1/3] Fix a delete on close divergence from windows and the associated ↵Tim Prouty2008-12-091-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | torture test smbtorture4's BASE-DELETE:deltest17 was failing against win2k8, win2k3, and winXPsp2 but passing against samba. deltest17 does the following: 1. open file -> file is created 2. closes file 3. open file with DOC -> fnum1 4. check that DOC is not reported as being set from fnum1 5. opens file again Read Only -> fnum2 6. check that DOC is not reported as being set from either file handle 7. close fnum1 (the file handle that requested DOC to be set) 8. check if DOC is reported as being set from fnum2 * This is where windows and samba begin to diverge. Windows reports that the DOC bit is set, while samba reports that it is not set. 9. close fnum2 (the last remaining open handle for the file) 10.See if the file has been deleted. * On samba the file still exists. On windows the file was deleted. The way open_file_ntcreate is written now, if an open has the DOC bit set on the wire, DOC (fsp->initial_delete_on_close) is not set unless: a. the open creates the file, or b. there is an open file handle with a share_entry in the struct lck that has the SHARE_MODE_ALLOW_INITIAL_DELETE_ON_CLOSE bit set (let's call it SM_AIDOC). My understanding of SM_AIDOC is that it was added to differentiate between DOC being set on an open that creates a file vs an open that opens an existing. As described in step 8/10 above, it appears that windows does not make this differentiation. To resolve this issue there are three patches. This first patch is a simple proof of concept change that is sufficient to fix the bug. It removes the differentiation in open_file_ntcreate, and updates deltest17 to allow it to pass against win2k3/xp. This makes open_file_ntcreate more closely match the semantics in open_directory and rename_internals_fsp. This change also does not break any other tests in BASE-DELETE or "make test". Specifically test deltest20b which verifies the CIFSFS rename DOC semantics still passes :).
* s3: Call fd_close from close_directoryTim Prouty2008-12-091-0/+7
| | | | | | | | | Some implementations of SMB_VFS_CREATE_FILE implementations actually keep an fd open for directories just as files. In this case it is necessary to call fd_close when closing directories. This is safe because fd_close is a no-op when fd == -1, which is true for directory opens originating from open.c (the default SMB_VFS_CREATE_FILE implementation).
* s3: Refactor calculating path from relative_fid into a separate functionTim Prouty2008-12-091-78/+96
|
* s3: Refactor getting sec_info from a security_descriptor into separate functionTim Prouty2008-12-091-13/+2
|
* s3: Make a few open utility functions non-staticTim Prouty2008-12-092-17/+17
| | | | | This allows vfs modules that implement SMB_VFS_CREATE_FILE to access some of the useful utility functions.
* Replace some pointless variables in reply_open_pipe_and_X by commentsVolker Lendecke2008-12-071-12/+6
|
* Fix bug #5944 - nmbd does not boot if socket adress = "" is defined in smb.confYasuma Takeda2008-12-051-3/+2
|
* Fix bug #5937 - filenames with "*" char hide other filesJeremy Allison2008-12-041-6/+4
| | | | Jeremy.
* Fix bug #1254 - write list not working under share-level securityJeremy Allison2008-12-042-37/+48
| | | | | | | | A somewhat more elegant fix than I could use for 3.2.x or 3.0.x. Turns out the only part of check_user_ok() that needs to change for share level security is the VUID cache pieces, so I can just always use check_user_ok() for all lp_security() cases. Jeremy
* s3: Fix FILE_FLAG_POSIX_SEMANTICS handling underneath SMB_VFS_CREATE_FILETim Prouty2008-12-031-2/+2
|
* s3: Change SMB_VFS_CREATE_FILE to take a create_file_flags argumentTim Prouty2008-12-035-26/+26
| | | | | | This replaces the is_dos_path bool with a more future-proof argument. The next step is to plumb INTERNAL_OPEN_ONLY through this flag instead of overridding the oplock_request.
* s3: Simplify the create_file_unix_path->open_file_ntcreate pathTim Prouty2008-12-031-93/+38
| | | | | Also removed open_file_ntcreate/open_file from proto.h so they can no longer be called directly.
* s3: Modify direct caller of open_file to call SMB_VFS_CREATE_FILETim Prouty2008-12-031-4/+19
|
* s3: Modify direct callers of open_file_ntcreate and open_directory to call ↵Tim Prouty2008-12-035-143/+276
| | | | SMB_VFS_CREATE_FILE
* s3: Modify direct callers of create_file_unix_path to call SMB_VFS_CREATE_FILETim Prouty2008-12-032-18/+46
|
* s3: Add new "is_dos_path" argument to SMB_VFS_CREATE_FILETim Prouty2008-12-034-3/+10
| | | | | Now unix paths can be differentiated from windows paths so the underlying create_file implementations can convert paths correctly.
* s3: Add SMB_VFS_CREATE_FILE to the vfs layerTim Prouty2008-12-034-89/+119
| | | | Modify all callers of create_file to go through SMB_VFS_CREATE_FILE
* s3:smbd: close the low level fd of the base_fsp, if the file was createdStefan Metzmacher2008-12-011-0/+2
| | | | metze
* s3:smbd: give the correct error when trying to replace a streamStefan Metzmacher2008-12-011-0/+6
| | | | metze
* s3:smbd: only try and fallback to open a directory if it's not a stream openStefan Metzmacher2008-12-011-0/+7
| | | | metze
* s3:smbd: write times should be set on the base file instead of the stream nameStefan Metzmacher2008-12-011-1/+9
| | | | metze
* s3:smbd: return DELETE_PENDING on path based operations on streams, when the ↵Stefan Metzmacher2008-12-011-0/+40
| | | | | | main file was deleted. metze
* s3:smbd: construct the correct newname for stream renamesStefan Metzmacher2008-12-011-16/+32
| | | | | | | | The Windows Explorer creates temporary streams and renames them later via SFILEINFO_RENAME_INFO. The newname comes in as ":Stream:$DATA". metze