[SCM] Samba Shared Repository - branch master updated

2017-04-21 Thread Andrew Bartlett
The branch, master has been updated
   via  52349a7 selftest: Do not enable inbound replication during 
replica_sync
  from  306783d lib: modules: Change XXX_init interface from XXX_init(void) 
to XXX_init(TALLOC_CTX *)

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


- Log -
commit 52349a7e69a933cbfe410241c7ad80d012886e02
Author: Andrew Bartlett 
Date:   Thu Apr 20 14:08:20 2017 +1200

selftest: Do not enable inbound replication during replica_sync

Instead we should use the forced=True to only do a very specific
replication, and so avoid noise from any other DC also live
on the network.  This extra replication in turn causes (and this
patch fixes) flapping replica_sync tests.

Signed-off-by: Andrew Bartlett 
Reviewed-by: Garming Sam 
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12753

Autobuild-User(master): Andrew Bartlett 
Autobuild-Date(master): Sat Apr 22 05:19:11 CEST 2017 on sn-devel-144

---

Summary of changes:
 source4/torture/drs/python/replica_sync.py | 51 --
 1 file changed, 51 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/torture/drs/python/replica_sync.py 
b/source4/torture/drs/python/replica_sync.py
index e8aaf0f..dd862ce 100644
--- a/source4/torture/drs/python/replica_sync.py
+++ b/source4/torture/drs/python/replica_sync.py
@@ -117,7 +117,6 @@ objectClass: organizationalUnit
 """Tests that objects created in conflict become conflict DNs (honour 
full sync override)"""
 
 # First confirm local replication (so when we test against windows, 
this fails fast without creating objects)
-self._enable_inbound_repl(self.dnsname_dc2)
 self._net_drs_replicate(DC=self.dnsname_dc2, fromDC=self.dnsname_dc1, 
local=True, forced=True, full_sync=True)
 
 self._disable_inbound_repl(self.dnsname_dc1)
@@ -129,9 +128,7 @@ objectClass: organizationalUnit
 time.sleep(1)
 self.ou2 = self._create_ou(self.ldb_dc2, "OU=Test Full Sync")
 
-self._enable_inbound_repl(self.dnsname_dc2)
 self._net_drs_replicate(DC=self.dnsname_dc2, fromDC=self.dnsname_dc1, 
local=True, forced=True, full_sync=True)
-self._disable_inbound_repl(self.dnsname_dc2)
 
 # Check that DC2 got the DC1 object, and OU1 was make into conflict
 res1 = 

[SCM] Samba Shared Repository - branch master updated

2017-04-21 Thread Jeremy Allison
The branch, master has been updated
   via  306783d lib: modules: Change XXX_init interface from XXX_init(void) 
to XXX_init(TALLOC_CTX *)
  from  9342b3e pyrpc: Fix segfault in ClientConnection

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


- Log -
commit 306783d6f5d577a0b8bd31d659d8c802f22f0333
Author: Jeremy Allison 
Date:   Thu Apr 20 12:24:43 2017 -0700

lib: modules: Change XXX_init interface from XXX_init(void) to 
XXX_init(TALLOC_CTX *)

Not currently used - no logic changes inside.

This will make it possible to pass down a long-lived talloc
context from the loading function for modules to use instead
of having them internally all use talloc_autofree_context()
which is a hidden global.

Updated all known module interface numbers, and added a
WHATSNEW.

Signed-off-by: Jeremy Allison 
Signed-off-by: Ralph Böhme 

Autobuild-User(master): Jeremy Allison 
Autobuild-Date(master): Sat Apr 22 01:17:00 CEST 2017 on sn-devel-144

---

Summary of changes:
 WHATSNEW.txt  | 19 +++
 auth/gensec/external.c|  4 ++--
 auth/gensec/gensec.h  |  3 ++-
 auth/gensec/gensec_start.c|  6 +++---
 auth/gensec/ncalrpc.c |  4 ++--
 auth/gensec/schannel.c|  4 ++--
 auth/gensec/spnego.c  |  4 ++--
 auth/ntlmssp/ntlmssp.c|  2 +-
 auth/ntlmssp/ntlmssp.h|  2 +-
 buildtools/wafsamba/samba_patterns.py |  3 +++
 docs-xml/Samba3-Developers-Guide/modules.xml  | 14 --
 examples/VFS/shadow_copy_test.c   |  2 +-
 examples/VFS/skel_opaque.c|  2 +-
 examples/VFS/skel_transparent.c   |  2 +-
 examples/auth/auth_skel.c |  4 ++--
 examples/pdb/test.c   |  2 +-
 file_server/file_server.c |  4 ++--
 lib/util/modules.c|  6 +++---
 lib/util/samba_modules.h  |  6 +++---
 libcli/echo/tests/echo.c  |  4 ++--
 pidl/lib/Parse/Pidl/Samba4/NDR/Server.pm  |  4 ++--
 source3/auth/auth.c   |  2 +-
 source3/auth/auth_builtin.c   |  2 +-
 source3/auth/auth_domain.c|  2 +-
 source3/auth/auth_sam.c   |  2 +-
 source3/auth/auth_samba4.c|  4 ++--
 source3/auth/auth_script.c|  4 ++--
 source3/auth/auth_unix.c  |  2 +-
 source3/auth/auth_winbind.c   |  2 +-
 source3/auth/proto.h  | 12 ++--
 source3/include/auth.h|  3 ++-
 source3/include/idmap.h   |  3 ++-
 source3/include/nss_info.h|  2 +-
 source3/include/passdb.h  |  3 ++-
 source3/include/smb_perfcount.h   |  3 ++-
 source3/include/vfs.h |  3 ++-
 source3/modules/perfcount_test.c  |  2 +-
 source3/modules/vfs_acl_tdb.c |  2 +-
 source3/modules/vfs_acl_xattr.c   |  2 +-
 source3/modules/vfs_afsacl.c  |  4 ++--
 source3/modules/vfs_aio_fork.c|  4 ++--
 source3/modules/vfs_aio_linux.c   |  2 +-
 source3/modules/vfs_aio_pthread.c |  4 ++--
 source3/modules/vfs_aixacl.c  |  4 ++--
 source3/modules/vfs_aixacl2.c |  4 ++--
 source3/modules/vfs_audit.c   |  2 +-
 source3/modules/vfs_btrfs.c   |  4 ++--
 source3/modules/vfs_cacheprime.c  |  4 ++--
 source3/modules/vfs_cap.c |  4 ++--
 source3/modules/vfs_catia.c   |  2 +-
 source3/modules/vfs_ceph.c|  4 ++--
 source3/modules/vfs_commit.c  |  4 ++--
 source3/modules/vfs_crossrename.c |  4 ++--
 source3/modules/vfs_default.c |  4 ++--
 source3/modules/vfs_default_quota.c   |  4 ++--
 source3/modules/vfs_dfs_samba4.c  |  4 ++--
 source3/modules/vfs_dirsort.c |  2 +-
 source3/modules/vfs_expand_msdfs.c|  4 ++--
 source3/modules/vfs_extd_audit.c  |  2 +-
 source3/modules/vfs_fake_acls.c   |  4 ++--
 source3/modules/vfs_fake_dfq.c|  2 +-
 source3/modules/vfs_fake_perms.c  |  4 ++--
 source3/modules/vfs_fileid.c  |  4 ++--
 source3/modules/vfs_fruit.c   |  4 ++--
 source3/modules/vfs_full_audit.c  |  2 +-
 source3/modules/vfs_glusterfs.c   |  4 ++--

[SCM] Samba Shared Repository - branch master updated

2017-04-21 Thread Andreas Schneider
The branch, master has been updated
   via  9342b3e pyrpc: Fix segfault in ClientConnection
  from  375d772 vfs_acl_xattr|tdb: ensure create mask is at least 0666 if 
ignore_system_acls is set

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


- Log -
commit 9342b3ebf7fe7b7565406bd9a606b6676c08b029
Author: Gary Lockyer 
Date:   Wed Apr 19 16:13:20 2017 +1200

pyrpc: Fix segfault in ClientConnection

Fix segfault when connecting over TCP, the endpoints list in dummy_table
was not initialised this caused a segfault when attempting to connect
over TCP.

Signed-off-by: Gary Lockyer 
Reviewed-by: Andrew Bartlet 
Reviewed-by: Andreas Schneider 

Autobuild-User(master): Andreas Schneider 
Autobuild-Date(master): Fri Apr 21 16:10:12 CEST 2017 on sn-devel-144

---

Summary of changes:
 python/samba/tests/dcerpc/bare.py | 18 ++
 source4/librpc/rpc/pyrpc.c|  8 
 2 files changed, 26 insertions(+)


Changeset truncated at 500 lines:

diff --git a/python/samba/tests/dcerpc/bare.py 
b/python/samba/tests/dcerpc/bare.py
index e101c5b..270c7af 100644
--- a/python/samba/tests/dcerpc/bare.py
+++ b/python/samba/tests/dcerpc/bare.py
@@ -19,6 +19,7 @@
 
 """Tests for samba.tests.dcerpc.bare."""
 
+import os
 from samba.dcerpc import ClientConnection
 import samba.tests
 
@@ -40,3 +41,20 @@ class BareTestCase(samba.tests.TestCase):
 basis_connection=x, lp_ctx=samba.tests.env_loadparm())
 self.assertEquals(24, len(x.request(0, chr(0) * 8)))
 self.assertEquals("\x01\x00\x00\x00", y.request(0, chr(0) * 4))
+
+def test_bare_tcp(self):
+# Connect to the echo pipe
+x = ClientConnection("ncacn_ip_tcp:%s" % os.environ["SERVER"],
+("60a15ec5-4de8-11d7-a637-005056a20182", 1),
+lp_ctx=samba.tests.env_loadparm())
+self.assertEquals("\x01\x00\x00\x00", x.request(0, chr(0) * 4))
+
+def test_two_contexts_tcp(self):
+x = ClientConnection("ncacn_ip_tcp:%s" % os.environ["SERVER"],
+("12345778-1234-abcd-ef00-0123456789ac", 1),
+lp_ctx=samba.tests.env_loadparm())
+y = ClientConnection("ncacn_ip_tcp:%s" % os.environ["SERVER"],
+("60a15ec5-4de8-11d7-a637-005056a20182", 1),
+basis_connection=x, lp_ctx=samba.tests.env_loadparm())
+self.assertEquals(24, len(x.request(0, chr(0) * 8)))
+self.assertEquals("\x01\x00\x00\x00", y.request(0, chr(0) * 4))
diff --git a/source4/librpc/rpc/pyrpc.c b/source4/librpc/rpc/pyrpc.c
index d4f13ba..8b817b8 100644
--- a/source4/librpc/rpc/pyrpc.c
+++ b/source4/librpc/rpc/pyrpc.c
@@ -293,6 +293,7 @@ static PyObject *dcerpc_interface_new(PyTypeObject *type, 
PyObject *args, PyObje
"binding", "syntax", "lp_ctx", "credentials", 
"basis_connection", NULL
};
static struct ndr_interface_table dummy_table;
+   static struct ndr_interface_string_array dummy_endpoints;
PyObject *args2 = Py_None;
PyObject *kwargs2 = Py_None;
 
@@ -316,6 +317,13 @@ static PyObject *dcerpc_interface_new(PyTypeObject *type, 
PyObject *args, PyObje
return NULL;
}
 
+   /*
+* Initialise the endpoints list in dummy_table if required
+*/
+   if (dummy_table.endpoints == NULL) {
+   dummy_table.endpoints = _endpoints;
+   }
+
args2 = Py_BuildValue("(s)", binding_string);
if (args2 == NULL) {
return NULL;


-- 
Samba Shared Repository



autobuild[sn-devel-144]: intermittent test failure detected

2017-04-21 Thread autobuild
The autobuild test system (on sn-devel-144) has detected an intermittent 
failing test in 
the current master tree.

The autobuild log of the failure is available here:

   http://git.samba.org/autobuild.flakey.sn-devel-144/2017-04-21-1526/flakey.log

The samba build logs are available here:

   
http://git.samba.org/autobuild.flakey.sn-devel-144/2017-04-21-1526/samba.stderr
   
http://git.samba.org/autobuild.flakey.sn-devel-144/2017-04-21-1526/samba.stdout
  
The top commit at the time of the failure was:

commit 375d772d04338861d92e683ae3c6c9d7ecb846ad
Author: Ralph Boehme 
Date:   Mon Feb 6 12:47:41 2017 +0100

vfs_acl_xattr|tdb: ensure create mask is at least 0666 if 
ignore_system_acls is set

Bug: https://bugzilla.samba.org/show_bug.cgi?id=12562

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

Autobuild-User(master): Ralph Böhme 
Autobuild-Date(master): Thu Apr 20 20:50:10 CEST 2017 on sn-devel-144



[SCM] Samba Shared Repository - branch v4-6-test updated

2017-04-21 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  c13244a cleanupdb: Fix a memory read error
   via  b8c11db s3:vfs:shadow_copy2: fix corner case of "/@GMT-token" in 
shadow_copy2_strip_snapshot
   via  0a84f16 s3:vfs:shadow_copy2: fix the corner case if cwd=/ in 
make_relative_path
   via  222aa4a s3:vfs:shadow_copy2: fix quoting in debug messages
   via  312fb3b pam_winbind: no longer use wbcUserPasswordPolicyInfo when 
authenticating
  from  12c24f3 s3:smbd: Fix incorrect use of sys_getgroups()

https://git.samba.org/?p=samba.git;a=shortlog;h=v4-6-test


- Log -
commit c13244a42c7cd4adeffa9c8125bcc5652e504b66
Author: Hanno Böck 
Date:   Wed Apr 19 14:00:21 2017 +0200

cleanupdb: Fix a memory read error

Bug: https://bugzilla.samba.org/show_bug.cgi?id=12748

Signed-off-by: Hanno Böck 
Reviewed-by: Volker Lendecke 
Reviewed-by: Jeremy Allison 
Reviewed-by: Ralph Boehme 
(cherry picked from commit fd98a7b6a0053b62802e29fb729e219dc08eef6b)

Autobuild-User(v4-6-test): Karolin Seeger 
Autobuild-Date(v4-6-test): Fri Apr 21 13:59:21 CEST 2017 on sn-devel-144

commit b8c11dbfd1d408c949e7bf71bd2687aef8267ffc
Author: Michael Adam 
Date:   Tue Apr 11 12:03:52 2017 +0200

s3:vfs:shadow_copy2: fix corner case of "/@GMT-token" in 
shadow_copy2_strip_snapshot

Signed-off-by: Michael Adam 
Reviewed-by: Jeremy Allison 
(cherry picked from commit 26661218b3d3f0d4ee89039727bc110e972c2851)

The last 3 patches address
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12743
vfs_shadow_copy2 fails to list snapshots from shares with GlusterFS backend

commit 0a84f1678180a8a2653f745a276de49d698330d2
Author: Michael Adam 
Date:   Tue Apr 11 12:03:20 2017 +0200

s3:vfs:shadow_copy2: fix the corner case if cwd=/ in make_relative_path

Signed-off-by: Michael Adam 
Reviewed-by: Jeremy Allison 
(cherry picked from commit 16c89835cf07caa2082b58095deba38ef962)

commit 222aa4a9794502b1e6b622b949133830bf94b8a9
Author: Michael Adam 
Date:   Tue Apr 11 11:18:30 2017 +0200

s3:vfs:shadow_copy2: fix quoting in debug messages

Signed-off-by: Michael Adam 
Reviewed-by: Jeremy Allison 
(cherry picked from commit fffd611fdc558ab428c8a21cf1e68feaf1f6f469)

commit 312fb3bfe1f2965a128d12d7e936e9b86016a719
Author: Stefan Metzmacher 
Date:   Mon Apr 3 00:19:25 2017 +0200

pam_winbind: no longer use wbcUserPasswordPolicyInfo when authenticating

The expiry time for the specific user comes from
info->pass_must_change_time and nothing else.

The authenticating DC knows which password policy applies
to the user, that's nothing the client can do, as
domain trusts and fine-grained password policies makes
this a very complex task.

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

Signed-off-by: Stefan Metzmacher 
Reviewed-by: Christof Schmitt 
(cherry picked from commit fba7ed9a3fa6fcb2d90d1271ae81ec11b554bd2d)

---

Summary of changes:
 nsswitch/pam_winbind.c | 58 --
 source3/lib/cleanupdb.c|  2 +-
 source3/modules/vfs_shadow_copy2.c | 17 +++
 3 files changed, 24 insertions(+), 53 deletions(-)


Changeset truncated at 500 lines:

diff --git a/nsswitch/pam_winbind.c b/nsswitch/pam_winbind.c
index dca2c29..26a9e8d 100644
--- a/nsswitch/pam_winbind.c
+++ b/nsswitch/pam_winbind.c
@@ -1004,7 +1004,6 @@ static bool _pam_send_password_expiry_message(struct 
pwb_context *ctx,
 
 static void _pam_warn_password_expiry(struct pwb_context *ctx,
  const struct wbcAuthUserInfo *info,
- const struct wbcUserPasswordPolicyInfo 
*policy,
  int warn_pwd_expire,
  bool *already_expired,
  bool *change_pwd)
@@ -1012,7 +1011,7 @@ static void _pam_warn_password_expiry(struct pwb_context 
*ctx,
time_t now = time(NULL);
time_t next_change = 0;
 
-   if (!info || !policy) {
+   if (info == NULL) {
return;
}
 
@@ -1044,23 +1043,6 @@ static void _pam_warn_password_expiry(struct pwb_context 
*ctx,
return;
}
 
-   /* now check for the global password policy */
-   /* good catch from Ralf Haferkamp: an expiry of "never" is translated
-* to -1 */
-   if ((policy->expire == (int64_t)-1) ||
-   (policy->expire == 

[SCM] Samba Shared Repository - branch v4-5-test updated

2017-04-21 Thread Karolin Seeger
The branch, v4-5-test has been updated
   via  bd0f2e8 cleanupdb: Fix a memory read error
   via  136d0d8 s3:vfs:shadow_copy2: fix corner case of "/@GMT-token" in 
shadow_copy2_strip_snapshot
   via  5b0b84e s3:vfs:shadow_copy2: fix the corner case if cwd=/ in 
make_relative_path
   via  609ae13 s3:vfs:shadow_copy2: fix quoting in debug messages
   via  ea91004 pam_winbind: no longer use wbcUserPasswordPolicyInfo when 
authenticating
  from  685437e s3:smbd: Fix incorrect use of sys_getgroups()

https://git.samba.org/?p=samba.git;a=shortlog;h=v4-5-test


- Log -
commit bd0f2e8333557273cd17573053deef623d53ddff
Author: Hanno Böck 
Date:   Wed Apr 19 14:00:21 2017 +0200

cleanupdb: Fix a memory read error

Bug: https://bugzilla.samba.org/show_bug.cgi?id=12748

Signed-off-by: Hanno Böck 
Reviewed-by: Volker Lendecke 
Reviewed-by: Jeremy Allison 
Reviewed-by: Ralph Boehme 
(cherry picked from commit fd98a7b6a0053b62802e29fb729e219dc08eef6b)

Autobuild-User(v4-5-test): Karolin Seeger 
Autobuild-Date(v4-5-test): Fri Apr 21 13:28:33 CEST 2017 on sn-devel-144

commit 136d0d8a784f9b9d1e2b97d83eba89d628fb8c6d
Author: Michael Adam 
Date:   Tue Apr 11 12:03:52 2017 +0200

s3:vfs:shadow_copy2: fix corner case of "/@GMT-token" in 
shadow_copy2_strip_snapshot

Signed-off-by: Michael Adam 
Reviewed-by: Jeremy Allison 
(cherry picked from commit 26661218b3d3f0d4ee89039727bc110e972c2851)

The last 3 patches address
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12743
vfs_shadow_copy2 fails to list snapshots from shares with GlusterFS backend

commit 5b0b84eda36483a2a6f17d0f9eb6c6e734e6ac71
Author: Michael Adam 
Date:   Tue Apr 11 12:03:20 2017 +0200

s3:vfs:shadow_copy2: fix the corner case if cwd=/ in make_relative_path

Signed-off-by: Michael Adam 
Reviewed-by: Jeremy Allison 
(cherry picked from commit 16c89835cf07caa2082b58095deba38ef962)

commit 609ae136070bf15c6da2554674f19eb5d1126055
Author: Michael Adam 
Date:   Tue Apr 11 11:18:30 2017 +0200

s3:vfs:shadow_copy2: fix quoting in debug messages

Signed-off-by: Michael Adam 
Reviewed-by: Jeremy Allison 
(cherry picked from commit fffd611fdc558ab428c8a21cf1e68feaf1f6f469)

commit ea910042c9653ac9ffe8a005698dd67464e59b0a
Author: Stefan Metzmacher 
Date:   Mon Apr 3 00:19:25 2017 +0200

pam_winbind: no longer use wbcUserPasswordPolicyInfo when authenticating

The expiry time for the specific user comes from
info->pass_must_change_time and nothing else.

The authenticating DC knows which password policy applies
to the user, that's nothing the client can do, as
domain trusts and fine-grained password policies makes
this a very complex task.

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

Signed-off-by: Stefan Metzmacher 
Reviewed-by: Christof Schmitt 
(cherry picked from commit fba7ed9a3fa6fcb2d90d1271ae81ec11b554bd2d)

---

Summary of changes:
 nsswitch/pam_winbind.c | 58 --
 source3/lib/cleanupdb.c|  2 +-
 source3/modules/vfs_shadow_copy2.c | 17 +++
 3 files changed, 24 insertions(+), 53 deletions(-)


Changeset truncated at 500 lines:

diff --git a/nsswitch/pam_winbind.c b/nsswitch/pam_winbind.c
index 4ae78b3..0692960 100644
--- a/nsswitch/pam_winbind.c
+++ b/nsswitch/pam_winbind.c
@@ -1002,7 +1002,6 @@ static bool _pam_send_password_expiry_message(struct 
pwb_context *ctx,
 
 static void _pam_warn_password_expiry(struct pwb_context *ctx,
  const struct wbcAuthUserInfo *info,
- const struct wbcUserPasswordPolicyInfo 
*policy,
  int warn_pwd_expire,
  bool *already_expired,
  bool *change_pwd)
@@ -1010,7 +1009,7 @@ static void _pam_warn_password_expiry(struct pwb_context 
*ctx,
time_t now = time(NULL);
time_t next_change = 0;
 
-   if (!info || !policy) {
+   if (info == NULL) {
return;
}
 
@@ -1042,23 +1041,6 @@ static void _pam_warn_password_expiry(struct pwb_context 
*ctx,
return;
}
 
-   /* now check for the global password policy */
-   /* good catch from Ralf Haferkamp: an expiry of "never" is translated
-* to -1 */
-   if ((policy->expire == (int64_t)-1) ||
-   (policy->expire ==