summaryrefslogtreecommitdiffstats
path: root/source3
Commit message (Collapse)AuthorAgeFilesLines
...
* s3-rpc_server: Use make_internal_rpc_pipe_socketpair().Andreas Schneider2013-10-291-8/+9
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3-rpc_server: Pass the server event context to np_open().Andreas Schneider2013-10-293-0/+3
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3-rpc_server: Add make_internal_rpc_pipe_socketpair().Andreas Schneider2013-10-294-6/+122
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3-smbd: Do not declare change_to_root_user() twice.Andreas Schneider2013-10-291-1/+0
| | | | | | | This is already in include/proto.h for smbd_shim. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3-smbd_shim: Add become_authenticated_pipe_user().Andreas Schneider2013-10-296-5/+30
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3-rpc_server: Add named_pipe_client_init() function.Andreas Schneider2013-10-292-30/+78
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3-rpc_server: Make named_pipe_packet_process a shared functiion.Andreas Schneider2013-10-292-2/+2
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3-rpc_server: Make make_server_pipes_struct a shared function.Andreas Schneider2013-10-292-10/+21
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3-waf: Create a target for RPC_SOCK_HELPER.Andreas Schneider2013-10-291-2/+6
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3-waf: Seperate rpc_server and rpc_service.Andreas Schneider2013-10-292-10/+34
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3-waf: Reorder rpc_server wscript_build file.Andreas Schneider2013-10-291-62/+66
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3-rpc_server: Use new rpc named pipe functions.Andreas Schneider2013-10-291-34/+58
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3-rpc_server: Add make_internal_rpc_pipe().Andreas Schneider2013-10-292-0/+90
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3-rpc_server: Add make_external_rpc_pipe() function.Andreas Schneider2013-10-292-0/+138
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3-rpc_server: Add npa_state_init() function.Andreas Schneider2013-10-292-0/+40
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* rpc_server: Fix a memleak on error exitVolker Lendecke2013-10-281-0/+1
| | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Mon Oct 28 10:20:35 CET 2013 on sn-devel-104
* rpc_server: Remove rpc_ep_register_state->mem_ctxVolker Lendecke2013-10-281-15/+5
| | | | | | | We can use the state directly as a parent Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* rpc_server: Fix some uses of tevent_req_nomemVolker Lendecke2013-10-281-4/+4
| | | | | | | | | | | | tevent_req_nomem is to be used in a sequence of async actions where we have one main request. This is a completely independent loop without one central tevent_req. tevent_req_nomem is used as a simple way to signal an out of memory condition to the main request representing the async sequence. If we don't have such a tevent_req, we need to directly check for NULL. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* rpc_server: fix a typoVolker Lendecke2013-10-281-7/+7
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* smb2_ioctl: add support for FSCTL_SRV_COPYCHUNK_WRITEDavid Disseldorp2013-10-251-10/+34
| | | | | | | | | | | FSCTL_SRV_COPYCHUNK can only be used when the client has the copy-chunk target file open with FILE_WRITE_DATA and FILE_READ_DATA. FSCTL_SRV_COPYCHUNK_WRITE requires only FILE_WRITE_DATA access on the target, and is therefore suitable for cp --reflink, which opens the target file O_WRONLY. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* Revert "smbd: Move oplock/sharemode ops into one place"Volker Lendecke2013-10-251-3/+10
| | | | | | | | | | | | | This reverts commit 7b70fa18734d9ceb020fe3e5d4cc0c26cd27a484. This is a change in behaviour which needs much further investigation and testing. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Fri Oct 25 14:22:20 CEST 2013 on sn-devel-104
* Revert "smbd: Move oplock handling together"Volker Lendecke2013-10-251-7/+7
| | | | | | | | | | This reverts commit e689b7d51e6ffd848ab10e160dca2c3a03fc750b. This is a change in behaviour which needs much further investigation and testing. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* smbd: Move oplock handling togetherVolker Lendecke2013-10-241-7/+7
| | | | | | | Later on we will have all the oplock/sharemode operations in one routine. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* smbd: Move oplock/sharemode ops into one placeVolker Lendecke2013-10-241-10/+3
| | | | | | | | | This makes the is_stat_open special case in grant_fsp_oplock_type redundant because in open_file_ntcreate further up we have already set oplock_request to NO_OPLOCK for stat opens. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* smbd: Remove separate oplock_type parameter from set_file_oplockVolker Lendecke2013-10-244-7/+6
| | | | | | | | This avoids the question where it could happen that something else but fsp->oplock_type might be useful as an argument here. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* smbd: Unify parameters to set_oplock_typeVolker Lendecke2013-10-241-1/+1
| | | | | | | | | | Some lines above we set fsp->oplock_type = e->op_type. I don't see how this might have changed. This change will unify both callers of set_file_oplock. In the next step the second parameter to set_file_oplock will be removed. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* smbd: Make release_file_oplock staticVolker Lendecke2013-10-242-2/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* smbd: Use remove_oplock() in close_normal_fileVolker Lendecke2013-10-241-1/+1
| | | | | | | | | | | remove_oplock is a wrapper around release_file_oplock. This streamlines the exports of oplock.c a bit. Reason for this patch: In a later patch I will add functionality to remove_oplock that is required in close_normal_file as well. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* Fix bug 10196 - RW Deny for a specific user is not overriding RW Allow for a ↵Jeremy Allison2013-10-241-38/+41
| | | | | | | | | | | | | | | group. When the ID returned is ID_TYPE_BOTH we must *always* add it as both a user and a group, not just in the owning case. Otherwise DENY entries are not correctly processed. Confirmed by the reporter as fixing the problem. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10196 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* smbd: Remove MSG_SMB_ASYNC_LEVEL2_BREAKVolker Lendecke2013-10-232-85/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* smbd: Use MSG_SMB_BREAK_REQUEST for async l2 breaksVolker Lendecke2013-10-231-2/+10
| | | | | | | | | Now that we transmit the level we want to break to via the msg.op_type we can unify MSG_SMB_BREAK_REQUEST and MSG_SMB_ASYNC_LEVEL2_BREAK and thus simplify the code a bit. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* smbd: Fix breaking level2 on OVERWRITE create_dispositionVolker Lendecke2013-10-231-0/+11
| | | | | | | This is shown by the new raw.oplock.level_ii_1 test Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* smbd: Fix raw.batch.exclusive[59]Volker Lendecke2013-10-232-10/+29
| | | | | | | | | | | | | | | The level we have to break to depend on the breakers create_disposition: If we overwrite, we have to break to none. This patch overloads the "op_type" field in the break message we send across to the smbd holding the oplock with the oplock level we want to break to. Because it depends on the create_disposition in the breaking open, only the breaker can make that decision. We might want to use a different mechanism for this in the future, but for now using the op_type field seems acceptable to me. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* smbd: Remove unused "mid" from delay_for_oplockVolker Lendecke2013-10-231-3/+2
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* smbd: Don't send op_mid in a BREAK messageVolker Lendecke2013-10-231-5/+3
| | | | | | | The callee doesn't use this anyway Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* smbd: Simplify send_break_messageVolker Lendecke2013-10-231-4/+4
| | | | | | | We don't need an fsp here Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* smbd: Remove unused "oplock_request" arg from send_break_messageVolker Lendecke2013-10-231-5/+4
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* smbd: validate oplock types even for internal and stat opensVolker Lendecke2013-10-231-18/+3
| | | | | | | | There's no reason why we should not do this. This has turned into a pure internal consistency check that should apply fine every time. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* smbd: Fix bug 10216Volker Lendecke2013-10-231-4/+28
| | | | | | | | | | While refactoring find_oplock_types to validate_oplock_types I forgot that stat opens will end up in locking.tdb. So even with a batch oplock around we can have more than one entry. This means the consistency check in validate_oplock_types was wrong and too strict. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* winbind3: Fix CID 241468 Resource leakVolker Lendecke2013-10-211-0/+1
| | | | | | | We were leaking centry in this error case Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* idmap_autorid: fix traversal of ranges to correctly exclude mapping records.Michael Adam2013-10-211-0/+8
| | | | | | | | | | | | | | | When listing all ranges with "net idmap get ranges", the database records of the form "S-1-5-10" --> "GID 100016" were treated here as rangee mapings, resulting in an faulty printout like this: "RANGE 541346119: S-1-5-10". This patch fixes this by adding a filter that checks the size of the value datablob. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Mon Oct 21 19:48:40 CEST 2013 on sn-devel-104
* s3-rpc_server: Refactor lsasd_create_sockets().Andreas Schneider2013-10-211-33/+5
| | | | | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Mon Oct 21 12:49:44 CEST 2013 on sn-devel-104
* lsasd: Fix CID 1107233 Double closeVolker Lendecke2013-10-211-1/+0
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* winbind3: Fix CID 1107229 Uninitialized pointer readVolker Lendecke2013-10-191-1/+2
| | | | | | | | | | The first "goto done" would TALLOC_FREE the uninitialized "value" Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sat Oct 19 03:43:04 CEST 2013 on sn-devel-104
* s3:nmbd: do a very early cluster probe when starting nmbd.Michael Adam2013-10-181-0/+5
| | | | | | | | | | Just as for smbd and winbindd Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Fri Oct 18 01:17:14 CEST 2013 on sn-devel-104
* s3:winbindd: use cluster_probe_ok()Michael Adam2013-10-171-10/+3
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s3:smbd: use new function cluster_probe_ok()Michael Adam2013-10-172-9/+4
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s3: add cluster_probe_ok() in a new module util_cluster.Michael Adam2013-10-172-0/+66
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* smbd/winbindd: Do an early check if ctdbd is functionalVolker Lendecke2013-10-174-0/+48
| | | | | | | | | This will avoid panic calls when smbd and winbind is started in cluster mode before ctdb is functional. It still logs something sane at debug level 0, but it does not panic and core anymore. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* ctdbd_conn: Remove one call to cluster_fatalVolker Lendecke2013-10-171-1/+0
| | | | | | | | This is during startup of a ctdb connection, thus it is not as important as in other cases to immediately exit to free up resources Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>