summaryrefslogtreecommitdiff
path: root/source3/smbd
AgeCommit message (Collapse)AuthorFilesLines
2008-12-10Pass the get_real_filename operation through the VFSVolker Lendecke1-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
2008-12-10Change get_real_filename() to unix syscall conventions, make it non-staticVolker Lendecke1-13/+14
It sets errno, so it might as well return 0/-1.
2008-12-10Apply some constVolker Lendecke1-2/+2
2008-12-10Rename "scan_directory" to "get_real_filename"Volker Lendecke1-12/+12
2008-12-09s3: [3/3]: Fix a delete on close divergence from windows and the associated ↵Tim Prouty2-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.
2008-12-09s3: [1/3] Fix a delete on close divergence from windows and the associated ↵Tim Prouty1-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 :).
2008-12-09s3: Call fd_close from close_directoryTim Prouty1-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).
2008-12-09s3: Refactor calculating path from relative_fid into a separate functionTim Prouty1-78/+96
2008-12-09s3: Refactor getting sec_info from a security_descriptor into separate functionTim Prouty1-13/+2
2008-12-09s3: Make a few open utility functions non-staticTim Prouty2-17/+17
This allows vfs modules that implement SMB_VFS_CREATE_FILE to access some of the useful utility functions.
2008-12-07Replace some pointless variables in reply_open_pipe_and_X by commentsVolker Lendecke1-12/+6
2008-12-05Fix bug #5944 - nmbd does not boot if socket adress = "" is defined in smb.confYasuma Takeda1-3/+2
2008-12-04Fix bug #5937 - filenames with "*" char hide other filesJeremy Allison1-6/+4
Jeremy.
2008-12-04Fix bug #1254 - write list not working under share-level securityJeremy Allison2-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
2008-12-03s3: Fix FILE_FLAG_POSIX_SEMANTICS handling underneath SMB_VFS_CREATE_FILETim Prouty1-2/+2
2008-12-03s3: Change SMB_VFS_CREATE_FILE to take a create_file_flags argumentTim Prouty5-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.
2008-12-03s3: Simplify the create_file_unix_path->open_file_ntcreate pathTim Prouty1-93/+38
Also removed open_file_ntcreate/open_file from proto.h so they can no longer be called directly.
2008-12-03s3: Modify direct caller of open_file to call SMB_VFS_CREATE_FILETim Prouty1-4/+19
2008-12-03s3: Modify direct callers of open_file_ntcreate and open_directory to call ↵Tim Prouty5-143/+276
SMB_VFS_CREATE_FILE
2008-12-03s3: Modify direct callers of create_file_unix_path to call SMB_VFS_CREATE_FILETim Prouty2-18/+46
2008-12-03s3: Add new "is_dos_path" argument to SMB_VFS_CREATE_FILETim Prouty4-3/+10
Now unix paths can be differentiated from windows paths so the underlying create_file implementations can convert paths correctly.
2008-12-03s3: Add SMB_VFS_CREATE_FILE to the vfs layerTim Prouty4-89/+119
Modify all callers of create_file to go through SMB_VFS_CREATE_FILE
2008-12-01s3:smbd: close the low level fd of the base_fsp, if the file was createdStefan Metzmacher1-0/+2
metze
2008-12-01s3:smbd: give the correct error when trying to replace a streamStefan Metzmacher1-0/+6
metze
2008-12-01s3:smbd: only try and fallback to open a directory if it's not a stream openStefan Metzmacher1-0/+7
metze
2008-12-01s3:smbd: write times should be set on the base file instead of the stream nameStefan Metzmacher1-1/+9
metze
2008-12-01s3:smbd: return DELETE_PENDING on path based operations on streams, when the ↵Stefan Metzmacher1-0/+40
main file was deleted. metze
2008-12-01s3:smbd: construct the correct newname for stream renamesStefan Metzmacher1-16/+32
The Windows Explorer creates temporary streams and renames them later via SFILEINFO_RENAME_INFO. The newname comes in as ":Stream:$DATA". metze
2008-12-01s3:smbd: wildcard characters are allowed in stream namesStefan Metzmacher1-1/+11
We only check the filename of the basefile now. metze
2008-12-01s3:smbd: correctly verify stream names to pass RAW-STREAMSStefan Metzmacher1-1/+35
metze
2008-12-01s3:smbd: '|' isn't allowed in windows filenamesStefan Metzmacher1-1/+1
metze
2008-12-01Fix a debug message, append the correct \nVolker Lendecke1-1/+1
2008-11-30Make nt4_compatible_acls() non-static for use by VFS ACL modules.Steven Danneman1-1/+1
2008-11-30Set PRESENT flag when returning NULL [SD]ACL like Windows does.Steven Danneman1-1/+9
This could also be handled inside each ACL VFS module, by setting the PRESENT flag when a NULL [SD]ACL is created.
2008-11-28Remove "conn" parameter from np_open, smb_request contains itVolker Lendecke2-2/+2
2008-11-28Remove inbuf references from the trans2ioctl codeVolker Lendecke1-4/+4
2008-11-28Consolidate the buffer checks for the reply_trans style functionsVolker Lendecke3-169/+54
This is the one where I found the problem that led to 3.2.5. So if there is one checkin in the last year that I would like others to review and *understand*, it is this one :-) Volker
2008-11-28Remove the variable "size" from reply_nttransVolker Lendecke1-10/+13
This converts the range checks for the setup[] array to rely on req->wct being set correctly in init_smb_request. As that already verifies the vwv array to be in the range of the smb_request inbuf, we don't have to do overflow checks here anymore. Jeremy, please check thoroughly! :-) Thanks, Volker
2008-11-28Remove the variable "size" from reply_transVolker Lendecke1-12/+16
This converts the range checks for the setup[] array to rely on req->wct being set correctly in init_smb_request. As that already verifies the vwv array to be in the range of the smb_request inbuf, we don't have to do overflow checks here anymore. Jeremy, please check thoroughly! :-) Thanks, Volker
2008-11-28Remove an unused variableVolker Lendecke1-2/+0
2008-11-28Remove two direct inbuf references from reply_sesssetup_and_X_spnego()Volker Lendecke1-2/+2
2008-11-27Fix the offset checks in the trans routinesVolker Lendecke3-9/+9
This fixes a potential crash bug, a client can make us read memory we should not read. Luckily I got the disp checks right... Volker (cherry picked from commit 64a1d80851da5b05e70ec6c96f6e9bd473748369) (cherry picked from commit f04c5650a3aeca23591ddc781c4b297caaf9bb3f)
2008-11-24Fix bug #5873 - ACL inheritance cannot be broken. This regresses #4308, but ↵Jeremy Allison1-0/+8
that will have to be fixed another way. Jeremy.
2008-11-24Get rid of pipes_struct->pipe_user, we have server_info now --- YESSS!Volker Lendecke1-3/+3
2008-11-24Remove unused make_connection_with_chdir()Volker Lendecke1-32/+0
2008-11-23Fix to allow setting of NULL DACL/SACLSteven Danneman1-11/+2
This is a modification of Jeremy's 7522ef15aca2429ef57c75d8297dd8121e79c9da commit. If no DACL/SACL is present in the packet, the SEC_INFO field should still be passed down as is to the VFS layer to signal the creation of a NULL DACL/SACL. As seen in metze RAW-ACL test_nttrans_create_null_dacl(), a NULL DACL is set regardless of the SEC_DESC_DACL_PRESENT bit being set.
2008-11-23Add auth_serversupplied_info to create_conn_structVolker Lendecke1-4/+15
srvsvc needs it, as will printing
2008-11-21Rever 83ff6979f504d50caf725ee62549604630b69be7 - "Fix the logic bug that ↵Jeremy Allison1-7/+1
caused us to run into kernel oplocks on an open for a stream inside a file with stream_xattr module. On opening the base_fsp we must break existing oplocks." as it broke make test. Jeremy.
2008-11-21Fix the logic bug that caused us to run into kernel oplocks on an open for a ↵Jeremy Allison1-1/+7
stream inside a file with stream_xattr module. On opening the base_fsp we must break existing oplocks. Jeremy.
2008-11-21Second part of the fix for bug #5903 - vfs_streams_xattr breaks contents of ↵Jeremy Allison1-15/+46
the file (also fix a bad merge of the previous patch from 3.3). Jeremy.