summaryrefslogtreecommitdiffstats
path: root/source3/smbd
Commit message (Collapse)AuthorAgeFilesLines
...
* s3: Slightly simplify calculate_open_access_flagsVolker Lendecke2012-09-261-9/+10
|
* s3: Slightly simplify calculate_open_access_flagsVolker Lendecke2012-09-261-13/+17
|
* s3-smbd: Don't segfault if user specified ports out for range.Andreas Schneider2012-09-261-7/+9
| | | | | Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Wed Sep 26 16:28:44 CEST 2012 on sn-devel-104
* s3:smb2_create: don't take 'state->te' as indication for "was_deferred" (bug ↵Stefan Metzmacher2012-09-261-1/+4
| | | | | | | | | | | | | | | | | #9196) We always set state->te = NULL of TALLOC_FREE(state->te), before calling smbd_smb2_request_dispatch(), so open_was_deferred_smb2() always returned false, while dispatching it again. But it's remove_deferred_open_message_smb2_internal() which should reset this state. In developer mode validate_my_share_entries() did call smb_panic() before. metze
* s3: Factor out calculate_open_access_flagsVolker Lendecke2012-09-261-15/+31
| | | | | Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Wed Sep 26 00:22:56 CEST 2012 on sn-devel-104
* s3: Slightly simplify smbd_smb2_request_process_negprotVolker Lendecke2012-09-251-5/+3
| | | | Remove a nested if-statement
* s3: Fix some blank line endingsVolker Lendecke2012-09-251-6/+6
|
* s3: Fix a typoVolker Lendecke2012-09-251-1/+1
|
* pysmbd: Fix cut&paste errorsVolker Lendecke2012-09-251-2/+3
|
* s3: Slightly simplify is_stat_openVolker Lendecke2012-09-251-3/+2
| | | | | | | | The "access_bits" clause is redundant. is_stat_open says that exactly at least one of the stat_open_bits must be set and none else. Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Tue Sep 25 20:05:06 CEST 2012 on sn-devel-104
* s3: Make is_stat_open() a bit more readableVolker Lendecke2012-09-251-4/+7
|
* s3: Fix indentation of if-expressionsVolker Lendecke2012-09-251-2/+3
| | | | | | | To me this makes open_file_ntcreate a little easier to understand Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Tue Sep 25 10:08:15 CEST 2012 on sn-devel-104
* Fix bug #9189 - SMB2 Create doesn't return correct MAX ACCESS access mask in ↵Jeremy Allison2012-09-251-0/+7
| | | | | | | blob. If we aren't already granted DELETE access, check if we have DELETE_CHILD in the containing directory.
* s3:printing only do printing_subsystem_update when printing is enabledChristian Ambach2012-09-231-1/+4
| | | | | | | no point in calling this if printing was disabled and no spoolss service was started this hurts CTDB clusters as the smbds on the cluster nodes will fight for the single record in the TDB This fixes Bug 9197 - Disabling printing still makes smbd create and access printer_list.tdb
* s3:smbd:smb2: initialize variable in vfs_default_durable_reconnect()Michael Adam2012-09-221-1/+1
| | | | Found by Ambi's state-of-the-art compiler!
* s3:smbd: remove struct member smbd_smb2_request.cancelled - it was only writtenMichael Adam2012-09-226-8/+0
|
* s3:smb2_lock: let smbd_smb2_create_cancel() trigger NT_STATUS_CANCELEDStefan Metzmacher2012-09-221-14/+2
| | | | | | Instead of violating the tevent_req layers. metze
* s3:smb2_lock: smbd_smb2_notify_recv() can already return NT_STATUS_CANCELEDStefan Metzmacher2012-09-221-18/+0
| | | | | | That's why we can remove the code that violates the tevent_req layers. metze
* s3:smb2_notify: make use of tevent_req_defer_callback() instead of custom ↵Stefan Metzmacher2012-09-221-34/+1
| | | | | | tevent_immediate metze
* s3:smb2_notify: don't call tevent_req_done() from smbd_smb2_notify_cancel()Stefan Metzmacher2012-09-221-2/+1
| | | | | | | smbd_notify_cancel_by_smbreq() will already trigger this via smbd_smb2_notify_reply() and smbd_smb2_notify_reply_trigger(). metze
* s3:smb2_lock: let smbd_smb2_lock_cancel() trigger NT_STATUS_CANCELEDStefan Metzmacher2012-09-221-26/+3
| | | | | | Instead of violating the tevent_req layers. metze
* s3:smb2_server: avoid segfault in smbd_smb2_request_pending_queue()Stefan Metzmacher2012-09-221-2/+6
| | | | | | | | | | | | Because we should not call smbd_smb2_request_error() on an request that is still running. If the subreq implementes a cancel function, this should take care of triggering smbd_smb2_request_error. metze Signed-off-by: Michael Adam <obnox@samba.org>
* s3:smbd:smb2: simplify smbd_smb2_request_validate() and ↵Michael Adam2012-09-222-51/+3
| | | | | | | | | | | smbd_smb2_request_dispatch() removes unnneccary checks/assignments for compound_related and next_status and duplicate setting of error status. And remove (now) unused next_status from struct smbd_smb2_request. Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
* s3:smbd:smb2: add check for session_status for compound requestsMichael Adam2012-09-221-3/+3
|
* s3:smb2_server: do the req->next_status check before the signing checksStefan Metzmacher2012-09-221-15/+15
| | | | | | | | Windows 2012 returns NT_STATUS_INVALID_PARAMETER to the smb2.compound.invalid1 test if that uses signing (instead of NT_STATUS_ACCESS_DENIED). metze
* s3:smb2_server: reset req->last_session_id and req->last_tid after using itStefan Metzmacher2012-09-221-0/+4
| | | | | | | | | | | | | | If we can find a valid session or tcon we'll set it after the lookup, but it need to make sure to reset it if we don't find the session. This fixes a problem where a compound unrelated request between related requests doesn't reset the session. If we have 3 requests in a compound chain, request 3 should never use the id's cached from request 1. It should only every inherit handles from request 2. metze
* s3: Compound requests should continue processing.Ira Cooper2012-09-221-3/+2
| | | | | | This patch addresses #9173. Signed-off-by: Michael Adam <obnox@samba.org>
* s3:smbd: release the share mode lock before calling exit_server() (bug #9191)Stefan Metzmacher2012-09-211-0/+2
| | | | | | | metze Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Fri Sep 21 22:36:57 CEST 2012 on sn-devel-104
* s3:smb2_server: fix usage of invalid memory in smb2_signing_check_pdu()Stefan Metzmacher2012-09-201-1/+1
| | | | | | | metze Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Thu Sep 20 07:18:31 CEST 2012 on sn-devel-104
* Add 'bool use_privs' to smbd_calculate_access_mask().Jeremy Allison2012-09-154-5/+10
| | | | | | | | Replaces blanket root allow if set. Set to 'false' for all current callers. Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sat Sep 15 00:37:49 CEST 2012 on sn-devel-104
* Fix bad string in debug message (remove it).Jeremy Allison2012-09-141-4/+2
|
* Add bool use_privs parameter to smbd_check_access_rights()Jeremy Allison2012-09-145-4/+18
| | | | | If this is set we should use it in preference to blindly assuming root can do anything. Currently set to 'false' in (most) callers.
* Add "backup_intent" bool.Jeremy Allison2012-09-141-1/+2
|
* Don't call can_write_to_file() if we already have 'fsp->can_write' set.Jeremy Allison2012-09-141-0/+2
|
* Sigh :-(. Removing optimization prematurely is the root of all evil :-(.Jeremy Allison2012-09-133-0/+15
| | | | | | | | | | | | | | | | | Sorry for the mistake, but the LastDir singleton cache in vfs_ChDir() actually plays an important role. When we're processing a stream of SMB1/SMB2/SMB3 requests we don't want to add a chdir()/getcwd() system call pair on every request if they're all on the same connection and dealing with the same base path. I did some testing with a program that times 1,000,000 chdir() requests vs. 1,000,000 strcmp requests and it's a penalty of 10x doing the system calls. Just because it's old code, doesn't mean it's bad :-(. Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Sep 13 21:31:42 CEST 2012 on sn-devel-104
* Move cached cwd onto conn struct.Jeremy Allison2012-09-122-1/+15
| | | | | This enables us to make VFS modules safe for use in root called code when we've changed directory under conn->connectpath.
* Remove ancient "optimization" global LastDir.Jeremy Allison2012-09-123-18/+3
|
* s3: remove unneeded noquota.c fileBjörn Jacke2012-09-121-38/+0
| | | | | Autobuild-User(master): Björn Jacke <bj@sernet.de> Autobuild-Date(master): Wed Sep 12 16:50:50 CEST 2012 on sn-devel-104
* s3-rap: Open printers with the right access mask.Andreas Schneider2012-09-121-3/+3
| | | | | Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Wed Sep 12 14:05:42 CEST 2012 on sn-devel-104
* smbd: Add extra VFS hooks to get the posix ACL as a blobAndrew Bartlett2012-09-121-0/+21
| | | | | | | | | | | This will allow us to hash this, rather than the NT ACL it maps to. This will in turn allow us to know if the NT ACL is valid even if we have to change the mapping code. Andrew Bartlett Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Wed Sep 12 07:06:01 CEST 2012 on sn-devel-104
* smbd: Remove pre-allocation of ACL array in sys_acl_init()Andrew Bartlett2012-09-122-4/+4
| | | | | | | | Instead, this is just handled with realloc in sys_acl_create_entry() This allows us to remove the size element from the SMB_ACL_T. Andrew Bartlett
* Make metze happy and the code clearer :-).Jeremy Allison2012-09-121-0/+6
| | | | | | | | Ensure we know after the destructor fires we're never going to look at this again. Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Sep 12 03:00:21 CEST 2012 on sn-devel-104
* quota: move function again to its belonging ifdef blockBjörn Jacke2012-09-111-11/+9
| | | | | Autobuild-User(master): Björn Jacke <bj@sernet.de> Autobuild-Date(master): Tue Sep 11 04:44:28 CEST 2012 on sn-devel-104
* s3:proto.h: remove duplicate disk_quotas prototypesBjörn Jacke2012-09-111-10/+0
|
* s3: delete requests are not specialVolker Lendecke2012-09-101-16/+0
| | | | | | | The only difference between batch and exclusive oplocks is the time of the check: Batch is checked before the share mode check, exclusive after. Signed-off-by: Jeremy Allison <jra@samba.org>
* Fix talloc memory heirarchy bug. If there's an SMB2 sessionsetup in flight ↵Jeremy Allison2012-09-101-5/+36
| | | | | | | when we're shut down, we end up freeing the struct smbXsrv_session *session pointer twice. Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Mon Sep 10 23:34:06 CEST 2012 on sn-devel-104
* uid_t is a synonym for int on osXMatthieu Patou2012-09-101-1/+1
| | | | | This function is clearly osX oriented so we adapt the modifier to the target
* s3:vfs_default: add basic support for durable handle request and reconnectMichael Adam2012-09-082-0/+586
| | | | | | | | | | | | We only grant durable handles for CIFS/SMB2 only access, that means "kernel oplocks", "kernel share modes" and "posix locking" need to be set to "no". For now we also don't grant durable handles if delete on close is active on the handle. Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Pair-Programmed-With: Volker Lendecke <vl@samba.org>
* s3:smbd: make fd_open() publicMichael Adam2012-09-082-4/+6
|
* s3:smbd: don't set kernel flock if "kernel share modes = no"Michael Adam2012-09-081-1/+1
| | | | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Sat Sep 8 13:05:05 CEST 2012 on sn-devel-104