[SCM] Socket Wrapper Repository - annotated tag socket_wrapper-1.1.5 created

2015-10-15 Thread Andreas Schneider
The annotated tag, socket_wrapper-1.1.5 has been created
at  2308ba4aa8a5f00245c119a34aa248004483b803 (tag)
   tagging  f635b312cd3cd166056dc02603c1f6b041f8d6e3 (commit)
  replaces  socket_wrapper-1.1.4
 tagged by  Andreas Schneider
on  Thu Oct 15 11:12:40 2015 +0200

- Log -
socket_wrapper-1.1.5
-BEGIN PGP SIGNATURE-
Version: GnuPG v2

iQIcBAABCgAGBQJWH24MAAoJEH7g/E3MAU49Jc0P/R501JOcBv+hDzHQgb9yrRWA
8ZYRmkDo5tGEBzp94D/GS0xEz8EDBHFpjk/e10f+DdAnRXVMaaQMaC4VrQEOXJnK
yZefdE1qfSLNBDVlqac3LBVAgw1tEq27Q81woAIlTGDo4Yq1kFky2AcF5C93sRGM
4kxlaS28yGgtOuX1VbSrwNCeaV8b/d+V58tBFXsPmIxowgTiZ1QVMp+amVSpmLMg
zeJogQkZsgtZIhR7WfxVGsYWyOWcwIUePaGKP/DJdwMCM269V9ZzAI4xTL1c706E
aPqNp4W8bhNIHnkGBy8bY3trwTMMO5cNu2h1/IXx0H+J7eeR1cW7FraYJltWXR5A
65c9RRwik7fzHlQz7IyLRO7MfKsEfULj7xEbxu+fnMtv5zDAkgVxnlh8oQYFpw+c
tRbVzjTvtNK9AEpsSc+b56aqgZfbZRvE4YkJNeF9jrMilekNXLt/d0n+00A/3Y4q
jAMW2xeggP2/UXkTrwEDv/JEiIOHh42acsXUPfzTyIRKvHshjafegHBQFEgdcg/V
RMeYtsqT+rhfJ99vSHkG+KI1aQYLhw1mHv674joTm0WTEBJBi1CQE/mDm+8mXBIP
jBG9Puqct7Cvr7KLMgqbySuJCAP+mjetRz2S4h8m2fwvZrpKFhXE5UCrHgWUhi4m
mBmxKR+uJ+iYSnNRIsW9
=l0TE
-END PGP SIGNATURE-

Andreas Schneider (5):
  swrap: Add support for TCP_NODELAY in setsockopt()
  swrap: Add support for TCP_NODELAY in getsockopt()
  tests: Add test for TCP_NODELAY getsockopt()
  tests: Add test for TCP_NODELAY setsockopt()
  Bump version to 1.1.5

Ralph Boehme (2):
  tests: Add a unit test for wrap_sendmsg_filter_cmsghdr()
  swrap: Simplify cmspace calculation in swrap_sendmsg_copy_cmsg()

---


-- 
Socket Wrapper Repository



[SCM] Socket Wrapper Repository - branch master updated

2015-10-15 Thread Andreas Schneider
The branch, master has been updated
   via  f635b31 Bump version to 1.1.5
  from  f3489d5 swrap: Simplify cmspace calculation in 
swrap_sendmsg_copy_cmsg()

https://git.samba.org/?p=socket_wrapper.git;a=shortlog;h=master


- Log -
commit f635b312cd3cd166056dc02603c1f6b041f8d6e3
Author: Andreas Schneider 
Date:   Wed Oct 14 11:37:55 2015 +0200

Bump version to 1.1.5

Signed-off-by: Andreas Schneider 
Reviewed-by: Ralph Boehme 

---

Summary of changes:
 CMakeLists.txt | 4 ++--
 ChangeLog  | 4 
 2 files changed, 6 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5407410..a2924cd 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -8,7 +8,7 @@ set(APPLICATION_NAME ${PROJECT_NAME})
 
 set(APPLICATION_VERSION_MAJOR "1")
 set(APPLICATION_VERSION_MINOR "1")
-set(APPLICATION_VERSION_PATCH "4")
+set(APPLICATION_VERSION_PATCH "5")
 
 set(APPLICATION_VERSION 
"${APPLICATION_VERSION_MAJOR}.${APPLICATION_VERSION_MINOR}.${APPLICATION_VERSION_PATCH}")
 
@@ -19,7 +19,7 @@ set(APPLICATION_VERSION 
"${APPLICATION_VERSION_MAJOR}.${APPLICATION_VERSION_MINO
 # Increment AGE. Set REVISION to 0
 #   If the source code was changed, but there were no interface changes:
 # Increment REVISION.
-set(LIBRARY_VERSION "0.1.4")
+set(LIBRARY_VERSION "0.1.5")
 set(LIBRARY_SOVERSION "0")
 
 # where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is 
checked
diff --git a/ChangeLog b/ChangeLog
index b3509ab..3a665fc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,10 @@
 ChangeLog
 ==
 
+version 1.1.5 (released 2015-10-15)
+  * Added support for TCP_NODELAY in setsockopt/getsockopt
+  * Fixed cmsg space calculation
+
 version 1.1.4 (released 2015-08-25)
   * Fixed handling of msg_name in recvmsg()
   * Fixed sendmsg()/recvmsg() TCP support


-- 
Socket Wrapper Repository



[SCM] Samba Shared Repository - branch master updated

2015-10-15 Thread Jeremy Allison
The branch, master has been updated
   via  30460fc s4:torture: Add test case for Replay of Persistent Handle 
on a Single Channel.
  from  8bcbb6f s3: test: Fix standalone valid users fileserver test.

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 30460fc45ef7414ae6e23683f60d64edd5d3e9dc
Author: Anubhav Rakshit 
Date:   Wed Oct 14 18:16:06 2015 +0530

s4:torture: Add test case for Replay of Persistent Handle on a Single 
Channel.

Signed-off-by: Anubhav Rakshit 
Reviewed-by: Michael Adam 
Reviewed-by: Jeremy Allison 

Autobuild-User(master): Jeremy Allison 
Autobuild-Date(master): Fri Oct 16 02:00:28 CEST 2015 on sn-devel-104

---

Summary of changes:
 source4/torture/smb2/replay.c | 105 ++
 1 file changed, 105 insertions(+)


Changeset truncated at 500 lines:

diff --git a/source4/torture/smb2/replay.c b/source4/torture/smb2/replay.c
index e4f5b01..c7c9bea 100644
--- a/source4/torture/smb2/replay.c
+++ b/source4/torture/smb2/replay.c
@@ -808,6 +808,110 @@ done:
return ret;
 }
 
+/**
+ * Test Durablity V2 Persistent Create Replay on a Single Channel
+ */
+static bool test_replay5(struct torture_context *tctx, struct smb2_tree *tree)
+{
+   NTSTATUS status;
+   TALLOC_CTX *mem_ctx = talloc_new(tctx);
+   struct smb2_handle _h;
+   struct smb2_handle *h = NULL;
+   struct smb2_create io;
+   struct GUID create_guid = GUID_random();
+   bool ret = true;
+   uint32_t share_capabilities;
+   bool share_is_ca;
+   const char *fname = BASEDIR "\\replay5.dat";
+   struct smb2_transport *transport = tree->session->transport;
+   struct smbcli_options options = tree->session->transport->options;
+
+   if (smbXcli_conn_protocol(transport->conn) < PROTOCOL_SMB3_00) {
+   torture_skip(tctx, "SMB 3.X Dialect family required for "
+   "Replay tests\n");
+   }
+
+   share_capabilities = smb2cli_tcon_capabilities(tree->smbXcli);
+   share_is_ca = share_capabilities & 
SMB2_SHARE_CAP_CONTINUOUS_AVAILABILITY;
+   if (!share_is_ca) {
+   torture_skip(tctx, "Persistent File Handles not supported");
+   }
+
+   ZERO_STRUCT(break_info);
+   break_info.tctx = tctx;
+   transport->oplock.handler = torture_oplock_ack_handler;
+   transport->oplock.private_data = tree;
+
+   torture_comment(tctx, "Replay of Persistent DurableHandleReqV2 on 
Single "
+   "Channel\n");
+   status = torture_smb2_testdir(tree, BASEDIR, &_h);
+   CHECK_STATUS(status, NT_STATUS_OK);
+   smb2_util_close(tree, _h);
+   smb2_util_unlink(tree, fname);
+   CHECK_VAL(break_info.count, 0);
+
+   smb2_oplock_create_share(, fname,
+   smb2_util_share_access("RWD"),
+   smb2_util_oplock_level("b"));
+   io.in.durable_open = false;
+   io.in.durable_open_v2 = true;
+   io.in.persistent_open = true;
+   io.in.create_guid = create_guid;
+   io.in.timeout = UINT32_MAX;
+
+   status = smb2_create(tree, mem_ctx, );
+   CHECK_STATUS(status, NT_STATUS_OK);
+   _h = io.out.file.handle;
+   h = &_h;
+   CHECK_CREATED(, CREATED, FILE_ATTRIBUTE_ARCHIVE);
+   CHECK_VAL(io.out.oplock_level, smb2_util_oplock_level("b"));
+   CHECK_VAL(io.out.durable_open, false);
+   CHECK_VAL(io.out.durable_open_v2, true);
+   CHECK_VAL(io.out.persistent_open, true);
+   CHECK_VAL(io.out.timeout, io.in.timeout);
+   CHECK_VAL(break_info.count, 0);
+
+   /* disconnect, leaving the durable open */
+   TALLOC_FREE(tree);
+
+   if (!torture_smb2_connection_ext(tctx, 0, , )) {
+   torture_warning(tctx, "couldn't reconnect, bailing\n");
+   ret = false;
+   goto done;
+   }
+
+   /* a re-open of a persistent handle causes an error */
+   status = smb2_create(tree, mem_ctx, );
+   CHECK_STATUS(status, NT_STATUS_DUPLICATE_OBJECTID);
+
+   /* SMB2_FLAGS_REPLAY_OPERATION must be set to open the Persistent 
Handle */
+   smb2cli_session_start_replay(tree->session->smbXcli);
+   smb2cli_session_increment_channel_sequence(tree->session->smbXcli);
+   status = smb2_create(tree, mem_ctx, );
+   CHECK_STATUS(status, NT_STATUS_OK);
+   CHECK_CREATED(, CREATED, FILE_ATTRIBUTE_ARCHIVE);
+   CHECK_VAL(io.out.durable_open, false);
+   CHECK_VAL(io.out.persistent_open, true);
+   CHECK_VAL(io.out.oplock_level, smb2_util_oplock_level("b"));
+   _h = io.out.file.handle;
+   h = &_h;
+
+   smb2_util_close(tree, *h);
+   h = NULL;
+done:
+   if (h != NULL) {
+  

[SCM] Samba Shared Repository - branch master updated

2015-10-15 Thread Uri Simchoni
The branch, master has been updated
   via  8bcbb6f s3: test: Fix standalone valid users fileserver test.
   via  2f6dc26 s3: lsa: lookup_name() logic for unqualified (no DOMAIN\ 
component) names is incorrect.
   via  23f6744 s3:lib: validate domain name in lookup_wellknown_name()
  from  808f29c s4: torture: Add SMB2 access-based enumeration test. Passes 
against Win2k12R2.

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit 8bcbb6fb16c13d20556fc50ea2744020cb895be3
Author: Jeremy Allison 
Date:   Wed Oct 14 11:20:08 2015 -0700

s3: test: Fix standalone valid users fileserver test.

Test was originally added for bug #11320. At the time
I remarked the only way I could get this to reproduce
the issue was to use "+WORKGROUP\userdup" instead of
just "+userdup" (which was the actual problem reported),
but I didn't investigage enough to discover the underlying
problem which is actually bug:

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11555

(lookup_names() logic for unqualified (no DOMAIN\
component) names is incorrect). On a standalone
fileserver "WORKGROUP\name" should not resolve,
but "NETBIOS-NAME\name" and just "name" should.

This corrects the test now that lookups for unqualified
names are now being done correctly.

Signed-off-by: Jeremy Allison 
Reviewed-by: Ralph Boehme 
Reviewed-by: Uri Simchoni 

Autobuild-User(master): Uri Simchoni 
Autobuild-Date(master): Thu Oct 15 22:58:54 CEST 2015 on sn-devel-104

commit 2f6dc260ada6cd178a650ca003c2ad22e12697c1
Author: Jeremy Allison 
Date:   Thu Oct 15 09:20:58 2015 -0700

s3: lsa: lookup_name() logic for unqualified (no DOMAIN\ component) names 
is incorrect.

Change so we only use unqualified name lookup logic if
domain component = "" and LOOKUP_NAME_ISOLATED flag is
passed in.

Remember to search for "NT Authority" *before* going
into unqualified name lookup logic.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11555

Signed-off-by: Jeremy Allison 
Reviewed-by: Uri Simchoni 

commit 23f674488a1f62fcc58bb94bed0abed98078b96d
Author: Ralph Boehme 
Date:   Thu Oct 15 12:35:26 2015 +0200

s3:lib: validate domain name in lookup_wellknown_name()

If domain argument is not an empty string, only search the matching
wellknown domain name.

As the only wellknown domain with a name is "NT Authority", passing ""
to lookup_wellknown_name() will search all domains inlcuding "NT
Authority".

Passing "NT Authority" otoh will obviously only search that domain.

This change makes lookup_wellknown_name() behave like this:

in domain | in name   | ok | out sid | out domain

Dialup  +S-1-5-1   NT Authority
NT AuthorityDialup  +S-1-5-1   NT Authority
Creator Authority   Dialup  -- -
Creator Owner   +S-1-3-0   ""
Creator Authority   Creator Owner   -- -
NT AuthorityCreator Owner   -- -

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11555

Signed-off-by: Ralph Boehme 
Reviewed-by: Jeremy Allison 
Reviewed-by: Uri Simchoni 

---

Summary of changes:
 selftest/target/Samba3.pm|  2 +-
 source3/lib/util_wellknown.c | 13 ++---
 source3/passdb/lookup_sid.c  | 31 ++-
 3 files changed, 41 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm
index de4346e..15423fe 100755
--- a/selftest/target/Samba3.pm
+++ b/selftest/target/Samba3.pm
@@ -608,7 +608,7 @@ sub setup_fileserver($$)
dfree command = $srcdir_abs/testprogs/blackbox/dfree.sh
 [valid-users-access]
path = $valid_users_sharedir
-   valid users = +SAMBA-TEST/userdup
+   valid users = +userdup
";
 
my $vars = $self->provision($path,
diff --git a/source3/lib/util_wellknown.c b/source3/lib/util_wellknown.c
index 0f627d1..a3db9ab 100644
--- a/source3/lib/util_wellknown.c
+++ b/source3/lib/util_wellknown.c
@@ -154,16 +154,23 @@ bool lookup_wellknown_sid(TALLOC_CTX *mem_ctx, const 
struct dom_sid *sid,
 ***/
 
 bool lookup_wellknown_name(TALLOC_CTX *mem_ctx, const char *name,
-  struct dom_sid *sid, const char **domain)
+  struct dom_sid *sid, const char