summaryrefslogtreecommitdiff
path: root/source3/smbd/trans2.c
AgeCommit message (Collapse)AuthorFilesLines
2013-08-05s3:smbd: allow status code in smbd_do_qfsinfo() to be set by information ↵Ralph Wuerthner1-1/+2
class handler Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
2013-08-04Ensure we can never integer wrap when working on client-supplied max_data_bytes.Jeremy Allison1-0/+22
This would only be possible with SMB2, and is already checked in the upper SMB2 layers, but it really doesn't hurt to have these extra checks at time of use also. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Sun Aug 4 16:54:04 CEST 2013 on sn-devel-104
2013-07-19Reply with correct trans2 message on a setpathinfo with a bad EA name.Jeremy Allison1-1/+10
Bug 9992 - Windows error 0x800700FE when copying files with xattr names containing ":" Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-07-19Ensure we can't create a file using TRANS2_OPEN with an invalid EA list.Jeremy Allison1-0/+14
Bug 9992 - Windows error 0x800700FE when copying files with xattr names containing ":" Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-07-19Add the ability to send an NTSTATUS result back with a trans2 reply so we ↵Jeremy Allison1-13/+30
can return a parameter block with an error code. This is needed when returning a STATUS_INVALID_NAME result (tested from Windows 2012). Bug 9992 - Windows error 0x800700FE when copying files with xattr names containing ":" Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-07-19Ensure we never return an EA name to a Windows client it can't handle.Jeremy Allison1-0/+9
Bug 9992 - Windows error 0x800700FE when copying files with xattr names containing ":" Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-07-19Ensure set_ea cannot set invalid Windows EA names.Jeremy Allison1-0/+9
Bug 9992 - Windows error 0x800700FE when copying files with xattr names containing ":" Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-04-17smbd: Convert smb_file_rename_information to synthetic_smb_fnameVolker Lendecke1-5/+4
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-17smbd: Convert smb_file_rename_information to synthetic_smb_fnameVolker Lendecke1-4/+5
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-17smbd: Convert smb2_file_rename_information to synthetic_smb_fnameVolker Lendecke1-4/+5
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-17smbd: Convert smb_set_file_dosmode to synthetic_smb_fnameVolker Lendecke1-6/+5
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-17smbd: Convert call_trans2qfilepathinfo to synthetic_smb_fnameVolker Lendecke1-8/+6
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-17smbd: Convert call_trans2setfilepathinfo to cp_smb_filenameVolker Lendecke1-4/+3
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-17smbd: Convert smb_set_file_unix_basic to cp_smb_filenameVolker Lendecke1-4/+3
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-17smbd: Convert smb_set_file_size to cp_smb_filenameVolker Lendecke1-3/+3
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-17smbd: Convert call_trans2qfilepathinfo to cp_smb_filenameVolker Lendecke1-4/+3
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-02Ensure EA value is allocated on the right context.Jeremy Allison1-1/+2
Ensure we free on error condition (tidyup, not a leak). Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@suse.de> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Tue Apr 2 21:54:33 CEST 2013 on sn-devel-104
2013-04-02Final fix for bug #9130 - Certain xattrs cause Windows error 0x800700FFJeremy Allison1-1/+1
The spec lies when it says that NextEntryOffset is the only value considered when finding the next EA. We were adding 4 more extra pad bytes than needed (i.e. if the next entry already was on a 4 byte boundary, then we were adding 4 additional pad bytes). Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@suse.de>
2013-04-02Ensure we don't return uninitialized memory in the pad bytes.Jeremy Allison1-1/+7
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@suse.de>
2013-04-02Fix bug #9130 - Certain xattrs cause Windows error 0x800700FFJeremy Allison1-0/+9
Ensure we never return any zero-length EA's. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@suse.de>
2013-04-02Change estimate_ea_size() to correctly estimate the EA size over SMB2.Jeremy Allison1-0/+20
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@suse.de>
2013-04-02Modify fill_ea_chained_buffer() to be able to do size calculation only, no ↵Jeremy Allison1-12/+15
marshalling. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@suse.de>
2013-04-02Ensure we can never return an uninitialized EA list.Jeremy Allison1-1/+2
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@suse.de>
2013-02-12Fix bug 9519 - Samba returns unexpected error on SMB posix open.Jeremy Allison1-2/+9
Explicitly ignore bare O_EXCL flags instead of returning INVALID_PARAMETER. That's what the Linux kernel does. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Jeff Layton <jlayton@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue Feb 12 22:59:21 CET 2013 on sn-devel-104
2013-02-08s3: Make SMB2_GETINFO multi-volume aware.Ira Cooper1-9/+18
Not all shares are a single volume. Some actually expose multiple volumes under a single share. In these cases showing the amount of space free as the space free at the base of the directory heirarchy is wrong. Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Feb 8 21:44:37 CET 2013 on sn-devel-104
2013-01-28Fix bug #9571 - Unlink after open causes smbd to panic.Pavel Shilovsky1-3/+3
s3:smbd: fix wrong lock order in posix unlink Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2012-12-06Fix bug #9460 - Samba 3.6.x and Master respond incorrectly to ↵Richard Sharpe1-1/+22
FILE_STREAM_INFO requests. Ensure we check the buffer size correctly. Reviewed by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Dec 6 01:31:08 CET 2012 on sn-devel-104
2012-10-11smbd: Add mem_ctx to sys_acl_init() and all callersAndrew Bartlett1-4/+8
This changes from allocation on NULL to allocation on the supplied memory context. Currently that supplied context is talloc_tos() at the the final consumer of the ACL. Andrew Bartlett
2012-10-04Remove all uses of ↵Jeremy Allison1-12/+2
lp_security_mask/lp_force_security_mode/lp_dir_security_mask/lp_force_dir_security_mode and replace with the normal masks. Now these parameters can be removed.
2012-09-14Add bool use_privs parameter to smbd_check_access_rights()Jeremy Allison1-0/+1
If this is set we should use it in preference to blindly assuming root can do anything. Currently set to 'false' in (most) callers.
2012-08-20s3-smbd: ensure we give appropriate errors for EA requests on streamsAndrew Bartlett1-35/+77
2012-08-20s3-smbd: Do not look for EA information on a streamAndrew Bartlett1-6/+8
The estimated EA size needs to be of the main file. However, the fsp may point to the stream, so we need to ignore it if this is the case. This may mean we estimate wrong if there has been a rename. Andrew Bartlett
2012-08-20s3-smbd: Push smb_fname into estimate_ea_sizeAndrew Bartlett1-12/+20
This ensures that we return the ea size of the stream, not the overall file. This is important as if there is an EA on the main file, the raw.streams test was failing. Andrew Bartlett
2012-08-17s3:smbd: don't disconnect the client when a share has "smb encrypt = required"Stefan Metzmacher1-4/+2
It's not the client fault, if he doesn't know that encryption is required. We should just return ACCESS_DENIED and let the client work on other shares and open files on the current SMB connection. metze
2012-08-17s3:smbd: lp_smb_encrypt() returns SMB_SIGNING_* valuesStefan Metzmacher1-5/+5
metze
2012-08-17s3:smbd: make use of ENCRYPTION_REQUIRED()Stefan Metzmacher1-2/+2
metze
2012-08-15s3-sysacls: Remove sys_acl_free_qualifier() as it is a no-opAndrew Bartlett1-2/+0
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Wed Aug 15 05:23:18 CEST 2012 on sn-devel-104
2012-08-15s3-sysacls: Remove sys_acl_free_acl() and replace with TALLOC_FREE()Andrew Bartlett1-8/+8
2012-08-15s3-smbd: Call sys_acl_free_acl() directly rather than via the VFSAndrew Bartlett1-8/+8
This will allow us to remove the struct smb_acl_t manipuations from the VFS layer, which will be reduced to handling the get/set functions. Andrew Bartlett
2012-08-15s3-smbd: Call sys_acl_free_qualifier() directly rather than via the VFSAndrew Bartlett1-2/+2
This will allow us to remove the struct smb_acl_t manipuations from the VFS layer, which will be reduced to handling the get/set functions. Andrew Bartlett
2012-08-15s3-smbd: Call sys_acl_get_entry() directly rather than via the VFSAndrew Bartlett1-2/+2
This will allow us to remove the struct smb_acl_t manipuations from the VFS layer, which will be reduced to handling the get/set functions. Andrew Bartlett
2012-08-15s3-smbd: Call sys_acl_get_qualifier() directly rather than via the VFSAndrew Bartlett1-2/+2
This will allow us to remove the struct smb_acl_t manipuations from the VFS layer, which will be reduced to handling the get/set functions. Andrew Bartlett
2012-08-15s3-smbd: Call sys_acl_get_tagtype() directly rather than via the VFSAndrew Bartlett1-1/+1
This will allow us to remove the struct smb_acl_t manipuations from the VFS layer, which will be reduced to handling the get/set functions. Andrew Bartlett
2012-08-15s3-smbd: Call sys_acl_get_permset() directly rather than via the VFSAndrew Bartlett1-1/+1
This will allow us to remove the struct smb_acl_t manipuations from the VFS layer, which will be reduced to handling the get/set functions. Andrew Bartlett
2012-08-15s3-smbd: Call sys_acl_get_perm() directly rather than via the VFSAndrew Bartlett1-3/+3
This will allow us to remove the struct smb_acl_t manipuations from the VFS layer, which will be reduced to handling the get/set functions. Andrew Bartlett
2012-07-18loadparm: make the source3/ lp_ functions take an explicit TALLOC_CTX *.Rusty Russell1-19/+21
They use talloc_tos() internally: hoist that up to the callers, some of whom don't want to us talloc_tos(). A simple patch, but hits a lot of files. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-06-19Remove unused code now we set the correct command codes.Jeremy Allison1-6/+0
2012-06-16Same fix as bug 8989 - Samba 3.5.x (and probably all other versions of ↵Jeremy Allison1-0/+9
Samba) does not send correct responses to NT Transact Secondary when no data and no params for the Trans2 calls. See MS-CIFS 2.2.4.47.2 for details. Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sat Jun 16 07:59:19 CEST 2012 on sn-devel-104
2012-06-15s3:smbd: change trans2.c to use fsp_fnum_dbg() for fsp->fnum logging.Michael Adam1-17/+17
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-06-15s3:smbd: use FNUM_FIELD_INVALID instead of literal -1Michael Adam1-5/+9
This is in preparation of changing fnum to uint64_t Signed-off-by: Stefan Metzmacher <metze@samba.org>