summaryrefslogtreecommitdiffstats
path: root/source3/smbd
Commit message (Collapse)AuthorAgeFilesLines
* Ensure we correctly calculate reply credits over all returnedJeremy Allison2011-11-161-4/+13
| | | | | | | | | | SMB2 replies, and do as Windows does and return the total in the last SMB2 reply. Fixes an issue found by Christian M Ambach <christian.ambach@de.ibm.com> (and thanks to Christian for the initial patch this was based on). (cherry picked from commit 65566dfa8629136eaf0dc1491502dc651d1a4858) Fix bug #8614 (SMB2: not granting credits for all requests in a compound request).
* s3:smb2_flush: outbody only needs 4 bytesStefan Metzmacher2011-11-161-1/+1
| | | | | | | | | | metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Mon Nov 14 10:01:30 CET 2011 on sn-devel-104 (cherry picked from commit 72cabbbe50a36986dde823f0ba60abf9052c535a) Fix bug #8579 (smb2_flush sends uninitialized memory).
* s3:smb2_server: grant credits in async interim responses (bug #8357)Stefan Metzmacher2011-11-141-1/+3
| | | | | | | | | | | | The first fix for bug #8357 intruduced a regression, so that we no longer grant credits for real async interim responses with STATUS_PENDING. metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Wed Nov 9 11:56:29 CET 2011 on sn-devel-104 (cherry picked from commit ffbd1ed2797616226a7987efd4b4dd4275c8c9d0)
* s3:smbd: don't limit the number of open dptrs for smb2 (bug #8592)Stefan Metzmacher2011-11-141-3/+12
| | | | | | | | | | | This fixes a crash bug that is triggered, when a client has more than 256 directory handles with searches. metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Thu Nov 10 14:08:14 CET 2011 on sn-devel-104 (cherry picked from commit 22ddbb50534aa73240a171732d4ac1fa884fa412)
* s3:smbd: fully construct the dptr before allocating a dnum in the bitmapStefan Metzmacher2011-11-141-27/+29
| | | | | metze (cherry picked from commit 39bb5a62977261d0926f56b792aacaa5e772ff6f)
* s3:smbd: avoid string_set() in dir.cStefan Metzmacher2011-11-141-2/+9
| | | | | | | And do some more error checks. metze (cherry picked from commit 7644547a5523b77bd49d9a5d979d5e4939153401)
* s3:smb2_server: FLAG_CHAINED means we always use the last session_id and tidStefan Metzmacher2011-11-094-34/+20
| | | | | | | | | Based on master commit 91648aeb6409787c7766943225f5c7a9c695aa0b. metze The last 4 patches address bug #8560 (SMB2 doesn't handle compound request headers in the same way as Windows).
* s3:smb2_server: don't reset the tid and session id in the out hdr of ↵Stefan Metzmacher2011-11-092-15/+0
| | | | | | | | | | | compound requests Windows also leaves tid (0xFFFFFFFF) and session id (0xFFFFFFFFFFFFFFFF) as the client requested them. Based on commit 8d07d7148bf47ea14e62d39ed8a8cc4f1366810e from master. metze
* s3:smb2_server: echo the SMB2_HDR_CREDIT_CHARGE and SMB2_HDR_SIGNATURE fieldsStefan Metzmacher2011-11-091-2/+4
| | | | | | | Windows just echos back the given values by default. metze (cherry picked from commit c7d3b6b2c38711943910aebff72b0188b0c346db)
* s3:smbd increase a debug levelChristian Ambach2011-11-091-3/+4
| | | | | | logging disconnected clients with level 1 swamps the logs (This fixes Bug #8585 Disconnecting clients swamp the logs)
* Third part of fix for bug #8541 - readlink() on Linux clients fails if the ↵Jeremy Allison2011-10-261-2/+1
| | | | | | | symlink target is outside of the share. Missed passing ucf_flags instead of hard coded flags in findfirst call. (cherry picked from commit 49d2a796bed0273327d8919755023c4dbd6d8232)
* Second part of fix for bug #8541 - readlink() on Linux clients fails if the ↵Jeremy Allison2011-10-263-2/+12
| | | | | | | | symlink target is outside of the share. The statcache has to do lstat instead of stat when returning cached posix pathnames. (cherry picked from commit 305d7d7f7d76e37d82ce6ac257f178ce654b26db)
* Fix bug #8541 - readlink() on Linux clients fails if the symlink target is ↵Jeremy Allison2011-10-263-11/+42
| | | | | | | | outside of the share. The key is to only allow the lookup to succeed if it's a UNIX level lookup or readlink, but disallow all other operations. (cherry picked from commit d2ec9d20858b8e5256bf8339395c6f47793e0975)
* Use existing ISDOT and ISDOTDOT macros.Jeremy Allison2011-10-261-2/+1
| | | | | | Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Thu Jul 28 02:09:20 CEST 2011 on sn-devel-104 (cherry picked from commit d82256ca119eb8315cc69ba725ba71c386caa901)
* First part of fix for bug #8419 - Make VFS op "streaminfo" stackable.Frank Lahm2011-10-207-13/+33
| | | | | | Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Mon Oct 17 21:39:32 CEST 2011 on sn-devel-104 (cherry picked from commit c3bdcab5161107be8155a7913d9cb325383a781d)
* Add support for VFS op streaminfo chaining in all relevant VFS modules.Frank Lahm2011-10-205-10/+10
| | | | | | Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Fri Oct 14 03:26:06 CEST 2011 on sn-devel-104 (cherry picked from commit 7a0b5d6fc51d5d212529e82e5ed8e21516bfbe27)
* s3:smb2_server: get/set info are limited by max_trans size (bug #8473)Stefan Metzmacher2011-10-132-0/+11
| | | | | | | | metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Thu Oct 13 03:32:02 CEST 2011 on sn-devel-104 (cherry picked from commit 5e04231e961f10656384a6f16104d0d55b6f3e0e)
* s3:smb2_server: reject writes larger then the negotiated max_write size (bug ↵Stefan Metzmacher2011-10-131-2/+0
| | | | | | | #8473) metze (cherry picked from commit 6981f1114792cc251bf1e05183dd88f5d351ab09)
* s3:smb2_server: remember the max_{trans,read,write} sizes we negotiated (bug ↵Stefan Metzmacher2011-10-136-8/+12
| | | | | | | | | | #8473) We should enforce the negotiated max sizes instead of the lp_smb2_max_*() sizes. metze (cherry picked from commit 40ea66c5dda91ba3f74bed7db1ce02f6c8b4ffeb)
* s3:smbd: disconnect the socket if we got an unexpected requestStefan Metzmacher2011-10-132-1/+20
| | | | | | | | | | | | If we got a SMB2_OP_NEGPROT after the protocol is already negotiated or if we got a non SMB2_OP_NEGPROT before the protocol was negotiated we should close the connection (as windows does). metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Fri Sep 23 12:30:50 CEST 2011 on sn-devel-104 (cherry picked from commit 5494856294384df4360d85e68abc03c43dc16e06)
* s3:smb2_server: max_trans, max_read and max_write are limited to 64 kilobytesStefan Metzmacher2011-10-131-3/+17
| | | | | | | Only if SMB2_CAP_LARGE_MTU is supported we should announce larger limits. metze (cherry picked from commit e603929b9801ad6cc47dead19d27b42fe46489c7)
* s3-smb2_server: fix ioctl InputOffset checkingDavid Disseldorp2011-10-121-1/+10
| | | | | | | | | | | Currently the InputOffset is always check to point to the input data buffer, regardless of whether input data is present. Signed-off-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit dbcd59f46b0d2125dfb6eb82b3d92be228c6ae4b) The last 22 patches addres bug #8520 (Fix SMB2 SMB2_OP_GETINFO and SMB2_OP_IOCTL parsing requirements).
* s3-smb2_server: SMB2_OP_IOCTL doesn't require at least 1 dyn byteDavid Disseldorp2011-10-121-0/+1
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit 18482957daa2e2122ef39426a8fff167df3c9377)
* s3:smb2_server: SMB2_OP_GETINFO doesn't require at least 1 dyn byteStefan Metzmacher2011-10-121-1/+13
| | | | | metze (cherry picked from commit 563fa741f6a34a1300c81a8474ca87346a9f5cca)
* s3:smb2_server: return OBJECT_NAME_INVALID if the path is terminated in ↵Stefan Metzmacher2011-10-121-0/+8
| | | | | | | | | | SMB2_FIND/QUERY_DIRECTORY metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Wed Sep 7 12:15:51 CEST 2011 on sn-devel-104 (cherry picked from commit 9bc4decc1cba701926fc8081c3903aac754a6f51)
* s3:smb2_server: return OBJECT_NAME_INVALID if the path is terminated in ↵Stefan Metzmacher2011-10-121-0/+8
| | | | | | | SMB2_CREATE metze (cherry picked from commit 1bc93c2605e14104237bb100db1d8acb1e7fe389)
* s3:smb2_server: return BAD_NETWORK_NAME if the path is terminated in SMB2_TCONStefan Metzmacher2011-10-121-0/+8
| | | | | metze (cherry picked from commit 68b33aa61ac393c2737969f8449adce3e3096d73)
* s3:smb2_server: use smbd_smb2_request_verify_sizes() in smb2_write.cStefan Metzmacher2011-10-121-12/+6
| | | | | metze (cherry picked from commit 1a726b88ec74962d0317740bbdf576ddcffb52bc)
* s3:smb2_server: use smbd_smb2_request_verify_sizes() in smb2_setinfo.cStefan Metzmacher2011-10-121-13/+5
| | | | | metze (cherry picked from commit 3643a05ba63ac5d8466dc8391b5d05efeedb5ac4)
* s3:smb2_server: use smbd_smb2_request_verify_sizes() in smb2_read.cStefan Metzmacher2011-10-121-11/+5
| | | | | metze (cherry picked from commit f3a8d65bdfe496f080a74eb7104500bd8e2b0179)
* s3:smb2_server: use smbd_smb2_request_verify_sizes() in smb2_notify.cStefan Metzmacher2011-10-121-12/+4
| | | | | metze (cherry picked from commit c6480366e551d1dc683c2648bd897bdc7c1b90df)
* s3:smb2_server: use smbd_smb2_request_verify_sizes() in smb2_lock.cStefan Metzmacher2011-10-121-11/+5
| | | | | metze (cherry picked from commit a358eee2d8670d4a1675e82562fa704fa45a71e6)
* s3:smb2_server: use smbd_smb2_request_verify_sizes() in smb2_keepalive.cStefan Metzmacher2011-10-121-13/+4
| | | | | metze (cherry picked from commit 22d479f75794b7c5fcac2fd47fbfd767700507d6)
* s3:smb2_server: use smbd_smb2_request_verify_sizes() in smb2_ioctl.cStefan Metzmacher2011-10-121-13/+5
| | | | | metze (cherry picked from commit 29b3601c028b8861102b1d988285c78fc17f3b8e)
* s3:smb2_server: use smbd_smb2_request_verify_sizes() in smb2_getinfo.cStefan Metzmacher2011-10-121-13/+5
| | | | | metze (cherry picked from commit 880eafd7e83ba326be7036605179e8de746f4312)
* s3:smb2_server: use smbd_smb2_request_verify_sizes() in smb2_flush.cStefan Metzmacher2011-10-121-12/+4
| | | | | metze (cherry picked from commit 440f702aa9a020f8cfe13037b7af1ba0dadf86f2)
* s3:smb2_server: use smbd_smb2_request_verify_sizes() in smb2_find.cStefan Metzmacher2011-10-121-13/+5
| | | | | metze (cherry picked from commit bc95ab99dc84fa6d567a7d4e803552363bbc07a9)
* s3:smb2_server: use smbd_smb2_request_verify_sizes() in smb2_create.cStefan Metzmacher2011-10-121-11/+4
| | | | | metze (cherry picked from commit 251815bfd395398857cb60c0b89710ddce7ab19f)
* s3:smb2_server: use smbd_smb2_request_verify_sizes() in smb2_close.cStefan Metzmacher2011-10-121-12/+3
| | | | | metze (cherry picked from commit e09b3940a769806dcc17d24079375f5d53eca26a)
* s3:smb2_server: use smbd_smb2_request_verify_sizes() in smb2_break.cStefan Metzmacher2011-10-121-12/+4
| | | | | metze (cherry picked from commit 9da2f72d471460d9c953e9cee84c9cfa3611e89e)
* s3:smb2_server: use smbd_smb2_request_verify_sizes() in smb2_tcon.cStefan Metzmacher2011-10-121-24/+8
| | | | | metze (cherry picked from commit 02f7c37e671c7950619c000b73c5a09ce31c68ac)
* s3:smb2_server: use smbd_smb2_request_verify_sizes() in smb2_sesssetup.cStefan Metzmacher2011-10-121-26/+9
| | | | | metze (cherry picked from commit d280d9f945be2d658694c6d4503822e99dc953b5)
* s3:smb2_server: use smbd_smb2_request_verify_sizes() in smb2_negprot.cStefan Metzmacher2011-10-121-10/+4
| | | | | metze (cherry picked from commit 7ec3a35d2a67ca93a49094f07a12b0e37cec1661)
* s3:smb2_server: add smbd_smb2_request_verify_sizes()Stefan Metzmacher2011-10-122-0/+45
| | | | metze.
* s3:smb2_create: fix allocation size return value when opening existing filesChristian Ambach2011-10-111-2/+2
| | | | | | | | | | | | | | at least on GPFS, using the stat information gave wrong results example: FileInfo gave 12582912000, Create Response gave 25769803776000 This makes the create part use the same method as fileinfo, matching up the replies of both calls Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Mon Oct 10 21:49:53 CEST 2011 on sn-devel-104 (cherry picked from commit ec0c1f2c34ea520b4a7d636ba284a9c7d3ecd96f) Fix bug #8518 (SMB2 create call returns incorrect file allocation size).
* Fix bug #8507 - smbd doesn't correctly honor the "force create mode" bits ↵Jeremy Allison2011-10-081-6/+6
| | | | | | | | | | from a cifsfs create. Don't manipulate the new_dos_attributes bits until we know it's not a POSIX open. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Wed Oct 5 01:19:17 CEST 2011 on sn-devel-104 (cherry picked from commit f93fd128eb623e324459806a34052bd40afe82e5)
* Second part of fix for bug #8443 - Default user entry is set to minimal ↵Jeremy Allison2011-10-081-8/+11
| | | | | | | | | | permissions on incoming ACL change with no user specified. Be smarter about setting default permissions when a ACL_USER_OBJ isn't given. Use the principle of least surprises for the user. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Fri Sep 9 00:26:08 CEST 2011 on sn-devel-104 (cherry picked from commit e30b8c72def13e2abc14858ea64eb849ea665b80)
* First part of fix for bug #8443 - Default user entry is set to minimal ↵Jeremy Allison2011-10-081-58/+2
| | | | | | | | permissions on incoming ACL change with no user specified. create_default_mode() is not needed - it's taken care of by code inside ensure_canon_entry_valid(). (cherry picked from commit 793bd527fdd0b188aba8f3b4bffd8fa8f69a9cd1)
* Part 3 of bugfix for bug #7509 - smb_acl_to_posix: ACL is invalid for set ↵Jeremy Allison2011-10-081-7/+6
| | | | | | | | | (Invalid argument) Don't call check_owning_objs() to convert ACL_USER->ACL_USER_OBJ and AC_GROUP->ACL_GROUP_OBJ for default (directory) ACLs, we do this separately inside ensure_canon_entry_valid(). (cherry picked from commit c528fc5cacaae7e0e83041eb98150052b436071e)
* Part 2 of bugfix for bug #7509 - smb_acl_to_posix: ACL is invalid for set ↵Jeremy Allison2011-10-081-0/+38
| | | | | | | | (Invalid argument) Only map CREATOR_OWNER/CREATOR_GROUP to ACL_USER_OBJ/ACL_GROUP_OBJ in a default(directory) ACL set. (cherry picked from commit a5038ace24559bb02eec8262d3af5b5e78634d16)