summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-10-24smbd: Use remove_oplock() in close_normal_fileVolker Lendecke1-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>
2013-10-24Fix comment showing how to print an ACL to allow debug.Jeremy Allison1-2/+4
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-10-24Fix bug 10196 - RW Deny for a specific user is not overriding RW Allow for a ↵Jeremy Allison1-44/+116
group. Fix posix_acl tests to match the change in writing ACLs with ID_TYPE_BOTH. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-10-24Fix bug 10196 - RW Deny for a specific user is not overriding RW Allow for a ↵Jeremy Allison1-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>
2013-10-23torture: Extend the raw.oplock.level_ii_1 testVolker Lendecke1-0/+14
smbd broke to none twice. Make sure this won't happen again :-) This used to happen before the MSG_SMB_BREAK_RESPONSE merge. In process_oplock_break_message we did not call remove_oplock, which would have prevented this. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Wed Oct 23 14:06:13 CEST 2013 on sn-devel-104
2013-10-23smbd: Remove MSG_SMB_ASYNC_LEVEL2_BREAKVolker Lendecke2-85/+1
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-10-23smbd: Use MSG_SMB_BREAK_REQUEST for async l2 breaksVolker Lendecke1-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>
2013-10-23smbd: Fix breaking level2 on OVERWRITE create_dispositionVolker Lendecke2-1/+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>
2013-10-23torture: Add a test showing we have to break L2 at open timeVolker Lendecke2-0/+107
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-10-23smbd: Fix raw.batch.exclusive[59]Volker Lendecke3-13/+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>
2013-10-23smbd: Remove unused "mid" from delay_for_oplockVolker Lendecke1-3/+2
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-10-23smbd: Don't send op_mid in a BREAK messageVolker Lendecke1-5/+3
The callee doesn't use this anyway Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-10-23smbd: Simplify send_break_messageVolker Lendecke1-4/+4
We don't need an fsp here Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-10-23smbd: Remove unused "oplock_request" arg from send_break_messageVolker Lendecke1-5/+4
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-10-23torture: Add oplock break to l2/none testsVolker Lendecke3-0/+183
The level we have to break to depends on the create disposition of the second opener. If it's overwriting, break to none. If it's not, break to level2. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-10-23torture: Check break level in raw.oplock.exclusive5Volker Lendecke2-0/+3
This is what Windows does in this case, we don't survive that. We break to LEVEL2 here. Fixes and more precise test to follow. We don't survive this anymore. Re-enable later. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-10-23smbd: validate oplock types even for internal and stat opensVolker Lendecke1-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>
2013-10-23torture: Add reproducer for bug 10216Volker Lendecke1-0/+12
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-10-23smbd: Fix bug 10216Volker Lendecke1-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>
2013-10-22ldb: Fix CID 240798 Uninitialized pointer readVolker Lendecke1-1/+1
Not called right now, because nobody tries multiple sort attributes. But if someone did, build_response would have looked at the uninitialized controls. 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): Tue Oct 22 03:28:20 CEST 2013 on sn-devel-104
2013-10-21winbind3: Fix CID 241468 Resource leakVolker Lendecke1-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>
2013-10-21ntvfs: Fix CID 1107225 Resource leakVolker Lendecke1-1/+3
After the talloc_strdup, we don't need cwd anymore. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-10-21ntvfs: Fix Coverity ID 1107224 Resource leakVolker Lendecke1-1/+3
In this error path we were leaking "fd". Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-10-21idmap_autorid: fix traversal of ranges to correctly exclude mapping records.Michael Adam1-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
2013-10-21nsswitch: Fix short writes in winbind_write_sockVolker Lendecke1-2/+2
We set the socket to nonblocking and don't handle EAGAIN right. We do a poll anyway, so wait for writability, which should fix this. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10195 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2013-10-21s3-rpc_server: Refactor lsasd_create_sockets().Andreas Schneider1-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
2013-10-21lsasd: Fix CID 1107233 Double closeVolker Lendecke1-1/+0
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2013-10-19winbind3: Fix CID 1107229 Uninitialized pointer readVolker Lendecke1-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
2013-10-18script/mks3param_ctx_table.pl: fix tabs/whitespaces in generated output.Stefan Metzmacher1-2/+2
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Günther Deschner <gd@samba.org> Autobuild-User(master): Günther Deschner <gd@samba.org> Autobuild-Date(master): Fri Oct 18 16:20:01 CEST 2013 on sn-devel-104
2013-10-18Reserve an OID space for external projectsSimo Sorce1-0/+4
Some external, but somewhat related projects, benefit from being able to use the Samba OID space instead of having to go through IANA. Reserve 1.3.6.1.4.1.7165.655.x for external projects And assign 1.3.6.1.4.1.7165.655.1.x to the GSS-NTLMSSP project. Signed-off-by: Simo Sorce <idra@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Simo Sorce <idra@samba.org> Autobuild-Date(master): Fri Oct 18 05:47:29 CEST 2013 on sn-devel-104
2013-10-18s3:nmbd: do a very early cluster probe when starting nmbd.Michael Adam1-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
2013-10-17s3:winbindd: use cluster_probe_ok()Michael Adam1-10/+3
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-17s3:smbd: use new function cluster_probe_ok()Michael Adam2-9/+4
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-17s3: add cluster_probe_ok() in a new module util_cluster.Michael Adam2-0/+66
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2013-10-17smbd/winbindd: Do an early check if ctdbd is functionalVolker Lendecke4-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>
2013-10-17ctdbd_conn: Remove one call to cluster_fatalVolker Lendecke1-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>
2013-10-17ctdbd_conn: Remove one call to cluster_fatalVolker Lendecke1-1/+2
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>
2013-10-17ctdbd_conn: Lift the cluster_fatal call in get_cluster_vnnVolker Lendecke1-1/+3
We have to report a proper error when ctdbd is not around Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2013-10-17s3:libsmb: call smbXcli_tcon_set_fs_attributes() directlyStefan Metzmacher1-4/+8
We should try to set all attributes we got and not just FILE_CASE_SENSITIVE_SEARCH. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10200 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Thu Oct 17 19:02:03 CEST 2013 on sn-devel-104
2013-10-17s3:libsmb: remove unused cli_state->case_sensitiveStefan Metzmacher2-5/+6
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10200 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2013-10-17s3:libsmb: remove unused cli_state->dfsrootStefan Metzmacher2-7/+0
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10200 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2013-10-17s3:libsmb: add SMB2/3 support to cli_dfs_get_referral()Stefan Metzmacher1-17/+56
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10200 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2013-10-17s3/libsmb: make use of smbXcli_tcon_is_dfs_share()Stefan Metzmacher2-3/+26
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10200 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2013-10-17s3/libsmb: Use smbXcli_conn_dfs_supported instead of test on CAP_DFSLuk Claes3-3/+3
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10200 Signed-off-by: Luk Claes <luk@debian.org> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-10-17s3:libsmb: don't pass down FLAG_CASELESS_PATHNAMES and FLAGS2_DFS_PATHNAMES ↵Stefan Metzmacher2-43/+0
anymore They're now handled at the smbXcli_conn and smbXcli_tcon layer. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10200 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2013-10-17s3:libsmb: call smbXcli_tcon_{get,set}_fs_attributes() from ↵Stefan Metzmacher1-0/+17
cli_set_case_sensitive() Bug: https://bugzilla.samba.org/show_bug.cgi?id=10200 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2013-10-17libcli/smb: add SMB2_HDR_FLAG_DFS for SMB2 Create operations on dfs sharesStefan Metzmacher1-1/+9
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10200 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2013-10-17libcli/smb: add FLAG_CASELESS_PATHNAMES based on FILE_CASE_SENSITIVE_SEARCH ↵Stefan Metzmacher1-0/+7
to smb1 requests Bug: https://bugzilla.samba.org/show_bug.cgi?id=10200 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2013-10-17libcli/smb: move Filesystem Attributes defines to smb_constants.hStefan Metzmacher3-33/+19
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10200 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2013-10-17libcli/smb: add FLAGS2_DFS_PATHNAMES for SMB1 operations against dfs sharesStefan Metzmacher1-0/+6
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10200 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>