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

2018-08-14 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  8635c4f VERSION: Bump version up to 4.6.17.
   via  fd60772 Merge tag 'samba-4.6.16' into v4-6-test
   via  18df99b VERSION: Disable GIT_SNAPSHOT for the 4.6.16 release.
   via  cd2839a WHATSNEW: Add release notes for Samba 4.6.16.
   via  9f166c0 CVE-2018-10919 tests: Add extra test for dirsync deleted 
object corner-case
   via  246e79f CVE-2018-10919 acl_read: Fix unauthorized attribute access 
via searches
   via  9605ecc CVE-2018-10919 acl_read: Flip the logic in the dirsync check
   via  533106a CVE-2018-10919 acl_read: Small refactor to 
aclread_callback()
   via  fa7bcea CVE-2018-10919 acl_read: Split access_mask logic out into 
helper function
   via  f6cbad5 CVE-2018-10919 security: Fix checking of object-specific 
CONTROL_ACCESS rights
   via  873ccd0 CVE-2018-10919 tests: test ldap searches for non-existent 
attributes.
   via  924f87c CVE-2018-10919 tests: Add test case for object visibility 
with limited rights
   via  3388706 CVE-2018-10919 tests: Add tests for guessing confidential 
attributes
   via  010d1f1 CVE-2018-10919 security: Add more comments to the 
object-specific access checks
   via  2878c22 CVE-2018-10919 security: Move object-specific access checks 
into separate function
   via  2711b66 CVE-2018-10858: libsmb: Harden smbc_readdir_internal() 
against returns from malicious servers.
   via  6936d3e CVE-2018-10858: libsmb: Ensure smbc_urlencode() can't 
overwrite passed in buffer.
   via  30428f3 VERSION: Bump version up to 4.6.16...
  from  7705a4d VERSION: Bump version up to 4.6.16...

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


- Log -
commit 8635c4fb1b8dcf842480173b27b8352df484fb88
Author: Karolin Seeger 
Date:   Tue Aug 14 12:21:06 2018 +0200

VERSION: Bump version up to 4.6.17.

Signed-off-by: Karolin Seeger 

commit fd60772cd61d295e788c68d8d87b6685bde546dd
Merge: 7705a4d 18df99b
Author: Karolin Seeger 
Date:   Tue Aug 14 12:20:50 2018 +0200

Merge tag 'samba-4.6.16' into v4-6-test

samba: tag release samba-4.6.16

---

Summary of changes:
 VERSION|2 +-
 WHATSNEW.txt   |   66 +-
 libcli/security/access_check.c |  110 ++-
 source3/libsmb/libsmb_dir.c|   57 +-
 source3/libsmb/libsmb_path.c   |9 +-
 source4/dsdb/samdb/ldb_modules/acl_read.c  |  333 +++-
 source4/dsdb/tests/python/acl.py   |   68 ++
 source4/dsdb/tests/python/confidential_attr.py | 1025 
 source4/dsdb/tests/python/ldap.py  |9 +
 source4/selftest/tests.py  |3 +
 10 files changed, 1608 insertions(+), 74 deletions(-)
 create mode 100755 source4/dsdb/tests/python/confidential_attr.py


Changeset truncated at 500 lines:

diff --git a/VERSION b/VERSION
index 466bd23..88d6548 100644
--- a/VERSION
+++ b/VERSION
@@ -25,7 +25,7 @@
 
 SAMBA_VERSION_MAJOR=4
 SAMBA_VERSION_MINOR=6
-SAMBA_VERSION_RELEASE=16
+SAMBA_VERSION_RELEASE=17
 
 
 # If a official release has a serious bug  #
diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index fa673c3..d0c0533 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -1,4 +1,66 @@
==
+   Release Notes for Samba 4.6.16
+   August 14, 2018
+   ==
+
+
+This is a security release in order to address the following defects:
+
+o  CVE-2018-10858 (Insufficient input validation on client directory
+  listing in libsmbclient.)
+o  CVE-2018-10919 (Confidential attribute disclosure from the AD LDAP
+  server.)
+
+
+===
+Details
+===
+
+o  CVE-2018-10858:
+   A malicious server could return a directory entry that could corrupt
+   libsmbclient memory.
+
+o  CVE-2018-10919:
+   Missing access control checks allow discovery of confidential attribute
+   values via authenticated LDAP search expressions.
+
+
+Changes since 4.6.15:
+
+
+o  Jeremy Allison 
+   * BUG 13453: CVE-2018-10858: libsmb: Harden smbc_readdir_internal() against
+ returns from malicious servers.
+
+o  Tim Beale 
+   * BUG 13434: CVE-2018-10919: acl_read: Fix unauthorized attribute access via
+ searches.
+
+
+###
+Reporting bugs & Development Discussion
+###
+
+Please discuss this release on the samba-technical mailing list or by
+joining the #samba-technical IRC channel on irc.freenode.net.
+
+If you do report problems then please try to send high 

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

2018-04-13 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  7705a4d VERSION: Bump version up to 4.6.16...
   via  c4d44b9 VERSION: Disable GIT_SNAPSHOT for the 4.6.15 release.
   via  46be020 WHATSNEW: Add release notes for Samba 4.6.15.
  from  c90accf torture: Test compound request request counters

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


- Log -
commit 7705a4d471a427041616a9897158474d8a5ff457
Author: Karolin Seeger 
Date:   Tue Apr 10 21:22:32 2018 +0200

VERSION: Bump version up to 4.6.16...

and re-enable GIT_SNAPSHOT.

Signed-off-by: Karolin Seeger 

commit c4d44b9a78f65a27803ee7005a077292b45690f7
Author: Karolin Seeger 
Date:   Tue Apr 10 21:21:39 2018 +0200

VERSION: Disable GIT_SNAPSHOT for the 4.6.15 release.

Signed-off-by: Karolin Seeger 

commit 46be02065ab90c160911e0671c2b4f8c80a0a032
Author: Karolin Seeger 
Date:   Tue Apr 10 21:21:09 2018 +0200

WHATSNEW: Add release notes for Samba 4.6.15.

Signed-off-by: Karolin Seeger 

---

Summary of changes:
 VERSION  |  2 +-
 WHATSNEW.txt | 81 +---
 2 files changed, 79 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/VERSION b/VERSION
index f746dee..466bd23 100644
--- a/VERSION
+++ b/VERSION
@@ -25,7 +25,7 @@
 
 SAMBA_VERSION_MAJOR=4
 SAMBA_VERSION_MINOR=6
-SAMBA_VERSION_RELEASE=15
+SAMBA_VERSION_RELEASE=16
 
 
 # If a official release has a serious bug  #
diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index ca1e471..fa673c3 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -1,4 +1,79 @@
==
+   Release Notes for Samba 4.6.15
+   April 13, 2018
+   ==
+
+
+This is the latest stable release of the Samba 4.6 release series.
+
+
+Changes since 4.6.14:
+-
+
+o  Jeremy Allison 
+   * BUG 13244: s3: ldap: Ensure the ADS_STRUCT pointer doesn't get freed
+ on error, we don't own it here.
+   * BUG 13270: s3: smbd: Fix possible directory fd leak if the underlying
+ OS doesn't support fdopendir().
+   * BUG 13375: s3: smbd: Unix extensions attempts to change wrong field
+ in fchown call.
+
+o  Günther Deschner 
+   * BUG 13277: build: fix libceph-common detection.
+
+o  Poornima G 
+   * BUG 13297: vfs_glusterfs: Fix the wrong pointer being sent in
+ glfs_fsync_async.
+
+o  Volker Lendecke 
+   * BUG 13215: Fix smbd panic if the client-supplied channel sequence number
+ wraps.
+   * BUG 13240: samba: Only use async signal-safe functions in signal handler.
+
+o  Stefan Metzmacher 
+   * BUG 13197: SMB2 close/lock/logoff can generate
+ NT_STATUS_NETWORK_SESSION_EXPIRED.
+   * BUG 13206: Fix authentication with an empty string domain ''.
+   * BUG 13215: s3:smb2_server: correctly maintain request counters for
+ compound requests.
+
+o  Anton Nefedov
+   * BUG 13338: s3:smbd: Map nterror on smb2_flush errorpath.
+
+o  Dan Robertson 
+   * BUG 13310: libsmb: Use smb2 tcon if conn_protocol >= SMB2_02.
+
+o  Garming Sam 
+   * BUG 13031: subnet: Avoid a segfault when renaming subnet objects.
+
+o  Andreas Schneider 
+   * BUG 13315: s3:smbd: Do not crash if we fail to init the session table.
+
+
+###
+Reporting bugs & Development Discussion
+###
+
+Please discuss this release on the samba-technical mailing list or by
+joining the #samba-technical IRC channel on irc.freenode.net.
+
+If you do report problems then please try to send high quality
+feedback. If you don't provide vital information to help us track down
+the problem then you will probably be ignored.  All bug reports should
+be filed under the "Samba 4.1 and newer" product in the project's Bugzilla
+database (https://bugzilla.samba.org/).
+
+
+==
+== Our Code, Our Bugs, Our Responsibility.
+== The Samba Team
+==
+
+
+Release notes for older releases follow:
+
+
+   ==
Release Notes for Samba 4.6.14
March 13, 2018
=
@@ -36,7 +111,7 @@ o  CVE-2018-1057:

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

2018-04-12 Thread Stefan Metzmacher
The branch, v4-6-test has been updated
   via  c90accf torture: Test compound request request counters
   via  fb602bd s3:smb2_server: correctly maintain request counters for 
compound requests
  from  e1c58ec s3: smbd: Unix extensions attempts to change wrong field in 
fchown call.

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


- Log -
commit c90accf0275d17fb237ea01e7477d741ed8123bd
Author: Volker Lendecke 
Date:   Wed Apr 11 15:11:10 2018 +0200

torture: Test compound request request counters

This will send an unfixed smbd into the

SMB_ASSERT(op->request_count > 0);

in smbd_smb2_request_reply_update_counts

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13215
Signed-off-by: Volker Lendecke 
Reviewed-by: Stefan Metzmacher 

Autobuild-User(master): Volker Lendecke 
Autobuild-Date(master): Thu Apr 12 14:38:39 CEST 2018 on sn-devel-144

(cherry picked from commit 40edd1bc273f664d5567ef5be169033899acee1f)

Autobuild-User(v4-6-test): Stefan Metzmacher 
Autobuild-Date(v4-6-test): Thu Apr 12 21:56:31 CEST 2018 on sn-devel-144

commit fb602bddc4f968310b958f5fd06eb8857a39
Author: Stefan Metzmacher 
Date:   Wed Apr 11 12:14:59 2018 +0200

s3:smb2_server: correctly maintain request counters for compound requests

If a session expires during a compound request chain,
we exit smbd_smb2_request_dispatch() with
'return smbd_smb2_request_error(req, ...)' before
calling smbd_smb2_request_dispatch_update_counts().

As req->request_counters_updated was only reset
within smbd_smb2_request_dispatch_update_counts(),
smbd_smb2_request_reply_update_counts() was called
twice on the same request, which triggers
SMB_ASSERT(op->request_count > 0);

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

Signed-off-by: Stefan Metzmacher 
Reviewed-by: Volker Lendecke 
(cherry picked from commit 87e25cd1e45bfe57292b62ffc44ddafc01c61ca0)

---

Summary of changes:
 source3/smbd/smb2_server.c  |  6 +++-
 source4/torture/smb2/compound.c | 77 +
 2 files changed, 82 insertions(+), 1 deletion(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/smb2_server.c b/source3/smbd/smb2_server.c
index 573f5f6..23eb4b6 100644
--- a/source3/smbd/smb2_server.c
+++ b/source3/smbd/smb2_server.c
@@ -2148,7 +2148,7 @@ static NTSTATUS smbd_smb2_request_dispatch_update_counts(
bool update_open = false;
NTSTATUS status = NT_STATUS_OK;
 
-   req->request_counters_updated = false;
+   SMB_ASSERT(!req->request_counters_updated);
 
if (xconn->protocol < PROTOCOL_SMB2_22) {
return NT_STATUS_OK;
@@ -2283,6 +2283,8 @@ NTSTATUS smbd_smb2_request_dispatch(struct 
smbd_smb2_request *req)
 
DO_PROFILE_INC(request);
 
+   SMB_ASSERT(!req->request_counters_updated);
+
/* TODO: verify more things */
 
flags = IVAL(inhdr, SMB2_HDR_FLAGS);
@@ -2722,6 +2724,8 @@ static void smbd_smb2_request_reply_update_counts(struct 
smbd_smb2_request *req)
return;
}
 
+   req->request_counters_updated = false;
+
if (xconn->protocol < PROTOCOL_SMB2_22) {
return;
}
diff --git a/source4/torture/smb2/compound.c b/source4/torture/smb2/compound.c
index 1856054..da95479 100644
--- a/source4/torture/smb2/compound.c
+++ b/source4/torture/smb2/compound.c
@@ -1030,6 +1030,81 @@ done:
return ret;
 }
 
+static bool test_compound_invalid4(struct torture_context *tctx,
+  struct smb2_tree *tree)
+{
+   struct smb2_create cr;
+   struct smb2_read rd;
+   NTSTATUS status;
+   const char *fname = "compound_invalid4.dat";
+   struct smb2_close cl;
+   bool ret = true;
+   bool ok;
+   struct smb2_request *req[2];
+
+   smb2_transport_credits_ask_num(tree->session->transport, 2);
+
+   smb2_util_unlink(tree, fname);
+
+   ZERO_STRUCT(cr);
+   cr.in.security_flags  = 0x00;
+   cr.in.oplock_level= 0;
+   cr.in.impersonation_level = NTCREATEX_IMPERSONATION_IMPERSONATION;
+   cr.in.create_flags= 0x;
+   cr.in.reserved= 0x;
+   cr.in.desired_access  = SEC_RIGHTS_FILE_ALL;
+   cr.in.file_attributes = FILE_ATTRIBUTE_NORMAL;
+   cr.in.share_access= NTCREATEX_SHARE_ACCESS_READ |
+   NTCREATEX_SHARE_ACCESS_WRITE |
+   NTCREATEX_SHARE_ACCESS_DELETE;
+   cr.in.create_disposition  = NTCREATEX_DISP_OPEN_IF;
+   cr.in.create_options  = 

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

2018-04-11 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  e1c58ec s3: smbd: Unix extensions attempts to change wrong field in 
fchown call.
   via  b11b0e0 s3:smbd: map nterror on smb2_flush errorpath
   via  24354b0 vfs_glusterfs: Fix the wrong pointer being sent in 
glfs_fsync_async
   via  94d91c9 s3: smbd: Fix possible directory fd leak if the underlying 
OS doesn't support fdopendir()
   via  8f4202e s3: ldap: Ensure the ADS_STRUCT pointer doesn't get freed 
on error, we don't own it here.
  from  0afb85c tests/bind.py: Add a bind test with NTLMSSP with no domain

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


- Log -
commit e1c58ec4eed3479cb28f90b3982648dcf7cf88fb
Author: Jeremy Allison 
Date:   Mon Apr 9 09:32:23 2018 -0700

s3: smbd: Unix extensions attempts to change wrong field in fchown call.

Cut and paste error.

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

Reported-by: Rungta, Vandana 
Signed-off-by: Jeremy Allison 
Reviewed-by: David Disseldorp 

Autobuild-User(master): David Disseldorp 
Autobuild-Date(master): Tue Apr 10 00:45:56 CEST 2018 on sn-devel-144

(cherry picked from commit 3227b110d065500ed84fc70063da70ab35823a2e)

Autobuild-User(v4-6-test): Karolin Seeger 
Autobuild-Date(v4-6-test): Wed Apr 11 16:55:21 CEST 2018 on sn-devel-144

commit b11b0e0f7fcbc72814c2240aff8ed35519f022b9
Author: Anton Nefedov via samba-technical 
Date:   Thu Mar 15 14:38:41 2018 +0300

s3:smbd: map nterror on smb2_flush errorpath

smbd_smb2_flush_recv() expects nterror in tevent_req, and otherwise
aborts in tevent_req_is_nterror()

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

Signed-off-by: Anton Nefedov 
Reviewed-by: Volker Lendecke 
Reviewed-by: Jeremy Allison 
(cherry picked from commit 98623129446672521b7fa41d3457b8ce95db828c)

commit 24354b0fdaa0512ffc50c9f037135f4f1d11a008
Author: Poornima G 
Date:   Thu Feb 22 16:21:35 2018 +0530

vfs_glusterfs: Fix the wrong pointer being sent in glfs_fsync_async

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

Pair-Programmed-With: Anoop C S 
Signed-off-by: Poornima G 
Reviewed-by: Guenther Deschner 
Reviewed-by: Michael Adam 

Autobuild-User(master): Günther Deschner 
Autobuild-Date(master): Mon Feb 26 20:17:50 CET 2018 on sn-devel-144

(cherry picked from commit 46e6626f73f42c84f254507c3ec2b591e2e732ba)

commit 94d91c990630c157bc162c2baf600a97c359af51
Author: Jeremy Allison 
Date:   Wed Feb 14 13:23:12 2018 -0800

s3: smbd: Fix possible directory fd leak if the underlying OS doesn't 
support fdopendir()

HPUX has this problem.

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

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

Autobuild-User(master): Ralph Böhme 
Autobuild-Date(master): Fri Feb 23 22:56:35 CET 2018 on sn-devel-144

(cherry picked from commit 5ad5e7966f555b1d2b39d276646934a2cd2535e6)

commit 8f4202e0d98bd497286dc2dea63883bf880d811b
Author: Jeremy Allison 
Date:   Wed Jan 24 14:09:43 2018 -0800

s3: ldap: Ensure the ADS_STRUCT pointer doesn't get freed on error, we 
don't own it here.

Thanks to Isaac Boukris  for finding the
issue and testing this fix.

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

Signed-off-by: Jeremy Allison 
Reviewed-by: Volker Lendecke 

Autobuild-User(master): Jeremy Allison 
Autobuild-Date(master): Fri Jan 26 02:25:20 CET 2018 on sn-devel-144

(cherry picked from commit e7425bd5245ffea68b7e8f794c9b5f864d103769)

---

Summary of changes:
 source3/libads/ldap_utils.c | 9 +
 source3/modules/vfs_glusterfs.c | 2 +-
 source3/smbd/smb2_flush.c   | 2 +-
 source3/smbd/smb2_query_directory.c | 9 ++---
 source3/smbd/trans2.c   | 4 ++--
 5 files changed, 19 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/libads/ldap_utils.c b/source3/libads/ldap_utils.c
index a4adbc0..0c37b06 100644
--- a/source3/libads/ldap_utils.c
+++ b/source3/libads/ldap_utils.c
@@ -105,9 +105,18 @@ static ADS_STATUS ads_do_search_retry_internal(ADS_STRUCT 
*ads, const char *bind
status = ads_connect(ads);
 
if (!ADS_ERR_OK(status)) 

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

2018-03-20 Thread Stefan Metzmacher
The branch, v4-6-test has been updated
   via  0afb85c tests/bind.py: Add a bind test with NTLMSSP with no domain
   via  96d9297 s3:cliconnect.c: remove useless ';'
   via  bb14cec s3:libsmb: allow -U"\administrator" to work
  from  d71e1a2 Merge tag 'samba-4.6.14' into v4-6-test

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


- Log -
commit 0afb85c28f3932ef952abbbe10c20340e51ca90d
Author: Garming Sam 
Date:   Mon Jan 8 16:34:02 2018 +1300

tests/bind.py: Add a bind test with NTLMSSP with no domain

Confirmed to pass against Windows 2012 R2.

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

Signed-off-by: Garming Sam 
Reviewed-by: Andrew Bartlett 
Reviewed-by: Stefan Metzmacher 
(cherry picked from commit 2e49a9ebf5bffbeadca03517b4a21bca24c0)

Autobuild-User(v4-6-test): Stefan Metzmacher 
Autobuild-Date(v4-6-test): Tue Mar 20 21:20:00 CET 2018 on sn-devel-144

commit 96d9297a98d86000ec776049d84305ad9371efcc
Author: Stefan Metzmacher 
Date:   Tue Jan 9 08:57:05 2018 +0100

s3:cliconnect.c: remove useless ';'

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

Signed-off-by: Stefan Metzmacher 
Reviewed-by: Andrew Bartlett 
(cherry picked from commit e039e9b0d2a16b21ace019b028e5c8244486b8a3)

commit bb14cec6160bf9249fe2eb997ff48ad1408885d3
Author: Stefan Metzmacher 
Date:   Tue Jan 9 08:55:48 2018 +0100

s3:libsmb: allow -U"\\administrator" to work

cli_credentials_get_principal() returns NULL in that case.

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

Signed-off-by: Stefan Metzmacher 
Reviewed-by: Andrew Bartlett 
(cherry picked from commit 0786a65cabb92a812cf1c692d0d26914f74a6f87)

---

Summary of changes:
 auth/credentials/tests/bind.py | 26 +-
 source3/libsmb/cliconnect.c|  9 +++--
 2 files changed, 32 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/auth/credentials/tests/bind.py b/auth/credentials/tests/bind.py
index 91e493d..4aa4498 100755
--- a/auth/credentials/tests/bind.py
+++ b/auth/credentials/tests/bind.py
@@ -43,6 +43,7 @@ creds_machine = copy.deepcopy(creds)
 creds_user1 = copy.deepcopy(creds)
 creds_user2 = copy.deepcopy(creds)
 creds_user3 = copy.deepcopy(creds)
+creds_user4 = copy.deepcopy(creds)
 
 class BindTests(samba.tests.TestCase):
 
@@ -64,7 +65,7 @@ class BindTests(samba.tests.TestCase):
 self.config_dn = self.info_dc["configurationNamingContext"][0]
 self.computer_dn = "CN=centos53,CN=Computers,%s" % self.domain_dn
 self.password = "P@ssw0rd"
-self.username = "BindTestUser_" + time.strftime("%s", time.gmtime())
+self.username = "BindTestUser"
 
 def tearDown(self):
 super(BindTests, self).tearDown()
@@ -113,6 +114,7 @@ unicodePwd:: """ + 
base64.b64encode("\"P@ssw0rd\"".encode('utf-16-le')) + """
   expression="(samAccountName=%s)" % 
self.username)
 self.assertEquals(len(ldb_res), 1)
 user_dn = ldb_res[0]["dn"]
+self.addCleanup(delete_force, self.ldb, user_dn)
 
 # do a simple bind and search with the user account in format 
user@realm
 creds_user1.set_bind_dn(self.username + "@" + creds.get_realm())
@@ -138,5 +140,27 @@ unicodePwd:: """ + 
base64.b64encode("\"P@ssw0rd\"".encode('utf-16-le')) + """
   lp=lp, ldap_only=True)
 res = ldb_user3.search(base="", expression="", scope=SCOPE_BASE, 
attrs=["*"])
 
+def test_user_account_bind_no_domain(self):
+# create user
+self.ldb.newuser(username=self.username, password=self.password)
+ldb_res = self.ldb.search(base=self.domain_dn,
+  scope=SCOPE_SUBTREE,
+  expression="(samAccountName=%s)" % 
self.username)
+self.assertEquals(len(ldb_res), 1)
+user_dn = ldb_res[0]["dn"]
+self.addCleanup(delete_force, self.ldb, user_dn)
+
+creds_user4.set_username(self.username)
+creds_user4.set_password(self.password)
+creds_user4.set_domain('')
+creds_user4.set_workstation('')
+print "BindTest (no domain) with: " + self.username
+try:
+ldb_user4 = samba.tests.connect_samdb(host, 
credentials=creds_user4,
+  lp=lp, ldap_only=True)
+except:
+self.fail("Failed to connect without the domain set")
+
+res = ldb_user4.search(base="", expression="", scope=SCOPE_BASE, 

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

2018-03-13 Thread Stefan Metzmacher
The branch, v4-6-test has been updated
   via  d71e1a2 Merge tag 'samba-4.6.14' into v4-6-test
   via  d64e68a VERSION: Disable GIT_SNAPSHOT for the 4.6.14 release.
   via  7d6f329 WHATSNEW: Add release notes for Samba 4.6.14.
   via  8300e8e CVE-2018-1057: s4:dsdb/acl: changing dBCSPwd is only 
allowed with a control
   via  c1de637 CVE-2018-1057: s4:dsdb: use 
DSDB_CONTROL_PASSWORD_ACL_VALIDATION_OID
   via  06032bf CVE-2018-1057: s4:dsdb/samdb: define 
DSDB_CONTROL_PASSWORD_ACL_VALIDATION_OID control
   via  aee3832 CVE-2018-1057: s4:dsdb/acl: run password checking only once
   via  c8aa8ff CVE-2018-1057: s4/dsdb: correctly detect password resets
   via  7f4fef0 CVE-2018-1057: s4:dsdb/acl: add a NULL check for 
talloc_new() in acl_check_password_rights()
   via  39aa58a CVE-2018-1057: s4:dsdb/acl: add check for 
DSDB_CONTROL_PASSWORD_HASH_VALUES_OID control
   via  ddf8122 CVE-2018-1057: s4:dsdb/acl: check for internal controls 
before other checks
   via  67ad3bf CVE-2018-1057: s4:dsdb/acl: remove unused else branches in 
acl_check_password_rights()
   via  a529401 CVE-2018-1057: s4:dsdb/acl: only call dsdb_acl_debug() if 
we checked the acl in acl_check_password_rights()
   via  09eed84 CVE-2018-1057: s4:dsdb/password_hash: add a helper variable 
for passwordAttr->num_values
   via  116c4e3 CVE-2018-1057: s4:dsdb/password_hash: add a helper variable 
for LDB_FLAG_MOD_TYPE
   via  429a17f CVE-2018-1057: s4:dsdb/tests: add a test for password 
change with empty delete
   via  189d129 CVE-2018-1050: s3: RPC: spoolss server. Protect against 
null pointer derefs.
   via  24df683b VERSION: Bump version up to 4.6.14...
  from  2d2fb95 VERSION: Bump version up to 4.6.15...

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


- Log -
commit d71e1a2bf4b28442022002bf0a27ba5b0b8dbe45
Merge: 2d2fb95 d64e68a
Author: Stefan Metzmacher 
Date:   Tue Mar 13 11:11:55 2018 +0100

Merge tag 'samba-4.6.14' into v4-6-test

samba: tag release samba-4.6.14

---

Summary of changes:


Changeset truncated at 500 lines:



-- 
Samba Shared Repository



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

2018-03-13 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  2d2fb95 VERSION: Bump version up to 4.6.15...
  from  85fc0d5 build: fix libceph-common detection

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


- Log -
commit 2d2fb95a437da642c8d0e3005feee383046ac6dc
Author: Karolin Seeger 
Date:   Tue Mar 13 10:40:24 2018 +0100

VERSION: Bump version up to 4.6.15...

and re-enable GIT_SNAPSHOT.

Signed-off-by: Karolin Seeger 

---

Summary of changes:
 VERSION | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/VERSION b/VERSION
index c516eb7..f746dee 100644
--- a/VERSION
+++ b/VERSION
@@ -25,7 +25,7 @@
 
 SAMBA_VERSION_MAJOR=4
 SAMBA_VERSION_MINOR=6
-SAMBA_VERSION_RELEASE=14
+SAMBA_VERSION_RELEASE=15
 
 
 # If a official release has a serious bug  #
@@ -99,7 +99,7 @@ SAMBA_VERSION_RC_RELEASE=
 # e.g. SAMBA_VERSION_IS_SVN_SNAPSHOT=yes   #
 #  ->  "3.0.0-SVN-build-199"   #
 
-SAMBA_VERSION_IS_GIT_SNAPSHOT=no
+SAMBA_VERSION_IS_GIT_SNAPSHOT=yes
 
 
 # This is for specifying a release nickname#


-- 
Samba Shared Repository



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

2018-03-13 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  85fc0d5 build: fix libceph-common detection
   via  903 VERSION: Disable GIT_SNAPSHOT for the 4.6.14 release.
   via  5cabac8 WHATSNEW: Add release notes for Samba 4.6.14.
   via  58c2418 CVE-2018-1057: s4:dsdb/acl: changing dBCSPwd is only 
allowed with a control
   via  03b1513 CVE-2018-1057: s4:dsdb: use 
DSDB_CONTROL_PASSWORD_ACL_VALIDATION_OID
   via  96261a0 CVE-2018-1057: s4:dsdb/samdb: define 
DSDB_CONTROL_PASSWORD_ACL_VALIDATION_OID control
   via  9e03a09 CVE-2018-1057: s4:dsdb/acl: run password checking only once
   via  43863fc CVE-2018-1057: s4/dsdb: correctly detect password resets
   via  0c2ef5f CVE-2018-1057: s4:dsdb/acl: add a NULL check for 
talloc_new() in acl_check_password_rights()
   via  2cce162 CVE-2018-1057: s4:dsdb/acl: add check for 
DSDB_CONTROL_PASSWORD_HASH_VALUES_OID control
   via  a0e418a CVE-2018-1057: s4:dsdb/acl: check for internal controls 
before other checks
   via  4a8b22c CVE-2018-1057: s4:dsdb/acl: remove unused else branches in 
acl_check_password_rights()
   via  ed471f3 CVE-2018-1057: s4:dsdb/acl: only call dsdb_acl_debug() if 
we checked the acl in acl_check_password_rights()
   via  a976076 CVE-2018-1057: s4:dsdb/password_hash: add a helper variable 
for passwordAttr->num_values
   via  4b93237 CVE-2018-1057: s4:dsdb/password_hash: add a helper variable 
for LDB_FLAG_MOD_TYPE
   via  1610632 CVE-2018-1057: s4:dsdb/tests: add a test for password 
change with empty delete
   via  5365141 CVE-2018-1050: s3: RPC: spoolss server. Protect against 
null pointer derefs.
  from  ae55cfe s3:smbd: Do not crash if we fail to init the session table

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


- Log -
commit 85fc0d5d0100c0396daf51017ffa0051ba543048
Author: Günther Deschner 
Date:   Mon Jan 15 23:20:39 2018 +0100

build: fix libceph-common detection

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

Guenther

Signed-off-by: Guenther Deschner 
Reviewed-by: David Disseldorp 

Autobuild-User(master): Günther Deschner 
Autobuild-Date(master): Thu Feb 22 19:30:12 CET 2018 on sn-devel-144

(cherry picked from commit 6a59619844e0def505a6bfa778c17721c062e0ee)

commit 9039d7259bc5e9ff3024eff2e471b2ace58a
Author: Karolin Seeger 
Date:   Mon Mar 12 10:10:53 2018 +0100

VERSION: Disable GIT_SNAPSHOT for the 4.6.14 release.

CVE-2018-1050 (Denial of Service Attack on external print server.)
CVE-2018-1057 (Authenticated users can change other users' password.)

Signed-off-by: Karolin Seeger 

commit 5cabac80fa1a276d9b00aabb4acc8b79707cfb9d
Author: Karolin Seeger 
Date:   Mon Mar 12 10:10:07 2018 +0100

WHATSNEW: Add release notes for Samba 4.6.14.

Signed-off-by: Karolin Seeger 

commit 58c241844ad3e6913bbad0b0b15090e62fab90cd
Author: Ralph Boehme 
Date:   Thu Feb 15 23:11:38 2018 +0100

CVE-2018-1057: s4:dsdb/acl: changing dBCSPwd is only allowed with a control

This is not strictly needed to fig bug 13272, but it makes sense to also
fix this while fixing the overall ACL checking logic.

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

Signed-off-by: Ralph Boehme 
Reviewed-by: Stefan Metzmacher 

commit 03b15137112f15132da15d1a18f6afa708da35e0
Author: Ralph Boehme 
Date:   Fri Feb 16 15:38:19 2018 +0100

CVE-2018-1057: s4:dsdb: use DSDB_CONTROL_PASSWORD_ACL_VALIDATION_OID

This is used to pass information about which password change operation 
(change
or reset) the acl module validated, down to the password_hash module.

It's very important that both modules treat the request identical.

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

Signed-off-by: Ralph Boehme 
Reviewed-by: Stefan Metzmacher 

commit 96261a040e8ce60748abd5e9e124e96a0935f120
Author: Ralph Boehme 
Date:   Fri Feb 16 15:30:13 2018 +0100

CVE-2018-1057: s4:dsdb/samdb: define 
DSDB_CONTROL_PASSWORD_ACL_VALIDATION_OID control

Will be used to pass "user password change" vs "password reset" from the
ACL to the password_hash module, ensuring both modules treat the request
identical.

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

Signed-off-by: Ralph Boehme 
Reviewed-by: Stefan Metzmacher 

commit 9e03a09a145a62838eaf7dc1848b91562b76f509
Author: Ralph Boehme 
Date:   Wed Feb 14 19:15:49 2018 +0100

CVE-2018-1057: s4:dsdb/acl: run password checking only once

This is needed, because 

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

2018-03-08 Thread Stefan Metzmacher
The branch, v4-6-test has been updated
   via  ae55cfe s3:smbd: Do not crash if we fail to init the session table
   via  8fe0589 libsmb: Use smb2 tcon if conn_protocol >= SMB2_02
   via  3dadbb3 torture: Add test for channel sequence number handling
   via  597aba1 smbXcli: Add "force_channel_sequence"
   via  082c08e smbd: Fix channel sequence number checks for long-running 
requests
   via  c3bce29 smbd: Remove a "!" from an if-condition for easier 
readability
   via  65992c6 torture4: Fix typos
   via  dc5dbc6 smbd: Fix a typo
   via  b726719 s3:smb2_server: allow logoff, close, unlock, cancel and 
echo on expired sessions
   via  7118165 s3:smbd: return the correct error for cancelled SMB2 
notifies on expired sessions
   via  f0e7a7c s4:torture: add smb2.session.expire2 test
  from  d0c6802 Revert "HEIMDAL:kdc: fix memory leak when decryption 
AuthorizationData"

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


- Log -
commit ae55cfefd7cf6445fa61ee7f7c66d41edb9379f3
Author: Andreas Schneider 
Date:   Mon Feb 19 18:07:50 2018 +0100

s3:smbd: Do not crash if we fail to init the session table

This should the following segfault with SMB1:

  #6  sig_fault (sig=) at ../lib/util/fault.c:94
  #7  
  #8  smbXsrv_session_create (conn=conn@entry=0x5654d3512af0, 
now=now@entry=131594481900356690, _session=_session@entry=0x7ffc93a778e8)
  at ../source3/smbd/smbXsrv_session.c:1212
  #9  0x7f7618aa21ef in reply_sesssetup_and_X 
(req=req@entry=0x5654d35174b0) at ../source3/smbd/sesssetup.c:961
  #10 0x7f7618ae17b0 in switch_message (type=, 
req=req@entry=0x5654d35174b0) at ../source3/smbd/process.c:1726
  #11 0x7f7618ae3550 in construct_reply (deferred_pcd=0x0, 
encrypted=false, seqnum=0, unread_bytes=0, size=140, inbuf=0x0, 
xconn=0x5654d35146d0)
  at ../source3/smbd/process.c:1762
  #12 process_smb (xconn=xconn@entry=0x5654d3512af0, inbuf=, 
nread=140, unread_bytes=0, seqnum=0, encrypted=,
  deferred_pcd=deferred_pcd@entry=0x0) at ../source3/smbd/process.c:2008
  #13 0x7f7618ae4c41 in smbd_server_connection_read_handler 
(xconn=0x5654d3512af0, fd=40) at ../source3/smbd/process.c:2608
  #14 0x7f761587eedb in epoll_event_loop_once () from 
/lib64/libtevent.so.0

Inspection the core shows that:
  conn->client-session_table is NULL
  conn->protocol is PROTOCOL_NONE

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

Signed-off-by: Andreas Schneider 
Reviewed-by: Jeremy Allison 
(cherry picked from commit a89a7146563f2d9eb8bc02f1c090158ee499c878)

Autobuild-User(v4-6-test): Stefan Metzmacher 
Autobuild-Date(v4-6-test): Fri Mar  9 01:47:40 CET 2018 on sn-devel-144

commit 8fe0589cb1f8ac33aed689fe6507f4527412660b
Author: Dan Robertson 
Date:   Thu Feb 22 20:47:11 2018 +

libsmb: Use smb2 tcon if conn_protocol >= SMB2_02

When the connection protocol is SMB2 the tid from the smb1 member is
used instead of smb2 in cli_state_set_tid which often results in a null
deref.

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

Signed-off-by: Dan Robertson 
Reviewed-by: Jeremy Allison 
Reviewed-by: Andreas Schneider 
(cherry picked from commit b67ffaf518c971817b167b41bf6226cddfdcfd2f)

commit 3dadbb3556eec40bb568ca2298b5f1553d2b509b
Author: Volker Lendecke 
Date:   Thu Jan 11 11:55:39 2018 +0100

torture: Add test for channel sequence number handling

We run into an assert when the csn wraps

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

Signed-off-by: Volker Lendecke 
Reviewed-by: Stefan Metzmacher 

Autobuild-User(master): Stefan Metzmacher 
Autobuild-Date(master): Sun Jan 14 14:47:15 CET 2018 on sn-devel-144

(cherry picked from commit 0abe16a5343de9a69bb5cccbad9809b28b642f45)

commit 597aba166c3e088411581599c5d5b860611fc1e2
Author: Volker Lendecke 
Date:   Thu Jan 11 11:25:49 2018 +0100

smbXcli: Add "force_channel_sequence"

This enables use of the channel sequence number even for
non-multi-channel servers. This makes our client invalid, but we need to
protect against broken clients with tests.

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

Signed-off-by: Volker Lendecke 
Reviewed-by: Stefan Metzmacher 
(cherry picked from commit cd288a08500b1cc38ef26e5cb8ef754b4da658b6)

commit 082c08efb4dc9aad0f3a5223c7fbbc853105104f
Author: Volker Lendecke 
Date:   Thu Jan 11 15:34:45 2018 +0100

smbd: Fix channel sequence 

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

2018-02-21 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  d0c6802 Revert "HEIMDAL:kdc: fix memory leak when decryption 
AuthorizationData"
   via  c190c37 Revert "HEIMDAL:kdc: decrypt b->enc_authorization_data in 
tgs_build_reply()"
   via  e1a5f80 Revert "HEIMDAL:kdc: if we don't have an authenticator 
subkey for S4U2Proxy we need to use the additional tickets key"
   via  542382a Revert "s4:kdc: fix the principal names in 
samba_kdc_update_delegation_info_blob"
   via  fb65808 Revert "HEIMDAL:kdc: let _kdc_encode_reply() use the 
encryption type based on the server key"
   via  4afb9bd Revert "HEIMDAL:hdb: export a hdb_enctype_supported() 
helper function"
   via  cb60d1c Revert "s4:kdc: use the strongest possible tgs session key"
   via  0cd6906 Revert "TODO s4:kdc: msDS-SupportedEncryptionTypes only on 
computers"
   via  89f27fa Revert "TODO s4:kdc: indicate support for new encryption 
types by adding empty keys"
   via  3a54a04 Revert "HEIMDAL:kdc: use the correct authtime from 
addtitional ticket for S4U2Proxy tickets"
  from  56a40ab samba: Only use async signal-safe functions in signal 
handler

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


- Log -
commit d0c6802bd6f5be279b95858a6a6920a1745c32a8
Author: Karolin Seeger 
Date:   Wed Feb 21 10:15:23 2018 +0100

Revert "HEIMDAL:kdc: fix memory leak when decryption AuthorizationData"

This reverts commit 678a7a32473b1f64421cd905b7d535878eb11cab.

Autobuild-User(v4-6-test): Karolin Seeger 
Autobuild-Date(v4-6-test): Wed Feb 21 15:14:49 CET 2018 on sn-devel-144

commit c190c375403ec80c2c9b34f195c1c0fb6a172595
Author: Karolin Seeger 
Date:   Wed Feb 21 10:15:23 2018 +0100

Revert "HEIMDAL:kdc: decrypt b->enc_authorization_data in tgs_build_reply()"

This reverts commit e8988e614aaf269b24b072e483047bdcd80fef33.

commit e1a5f808c571a8c0d66c5407f8327d4648045847
Author: Karolin Seeger 
Date:   Wed Feb 21 10:15:23 2018 +0100

Revert "HEIMDAL:kdc: if we don't have an authenticator subkey for S4U2Proxy 
we need to use the additional tickets key"

This reverts commit ec57c13dc378d15dad98efd59e86bcc2775c5b0a.

commit 542382aa2fba9ce43f77882963ccb13f84574a4f
Author: Karolin Seeger 
Date:   Wed Feb 21 10:15:22 2018 +0100

Revert "s4:kdc: fix the principal names in 
samba_kdc_update_delegation_info_blob"

This reverts commit 2557d5c6235f7d24866163124fc254cfe81d3871.

commit fb65808bb2d1daf5bbf56b59ac3d9501da101cb4
Author: Karolin Seeger 
Date:   Wed Feb 21 10:15:22 2018 +0100

Revert "HEIMDAL:kdc: let _kdc_encode_reply() use the encryption type based 
on the server key"

This reverts commit 03484706e4ff546fc7fe41124d896e9f7840fe80.

commit 4afb9bddeb074ecd3d8b3c704cfd91907f34c9fb
Author: Karolin Seeger 
Date:   Wed Feb 21 10:15:22 2018 +0100

Revert "HEIMDAL:hdb: export a hdb_enctype_supported() helper function"

This reverts commit 18d7cf191718b3a30165a43271e503cc07ca5b50.

commit cb60d1c2175c32a4b3879d2c9e39a4760d17f78a
Author: Karolin Seeger 
Date:   Wed Feb 21 10:15:22 2018 +0100

Revert "s4:kdc: use the strongest possible tgs session key"

This reverts commit 9fdf175905efde803941a5876ce7e060013fc9a0.

commit 0cd690617547366562fb1deed049f0c7ab129b3e
Author: Karolin Seeger 
Date:   Wed Feb 21 10:15:22 2018 +0100

Revert "TODO s4:kdc: msDS-SupportedEncryptionTypes only on computers"

This reverts commit fe146338f304a52f861777ada5774887fe0776e3.

commit 89f27fab18020c5b236a684359a1172981528425
Author: Karolin Seeger 
Date:   Wed Feb 21 10:15:22 2018 +0100

Revert "TODO s4:kdc: indicate support for new encryption types by adding 
empty keys"

This reverts commit bf07697273017014516010475f79be3e59a2ce07.

commit 3a54a0497315430501a13f6397f3e2889197158a
Author: Karolin Seeger 
Date:   Wed Feb 21 10:15:22 2018 +0100

Revert "HEIMDAL:kdc: use the correct authtime from addtitional ticket for 
S4U2Proxy tickets"

This reverts commit 9ecdf21e174ba7525b77035664428fbdcbf53690.

---

Summary of changes:
 source4/heimdal/kdc/kerberos5.c|  20 ++---
 source4/heimdal/kdc/krb5tgs.c  | 127 ++---
 source4/heimdal/lib/hdb/hdb.c  |  30 +--
 source4/heimdal/lib/hdb/version-script.map |   1 -
 source4/kdc/db-glue.c  |  73 +
 source4/kdc/kdc-heimdal.c  |   6 +-
 source4/kdc/pac-glue.c |   6 +-
 7 files changed, 80 insertions(+), 183 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/heimdal/kdc/kerberos5.c 

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

2018-02-20 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  56a40ab samba: Only use async signal-safe functions in signal 
handler
   via  670af37 subnet: Avoid a segfault when renaming subnet objects
   via  f2e21e6 HEIMDAL:kdc: use the correct authtime from addtitional 
ticket for S4U2Proxy tickets
   via  ffda28e TODO s4:kdc: indicate support for new encryption types by 
adding empty keys
   via  075f061 TODO s4:kdc: msDS-SupportedEncryptionTypes only on computers
   via  7d0559e s4:kdc: use the strongest possible tgs session key
   via  2a7392d HEIMDAL:hdb: export a hdb_enctype_supported() helper 
function
   via  8ac00b0 HEIMDAL:kdc: let _kdc_encode_reply() use the encryption 
type based on the server key
   via  9f3571a s4:kdc: fix the principal names in 
samba_kdc_update_delegation_info_blob
   via  312bf1c HEIMDAL:kdc: if we don't have an authenticator subkey for 
S4U2Proxy we need to use the additional tickets key
   via  3dd52dd HEIMDAL:kdc: decrypt b->enc_authorization_data in 
tgs_build_reply()
   via  9ec1a52 HEIMDAL:kdc: fix memory leak when decryption 
AuthorizationData
  from  2ed8741 VERSION: Bump version up to 4.6.14...

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


- Log -
commit 56a40ab005671fd6ce3c55cd91eddcbcc925891d
Author: Volker Lendecke 
Date:   Thu Jan 4 21:06:02 2018 +0100

samba: Only use async signal-safe functions in signal handler

Otherwise shutdown can hang

Signed-off-by: Volker Lendecke 
Reviewed-by: Andreas Schneider 

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

Signed-off-by: Björn Baumbach 
(similar to commit 361ea743576cf125d7957a97ed78a0446dab1a19)

Autobuild-User(v4-6-test): Karolin Seeger 
Autobuild-Date(v4-6-test): Tue Feb 20 17:03:44 CET 2018 on sn-devel-144

commit 670af37291bc75481ac89efff62760d74377536f
Author: Garming Sam 
Date:   Wed Sep 20 14:55:11 2017 +1200

subnet: Avoid a segfault when renaming subnet objects

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

Signed-off-by: Garming Sam 
Reviewed-by: Douglas Bagnall 

commit f2e21e692640308c003bd851da0c627af73a9451
Author: Stefan Metzmacher 
Date:   Wed Nov 8 13:18:29 2017 +0100

HEIMDAL:kdc: use the correct authtime from addtitional ticket for S4U2Proxy 
tickets

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

Signed-off-by: Stefan Metzmacher 

commit ffda28e9b14a6d0464cc2b931105a4d43712dcba
Author: Stefan Metzmacher 
Date:   Tue Nov 7 12:23:31 2017 +0100

TODO s4:kdc: indicate support for new encryption types by adding empty keys

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

commit 075f061ca337d516a82b0fb19b001ff8cff61915
Author: Stefan Metzmacher 
Date:   Tue Nov 7 12:23:31 2017 +0100

TODO s4:kdc: msDS-SupportedEncryptionTypes only on computers

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

commit 7d0559e0eb5d533a5f5764a39d04fb05d8d34633
Author: Stefan Metzmacher 
Date:   Tue Nov 7 18:03:45 2017 +0100

s4:kdc: use the strongest possible tgs session key

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

Signed-off-by: Stefan Metzmacher 

commit 2a7392d3b216d4a79d81fd6a31bb2294b70c9a35
Author: Stefan Metzmacher 
Date:   Tue Nov 7 15:47:25 2017 +0100

HEIMDAL:hdb: export a hdb_enctype_supported() helper function

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

Signed-off-by: Stefan Metzmacher 

commit 8ac00b066c893f9da5ac44f9391e41ad018d08bc
Author: Stefan Metzmacher 
Date:   Wed Nov 8 11:57:08 2017 +0100

HEIMDAL:kdc: let _kdc_encode_reply() use the encryption type based on the 
server key

Currently the value is the same anyway as the session key is always of the
same type as server key up to now, but that will change shortly.

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

Signed-off-by: Stefan Metzmacher 

commit 9f3571aa20a209901c6ab7c776200afeac54eca4
Author: Stefan Metzmacher 
Date:   Thu Sep 28 14:51:43 2017 +0200

s4:kdc: fix the principal names in samba_kdc_update_delegation_info_blob

We need the target service without realm, but the proxy services with realm.

I have a domain with an w2008r2 server and a samba and now both generate
the same S4U_DELEGATION_INFO.

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

Signed-off-by: Stefan Metzmacher 

commit 312bf1c331038059698d14d7026387079a49bb61
Author: Stefan 

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

2018-02-14 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  2ed8741 VERSION: Bump version up to 4.6.14...
   via  fd09a02 VERSION: Disable GIT_SNAPSHOT for the 4.6.13 release.
   via  38e71ba WHATSNEW: Add release notes for Samba 4.6.13.
  from  666c680 build: fix ceph_statx check when configured with 
libcephfs_dir

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


- Log -
commit 2ed874196b73fce0e2376f0a4237f9986413e95f
Author: Karolin Seeger 
Date:   Tue Feb 13 11:45:24 2018 +0100

VERSION: Bump version up to 4.6.14...

and re-enable GIT_SNAPSHOT.

Signed-off-by: Karolin Seeger 

commit fd09a022d00cd3a816f508f9df217e41be295d18
Author: Karolin Seeger 
Date:   Tue Feb 13 11:44:18 2018 +0100

VERSION: Disable GIT_SNAPSHOT for the 4.6.13 release.

Signed-off-by: Karolin Seeger 

commit 38e71baaba3fd2bdebba246e22b6326c5c30da80
Author: Karolin Seeger 
Date:   Tue Feb 13 11:43:43 2018 +0100

WHATSNEW: Add release notes for Samba 4.6.13.

Signed-off-by: Karolin Seeger 

---

Summary of changes:
 VERSION  |  2 +-
 WHATSNEW.txt | 74 ++--
 2 files changed, 73 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/VERSION b/VERSION
index 43168e5..db0b93d 100644
--- a/VERSION
+++ b/VERSION
@@ -25,7 +25,7 @@
 
 SAMBA_VERSION_MAJOR=4
 SAMBA_VERSION_MINOR=6
-SAMBA_VERSION_RELEASE=13
+SAMBA_VERSION_RELEASE=14
 
 
 # If a official release has a serious bug  #
diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index a759fa9..992007d 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -1,4 +1,74 @@
==
+   Release Notes for Samba 4.6.13
+ February 14, 2017
+   =
+
+
+This is the latest stable release of the Samba 4.6 release series.
+
+
+Changes since 4.6.12:
+-
+
+o  Jeremy Allison 
+   * BUG 13193: s3: smbd: Use identical logic to test for kernel oplocks on a
+ share.
+
+o  Love Hornquist Astrand 
+   * BUG 12986: Kerberos: PKINIT: Can't decode algorithm parameters in
+ clientPublicValue.
+
+o  Ralph Boehme 
+   * BUG 13181: vfs_fruit: Fail to copy file with empty FinderInfo from Windows
+ client to Samba share with fruit.
+
+o  David Disseldorp 
+   * BUG 13208: vfs_default: Use VFS statvfs macro in fs_capabilities.
+   * BUG 13250: build: Fix ceph_statx check when configured with libcephfs_dir.
+
+o  Amitay Isaacs 
+   * BUG 13188: ctdb-recovery-helper: Deregister message handler in error
+ paths.
+
+o  Christof Schmitt 
+   * BUG 13189: smbd: Fix coredump on failing chdir during logoff.
+
+o  Stefan Metzmacher 
+   * BUG 12986: Kerberos: PKINIT: Can't decode algorithm parameters in
+ clientPublicValue.
+   * BUG 13132: s4:kdc: Only map SDB_ERR_NOT_FOUND_HERE to
+ HDB_ERR_NOT_FOUND_HERE.
+   * BUG 13195: g_lock: fix cleanup of stale entries in g_lock_trylock().
+
+o  Uri Simchoni 
+   * BUG 13176: Fix POSIX ACL support on hpux and possibly other
+ big-endian OSs.
+
+
+###
+Reporting bugs & Development Discussion
+###
+
+Please discuss this release on the samba-technical mailing list or by
+joining the #samba-technical IRC channel on irc.freenode.net.
+
+If you do report problems then please try to send high quality
+feedback. If you don't provide vital information to help us track down
+the problem then you will probably be ignored.  All bug reports should
+be filed under the "Samba 4.1 and newer" product in the project's Bugzilla
+database (https://bugzilla.samba.org/).
+
+
+==
+== Our Code, Our Bugs, Our Responsibility.
+== The Samba Team
+==
+
+
+Release notes for older releases follow:
+
+
+   ==
Release Notes for Samba 4.6.12
   December 20, 2017
=
@@ -90,8 +160,8 @@ database (https://bugzilla.samba.org/).
 ==
 
 
-Release notes for older releases follow:
-
+--
+
 
   

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

2018-02-13 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  666c680 build: fix ceph_statx check when configured with 
libcephfs_dir
  from  3015558 vfs_fruit: set delete-on-close for empty finderinfo

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


- Log -
commit 666c6802cbe148356b1b2b19893ce43d3521343a
Author: David Disseldorp 
Date:   Thu Jul 20 11:10:57 2017 +0200

build: fix ceph_statx check when configured with libcephfs_dir

When configured with a custom libcephfs_dir, the ceph_statx check fails
to link. This is due to the location of the ceph-common dependency,
which is installed under a ceph subdirectory.

ceph/build > make DESTDIR=./inst install
...
ceph/build > find inst/|grep -e /libcephfs -e /libceph-common
inst/usr/local/lib64/ceph/libceph-common.so.0
inst/usr/local/lib64/ceph/libceph-common.so
inst/usr/local/lib64/libcephfs.so.2.0.0
inst/usr/local/lib64/libcephfs.so.2
inst/usr/local/lib64/libcephfs.so
inst/usr/local/include/cephfs/libcephfs.h

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

Signed-off-by: David Disseldorp 
Reviewed-by: Jeff Layton 

(cherry picked from commit ff7df3d3f5259362a6bb6780d6b532e57e89681d)

Autobuild-User(v4-6-test): Karolin Seeger 
Autobuild-Date(v4-6-test): Tue Feb 13 13:36:13 CET 2018 on sn-devel-144

---

Summary of changes:
 source3/wscript | 9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/wscript b/source3/wscript
index 33eb599..06fbf8c 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -1578,11 +1578,16 @@ main() {
 if Options.options.libcephfs_dir:
 conf.env['CPPPATH_CEPHFS'] = Options.options.libcephfs_dir + '/include'
 conf.env['LIBPATH_CEPHFS'] = Options.options.libcephfs_dir + '/lib'
+conf.env['LIBPATH_CEPH-COMMON'] = Options.options.libcephfs_dir + 
'/lib/ceph'
 
-if conf.CHECK_HEADERS('cephfs/libcephfs.h', False, False, 'cephfs') and 
conf.CHECK_LIB('cephfs', shlib=True) and Options.options.with_cephfs:
+if (Options.options.with_cephfs and
+conf.CHECK_HEADERS('cephfs/libcephfs.h', False, False, 'cephfs') and
+conf.CHECK_LIB('cephfs', shlib=True) and
+conf.CHECK_LIB('ceph-common', shlib=True)):
 if Options.options.with_acl_support:
 conf.DEFINE('HAVE_CEPH', '1')
-if conf.CHECK_FUNCS_IN('ceph_statx', 'cephfs', 
headers='cephfs/libcephfs.h'):
+if conf.CHECK_FUNCS_IN('ceph_statx', 'cephfs ceph-common',
+   headers='cephfs/libcephfs.h'):
 conf.DEFINE('HAVE_CEPH_STATX', '1')
 else:
 Logs.warn("ceph support disabled due to --without-acl-support")


-- 
Samba Shared Repository



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

2018-01-25 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  3015558 vfs_fruit: set delete-on-close for empty finderinfo
   via  9e47e9e vfs_fruit: filter out AFP_AfpInfo streams with pending 
delete-on-close
   via  c1e0396 vfs_fruit: factor out delete_invalid_meta_stream() from 
fruit_streaminfo_meta_stream()
   via  d95b278 s4/torture/fruit: enhance zero AFP_AfpInfo stream test
   via  26da45b s4/torture/fruit: ensure AFP_AfpInfo blobs are 0-initialized
  from  21d0446 vfs_default: use VFS statvfs macro in fs_capabilities

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


- Log -
commit 301555830d97521f5b64a6ad20aad0aae6ccc3db
Author: Ralph Boehme 
Date:   Wed Dec 6 22:09:52 2017 +0100

vfs_fruit: set delete-on-close for empty finderinfo

We previously removed the stream from the underlying filesystem stream
backing store when the client zeroes out FinderInfo in the AFP_AfpInfo
stream, but this causes certain operations to fail (eg stat) when trying
to access the stream over any file-handle open on that stream.

So instead of deleting, set delete-on-close on the stream. The previous
commit already implemented not to list list streams with delete-on-close
set which is necessary to implemenent correct macOS semantics for this
particular stream.

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

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

Autobuild-User(master): Ralph Böhme 
Autobuild-Date(master): Tue Jan  9 17:09:12 CET 2018 on sn-devel-144

(backported from commit e61e9e98e9ff461055daae2fe78f0202f7ed8663)

Autobuild-User(v4-6-test): Karolin Seeger 
Autobuild-Date(v4-6-test): Thu Jan 25 19:25:24 CET 2018 on sn-devel-144

commit 9e47e9e28c47924374bff7825c0d554623a6616e
Author: Ralph Boehme 
Date:   Thu Dec 7 17:32:35 2017 +0100

vfs_fruit: filter out AFP_AfpInfo streams with pending delete-on-close

This is in preperation of fixing the implementation of removing the
AFP_AfpInfo stream by zeroing the FinderInfo out.

We currently remove the stream blob from the underyling filesystem
backing store, but that results in certain operations to fail on any
still open file-handle.

The fix comes in the next commit which will convert to backing store
delete operation to a set delete-on-close on the stream.

This commit adds filtering on streams that have the delete-on-close
set. It is only needed for the fruit:metadata=stream case, as with
fruit:metadata=netatalk the filtering is already done in
fruit_streaminfo_meta_netatalk().

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

Signed-off-by: Ralph Boehme 
Reviewed-by: Jeremy Allison 
(cherry picked from commit 70d8f7c5d25f35b58620c2db8f57c7c0758267b3)

commit c1e0396bcb1881967c5be82eb3e8101a81ed6829
Author: Ralph Boehme 
Date:   Thu Dec 7 14:56:36 2017 +0100

vfs_fruit: factor out delete_invalid_meta_stream() from 
fruit_streaminfo_meta_stream()

No change in behaviour, just some refactoring before adding more code to
fruit_streaminfo_meta_stream() in the next commit.

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

Signed-off-by: Ralph Boehme 
Reviewed-by: Jeremy Allison 
(backported from commit c41e1ea9247611473d30184efd953c61955ead15)

commit d95b278b00520483c64ff2d899966d078cf1b17b
Author: Ralph Boehme 
Date:   Thu Dec 7 13:43:02 2017 +0100

s4/torture/fruit: enhance zero AFP_AfpInfo stream test

This test more operations in the zeroed out FinderInfo test, ensuring
after zeroing out FinderInfo, operations on the filehandle still work
and that enumerating streams doesn't return the stream anymore.

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

Signed-off-by: Ralph Boehme 
Reviewed-by: Jeremy Allison 
(backported from commit df31e94eb6241f5e5594f6fd0ec1ad7896e02e27)

commit 26da45be00c614b553125949b75d1bc4f27b6d6b
Author: Ralph Boehme 
Date:   Wed Dec 6 22:05:23 2017 +0100

s4/torture/fruit: ensure AFP_AfpInfo blobs are 0-initialized

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

Signed-off-by: Ralph Boehme 
Reviewed-by: Jeremy Allison 
(cherry picked from commit a22833c2971dc7234b32741305f40ed62e232e0b)

---

Summary of changes:
 source3/modules/vfs_fruit.c | 172 ++--
 source4/torture/vfs/fruit.c |  89 +--
 2 files changed, 218 

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

2018-01-22 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  21d0446 vfs_default: use VFS statvfs macro in fs_capabilities
   via  a6b780c vfs_ceph: add fs_capabilities hook to avoid local statvfs
  from  579b6a4 s3: smbd: Use identical logic to test for kernel oplocks on 
a share.

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


- Log -
commit 21d0446c4811f2f066b549232ddd27b353a8c633
Author: David Disseldorp 
Date:   Wed Jan 10 14:03:09 2018 +0100

vfs_default: use VFS statvfs macro in fs_capabilities

Currently the vfs_default fs_capabilities handler calls statvfs
directly, rather than calling the vfs macro. This behaviour may cause
issues for VFS modules that delegate fs_capabilities handling to
vfs_default but offer their own statvfs hook.

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

Signed-off-by: David Disseldorp 
Reviewed-by: Jeremy Allison 
(cherry picked from commit 4b25c9f4a4d336a16894452862ea059701b025de)

Autobuild-User(v4-6-test): Karolin Seeger 
Autobuild-Date(v4-6-test): Mon Jan 22 13:14:03 CET 2018 on sn-devel-144

commit a6b780c52b251505e50607d6f77f57330b830b00
Author: David Disseldorp 
Date:   Wed Jan 10 01:37:14 2018 +0100

vfs_ceph: add fs_capabilities hook to avoid local statvfs

Adding the fs_capabilities() hook to the CephFS VFS module avoids
fallback to the vfs_default code-path, which calls statvfs() against the
share path on the *local* filesystem.

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

Signed-off-by: David Disseldorp 
Reviewed-by: Jeremy Allison 
(cherry picked from commit 2724e0cac29cd1632ea28075a740fcc888affb36)

---

Summary of changes:
 source3/modules/vfs_ceph.c| 15 +++
 source3/modules/vfs_default.c | 14 +++---
 2 files changed, 22 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_ceph.c b/source3/modules/vfs_ceph.c
index e3d22bf..2842647 100644
--- a/source3/modules/vfs_ceph.c
+++ b/source3/modules/vfs_ceph.c
@@ -251,6 +251,20 @@ static int cephwrap_statvfs(struct vfs_handle_struct 
*handle,  const char *path,
return ret;
 }
 
+static uint32_t cephwrap_fs_capabilities(struct vfs_handle_struct *handle,
+enum timestamp_set_resolution 
*p_ts_res)
+{
+   uint32_t caps = FILE_CASE_SENSITIVE_SEARCH | FILE_CASE_PRESERVED_NAMES;
+
+#ifdef HAVE_CEPH_STATX
+   *p_ts_res = TIMESTAMP_SET_NT_OR_BETTER;
+#else
+   *p_ts_res = TIMESTAMP_SET_MSEC;
+#endif
+
+   return caps;
+}
+
 /* Directory operations */
 
 static DIR *cephwrap_opendir(struct vfs_handle_struct *handle,
@@ -1339,6 +1353,7 @@ static struct vfs_fn_pointers ceph_fns = {
.get_quota_fn = cephwrap_get_quota,
.set_quota_fn = cephwrap_set_quota,
.statvfs_fn = cephwrap_statvfs,
+   .fs_capabilities_fn = cephwrap_fs_capabilities,
 
/* Directory operations */
 
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index ce1b6e2..4889591 100644
--- a/source3/modules/vfs_default.c
+++ b/source3/modules/vfs_default.c
@@ -121,8 +121,14 @@ static uint32_t vfswrap_fs_capabilities(struct 
vfs_handle_struct *handle,
struct vfs_statvfs_struct statbuf;
int ret;
 
+   smb_fname_cpath = synthetic_smb_fname(talloc_tos(), conn->connectpath,
+ NULL, NULL, 0);
+   if (smb_fname_cpath == NULL) {
+   return caps;
+   }
+
ZERO_STRUCT(statbuf);
-   ret = sys_statvfs(conn->connectpath, );
+   ret = SMB_VFS_STATVFS(conn, conn->connectpath, );
if (ret == 0) {
caps = statbuf.FsCapabilities;
}
@@ -132,12 +138,6 @@ static uint32_t vfswrap_fs_capabilities(struct 
vfs_handle_struct *handle,
/* Work out what timestamp resolution we can
 * use when setting a timestamp. */
 
-   smb_fname_cpath = synthetic_smb_fname(talloc_tos(), conn->connectpath,
- NULL, NULL, 0);
-   if (smb_fname_cpath == NULL) {
-   return caps;
-   }
-
ret = SMB_VFS_STAT(conn, smb_fname_cpath);
if (ret == -1) {
TALLOC_FREE(smb_fname_cpath);


-- 
Samba Shared Repository



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

2018-01-05 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  579b6a4 s3: smbd: Use identical logic to test for kernel oplocks on 
a share.
  from  6ba6125 smbd: Fix coredump on failing chdir during logoff

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


- Log -
commit 579b6a4f603c97480a319353dcd7319dcbcb521e
Author: Jeremy Allison 
Date:   Wed Jan 3 09:52:33 2018 -0800

s3: smbd: Use identical logic to test for kernel oplocks on a share.

Due to inconsistent use of lp_kernel_oplocks() we could miss kernel
oplocks being on/off in some of our oplock handling code, and thus
use the wrong logic.

Ensure all logic around koplocks and lp_kernel_oplocks() is consistent.

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

Signed-off-by: Jeremy Allison 
Reviewed-by: Volker Lendecke 

Autobuild-User(master): Volker Lendecke 
Autobuild-Date(master): Thu Jan  4 16:03:38 CET 2018 on sn-devel-144

(cherry picked from commit 114f5da2fab6f587de77e792274b396fb3d7ce71)

Autobuild-User(v4-6-test): Karolin Seeger 
Autobuild-Date(v4-6-test): Fri Jan  5 13:40:55 CET 2018 on sn-devel-144

---

Summary of changes:
 source3/smbd/oplock.c | 25 ++---
 1 file changed, 18 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/oplock.c b/source3/smbd/oplock.c
index d30de6a..dc11598 100644
--- a/source3/smbd/oplock.c
+++ b/source3/smbd/oplock.c
@@ -55,7 +55,8 @@ NTSTATUS set_file_oplock(files_struct *fsp)
 {
struct smbd_server_connection *sconn = fsp->conn->sconn;
struct kernel_oplocks *koplocks = sconn->oplocks.kernel_ops;
-   bool use_kernel = lp_kernel_oplocks(SNUM(fsp->conn)) && koplocks;
+   bool use_kernel = lp_kernel_oplocks(SNUM(fsp->conn)) &&
+   (koplocks != NULL);
 
if (fsp->oplock_type == LEVEL_II_OPLOCK) {
if (use_kernel &&
@@ -97,7 +98,8 @@ static void release_file_oplock(files_struct *fsp)
 {
struct smbd_server_connection *sconn = fsp->conn->sconn;
struct kernel_oplocks *koplocks = sconn->oplocks.kernel_ops;
-   bool use_kernel = lp_kernel_oplocks(SNUM(fsp->conn)) && koplocks;
+   bool use_kernel = lp_kernel_oplocks(SNUM(fsp->conn)) &&
+   (koplocks != NULL);
 
if ((fsp->oplock_type != NO_OPLOCK) &&
use_kernel) {
@@ -130,13 +132,15 @@ static void downgrade_file_oplock(files_struct *fsp)
 {
struct smbd_server_connection *sconn = fsp->conn->sconn;
struct kernel_oplocks *koplocks = sconn->oplocks.kernel_ops;
+   bool use_kernel = lp_kernel_oplocks(SNUM(fsp->conn)) &&
+   (koplocks != NULL);
 
if (!EXCLUSIVE_OPLOCK_TYPE(fsp->oplock_type)) {
DEBUG(0, ("trying to downgrade an already-downgraded 
oplock!\n"));
return;
}
 
-   if (koplocks) {
+   if (use_kernel) {
koplocks->ops->release_oplock(koplocks, fsp, LEVEL_II_OPLOCK);
}
fsp->oplock_type = LEVEL_II_OPLOCK;
@@ -728,12 +732,14 @@ static void add_oplock_timeout_handler(files_struct *fsp)
 {
struct smbd_server_connection *sconn = fsp->conn->sconn;
struct kernel_oplocks *koplocks = sconn->oplocks.kernel_ops;
+   bool use_kernel = lp_kernel_oplocks(SNUM(fsp->conn)) &&
+   (koplocks != NULL);
 
/*
 * If kernel oplocks already notifies smbds when an oplock break times
 * out, just return.
 */
-   if (koplocks &&
+   if (use_kernel &&
(koplocks->flags & KOPLOCKS_TIMEOUT_NOTIFICATION)) {
return;
}
@@ -844,7 +850,8 @@ static void process_oplock_break_message(struct 
messaging_context *msg_ctx,
break_to &= ~SMB2_LEASE_READ;
}
 
-   use_kernel = lp_kernel_oplocks(SNUM(fsp->conn)) && koplocks;
+   use_kernel = lp_kernel_oplocks(SNUM(fsp->conn)) &&
+   (koplocks != NULL);
if (use_kernel && !(koplocks->flags & KOPLOCKS_LEVEL2_SUPPORTED)) {
DEBUG(10, ("Kernel oplocks don't allow level2\n"));
break_to &= ~SMB2_LEASE_READ;
@@ -1254,8 +1261,10 @@ void smbd_contend_level2_oplocks_begin(files_struct *fsp,
 {
struct smbd_server_connection *sconn = fsp->conn->sconn;
struct kernel_oplocks *koplocks = sconn->oplocks.kernel_ops;
+   bool use_kernel = lp_kernel_oplocks(SNUM(fsp->conn)) &&
+   (koplocks != NULL);
 
-   if (koplocks && koplocks->ops->contend_level2_oplocks_begin) {
+   if (use_kernel && koplocks->ops->contend_level2_oplocks_begin) {
koplocks->ops->contend_level2_oplocks_begin(fsp, type);

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

2018-01-02 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  6ba6125 smbd: Fix coredump on failing chdir during logoff
   via  60eb51d selftest: Add test for failing chdir call in smbd
   via  e6ec5ae selftest: Make location of log file available in tests
   via  90d87d4 selftest: Add share for error injection testing
   via  919d16e vfs_error_inject: Add new module
   via  d932fcf ctdb-recovery-helper: Deregister message handler in error 
paths
   via  a3dc640 sysacls: change datatypes to 32 bits
   via  e64528a pysmbd: fix use of sysacl API
  from  f502340 HEIMDAL:kdc: fix dh->q allocation check in get_dh_param()

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


- Log -
commit 6ba61252745b097ab73b78534e227660d564ca11
Author: Christof Schmitt 
Date:   Wed Dec 13 11:34:23 2017 -0700

smbd: Fix coredump on failing chdir during logoff

server_exit does an internal tree disconnect which requires a chdir to
the share directory. In case the file system encountered a problem and
the chdir call returns an error, this triggers a SERVER_EXIT_ABNORMAL
which in turn results in a panic and a coredump. As the log already
indicates the problem (chdir returned an error), avoid the
SERVER_EXIT_ABNORMAL in this case and not trigger a coredump.

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

Signed-off-by: Christof Schmitt 
Reviewed-by: Jeremy Allison 

Autobuild-User(master): Jeremy Allison 
Autobuild-Date(master): Sat Dec 16 01:56:06 CET 2017 on sn-devel-144

(cherry picked from commit 7fa91fc4791d076c609eaf119753e38dd3c50a1c)

Autobuild-User(v4-6-test): Karolin Seeger 
Autobuild-Date(v4-6-test): Tue Jan  2 14:01:29 CET 2018 on sn-devel-144

commit 60eb51d6e6c23636e64fb21ece88a484679a753e
Author: Christof Schmitt 
Date:   Wed Dec 13 12:58:18 2017 -0700

selftest: Add test for failing chdir call in smbd

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

Signed-off-by: Christof Schmitt 
Reviewed-by: Jeremy Allison 
(cherry picked from commit 0d3000be2af8f8c4a37892d95ae694ad834d7b3a)

commit e6ec5ae88258ab1ec8d8bc3023b852f1939eae90
Author: Christof Schmitt 
Date:   Wed Dec 13 12:47:31 2017 -0700

selftest: Make location of log file available in tests

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

Signed-off-by: Christof Schmitt 
Reviewed-by: Jeremy Allison 
(cherry picked from commit b0e1fc74fdacecb86f46b47e527b3fdf1906d27b)

commit 90d87d4b9c557a8c60edbd1ba26680df29d5640c
Author: Christof Schmitt 
Date:   Wed Dec 13 11:34:05 2017 -0700

selftest: Add share for error injection testing

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

Signed-off-by: Christof Schmitt 
Reviewed-by: Jeremy Allison 
(cherry picked from commit 8b6402f3e5ff98c2701e626e47246b2400f76e5f)

commit 919d16e3f3c586c1c8785e1104221019dad733d0
Author: Christof Schmitt 
Date:   Fri Dec 8 15:29:07 2017 -0700

vfs_error_inject: Add new module

This module allow injecting errors in vfs calls. It only implements one
case (return ESTALE from chdir), but the idea is to extend this to more
vfs functions and more errors when needed.

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

Signed-off-by: Christof Schmitt 
Signed-off-by: Andrew Bartlett 
Reviewed-by: Jeremy Allison 
(cherry picked from commit 24623d53256c2424563709dedc19af1a106ccc73)

commit d932fcf6c0177e038272c37f4704c6e92cf0cab6
Author: Amitay Isaacs 
Date:   Wed Dec 13 16:12:09 2017 +1100

ctdb-recovery-helper: Deregister message handler in error paths

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

If PULL_DB control times out but the remote node is still sending the
data, then the tevent_req for pull_database_send will be freed without
removing the message handler.  So when the data is received, srvid
handler will be called and it will try to access tevent_req which will
result in use-after-free and abort.

Signed-off-by: Amitay Isaacs 
Reviewed-by: Martin Schwenke 

commit a3dc640c9d5978f3746c570ca9e34c1c57fa83bc
Author: Uri Simchoni 
Date:   Tue Dec 5 20:56:49 2017 +0200

sysacls: change datatypes to 32 bits

The SMB_ACL_PERMSET_T and SMB_ACL_PERM_T were defined as
mode_t, which is 16-bits on some (non-Linux) systems. However,
pidl *always* encodes mode_t as uint32_t. That created a bug on
big-endian systems as 

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

2017-12-23 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  f502340 HEIMDAL:kdc: fix dh->q allocation check in get_dh_param()
   via  c6dfb4e HEIMDAL: don't bother seeing q if not sent
   via  03c69a5 HEIMDAL: allow optional q in DH DomainParameters
  from  f69814f g_lock: fix cleanup of stale entries in g_lock_trylock()

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


- Log -
commit f502340923f089f9ac4fa060dc21471b59c29c56
Author: Stefan Metzmacher 
Date:   Tue Aug 29 07:24:35 2017 +0200

HEIMDAL:kdc: fix dh->q allocation check in get_dh_param()

Thanks to Doug Nazar  for spotting this!

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

Signed-off-by: Stefan Metzmacher 
(cherry picked from heimdal commit a79b59ba27070a015479e8d981b7e685dbe34310)
Reviewed-by: Andreas Schneider 

(cherry picked from commit 183e5d1e3dc306491c06f94c8c98e4882c64bc27)

Autobuild-User(v4-6-test): Karolin Seeger 
Autobuild-Date(v4-6-test): Sun Dec 24 01:15:07 CET 2017 on sn-devel-144

commit c6dfb4e1cc5decc61589865ba5e8e1fa4378ee5f
Author: Love Hornquist Astrand 
Date:   Mon Apr 29 11:42:46 2013 -0700

HEIMDAL: don't bother seeing q if not sent

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

Reviewed-by: Stefan Metzmacher 
Reviewed-by: Andrew Bartlett 
(cherry picked from heimdal commit 19f9fdbcea11013cf13ac72c416f161ee55dee2b)

Autobuild-User(master): Andrew Bartlett 
Autobuild-Date(master): Mon Aug 28 15:10:54 CEST 2017 on sn-devel-144

(cherry picked from commit dd3e06f14ec1788a59e4c6ba4ea165fd77b9135e)

commit 03c69a536d0d2ea74683a013042d278fc87698c7
Author: Love Hornquist Astrand 
Date:   Mon Apr 29 11:37:39 2013 -0700

HEIMDAL: allow optional q in DH DomainParameters

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

Reviewed-by: Stefan Metzmacher 
Reviewed-by: Andrew Bartlett 
(cherry picked from heimdal commit e8317b955f5a390c4f296871ba6987ad05478c95)

(cherry picked from commit 9f245aafdca8397df7dc050e25cfd858aeb1cc7f)

---

Summary of changes:
 source4/heimdal/kdc/pkinit.c  | 11 +++
 source4/heimdal/lib/asn1/rfc2459.asn1 |  2 +-
 source4/heimdal/lib/krb5/pkinit.c |  7 ++-
 3 files changed, 14 insertions(+), 6 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/heimdal/kdc/pkinit.c b/source4/heimdal/kdc/pkinit.c
index d85b156..ad7f3ef 100644
--- a/source4/heimdal/kdc/pkinit.c
+++ b/source4/heimdal/kdc/pkinit.c
@@ -361,7 +361,7 @@ get_dh_param(krb5_context context,
 }
 
 ret = _krb5_dh_group_ok(context, config->pkinit_dh_min_bits,
-   , , , moduli,
+   , , dhparam.q, moduli,
_params->dh_group_name);
 if (ret) {
/* XXX send back proposal of better group */
@@ -381,9 +381,12 @@ get_dh_param(krb5_context context,
 dh->g = integer_to_BN(context, "DH base", );
 if (dh->g == NULL)
goto out;
-dh->q = integer_to_BN(context, "DH p-1 factor", );
-if (dh->g == NULL)
-   goto out;
+
+if (dhparam.q) {
+   dh->q = integer_to_BN(context, "DH p-1 factor", dhparam.q);
+   if (dh->q == NULL)
+   goto out;
+}
 
 {
heim_integer glue;
diff --git a/source4/heimdal/lib/asn1/rfc2459.asn1 
b/source4/heimdal/lib/asn1/rfc2459.asn1
index 5df9e41..d6c273d 100644
--- a/source4/heimdal/lib/asn1/rfc2459.asn1
+++ b/source4/heimdal/lib/asn1/rfc2459.asn1
@@ -239,7 +239,7 @@ ValidationParms ::= SEQUENCE {
 DomainParameters ::= SEQUENCE {
p   INTEGER, -- odd prime, p=jq +1
g   INTEGER, -- generator, g
-   q   INTEGER, -- factor of p-1
+   q   INTEGER OPTIONAL, -- factor of p-1
j   INTEGER OPTIONAL, -- subgroup factor
validationParms ValidationParms OPTIONAL -- ValidationParms
 }
diff --git a/source4/heimdal/lib/krb5/pkinit.c 
b/source4/heimdal/lib/krb5/pkinit.c
index 1103a17..c30a298 100644
--- a/source4/heimdal/lib/krb5/pkinit.c
+++ b/source4/heimdal/lib/krb5/pkinit.c
@@ -497,7 +497,12 @@ build_auth_pack(krb5_context context,
free_DomainParameters();
return ret;
}
-   ret = BN_to_integer(context, dh->q, );
+   dp.q = calloc(1, sizeof(*dp.q));
+   if (dp.q == NULL) {
+   free_DomainParameters();
+   return ENOMEM;
+   }
+   ret = BN_to_integer(context, dh->q, dp.q);
if (ret) {
free_DomainParameters();
return 

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

2017-12-22 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  f69814f g_lock: fix cleanup of stale entries in g_lock_trylock()
   via  e39dcec s4:kdc: only map SDB_ERR_NOT_FOUND_HERE to 
HDB_ERR_NOT_FOUND_HERE
  from  51fb772 VERSION: Bump version up to 4.6.13...

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


- Log -
commit f69814f0350396a3d7aac1324c2eb71bc8068f69
Author: Stefan Metzmacher 
Date:   Wed Dec 20 08:25:19 2017 +0100

g_lock: fix cleanup of stale entries in g_lock_trylock()

g_lock_trylock() always incremented the counter 'i', even after cleaning a 
stale
entry at position 'i', which means it skipped checking for a conflict 
against
the new entry at position 'i'.

As result a process could get a write lock, while there're still
some read lock holders. Once we get into that problem, also more than
one write lock are possible.

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

Signed-off-by: Stefan Metzmacher 
Reviewed-by: Volker Lendecke 

Autobuild-User(master): Volker Lendecke 
Autobuild-Date(master): Wed Dec 20 20:31:48 CET 2017 on sn-devel-144
(similar to commit 576fb4fb5dc506bf55e5cf87973999dca444149b)

Autobuild-User(v4-6-test): Karolin Seeger 
Autobuild-Date(v4-6-test): Fri Dec 22 22:11:00 CET 2017 on sn-devel-144

commit e39dcec5e146dafaa47fbf64cfee96356a3ee8c1
Author: Stefan Metzmacher 
Date:   Thu Sep 21 12:02:25 2017 +0200

s4:kdc: only map SDB_ERR_NOT_FOUND_HERE to HDB_ERR_NOT_FOUND_HERE

HDB_ERR_NOT_FOUND_HERE indicated a very specific error on an RODC.

We should not map any error to HDB_ERR_NOT_FOUND_HERE,
we should just pass errors along unmapped.

Otherwise we'll hit the logic bug in:

if (ret == KDC_PROXY_REQUEST) {
uint16_t port;

if (!sock->kdc_socket->kdc->am_rodc) {
DEBUG(0,("kdc_udp_call_loop: proxying requested when not 
RODC"));
talloc_free(call);
goto done;
}

And just don't send an error message to the client.

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

Signed-off-by: Stefan Metzmacher 
Reviewed-by: Andreas Schneider 

Autobuild-User(master): Andreas Schneider 
Autobuild-Date(master): Wed Dec  6 23:16:54 CET 2017 on sn-devel-144

(cherry picked from commit aaa946bb9eb8088389b8ffdec460023f1961616c)

---

Summary of changes:
 source3/lib/g_lock.c |  6 +-
 source4/kdc/hdb-samba4.c | 24 ++--
 2 files changed, 23 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/lib/g_lock.c b/source3/lib/g_lock.c
index f954978..6a661cd 100644
--- a/source3/lib/g_lock.c
+++ b/source3/lib/g_lock.c
@@ -133,7 +133,9 @@ static NTSTATUS g_lock_trylock(struct db_record *rec, 
struct server_id self,
return NT_STATUS_INTERNAL_ERROR;
}
 
-   for (i=0; i

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

2017-12-20 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  51fb772 VERSION: Bump version up to 4.6.13...
  from  1377b56 VERSION: Disable GIT_SNAPSHOT for the 4.6.12 release.

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


- Log -
commit 51fb772b3b3107a05a8139796b50e2d991213f74
Author: Karolin Seeger 
Date:   Wed Dec 20 21:33:54 2017 +0100

VERSION: Bump version up to 4.6.13...

and re-enable GIT_SNAPSHOT.

Signed-off-by: Karolin Seeger 

---

Summary of changes:
 VERSION | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/VERSION b/VERSION
index 0c4ca38..43168e5 100644
--- a/VERSION
+++ b/VERSION
@@ -25,7 +25,7 @@
 
 SAMBA_VERSION_MAJOR=4
 SAMBA_VERSION_MINOR=6
-SAMBA_VERSION_RELEASE=12
+SAMBA_VERSION_RELEASE=13
 
 
 # If a official release has a serious bug  #
@@ -99,7 +99,7 @@ SAMBA_VERSION_RC_RELEASE=
 # e.g. SAMBA_VERSION_IS_SVN_SNAPSHOT=yes   #
 #  ->  "3.0.0-SVN-build-199"   #
 
-SAMBA_VERSION_IS_GIT_SNAPSHOT=no
+SAMBA_VERSION_IS_GIT_SNAPSHOT=yes
 
 
 # This is for specifying a release nickname#


-- 
Samba Shared Repository



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

2017-12-20 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  1377b56 VERSION: Disable GIT_SNAPSHOT for the 4.6.12 release.
   via  d665971 WHATSNEW: Add release notes for Samba 4.6.12.
  from  d9aaf8d messaging: Always register the unique id

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


- Log -
commit 1377b56d38f17ee1981b4bde8defb9d759f60c50
Author: Karolin Seeger 
Date:   Wed Dec 20 21:30:24 2017 +0100

VERSION: Disable GIT_SNAPSHOT for the 4.6.12 release.

Signed-off-by: Karolin Seeger 

commit d6659710304947e9e5a639161acd26462bd07fa2
Author: Karolin Seeger 
Date:   Wed Dec 20 21:29:41 2017 +0100

WHATSNEW: Add release notes for Samba 4.6.12.

Signed-off-by: Karolin Seeger 

---

Summary of changes:
 VERSION  |  2 +-
 WHATSNEW.txt | 99 ++--
 2 files changed, 98 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/VERSION b/VERSION
index 7051e63..0c4ca38 100644
--- a/VERSION
+++ b/VERSION
@@ -99,7 +99,7 @@ SAMBA_VERSION_RC_RELEASE=
 # e.g. SAMBA_VERSION_IS_SVN_SNAPSHOT=yes   #
 #  ->  "3.0.0-SVN-build-199"   #
 
-SAMBA_VERSION_IS_GIT_SNAPSHOT=yes
+SAMBA_VERSION_IS_GIT_SNAPSHOT=no
 
 
 # This is for specifying a release nickname#
diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index 8199d91..a759fa9 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -1,4 +1,99 @@
==
+   Release Notes for Samba 4.6.12
+  December 20, 2017
+   =
+
+
+This is the latest stable release of the Samba 4.6 release series.
+
+
+smbclient reparse point symlink parameters reversed
+===
+
+A bug in smbclient caused the 'symlink' command to reverse the
+meaning of the new name and link target parameters when creating a
+reparse point symlink against a Windows server.
+
+This only affects using the smbclient 'symlink' command against
+a Windows server, not a Samba server using the UNIX extensions
+(the parameter order is correct in that case) so no existing
+user scripts that depend on creating symlinks on Samba servers
+need to change.
+
+As this is a little used feature the ordering of these parameters
+has been reversed to match the parameter ordering of the UNIX
+extensions 'symlink' command. This means running 'symlink' against
+both Windows and Samba now uses the same paramter ordering in both
+cases. 
+
+The usage message for this command has also been improved to remove confusion.
+
+
+Changes since 4.6.11:
+-
+
+o  Jeremy Allison 
+   * BUG 13140: s3: smbclient: Implement 'volume' command over SMB2.
+   * BUG 13171: s3: libsmb: Fix valgrind read-after-free error in
+ cli_smb2_close_fnum_recv().
+   * BUG 13172: s3: libsmb: Fix reversing of oldname/newname paths when 
creating
+ a reparse point symlink on Windows from smbclient.
+
+o  Timur I. Bakeyev 
+   * BUG 12934: Build man page for vfs_zfsacl.8 with Samba.
+
+o  Ralph Boehme 
+   * BUG 6133: vfs_zfsacl: Fix compilation error.
+   * BUG 13051: "smb encrypt" setting changes are not fully applied until full
+ smbd restart.
+   * BUG 13052: winbindd: Fix idmap_rid dependency on trusted domain list.
+   * BUG 13155: vfs_fruit: Proper VFS-stackable conversion of FinderInfo.
+
+o  Amitay Isaacs 
+   * BUG 13153: ctdb: sock_daemon leaks memory.
+   * BUG 13154: TCP tickles not getting synchronised on CTDB restart.
+
+o  Volker Lendecke 
+   * BUG 13150: winbindd: Parent and child share a ctdb connection.
+   * BUG 13179: pthreadpool: Fix starvation after fork.
+   * BUG 13180: ctdb: Messaging initialisation for CTDB does not register
+ unique ID.
+
+o  Stefan Metzmacher 
+   * BUG 13149: libnet_join: Fix 'net rpc oldjoin'.
+
+o  Noel Power 
+   * BUG 13166: s3:libads: net ads keytab list fails with "Key table name
+ malformed".
+
+o  Christof Schmitt 
+   * BUG 13170: pthreadpool: Undo put_job when returning error.
+
+
+###
+Reporting bugs & Development Discussion
+###
+
+Please discuss this release on the samba-technical mailing list or by
+joining the #samba-technical IRC channel on irc.freenode.net.
+
+If you do report problems then please try to send high quality
+feedback. If you don't provide vital information to help us track down
+the problem then you will probably be 

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

2017-12-18 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  d9aaf8d messaging: Always register the unique id
  from  1a8c27f pthreadpool: Add a test for the race condition fixed in the 
last commit

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


- Log -
commit d9aaf8d3d6826388072a62e87fecd271a69f3903
Author: Volker Lendecke 
Date:   Thu Nov 30 21:06:53 2017 +0100

messaging: Always register the unique id

The winbind child does not call serverid_register, so the unique id is not
registered. ctdbd_process_exists now calls CTDB_CONTROL_CHECK_PID_SRVID, 
which
then fails.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=13180
Signed-off-by: Volker Lendecke 

Autobuild-User(v4-7-test): Karolin Seeger 
Autobuild-Date(v4-7-test): Fri Dec 15 15:35:25 CET 2017 on sn-devel-144

(cherry picked from commit 1eb08445d96a2c41593719925203f43f881b3567)

Autobuild-User(v4-6-test): Karolin Seeger 
Autobuild-Date(v4-6-test): Mon Dec 18 15:32:49 CET 2017 on sn-devel-144

---

Summary of changes:
 source3/lib/messages_ctdbd.c | 13 +
 1 file changed, 13 insertions(+)


Changeset truncated at 500 lines:

diff --git a/source3/lib/messages_ctdbd.c b/source3/lib/messages_ctdbd.c
index bee2685..b375da2 100644
--- a/source3/lib/messages_ctdbd.c
+++ b/source3/lib/messages_ctdbd.c
@@ -221,6 +221,19 @@ static int messaging_ctdbd_init_internal(struct 
messaging_context *msg_ctx,
return ret;
}
 
+   {
+   struct server_id self = messaging_server_id(msg_ctx);
+
+   ret = register_with_ctdbd(ctx->conn, self.unique_id,
+ NULL, NULL);
+   if (ret != 0) {
+   DBG_DEBUG("register_with_ctdbd failed: %s\n",
+ strerror(ret));
+   return ret;
+   }
+
+   }
+
ctdb_fd = ctdbd_conn_get_fd(ctx->conn);
ev = messaging_tevent_context(msg_ctx);
 


-- 
Samba Shared Repository



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

2017-12-15 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  1a8c27f pthreadpool: Add a test for the race condition fixed in the 
last commit
   via  b181b26 pthreadpool: Fix starvation after fork
  from  7dcc119 winbindd: idmap_rid: error code for failing id-to-sid 
mapping request

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


- Log -
commit 1a8c27f408c84c50ca9b3573988e39c2c5db387f
Author: Volker Lendecke 
Date:   Wed Nov 29 18:55:21 2017 +0100

pthreadpool: Add a test for the race condition fixed in the last commit

Bug: https://bugzilla.samba.org/show_bug.cgi?id=13179
Signed-off-by: Volker Lendecke 
Reviewed-by: Jeremy Allison 
(cherry picked from commit 53f7bbca0451e4f57cdbe8ab4f67f601fe8d40c1)

Autobuild-User(v4-6-test): Karolin Seeger 
Autobuild-Date(v4-6-test): Fri Dec 15 15:22:27 CET 2017 on sn-devel-144

commit b181b26caac8678f4fe1f746f9613b9a0a9e470d
Author: Volker Lendecke 
Date:   Wed Nov 29 16:45:40 2017 +0100

pthreadpool: Fix starvation after fork

After the race is before the race:

1) Create an idle thread
2) Add a job: This won't create a thread anymore
3) Immediately fork

The idle thread will be woken twice before it's actually woken up: Both
pthreadpool_add_job and pthreadpool_prepare_pool call cond_signal, for
different reasons. We must look at pool->prefork_cond first because 
otherwise
we will end up in a blocking job deep within a fork call, the helper thread
must take its fingers off the condvar as quickly as possible.  This means 
that
after the fork there's no idle thread around anymore that would pick up the 
job
submitted in 2). So we must keep the idle threads around across the fork.

The quick solution to re-create one helper thread in pthreadpool_parent has 
a
fatal flaw: What do we do if that pthread_create call fails? We're deep in 
an
application calling fork(), and doing fancy signalling from there is really
something we must avoid.

This has one potential performance issue: If we have hundreds of idle 
threads
(do we ever have that) during the fork, the call to pthread_mutex_lock on 
the
fork_mutex from pthreadpool_server (the helper thread) will probably cause a
thundering herd when the _parent call unlocks the fork_mutex. The solution 
for
this to just keep one idle thread around. But this adds code that is not
strictly required functionally for now.

More detailed explanation from Jeremy:

First, understanding the problem the test reproduces:

add a job (num_jobs = 1) -> creates thread to run it.
job finishes, thread sticks around (num_idle = 1).
num_jobs is now zero (initial job finished).

a) Idle thread is now waiting on pool->condvar inside
pthreadpool_server() in pthread_cond_timedwait().

Now, add another job ->

pthreadpool_add_job()
-> pthreadpool_put_job()
This adds the job to the queue.
Oh, there is an idle thread so don't
create one, do:

pthread_cond_signal(>condvar);

and return.

Now call fork *before* idle thread in (a) wakes from
the signaling of pool->condvar.

In the parent (child is irrelevent):

Go into: pthreadpool_prepare() ->
pthreadpool_prepare_pool()

Set the variable to tell idle threads to exit:

pool->prefork_cond = _cond;

then wake them up with:

pthread_cond_signal(>condvar);

This does nothing as the idle thread
is already awoken.

b) Idle thread wakes up and does:

Reduce idle thread count (num_idle = 0)

pool->num_idle -= 1;

Check if we're in the middle of a fork.

if (pool->prefork_cond != NULL) {

Yes we are, tell pthreadpool_prepare()
we are exiting.

pthread_cond_signal(pool->prefork_cond);

And exit.

pthreadpool_server_exit(pool);
return NULL;
}

So we come back from the fork in the parent with num_jobs = 1,
a job on the queue but no idle threads - and the code that
creates a new thread on job submission was skipped because
an idle thread existed at point (a).

OK, assuming that the previous explaination is correct, the
fix is to create a new pthreadpool context mutex:

pool->fork_mutex

and in pthreadpool_server(), when an idle thread wakes up and
notices we're in the prepare fork 

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

2017-12-14 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  7dcc119 winbindd: idmap_rid: error code for failing id-to-sid 
mapping request
   via  d85e691 winbindd: idmap_rid: don't rely on the static domain list
   via  96cc7e0 winbindd: pass domain SID to wbint_UnixIDs2Sids
   via  e16ef9f winbindd: add domain SID to idmap mapping domains
  from  822b5da s3: libsmb: Fix reversing of oldname/newname paths when 
creating a reparse point symlink on Windows from smbclient.

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


- Log -
commit 7dcc119c14e9fc087d382f05c802cdd997738cec
Author: Ralph Boehme 
Date:   Mon Oct 9 13:29:05 2017 +0200

winbindd: idmap_rid: error code for failing id-to-sid mapping request

NT_STATUS_NO_SUCH_DOMAIN triggers complete request failure in the parent
winbindd. By returning NT_STATUS_NONE_MAPPED winbindd lets the individual
mapping fail but keeps processing any remaining mapping requests.

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

Signed-off-by: Ralph Boehme 
Reviewed-by: Volker Lendecke 

Autobuild-User(master): Ralph Böhme 
Autobuild-Date(master): Tue Oct 10 19:57:37 CEST 2017 on sn-devel-144

(cherry picked from commit 490c35df35bad6c2f1c4acd2f056d6fdc480ec1f)

Autobuild-User(v4-6-test): Karolin Seeger 
Autobuild-Date(v4-6-test): Thu Dec 14 16:20:49 CET 2017 on sn-devel-144

commit d85e691a0b64918753d57966e39160e77af7c3ce
Author: Ralph Boehme 
Date:   Mon Sep 25 15:42:08 2017 +0200

winbindd: idmap_rid: don't rely on the static domain list

The domain list in the idmap child is inherited from the parent winbindd
process and may not contain all domains in case enumerating trusted
domains didn't finish before the first winbind request that triggers the
idmap child fork comes along.

The previous commits added the domain SID as an additional argument to
the wbint_UnixIDs2Sids request, storing the domain SID in struct
idmap_domain.

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

Signed-off-by: Ralph Boehme 
Reviewed-by: Volker Lendecke 
(cherry picked from commit 108675c4cf4c3d5bd29468255743423a56bd1471)

commit 96cc7e0fe30a747bf5cb49dcbf4953b4d659e038
Author: Ralph Boehme 
Date:   Mon Sep 25 15:39:39 2017 +0200

winbindd: pass domain SID to wbint_UnixIDs2Sids

This makes the domain SID available to the idmap child for
wbint_UnixIDs2Sids mapping request. It's not used yet anywhere, this
comes in the next commit.

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

Signed-off-by: Ralph Boehme 
Reviewed-by: Volker Lendecke 
(cherry picked from commit 71f99cb132f4c26f9febac6cb7dcd79f4940216a)

commit e16ef9fe6aa740a3f5db9ece5aaac3ff88ac67b6
Author: Ralph Boehme 
Date:   Mon Sep 25 13:25:57 2017 +0200

winbindd: add domain SID to idmap mapping domains

Fetch the domain SID for every domain in the idmap-domain map. This is
in preperation of passing the domain SID as an additional argument to
xid2sid requests to the idmap child.

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

Signed-off-by: Ralph Boehme 
Reviewed-by: Volker Lendecke 
(cherry picked from commit 59438bfd3d3551195582cf88bd1109c3cbc7e12a)

---

Summary of changes:
 librpc/idl/winbind.idl   |   1 +
 source3/include/idmap.h  |   5 ++
 source3/winbindd/idmap.c |   4 +-
 source3/winbindd/idmap_proto.h   |   3 +-
 source3/winbindd/idmap_rid.c |  10 +--
 source3/winbindd/wb_xids2sids.c  | 167 +++
 source3/winbindd/winbindd_dual_srv.c |   3 +-
 7 files changed, 168 insertions(+), 25 deletions(-)


Changeset truncated at 500 lines:

diff --git a/librpc/idl/winbind.idl b/librpc/idl/winbind.idl
index 05db6b9..ab9af2d 100644
--- a/librpc/idl/winbind.idl
+++ b/librpc/idl/winbind.idl
@@ -58,6 +58,7 @@ interface winbind
 
 NTSTATUS wbint_UnixIDs2Sids(
[in,string,charset(UTF8)] char *domain_name,
+   [in] dom_sid domain_sid,
[in] uint32 num_ids,
[in,out] unixid xids[num_ids],
[out] dom_sid sids[num_ids]
diff --git a/source3/include/idmap.h b/source3/include/idmap.h
index c379eba..1ca79cc 100644
--- a/source3/include/idmap.h
+++ b/source3/include/idmap.h
@@ -36,6 +36,11 @@ struct wbint_userinfo;
 
 struct idmap_domain {
const char *name;
+   /*
+* dom_sid is currently only initialized in the unixids_to_sids request,
+* so don't rely on this being filled out everywhere!
+ 

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

2017-12-13 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  822b5da s3: libsmb: Fix reversing of oldname/newname paths when 
creating a reparse point symlink on Windows from smbclient.
   via  c441234 s3: client: Rename  to  in 
cmd_symlink() and cli_posix_symlink().
   via  3fc3531 pthreadpool: Undo put_job when returning error
   via  b51a271 pthreadpool: Move creating of thread to new function
   via  82f6111 ctdb-daemon: Send STARTUP control after startup event
   via  0d42cfc ctdb-takeover: Send tcp tickles immediately on STARTUP 
control
   via  7d173bf ctdb-takeover: Refactor code to send tickle lists for all 
public IPs
  from  730c8f9 vfs_zfsacl: fix compilation error

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


- Log -
commit 822b5da2870c9cca6cc6cc6f4a92001c76e2ad69
Author: Jeremy Allison 
Date:   Wed Nov 29 13:16:43 2017 -0800

s3: libsmb: Fix reversing of oldname/newname paths when creating a reparse 
point symlink on Windows from smbclient.

This happened as smbd doesn't support reparse points so we couldn't test.
This was the reverse of the (tested) symlink parameters in the unix 
extensions
symlink command.

Rename parameters to link_target instead of oldname so this is clearer.

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

Signed-off-by: Jeremy Allison 
Reviewed-by: Volker Lendecke 
(cherry picked from commit abbc9b9ab793d22bca6a37828f4375ef38c56dd3)

Autobuild-User(v4-6-test): Karolin Seeger 
Autobuild-Date(v4-6-test): Wed Dec 13 14:40:01 CET 2017 on sn-devel-144

commit c441234984e17f5cb4a1b259a903faf6185985cb
Author: Jeremy Allison 
Date:   Wed Nov 29 13:10:25 2017 -0800

s3: client: Rename  to  in cmd_symlink() and 
cli_posix_symlink().

Stops us from mixing up the old and new names. Only behavior change
is correcting the names printed in the error messages.

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

Signed-off-by: Jeremy Allison 
Reviewed-by: Volker Lendecke 
(cherry picked from commit 8448dcaa8da78bcb84fca6a000c75e256bce1e77)

commit 3fc35313f09f534e8eed770ab5f583af05c7af4c
Author: Christof Schmitt 
Date:   Tue Nov 28 10:59:06 2017 -0700

pthreadpool: Undo put_job when returning error

When an error is returned to the caller of pthreadpool_add_job, the job
should not be kept in the internal job array. Otherwise the caller might
free the data structure and a later worker thread would still reference
it.

When it is not possible to create a single worker thread, the system
might be out of resources or hitting a configured limit. In this case
fall back to calling the job function synchronously instead of raising
the error to the caller and possibly back to the SMB client.

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

Signed-off-by: Christof Schmitt 
Reviewed-by: Volker Lendecke 
(cherry picked from commit 065fb5d94d25d19fc85832bb85aa9e379e8551cc)

commit b51a2712c1fe770a8d98c57e57b57ea83155ca57
Author: Christof Schmitt 
Date:   Tue Nov 28 10:49:36 2017 -0700

pthreadpool: Move creating of thread to new function

No functional change, but this simplifies error handling.

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

Signed-off-by: Christof Schmitt 
Reviewed-by: Volker Lendecke 
(cherry picked from commit 949ccc3ea9073a3d38bff28345f644d39177256f)

commit 82f6111ad58b5fdc085d9fd98272040665a3a25f
Author: Amitay Isaacs 
Date:   Mon Nov 20 15:27:52 2017 +1100

ctdb-daemon: Send STARTUP control after startup event

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

STARTUP control is primarily used to synchronise tcp tickles from running
nodes to a node which has just started up.  Earlier STARTUP control was
sent (using BROADCAST_ALL) after setup event.  Once the other nodes in
the cluster connected to this node, the queued up messages would be sent
and the tcp tickles would get synchronised.

Recent fix to drop messages to disconnected or not-yet-connected nodes,
the STARTUP control was never sent to the remote nodes and the tcp
tickles did not get synchronised.

To fix this problem send the STARTUP control (using BROADCAST_CONNECTED)
after startup event.  By this time all the running nodes in the cluster
are connected.

Signed-off-by: Amitay Isaacs 
Reviewed-by: Martin Schwenke 

Autobuild-User(master): Martin Schwenke 
Autobuild-Date(master): Thu Nov 30 15:29:48 CET 2017 on 

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

2017-12-07 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  730c8f9 vfs_zfsacl: fix compilation error
  from  9cc7d3d s3: libsmb: Fix valgrind read-after-free error in 
cli_smb2_close_fnum_recv().

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


- Log -
commit 730c8f9e331a4b4abec5b0a1bafb60323b04a2e8
Author: Ralph Boehme 
Date:   Sat Oct 28 16:13:16 2017 +0200

vfs_zfsacl: fix compilation error

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

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

Autobuild-User(master): Jeremy Allison 
Autobuild-Date(master): Thu Nov  2 03:16:11 CET 2017 on sn-devel-144

(cherry picked from commit 11da1e5c056c92fd7f51ecce0285628cac65f174)

Autobuild-User(v4-6-test): Karolin Seeger 
Autobuild-Date(v4-6-test): Thu Dec  7 14:00:20 CET 2017 on sn-devel-144

---

Summary of changes:
 source3/modules/vfs_zfsacl.c | 10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_zfsacl.c b/source3/modules/vfs_zfsacl.c
index 8e195b6..2272e48 100644
--- a/source3/modules/vfs_zfsacl.c
+++ b/source3/modules/vfs_zfsacl.c
@@ -51,6 +51,7 @@ static NTSTATUS zfs_get_nt_acl_common(struct 
connection_struct *conn,
SMB_STRUCT_STAT sbuf;
const SMB_STRUCT_STAT *psbuf = NULL;
int ret;
+   bool is_dir;
 
if (VALID_STAT(smb_fname->st)) {
psbuf = _fname->st;
@@ -65,10 +66,7 @@ static NTSTATUS zfs_get_nt_acl_common(struct 
connection_struct *conn,
}
psbuf = 
}
-
-   if (S_ISDIR(psbuf->st_ex_mode) && (ace->aceMask & SMB_ACE4_ADD_FILE)) {
-   ace->aceMask |= SMB_ACE4_DELETE_CHILD;
-   }
+   is_dir = S_ISDIR(psbuf->st_ex_mode);
 
/* read the number of file aces */
if((naces = acl(smb_fname->base_name, ACE_GETACLCNT, 0, NULL)) == -1) {
@@ -115,6 +113,10 @@ static NTSTATUS zfs_get_nt_acl_common(struct 
connection_struct *conn,
aceprop.aceMask |= SMB_ACE4_SYNCHRONIZE;
}
 
+   if (is_dir && (aceprop.aceMask & SMB_ACE4_ADD_FILE)) {
+   aceprop.aceMask |= SMB_ACE4_DELETE_CHILD;
+   }
+
if(aceprop.aceFlags & ACE_OWNER) {
aceprop.flags = SMB_ACE4_ID_SPECIAL;
aceprop.who.special_id = SMB_ACE4_WHO_OWNER;


-- 
Samba Shared Repository



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

2017-12-05 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  9cc7d3d s3: libsmb: Fix valgrind read-after-free error in 
cli_smb2_close_fnum_recv().
   via  8a37c85 testprogs: Fix a typo in the net ads test
   via  fb542aa testprogs: Test net ads keytab list
   via  19c9997 s3:libads: net ads keytab list fails with "Key table name 
malformed"
   via  3679be1 vfs_fruit: proper VFS-stackable conversion of FinderInfo
   via  0282d52 vfs_fruit: add AfpInfo prototypes
   via  b7f5e69 s4/torture: fruit: in test_adouble_conversion() also check 
stream list and AFPINFO_STREAM
   via  775ec5e s4/torture: fruit: remove use of localdir from 
test_adouble_conversion test
   via  dba33c9 selftest: add "fruit:veto_appledouble = no" to fruit shares
   via  de13adb s4/torture: let write_stream() deal with stream=NULL
   via  90ed82b selftest: run AppleDouble sidecar-file conversion test runs 
against all fruit shares
   via  79b3ea5 s4/torture: use torture_assert_goto in a vfs.fruit test
   via  51e21a3 s4/torture: rework stream names tests usage of local xattr 
call
   via  e266163 selftest: add localdir option to fruit subtests
   via  2354d2b selftest: reorder arguments for fruit tests
   via  1b9a0ca s3/loadparm: don't mark IPC$ as autoloaded
   via  e0a08bd s3/loadparm: ensure default service options are not changed
   via  37e816e s3/loadparm: allocate a fresh sDefault object per lp_ctx
   via  b728d17 Add vfs_zfsacl manpage to the list of manpages if we have 
this module enabled.
   via  d484d1b Fix typo in the "wide links" description for the getwd 
cache.
  from  3af01bd libnet_join: fix "net rpc oldjoin"

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


- Log -
commit 9cc7d3df94cda7c738ed4d9f60ef5f42cc68c2fa
Author: Jeremy Allison 
Date:   Wed Nov 29 09:21:30 2017 -0800

s3: libsmb: Fix valgrind read-after-free error in 
cli_smb2_close_fnum_recv().

cli_smb2_close_fnum_recv() uses tevent_req_simple_recv_ntstatus(req), which
frees req, then uses the state pointer which was owned by req.

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

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

Autobuild-User(master): Jeremy Allison 
Autobuild-Date(master): Thu Nov 30 05:47:12 CET 2017 on sn-devel-144

(cherry picked from commit 5c8032b6b8ce4439b3ef8f43a62a419f081eb787)

Autobuild-User(v4-6-test): Karolin Seeger 
Autobuild-Date(v4-6-test): Tue Dec  5 14:29:20 CET 2017 on sn-devel-144

commit 8a37c85693d4fa76a94f07205197b77703587f2d
Author: Noel Power 
Date:   Wed Nov 29 13:52:32 2017 +0100

testprogs: Fix a typo in the net ads test

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

Autobuild-User(master): Andreas Schneider 
Autobuild-Date(master): Thu Nov 30 01:47:24 CET 2017 on sn-devel-144

(cherry picked from commit 9f9c5d33c434b192d38a9758067fb0513041c0f0)

commit fb542aa9f14966187459c7cb1d3048d8407da85f
Author: Noel Power 
Date:   Fri Nov 24 07:06:27 2017 +

testprogs: Test net ads keytab list

Test that correct keytab is picked up.

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

Signed-off-by: Noel Power 
Reviewed-by: Andreas Schneider 
Reviewed-by: Ralph Boehme 
(cherry picked from commit 4be05c835e9d8b8f13856d592aaf42b40ce397c2)

commit 19c99976dad0c4d005811cb7c17336f5a1645acd
Author: Noel Power 
Date:   Thu Nov 23 15:55:21 2017 +

s3:libads: net ads keytab list fails with "Key table name malformed"

When keytab_name is NULL don't call smb_krb5_kt_open use ads_keytab_open
instead, this function will determine the correct keytab to use.

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

Signed-off-by: Noel Power 
Reviewed-by: Andreas Schneider 
Reviewed-by: Ralph Boehme 
(cherry picked from commit 3048ae318fc8b4d1b7663826972306372430a463)

commit 3679be1eae506f88cb845fe845fa069cd9258b25
Author: Ralph Boehme 
Date:   Wed Nov 15 16:52:48 2017 +0100

vfs_fruit: proper VFS-stackable conversion of FinderInfo

This fixes the problem that conversion failed with
fruit:metadata=stream. Before we were calling ad_set() which stores the
metadata in the Netatalk compatible format.

Rewrite to fully go through the VFS by calling SMB_VFS_CREATE_FILE() and
SMB_VFS_PWRITE().

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

Signed-off-by: 

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

2017-11-29 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  3af01bd libnet_join: fix "net rpc oldjoin"
   via  b9d0fce s3:selftest: add samba3.blackbox.net_rpc_oldjoin test
  from  eea9b63 ctdb-common: Call missing tevent_wakeup_recv() in 
sock_daemon

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


- Log -
commit 3af01bd9c80624889dec2bed1016fd4baa4cde4b
Author: Stefan Metzmacher 
Date:   Thu Nov 16 21:09:20 2017 +

libnet_join: fix "net rpc oldjoin"

We need to open the ncacn_np (smb) transport connection with
anonymous credentials.

In order to do netr_ServerPasswordSet*() we need to
establish a 2nd netlogon connection using dcerpc schannel
authentication.

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

Signed-off-by: Stefan Metzmacher 
Reviewed-by: Jeremy Allison 
(similar to commit d27f38d35bf111a5c0a898a5ef8b7dd0b320da0d)

Autobuild-User(v4-6-test): Karolin Seeger 
Autobuild-Date(v4-6-test): Wed Nov 29 12:59:34 CET 2017 on sn-devel-144

commit b9d0fce671883cabf1eb32fbc200ff31f1ad0ed4
Author: Stefan Metzmacher 
Date:   Fri Nov 17 15:51:36 2017 +0100

s3:selftest: add samba3.blackbox.net_rpc_oldjoin test

This demonstrates that "net rpc oldjoin" is currently broken.

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

Signed-off-by: Stefan Metzmacher 
Reviewed-by: Jeremy Allison 
(cherry picked from commit 9466796c87cc4ca8d32da553421cd8ecef1bb8e4)

---

Summary of changes:
 source3/libnet/libnet_join.c | 94 +---
 source3/script/tests/test_net_rpc_oldjoin.sh | 32 ++
 source3/selftest/tests.py|  4 ++
 3 files changed, 108 insertions(+), 22 deletions(-)
 create mode 100755 source3/script/tests/test_net_rpc_oldjoin.sh


Changeset truncated at 500 lines:

diff --git a/source3/libnet/libnet_join.c b/source3/libnet/libnet_join.c
index 591c177..903c93b 100644
--- a/source3/libnet/libnet_join.c
+++ b/source3/libnet/libnet_join.c
@@ -1044,12 +1044,23 @@ static NTSTATUS libnet_join_lookup_dc_rpc(TALLOC_CTX 
*mem_ctx,
NTSTATUS status, result;
union lsa_PolicyInformation *info = NULL;
struct dcerpc_binding_handle *b;
+   const char *account = r->in.admin_account;
+   const char *domain = r->in.admin_domain;
+   const char *password = r->in.admin_password;
+   bool use_kerberos = r->in.use_kerberos;
+
+   if (r->in.join_flags & WKSSVC_JOIN_FLAGS_JOIN_UNSECURE) {
+   account = "";
+   domain = "";
+   password = NULL;
+   use_kerberos = false;
+   }
 
status = libnet_join_connect_dc_ipc(r->in.dc_name,
-   r->in.admin_account,
-   r->in.admin_domain,
-   r->in.admin_password,
-   r->in.use_kerberos,
+   account,
+   domain,
+   password,
+   use_kerberos,
cli);
if (!NT_STATUS_IS_OK(status)) {
goto done;
@@ -1121,16 +1132,19 @@ static NTSTATUS 
libnet_join_joindomain_rpc_unsecure(TALLOC_CTX *mem_ctx,
struct cli_state *cli)
 {
TALLOC_CTX *frame = talloc_stackframe();
-   struct rpc_pipe_client *netlogon_pipe = NULL;
+   struct rpc_pipe_client *authenticate_pipe = NULL;
+   struct rpc_pipe_client *passwordset_pipe = NULL;
struct netlogon_creds_cli_context *netlogon_creds = NULL;
-   struct samr_Password current_nt_hash;
+   struct cli_credentials *cli_creds = NULL;
+   struct netlogon_creds_CredentialState *creds = NULL;
+   uint32_t netlogon_flags = 0;
size_t len = 0;
bool ok;
DATA_BLOB new_trust_blob = data_blob_null;
NTSTATUS status;
 
status = cli_rpc_pipe_open_noauth(cli, _table_netlogon,
- _pipe);
+ _pipe);
if (!NT_STATUS_IS_OK(status)) {
TALLOC_FREE(frame);
return status;
@@ -1148,31 +1162,67 @@ static NTSTATUS 
libnet_join_joindomain_rpc_unsecure(TALLOC_CTX *mem_ctx,
}
}
 
+   cli_creds = cli_credentials_init(talloc_tos());
+   if (cli_creds == NULL) {
+   TALLOC_FREE(frame);
+   return NT_STATUS_NO_MEMORY;
+   }
+
+   cli_credentials_set_username(cli_creds, 

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

2017-11-22 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  eea9b63 ctdb-common: Call missing tevent_wakeup_recv() in 
sock_daemon
   via  c54477d ctdb-daemon: Allocate deferred calls off calling context
   via  7e41c94 winbind: Remove winbind_messaging_context
   via  65bbf31 winbind: winbind_messaging_context -> 
server_messaging_context
   via  88a92ba winbind: Remove winbind_event_context
   via  d0b4331 winbind: Replace winbind_event_context with 
server_event_context
   via  598cc46 s3: smbclient: tests: Test "volume" command over SMB1 and 
SMB2+.
   via  3490bbd s3: smbclient: Implement "volume" command over SMB2.
  from  a7de852 VERSION: Bump version up to 4.6.12...

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


- Log -
commit eea9b637f7c217bbbc9cdb5e6e99fd15fcb890b9
Author: Amitay Isaacs 
Date:   Fri Nov 10 12:18:01 2017 +1100

ctdb-common: Call missing tevent_wakeup_recv() in sock_daemon

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

Signed-off-by: Amitay Isaacs 
Reviewed-by: Martin Schwenke 
(cherry picked from commit 49308f7f22f3d6fa05cc81fdef3db020e503fa9f)

Autobuild-User(v4-6-test): Karolin Seeger 
Autobuild-Date(v4-6-test): Wed Nov 22 13:43:49 CET 2017 on sn-devel-144

commit c54477d9bf4006156b261c374c0071ba87d6c03d
Author: Amitay Isaacs 
Date:   Thu Oct 19 14:58:18 2017 +1100

ctdb-daemon: Allocate deferred calls off calling context

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

This makes sure that if a client disconnects, all the deferred calls
from the client are correctly freed.

Signed-off-by: Amitay Isaacs 
Reviewed-by: Martin Schwenke 
(cherry picked from commit 848f2425984667c243ccac847b8f48a66ce10178)

commit 7e41c947641d3ec52174c9780b79e39871fd11be
Author: Volker Lendecke 
Date:   Fri Nov 17 11:47:37 2017 +0100

winbind: Remove winbind_messaging_context

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

Signed-off-by: Volker Lendecke 
Reviewed-by: Jeremy Allison 

Autobuild-User(master): Jeremy Allison 
Autobuild-Date(master): Sat Nov 18 04:07:24 CET 2017 on sn-devel-144

(cherry picked from commit 050ca45dc7fc5bbab6e1c60b919ac0b1e9661e27)

commit 65bbf314782d70a72c8500e4bcebefc8eefc102c
Author: Volker Lendecke 
Date:   Fri Nov 17 11:42:34 2017 +0100

winbind: winbind_messaging_context -> server_messaging_context

Don't use winbind_messaging_context anymore.

This fixes a bug analysed by Peter Somogyi : If a
parent winbind forks, it only called reinit_after_fork on
winbind_messaging_context. On the other hand, deep in dbwrap_open we use
server_messaging_context(). This is not reinitialized by
winbind_reinit_after fork, so the parent and child share a ctdb
connection. This is invalid, because replies from ctdb end up in the
wrong process.

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

Signed-off-by: Volker Lendecke 
Reviewed-by: Jeremy Allison 
(cherry picked from commit d8a01d09c13728f36107f6eb94ecb7653706a4db)

commit 88a92ba2e77517359c68628019c9d67452b476be
Author: Volker Lendecke 
Date:   Fri Nov 17 11:37:30 2017 +0100

winbind: Remove winbind_event_context

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

Signed-off-by: Volker Lendecke 
Reviewed-by: Jeremy Allison 
(cherry picked from commit e1f12acc13a3cc004518ac3460c6000ea0b95115)

commit d0b4331b5460e40a52b3c00776ef9272856239f5
Author: Volker Lendecke 
Date:   Fri Nov 17 11:35:19 2017 +0100

winbind: Replace winbind_event_context with server_event_context

There's no point in having two global event contexts

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

Signed-off-by: Volker Lendecke 
Reviewed-by: Jeremy Allison 
(cherry picked from commit 7e83d1489406cd53d72097e40bf02295c88ea61e)

commit 598cc463c5fb634588446fa15ea2e8ed39e36617
Author: Jeremy Allison 
Date:   Tue Nov 14 15:54:19 2017 -0800

s3: smbclient: tests: Test "volume" command over SMB1 and SMB2+.

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

Signed-off-by: Jeremy Allison 
Reviewed-by: Andreas Schneider 

Autobuild-User(master): Andreas Schneider 
Autobuild-Date(master): Wed Nov 15 19:50:54 CET 2017 on sn-devel-144

(cherry picked from commit f8cd211acc3824e01d89a6f8bc39aa5cd54e)

commit 

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

2017-11-22 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  a7de852 VERSION: Bump version up to 4.6.12...
   via  3a06a4f Merge tag 'samba-4.6.11' into v4-6-test
   via  4878a25 VERSION: Disable GIT_SNAPSHOT for the 4.6.11 release
   via  a3a3053 WHATSNEW: Add release notes for Samba 4.6.11.
   via  3a6b1ba s3: smbd: Chain code can return uninitialized memory when 
talloc buffer is grown.
   via  3ef34e9 s3: smbd: Fix SMB1 use-after-free crash bug. CVE-2017-14746
   via  8d7602d VERSION: Re-enable GIT_SNAPSHOT.
   via  1cd9157 VERSION: Bump version up to 4.6.11...
  from  d4217c0 s3: libsmb: smbc_statvfs is missing the supporting SMB2 
calls.

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


- Log -
commit a7de852339c72a88b872dcd2c1988731ab4ada2b
Author: Karolin Seeger 
Date:   Wed Nov 22 09:06:24 2017 +0100

VERSION: Bump version up to 4.6.12...

and re-enable GIT_SNAPSHOT.

Signed-off-by: Karolin Seeger 

commit 3a06a4fb17cbb274b4cc793271ddbd15e745b36a
Merge: d4217c0 4878a25
Author: Karolin Seeger 
Date:   Wed Nov 22 09:05:48 2017 +0100

Merge tag 'samba-4.6.11' into v4-6-test

samba: tag release samba-4.6.11

---

Summary of changes:
 VERSION|  4 +--
 WHATSNEW.txt   | 75 --
 source3/smbd/process.c |  7 +++--
 source3/smbd/reply.c   |  5 
 source3/smbd/srvstr.c  | 14 ++
 5 files changed, 98 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/VERSION b/VERSION
index c0e85a2..7051e63 100644
--- a/VERSION
+++ b/VERSION
@@ -25,7 +25,7 @@
 
 SAMBA_VERSION_MAJOR=4
 SAMBA_VERSION_MINOR=6
-SAMBA_VERSION_RELEASE=11
+SAMBA_VERSION_RELEASE=12
 
 
 # If a official release has a serious bug  #
@@ -99,7 +99,7 @@ SAMBA_VERSION_RC_RELEASE=
 # e.g. SAMBA_VERSION_IS_SVN_SNAPSHOT=yes   #
 #  ->  "3.0.0-SVN-build-199"   #
 
-SAMBA_VERSION_IS_GIT_SNAPSHOT=no
+SAMBA_VERSION_IS_GIT_SNAPSHOT=yes
 
 
 # This is for specifying a release nickname#
diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index 375d340..8199d91 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -1,4 +1,75 @@
==
+   Release Notes for Samba 4.6.11
+  November 21, 2017
+   =
+
+
+This is a security release in order to address the following defects:
+
+o  CVE-2017-14746 (Use-after-free vulnerability.)
+o  CVE-2017-15275 (Server heap memory information leak.)
+
+
+===
+Details
+===
+
+o  CVE-2017-14746:
+   All versions of Samba from 4.0.0 onwards are vulnerable to a use after
+   free vulnerability, where a malicious SMB1 request can be used to
+   control the contents of heap memory via a deallocated heap pointer. It
+   is possible this may be used to compromise the SMB server.
+
+o  CVE-2017-15275:
+   All versions of Samba from 3.6.0 onwards are vulnerable to a heap
+   memory information leak, where server allocated heap memory may be
+   returned to the client without being cleared.
+
+   There is no known vulnerability associated with this error, but
+   uncleared heap memory may contain previously used data that may help
+   an attacker compromise the server via other methods. Uncleared heap
+   memory may potentially contain password hashes or other high-value
+   data.
+
+For more details and workarounds, please see the security advisories:
+
+   o https://www.samba.org/samba/security/CVE-2017-14746.html
+   o https://www.samba.org/samba/security/CVE-2017-15275.html
+
+
+Changes since 4.6.10:
+-
+
+o  Jeremy Allison 
+   * BUG 13041: CVE-2017-14746: s3: smbd: Fix SMB1 use-after-free crash bug.
+   * BUG 13077: CVE-2017-15275: s3: smbd: Chain code can return uninitialized
+ memory when talloc buffer is grown.
+
+
+###
+Reporting bugs & Development Discussion
+###
+
+Please discuss this release on the samba-technical mailing list or by
+joining the #samba-technical IRC channel on irc.freenode.net.
+
+If you do report problems then please try to send high quality
+feedback. If you don't provide vital information to help us track down
+the problem then you will probably be ignored.  All bug reports should
+be filed under the "Samba 4.1 and newer" product in the project's Bugzilla
+database (https://bugzilla.samba.org/).
+
+

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

2017-11-17 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  d4217c0 s3: libsmb: smbc_statvfs is missing the supporting SMB2 
calls.
   via  a6db21e libsmbclient: Allow server (NetApp) to return 
STATUS_INVALID_PARAMETER from an echo.
  from  b196d0e VERSION: Bump version up to 4.6.11...

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


- Log -
commit d4217c0aa6fe6f01842a1ac978ad05a4018109ed
Author: Jeremy Allison 
Date:   Tue Nov 14 13:52:03 2017 -0800

s3: libsmb: smbc_statvfs is missing the supporting SMB2 calls.

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

Signed-off-by: Jeremy Allison 
Reviewed-by: Andreas Schneider 
(cherry picked from commit eefc7a27155b70d027b1193187dd435267d863ea)

Autobuild-User(v4-6-test): Karolin Seeger 
Autobuild-Date(v4-6-test): Fri Nov 17 13:59:02 CET 2017 on sn-devel-144

commit a6db21ef255ab3b8cc018626ae5784fdd686e7ce
Author: Jeremy Allison 
Date:   Fri Sep 8 16:20:34 2017 -0700

libsmbclient: Allow server (NetApp) to return STATUS_INVALID_PARAMETER from 
an echo.

It does this if we send a session ID of zero. The server still replied.

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

Signed-off-by: Jeremy Allison 
Reviewed-by: Andreas Schneider 

Autobuild-User(master): Jeremy Allison 
Autobuild-Date(master): Sat Nov 11 08:44:37 CET 2017 on sn-devel-144

(cherry picked from commit a0f6ea8dec1ab3d19bc93da12a9b0a1c0ccf6142)

---

Summary of changes:
 source3/client/client.c|  8 +++-
 source3/libsmb/cli_smb2_fnum.c | 97 ++
 source3/libsmb/cli_smb2_fnum.h |  6 +++
 source3/libsmb/clifsinfo.c |  9 
 source3/libsmb/libsmb_server.c | 11 -
 5 files changed, 129 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/client/client.c b/source3/client/client.c
index bb2518a..0900df1 100644
--- a/source3/client/client.c
+++ b/source3/client/client.c
@@ -5696,7 +5696,13 @@ static void readline_callback(void)
/* Ping the server to keep the connection alive using SMBecho. */
memset(garbage, 0xf0, sizeof(garbage));
status = cli_echo(cli, 1, data_blob_const(garbage, sizeof(garbage)));
-   if (NT_STATUS_IS_OK(status)) {
+   if (NT_STATUS_IS_OK(status) ||
+   NT_STATUS_EQUAL(status, NT_STATUS_INVALID_PARAMETER)) {
+   /*
+* Even if server returns NT_STATUS_INVALID_PARAMETER
+* it still responded.
+* BUG: https://bugzilla.samba.org/show_bug.cgi?id=13007
+*/
return;
}
 
diff --git a/source3/libsmb/cli_smb2_fnum.c b/source3/libsmb/cli_smb2_fnum.c
index cb62c90..e5a4055 100644
--- a/source3/libsmb/cli_smb2_fnum.c
+++ b/source3/libsmb/cli_smb2_fnum.c
@@ -1825,6 +1825,103 @@ NTSTATUS cli_smb2_dskattr(struct cli_state *cli, const 
char *path,
 }
 
 /***
+ Wrapper that allows SMB2 to query file system sizes.
+ Synchronous only.
+***/
+
+NTSTATUS cli_smb2_get_fs_full_size_info(struct cli_state *cli,
+   uint64_t *total_allocation_units,
+   uint64_t *caller_allocation_units,
+   uint64_t *actual_allocation_units,
+   uint64_t *sectors_per_allocation_unit,
+   uint64_t *bytes_per_sector)
+{
+   NTSTATUS status;
+   uint16_t fnum = 0x;
+   DATA_BLOB outbuf = data_blob_null;
+   struct smb2_hnd *ph = NULL;
+   TALLOC_CTX *frame = talloc_stackframe();
+
+   if (smbXcli_conn_has_async_calls(cli->conn)) {
+   /*
+* Can't use sync call while an async call is in flight
+*/
+   status = NT_STATUS_INVALID_PARAMETER;
+   goto fail;
+   }
+
+   if (smbXcli_conn_protocol(cli->conn) < PROTOCOL_SMB2_02) {
+   status = NT_STATUS_INVALID_PARAMETER;
+   goto fail;
+   }
+
+   /* First open the top level directory. */
+   status =
+   cli_smb2_create_fnum(cli, "", 0,   /* create_flags */
+FILE_READ_ATTRIBUTES, /* desired_access */
+FILE_ATTRIBUTE_DIRECTORY, /* file attributes */
+FILE_SHARE_READ | FILE_SHARE_WRITE |
+FILE_SHARE_DELETE, /* share_access */
+FILE_OPEN, /* create_disposition */
+ 

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

2017-11-15 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  b196d0e VERSION: Bump version up to 4.6.11...
   via  a56f9ed VERSION: Disable GIT_SNAPSHOT for the 4.6.10 release.
   via  ee75be8 WHATSNEW: Add release notes for Samba 4.6.10.
  from  c5d7a7d s4: torture: kernel oplocks. Add 
smb2.kernel-oplocks.kernel_oplocks8

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


- Log -
commit b196d0efcfaad6ea42ed0873b430ff3d416dd731
Author: Karolin Seeger 
Date:   Tue Nov 14 13:01:58 2017 +0100

VERSION: Bump version up to 4.6.11...

and re-enable GIT_SNAPSHOT.

Signed-off-by: Karolin Seeger 

commit a56f9ed4b49ee799d18850def51d40ab789569ce
Author: Karolin Seeger 
Date:   Tue Nov 14 13:00:55 2017 +0100

VERSION: Disable GIT_SNAPSHOT for the 4.6.10 release.

Signed-off-by: Karolin Seeger 

commit ee75be8e204645d52097faa75146cde7813900c1
Author: Karolin Seeger 
Date:   Tue Nov 14 13:00:24 2017 +0100

WHATSNEW: Add release notes for Samba 4.6.10.

Signed-off-by: Karolin Seeger 

---

Summary of changes:
 VERSION  |  4 ++--
 WHATSNEW.txt | 75 ++--
 2 files changed, 75 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/VERSION b/VERSION
index cd8c6ca..c0e85a2 100644
--- a/VERSION
+++ b/VERSION
@@ -25,7 +25,7 @@
 
 SAMBA_VERSION_MAJOR=4
 SAMBA_VERSION_MINOR=6
-SAMBA_VERSION_RELEASE=10
+SAMBA_VERSION_RELEASE=11
 
 
 # If a official release has a serious bug  #
@@ -99,7 +99,7 @@ SAMBA_VERSION_RC_RELEASE=
 # e.g. SAMBA_VERSION_IS_SVN_SNAPSHOT=yes   #
 #  ->  "3.0.0-SVN-build-199"   #
 
-SAMBA_VERSION_IS_GIT_SNAPSHOT=yes
+SAMBA_VERSION_IS_GIT_SNAPSHOT=no
 
 
 # This is for specifying a release nickname#
diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index 65c1137..375d340 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -1,3 +1,74 @@
+   ==
+   Release Notes for Samba 4.6.10
+  November 15, 2017
+   =
+
+
+This is an additional bugfix release to address a possible data corruption
+issue. Please update immediately! For details, please see
+
+  https://bugzilla.samba.org/show_bug.cgi?id=13130
+
+Samba 4.6.0 and newer is affected by this issue.
+
+
+Changes since 4.6.9:
+
+
+o  Michael Adam 
+   * BUG 13091: vfs_glusterfs: Fix exporting subdirs with shadow_copy2.
+
+o  Jeremy Allison 
+   * BUG 13093: s3: smbclient: Ensure we call client_clean_name() before all
+ operations on remote pathnames.
+   * BUG 13121: Non-smbd processes using kernel oplocks can hang smbd.
+
+o  Joe Guo 
+   * BUG 13127: python: use communicate to fix Popen deadlock.
+
+o  Volker Lendecke 
+   * BUG 13130: smbd on disk file corruption bug under heavy threaded load.
+
+o  Stefan Metzmacher 
+   * BUG 13130: tevent: version 0.9.34.
+
+o  Anoop C S 
+   * BUG 13086: vfs_fruit: Replace closedir() by SMB_VFS_CLOSEDIR.
+
+o  Christof Schmitt 
+   * BUG 13047: smbd: Move check for SMB2 compound request to new function.
+
+o  Andreas Schneider 
+   * BUG 13100: s3:vfs_glusterfs: Fix a double free in vfs_gluster_getwd().
+   * BUG 13101: s4:pyparam: Fix resource leaks on error.
+
+o  Ralph Wuerthner 
+   * BUG 13118: s3: smbd: Fix delete-on-close after smb2_find.
+
+
+###
+Reporting bugs & Development Discussion
+###
+
+Please discuss this release on the samba-technical mailing list or by
+joining the #samba-technical IRC channel on irc.freenode.net.
+
+If you do report problems then please try to send high quality
+feedback. If you don't provide vital information to help us track down
+the problem then you will probably be ignored.  All bug reports should
+be filed under the "Samba 4.1 and newer" product in the project's Bugzilla
+database (https://bugzilla.samba.org/).
+
+
+==
+== Our Code, Our Bugs, Our Responsibility.
+== The Samba Team
+==
+
+
+Release notes for older releases follow:
+
+
=
  

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

2017-11-14 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  c5d7a7d s4: torture: kernel oplocks. Add 
smb2.kernel-oplocks.kernel_oplocks8
   via  c64f58e s3: smbd: kernel oplocks. Replace retry_open() with 
setup_kernel_oplock_poll_open().
   via  8e338d8 selftest: Also run smbtorture smb2.compound with aio enabled
   via  8212d13 torture: Add testcase for compound CREATE-WRITE-CLOSE 
request
   via  d005547 smbd/aio: Do not go async for SMB2 compound requests
   via  13da33f smbd: Move check for SMB2 compound request to new function
   via  13e0f78 python: use communicate to fix Popen deadlock
   via  2514616 blackbox tests: method to check specific exit codes
   via  339f19a tevent: version 0.9.34
   via  5cb686d tevent: Fix a race condition
   via  148ab67 lib: tevent: Remove select backend.
   via  61819d6 tevent: version 0.9.33
   via  bd4ced8 tevent: handle passing req = NULL to tevent_req_print()
   via  4cc205c tevent: avoid calling talloc_get_name(NULL) in 
tevent_req_default_print()
   via  3bafcb5 tevent: version 0.9.32
   via  c2159d1 tevent: include the finish location in 
tevent_req_default_print()
   via  82572f0 tevent: Simplify create_immediate
   via  9abf13e tevent_threads: Fix a rundown race introduced with 
1828011317b
   via  dd516b9 tevent: Fix a race condition in tevent context rundown
   via  5a6d5c4 tevent: Fix a memleak on FreeBSD
   via  1375ed8 tevent: Add tevent_re_initialise to threaded test
   via  83c8bb7 tevent: Re-init threading in tevent_re_initialise
   via  1ea66fb tevent: Factor out context initialization
   via  03b43ed tevent: Fix a typo
   via  d4f07b4 Revert "tevent: Fix a race condition"
  from  6a43b1b tevent: Fix a race condition

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


- Log -
commit c5d7a7d8af3797bda2d505c952336eda0e7fc35f
Author: Jeremy Allison 
Date:   Thu Nov 9 09:59:23 2017 -0800

s4: torture: kernel oplocks. Add smb2.kernel-oplocks.kernel_oplocks8

Test if the server blocks whilst waiting on a kernel lease held by
a non-smbd process.

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

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

Autobuild-User(master): Ralph Böhme 
Autobuild-Date(master): Sat Nov 11 20:12:26 CET 2017 on sn-devel-144

(cherry picked from commit ad82557e1355107920ae80fd6a0df0f16d1bdb6c)

Autobuild-User(v4-6-test): Karolin Seeger 
Autobuild-Date(v4-6-test): Tue Nov 14 16:39:11 CET 2017 on sn-devel-144

commit c64f58eda991c7d8fa16a0d921682b8e35717d66
Author: Jeremy Allison 
Date:   Thu Nov 9 12:48:15 2017 -0800

s3: smbd: kernel oplocks. Replace retry_open() with 
setup_kernel_oplock_poll_open().

If a O_NONBLOCK open fails with EWOULDBLOCK, this code changes smbd to
do a retry open every second, until either the timeout or we get a 
successful
open. If we're opening a file that has a kernel lease set by a non-smbd
process, this is the best we can do.

Prior to this, smbd would block on the second open on such a leased file
(not using O_NONBLOCK) which freezes active clients.

Regression test to follow.

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

Signed-off-by: Jeremy Allison 
Reviewed-by: Ralph Boehme 
(cherry picked from commit 47c13fc10a2c9709e9511b2ffcf0e1004497887d)

commit 8e338d8795346b1a06ff8e2365bd4df1cd693ce4
Author: Christof Schmitt 
Date:   Wed Sep 20 16:13:38 2017 -0700

selftest: Also run smbtorture smb2.compound with aio enabled

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

Signed-off-by: Christof Schmitt 
Reviewed-by: Jeremy Allison 

Autobuild-User(master): Jeremy Allison 
Autobuild-Date(master): Fri Sep 22 09:49:30 CEST 2017 on sn-devel-144

(backported from commit 3a360f552d6641952931d3aa8a9ce85a648de3e1)

commit 8212d1356e7d87f8f4a27a2c0b28b58f281c6b8a
Author: Christof Schmitt 
Date:   Wed Sep 20 16:07:50 2017 -0700

torture: Add testcase for compound CREATE-WRITE-CLOSE request

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

Signed-off-by: Christof Schmitt 
Reviewed-by: Jeremy Allison 
(cherry picked from commit 508aebf40abe83b6319700260c405ada0566a46b)

commit d0055479b34384fc6e2f10fee7ff036a44b2864d
Author: Christof Schmitt 
Date:   Thu Sep 21 12:08:01 2017 -0700

smbd/aio: Do not go async for SMB2 compound requests

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

Signed-off-by: Christof Schmitt 

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

2017-11-13 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  6a43b1b tevent: Fix a race condition
   via  df214a3 s4: torture: Add smb2 FIND_and_set_DOC test case.
   via  b3ac865 s3: smbd: Fix delete-on-close after smb2_find
   via  38f0d93 s4: torture: kernel_oplocks. Create a regression test case 
for bug #13058.
   via  32ee9d1 Revert "s3/smbd: fix deferred open with streams and kernel 
oplocks"
  from  003eefb Revert "s3: smbclient: Test we can rename with a name 
containing."

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


- Log -
commit 6a43b1b17902c8fbc319e13f31f6c9177f38371c
Author: Volker Lendecke 
Date:   Fri Nov 10 21:22:26 2017 +0100

tevent: Fix a race condition

We can't rely on tctx to exist after we unlocked the mutex. It took a
while, but this does lead to data corruption. If *tctx is replaced with
something where tctx->wakeup_fd points to a real, existing file
descriptor, we're screwed. And by screwed, this means file corruption
on disk.

Again. I am not tall enough for this business.


http://bholley.net/blog/2015/must-be-this-tall-to-write-multi-threaded-code.html

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

Signed-off-by: Volker Lendecke 
Reviewed-by: Jeremy Allison 

Autobuild-User(master): Jeremy Allison 
Autobuild-Date(master): Sat Nov 11 03:20:09 CET 2017 on sn-devel-144

(cherry picked from commit 20cfcb7dbc5dd099384b76a76e3d35cf627100b6)

Autobuild-User(v4-6-test): Karolin Seeger 
Autobuild-Date(v4-6-test): Mon Nov 13 14:23:54 CET 2017 on sn-devel-144

commit df214a3808f25d45229f599a43886b71d482d4f5
Author: Ralph Wuerthner 
Date:   Fri Oct 27 14:59:32 2017 +0200

s4: torture: Add smb2 FIND_and_set_DOC test case.

Regression tests doing an SMB2_find followed by
a set delete on close and then close on a directory.

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

Signed-off-by: Ralph Wuerthner 
Reviewed-by: Jeremy Allison 
Reviewed-by: Volker Lendecke 

Autobuild-User(master): Volker Lendecke 
Autobuild-Date(master): Sun Nov  5 12:31:12 CET 2017 on sn-devel-144

(cherry picked from commit 44c018bdcc2d81aaf667d11c0c8fae209419ddd7)

commit b3ac865e3b3d87c3bafaa4ddb109d387c3beec26
Author: Ralph Wuerthner 
Date:   Fri Nov 3 22:33:28 2017 +

s3: smbd: Fix delete-on-close after smb2_find

Both dptr_create() and can_delete_directory_fsp() are calling OpenDir_fsp()
to get a directory handle. This causes an issue when delete-on-close is
set after smb2_find because both directory handle instances share the same
underlying file descriptor. In addition the SMB_ASSERT() in destructor
smb_Dir_destructor() gets triggered.

To avoid this use OpenDir() instead of OpenDir_fsp().

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

Signed-off-by: Ralph Wuerthner 
Reviewed-by: Jeremy Allison 
Reviewed-by: Volker Lendecke 
(cherry picked from commit c9e996d78df3ce326a5c13f8f4f1426918769ceb)

commit 38f0d935335818128cfc167655ed737ef0fa2558
Author: Jeremy Allison 
Date:   Fri Nov 3 12:02:17 2017 -0700

s4: torture: kernel_oplocks. Create a regression test case for bug #13058.

It implements the following test case:

1. client of smbd-1 opens the file and sets the oplock.
2. client of smbd-2 tries to open the file. open() fails(EAGAIN) and open 
is deferred.
3. client of smbd-1 sends oplock break request to the client.
4. client of smbd-1 closes the file.
5. client of smbd-1 opens the file and sets the oplock.
6. client of smbd-2 calls defer_open_done(), sees that the file lease was 
not changed
and does not reschedule open.

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

Signed-off-by: Jeremy Allison 
Reviewed-by: Ralph Böhme 
(cherry picked from commit 15597a95ecd2d1c2b7edce4942d489c95796951f)

commit 32ee9d16e0d23a44c581f83a3a73cde2329f33ff
Author: Jeremy Allison 
Date:   Fri Nov 3 21:47:01 2017 +

Revert "s3/smbd: fix deferred open with streams and kernel oplocks"

This reverts commit b35a296a27a0807c780f2a9e7af2f2e93feefaa8.

This was the cause of

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

1. client of smbd-1 opens the file and sets the oplock.
2. client of smbd-2 tries to open the file. open() fails(EAGAIN) and open 
is deferred.
3. client of smbd-1 sends oplock break request to the 

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

2017-11-02 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  003eefb Revert "s3: smbclient: Test we can rename with a name 
containing."
   via  5b414d9 s3:vfs_glusterfs: Fix a double free in vfs_gluster_getwd()
   via  35b1523 s4:pyparam: Fix resource leaks on error
   via  0d04dba s3:passdb: Make sure the salt is fully initialized before 
passing
   via  733aa17 s3:secrets: Do not leak memory of pw and old_pw
   via  781e5a6 ctdb-tests: Process-exists unit tests should wait until PID 
is registered
   via  5038300 ctdb-tests: Wait for fake_ctdbd to start, fail if it doesn't
   via  2340354 ctdb-tests: Skip starting fake_ctdbd when current node is 
disconnected
   via  b1f422e ctdb-tests: Wait for ctdb_eventd to start, fail if it 
doesn't
   via  ec36025 ctdb-tests: Allow wait_until() to be used in unit tests
   via  08100fc s3: smbclient: Test we can rename with a name containing.
   via  f01aac9 s3: smbclient: Ensure we call client_clean_name() before 
all operations on remote pathnames.
   via  f36e99e s3: client: Add new utility function client_clean_name().
   via  992d7dc vfs_glusterfs: Fix exporting subdirs with shadow_copy2
   via  6ef07b5 vfs_fruit: Replace closedir() by SMB_VFS_CLOSEDIR
  from  c1d6a04 VERSION: Bump version up to 4.6.10...

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


- Log -
commit 003eefb35e1880d7ea7e0933b9c8ac11e1c802d9
Author: Karolin Seeger 
Date:   Thu Nov 2 13:00:14 2017 +0100

Revert "s3: smbclient: Test we can rename with a name containing."

This reverts commit 8c7d944f106ca54581f5757bb8fa9c85169a04f2.

Autobuild-User(v4-6-test): Karolin Seeger 
Autobuild-Date(v4-6-test): Thu Nov  2 16:56:03 CET 2017 on sn-devel-144

commit 5b414d94fe7aa05d1fb3ca8ee35c346ca6797bae
Author: Andreas Schneider 
Date:   Wed Oct 25 19:39:34 2017 +0200

s3:vfs_glusterfs: Fix a double free in vfs_gluster_getwd()

Found by cppcheck.

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

Signed-off-by: Andreas Schneider 
Reviewed-by: Jeremy Allison 

(cherry picked from commit 16389bed0773952ca563b7bf1fecc2a737587257)

commit 35b152315506ce8bd796a700915b4bea5c6603dc
Author: Andreas Schneider 
Date:   Wed Oct 25 19:25:20 2017 +0200

s4:pyparam: Fix resource leaks on error

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

Signed-off-by: Andreas Schneider 
Reviewed-by: Jeremy Allison 
(cherry picked from commit e56626e864492831a3dbbca2d4fb8f3281547a90)

commit 0d04dba0a5e606e7405e1b0b2007cf66b28c1b8a
Author: Andreas Schneider 
Date:   Wed Oct 25 19:50:57 2017 +0200

s3:passdb: Make sure the salt is fully initialized before passing

Otherwise the magic member is not initialized.

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

Signed-off-by: Andreas Schneider 
Reviewed-by: Jeremy Allison 
(cherry picked from commit 5274beba4cf722a34403dc07bf287815a6df6281)

commit 733aa17679bb4673b27d9f9adfdc9399ccfa2850
Author: Andreas Schneider 
Date:   Wed Oct 25 19:30:28 2017 +0200

s3:secrets: Do not leak memory of pw and old_pw

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

Signed-off-by: Andreas Schneider 
Reviewed-by: Jeremy Allison 
(cherry picked from commit d6a418c13f0a41851ecc0579765502e076a5cd3b)

commit 781e5a67171df60978c0f759bd20e64b171c71fa
Author: Martin Schwenke 
Date:   Wed Oct 25 12:15:23 2017 +1100

ctdb-tests: Process-exists unit tests should wait until PID is registered

Otherwise the client registration can race with the check in the test.

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

Signed-off-by: Martin Schwenke 
Reviewed-by: Amitay Isaacs 

Autobuild-User(master): Amitay Isaacs 
Autobuild-Date(master): Thu Oct 26 13:32:24 CEST 2017 on sn-devel-144

(cherry picked from commit 0e8b781e0740310d251bf1fa7db7a467d4f7f9b5)

commit 5038300ab9ef60d641d3955ba8b5e3b8a5045aaa
Author: Martin Schwenke 
Date:   Wed Oct 25 17:52:04 2017 +1100

ctdb-tests: Wait for fake_ctdbd to start, fail if it doesn't

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

Signed-off-by: Martin Schwenke 
Reviewed-by: Amitay Isaacs 
(cherry picked from commit 6fad42103c0c812d5b5f4b42854fd7fd68846487)

commit 2340354e260d65e38c2d719af4074507cc968305
Author: Martin Schwenke 
Date:   Wed Oct 25 21:43:56 2017 +1100

ctdb-tests: Skip starting fake_ctdbd 

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

2017-10-25 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  c1d6a04 VERSION: Bump version up to 4.6.10...
   via  b77f419 VERSION: Disable GIT_SNAPSHOTS for the 4.6.9 release.
   via  b101fa1 WHATSNEW: Add release notes for Samba 4.6.9.
  from  f8da4ab vfs_catia: Fix a potential memleak

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


- Log -
commit c1d6a047f5796bd632bf1fd0cb4d2b44511cfbba
Author: Karolin Seeger 
Date:   Wed Oct 25 10:49:09 2017 +0200

VERSION: Bump version up to 4.6.10...

and re-enable GIT_SNAPSHOTS.

Signed-off-by: Karolin Seeger 

commit b77f4193c396101db5a07143ec5e17a981116009
Author: Karolin Seeger 
Date:   Wed Oct 25 10:48:29 2017 +0200

VERSION: Disable GIT_SNAPSHOTS for the 4.6.9 release.

Signed-off-by: Karolin Seeger 

commit b101fa11659343cd2d64c07c8c2a15fe21126efa
Author: Karolin Seeger 
Date:   Wed Oct 25 10:48:00 2017 +0200

WHATSNEW: Add release notes for Samba 4.6.9.

Signed-off-by: Karolin Seeger 

---

Summary of changes:
 VERSION  |   2 +-
 WHATSNEW.txt | 103 +--
 2 files changed, 102 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/VERSION b/VERSION
index 42fbbd7..cd8c6ca 100644
--- a/VERSION
+++ b/VERSION
@@ -25,7 +25,7 @@
 
 SAMBA_VERSION_MAJOR=4
 SAMBA_VERSION_MINOR=6
-SAMBA_VERSION_RELEASE=9
+SAMBA_VERSION_RELEASE=10
 
 
 # If a official release has a serious bug  #
diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index 5b11c9f..65c1137 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -1,4 +1,103 @@
=
+   Release Notes for Samba 4.6.9
+  October 25, 2017
+   =
+
+
+This is the latest stable release of the Samba 4.6 release series.
+
+
+Changes since 4.6.8:
+
+
+o  Jeremy Allison 
+   * BUG 12899: s3: libsmb: Reverse sense of 'clear all attributes', ignore
+ attribute change in SMB2 to match SMB1.
+   * BUG 12913: SMBC_setatr() initially uses an SMB1 call before falling back.
+   * BUG 13003: Fix segfault on MacOS 10.12.3 clients caused by
+ SMB_VFS_GET_COMPRESSION.
+   * BUG 13069: sys_getwd() can leak memory or possibly return the wrong errno
+ on older systems.
+
+o  Ralph Boehme 
+   * BUG 6133: Cannot delete non-ACL files on Solaris/ZFS/NFSv4 ACL filesystem.
+   * BUG 7909: vfs_zfs_acl: Map SYNCHRONIZE acl permission statically.
+   * BUG 7933: vfs_fake_acls: Honor SEC_STD_WRITE_OWNER bit.
+   * BUG 12791: Kernel oplocks still have issues with named streams.
+   * BUG 12944: vfs_gpfs: Handle EACCES when fetching DOS attributes.
+   * BUG 12991: s3/mdssvc: Missing assignment in sl_pack_float.
+   * BUG 12995: Fix wrong Samba access checks when changing DOS attributes.
+   * BUG 13065: net: Groupmap cleanup should not delete BUILTIN mappings.
+   * BUG 13076: Enabling vfs_fruit results in loss of Finder tags and other
+ xattrs.
+
+o  Samuel Cabrero 
+   * BUG 12993: s3: spoolss: Fix GUID string format on GetPrinter info.
+
+o  David Disseldorp 
+   * BUG 12144: smbd/ioctl: Match WS2016 ReFS set compression behaviour.
+
+o  Amitay Isaacs 
+   * BUG 13012: ctdb-daemon: Fix implementation of process_exists control.
+   * BUG 13021: ctdb: GET_DB_SEQNUM control can cause ctdb to deadlock when
+ databases are frozen.
+   * BUG 13029: ctdb-daemon: Free up record data if a call request is deferred.
+   * BUG 13036: ctdb-client: Initialize ctdb_ltdb_header completely for empty
+ record.
+   * BUG 13056: CTDB starts consuming memory if there are dead nodes in the
+ cluster.
+   * BUG 13070: ctdb-common: Ignore event scripts with multiple '.'s.
+
+o  Lutz Justen 
+   * BUG 13046: libgpo: Sort the GPOs in the correct order.
+
+o  Stefan Metzmacher 
+   * BUG 12973: 'smbd' uses a lot of CPU on startup of a connection.
+   * BUG 13018: charset: Fix str[n]casecmp_m() by comparing lower case values.
+   * BUG 13079: Can't change password in Samba from a windows client if Samba
+ runs on IPv6 only interface.
+
+o  Volker Lendecke 
+   * BUG 12903: Fix file change notification for renames.
+   * BUG 13006: messaging: Avoid a socket leak after fork.
+   * BUG 13090: vfs_catia: Fix a potential memleak.
+
+o  Christof Schmitt 
+   * BUG 12983: vfs_default: Fix passing of errno from async calls.
+   * BUG 13032: vfs_streams_xattr: Fix segfault when 

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

2017-10-25 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  f8da4ab vfs_catia: Fix a potential memleak
   via  bd4d3fb vfs_catia: Fix a memory leak
   via  ff9c618 krb5_wrap: ADDRTYPE_INET6 is available in all supported MIT 
versions
   via  60f0e49 krb5_wrap: KRB5_ADDRESS_INET6 is not a define in Heimdal
   via  c7726ee s4/torture: vfs_fruit: test xattr unpacking
   via  d61101b s4/torture: vfs_fruit: replace AppleDouble data blob with 
xattr data
   via  cbddb21 vfs_fruit: on-access conversion of AppleDouble xattr data
   via  5fb403f vfs_fruit: static string fruit_catia_maps
   via  8e95870 vfs_fruit: pass path to ad_convert
   via  f42c878 vfs_fruit: unpack AppleDouble xattr header if present
   via  8d03598 vfs_fruit: allocate ad_data buffer up to 
AD_XATTR_MAX_HDR_SIZE bytes
   via  1e4051b vfs_fruit: add AppleDouble xattr structure definitions
   via  e414f60 vfs_fruit: fix ftruncating resource fork
   via  b866626 vfs_catia: factor out mapping functions
   via  afecdce ctdb-common: Ignore event scripts with multiple '.'s
   via  595f108 s3: VFS: Protect errno if sys_getwd() fails across free() 
call.
   via  42b064a s3: VFS: Ensure sys_getwd() doesn't leak memory on error on 
really old systems.
   via  9209c35 net: groupmap cleanup should not delete BUILTIN mappings
   via  c9fa0e9 ctdb-common: Do not queue a packet if queue does not have 
valid fd
   via  65af3ee ctdb-tests: Send broadcast to connected nodes, not 
configured nodes
   via  9de6540 ctdb-daemon: Send broadcast to connected nodes, not 
configured nodes
   via  eb47cdd lib: gpo: Put enforced GPOs at the end of the list.
   via  07c6394 lib: gpo: Fixes issue with GPOPTIONS_BLOCK_INHERITANCE.
   via  322add1 lib: gpo: Changes order to match GPO application order.
   via  3cd186f s3/smbd: use correct access in get_file_handle_for_metadata
   via  096a3f8 s3/smbd: fix access checks in set_ea_dos_attribute()
   via  88dfaf1 s3/smbd: README.Coding fixes in set_ea_dos_attribute
   via  18122f0 s3: spoolss: Fix GUID string format on GetPrinter info
   via  a68f0bc s3/mdssvc: missing assignment in sl_pack_float
   via  f5b02e3 s4/torture: add a test for rename change notification with 
inotify enabled
   via  b5b77ba selftest: run smb2.notify-inotify testsuite against 
fileserver
   via  d052058 selftest: enable kernel change notifications in the 
fileserver environment
   via  1dd367a messaging: Remove messaging_handler_send
   via  389f2b7 notifyd: Remove notifyd_handler_done
   via  bb6011f notifyd: Use messaging_register for MSG_SMB_NOTIFY_DB
   via  ab6743d notifyd: Use messaging_register for MSG_SMB_NOTIFY_GET_DB
   via  e4dd339 notifyd: Use messaging_register for MSG_SMB_NOTIFY_TRIGGER
   via  340cde8 notifyd: Use messaging_register for 
MSG_SMB_NOTIFY_REC_CHANGE
   via  0f63069 messaging: make messaging_rec_create public
   via  5549320 notifyd: Avoid an if-expression
   via  7cf36b2 notifyd: Consolidate two #ifdef CLUSTER into one
   via  ab91b0d notifyd: Only ask for messaging_ctdb_conn when clustering
   via  cbb4750 selftest: prevent interpretation of escape sequences in 
test_give_owner.sh
   via  8c79020 selftest: add some debugging to test_give_owner.sh
   via  f4c3b87 vfs_fake_acls: deny give-ownership
   via  ec87dad vfs_acl_common: fix take ownership vs give ownership
   via  52de163 vfs_acl_common: factor out a variable declaration
   via  da807fe s3/smbd/posix_acls: return correct status in try_chown
   via  839830f selftest: tests for change ownership on a file
   via  49e080c selftest: fix samba3.blackbox.inherit_owner.default test 
script test_inherit_owner.sh
   via  3044852 selftest: fix acl_xattr test script test_acl_xattr.sh
   via  bc55590 selftest: fix acl_xattr test: sn-devel unreliable gid
   via  7b72c6f selftest: fix acl_xattr test: group, not user
   via  f9f9687 selftest: fix acl_xattr test: changing owner
   via  da10d811 vfs/nfs4_acls: move special handling of 
SMB_ACE4_SYNCHRONIZE to vfs_zfsacl
   via  38c3352 s3/vfs: move ACE4_ADD_FILE/ACE4_DELETE_CHILD mapping from 
NFSv4 framework to vfs_zfsacl
   via  bda469e vfs_zfsacl: ensure zfs_get_nt_acl_common() has access to 
stat info
   via  7657bb6 vfs_zfsacl: pass smb_fname to zfs_get_nt_acl_common
  from  96a8f4c torture/ioctl: test set_compression(format_none)

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


- Log -
commit f8da4ab0a0a8f1fb35ecd5b69426b3d86ed8c308
Author: Volker Lendecke 
Date:   Mon Oct 16 17:43:09 2017 +0200

vfs_catia: Fix a potential memleak

Together with the previous commit this fixes a memleak (twice) that
happens when vfs_catia is loaded with no mappings defined.

Bug: 

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

2017-09-22 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  96a8f4c torture/ioctl: test set_compression(format_none)
  from  bb54467 VERSION: Bump version up to 4.6.9...

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


- Log -
commit 96a8f4c7167c3f45856b8166c092430efd417e57
Author: David Disseldorp 
Date:   Thu Jan 5 17:10:42 2017 +0100

torture/ioctl: test set_compression(format_none)

This test case was overlooked in the previous bso#12144 update -
set compression requests with format=COMPRESSION_FORMAT_NONE should
succeed if the server / backing storage doesn't offer compression
support.
Confirm that Samba matches Windows Server 2016 ReFS behaviour here.

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

Reported-by: Nick Barrett 
Signed-off-by: David Disseldorp 
Reviewed-by: Jeremy Allison 
(cherry picked from commit 6fde123176409e261d955e24b3d28e5124f33bed)

Autobuild-User(v4-6-test): Karolin Seeger 
Autobuild-Date(v4-6-test): Fri Sep 22 13:36:22 CEST 2017 on sn-devel-144

---

Summary of changes:
 source4/torture/smb2/ioctl.c | 11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)


Changeset truncated at 500 lines:

diff --git a/source4/torture/smb2/ioctl.c b/source4/torture/smb2/ioctl.c
index 01cc150..54a36a8 100644
--- a/source4/torture/smb2/ioctl.c
+++ b/source4/torture/smb2/ioctl.c
@@ -2608,7 +2608,16 @@ static bool test_ioctl_compress_notsup_set(struct 
torture_context *torture,
 COMPRESSION_FORMAT_DEFAULT);
torture_assert_ntstatus_equal(torture, status,
  NT_STATUS_NOT_SUPPORTED,
- "FSCTL_GET_COMPRESSION");
+ "FSCTL_SET_COMPRESSION default");
+
+   /*
+* Despite not supporting compression, we should get a successful
+* response for set(COMPRESSION_FORMAT_NONE) - like WS2016 ReFS.
+*/
+   status = test_ioctl_compress_set(torture, tmp_ctx, tree, fh,
+COMPRESSION_FORMAT_NONE);
+   torture_assert_ntstatus_ok(torture, status,
+  "FSCTL_SET_COMPRESSION none");
 
smb2_util_close(tree, fh);
talloc_free(tmp_ctx);


-- 
Samba Shared Repository



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

2017-09-20 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  bb54467 VERSION: Bump version up to 4.6.9...
   via  adbe2eb Merge tag 'samba-4.6.8' into v4-6-test
   via  c66a4d9 smbd/ioctl: match WS2016 ReFS set compression behaviour
   via  be2ffca VERSION: Disable GIT_SNAPSHOTS for the 4.6.8 release.
   via  a308007 WHATSNEW: Add release notes for Samba 4.6.8.
   via  34dea82 selftest: make 
samba3.blackbox.smbclient_s3.*follow.symlinks.*no as flapping
   via  c848b10 CVE-2017-12163: s3:smbd: Prevent client short SMB1 write 
from writing server memory to file.
   via  105cc43 CVE-2017-12151: s3:libsmb: make use of 
cli_state_is_encryption_on()
   via  3157cce CVE-2017-12151: s3:libsmb: add cli_state_is_encryption_on() 
helper function
   via  2850666 CVE-2017-12150: s3:libsmb: only fallback to anonymous if 
authentication was not requested
   via  28f4a8d CVE-2017-12150: libcli/smb: add 
smbXcli_conn_signing_mandatory()
   via  d8c6ace CVE-2017-12150: auth/credentials: 
cli_credentials_authentication_requested() should check for 
NTLM_CCACHE/SIGN/SEAL
   via  f42ffde CVE-2017-12150: libgpo: make use of SMB_SIGNING_REQUIRED in 
gpo_connect_server()
   via  b760a46 CVE-2017-12150: s3:pylibsmb: make use of 
SMB_SIGNING_DEFAULT for 'samba.samba3.libsmb_samba_internal'
   via  97a7ddf CVE-2017-12150: s3:lib: get_cmdline_auth_info_signing_state 
smb_encrypt SMB_SIGNING_REQUIRED
   via  9fb5283 CVE-2017-12150: s3:popt_common: don't turn a guessed 
username into a specified one
  from  a86c837 ctdb-client: Initialize ctdb_ltdb_header completely for 
empty record

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


- Log -
commit bb54467ed822bf8d422f5a20db5362406398fbc0
Author: Karolin Seeger 
Date:   Wed Sep 20 13:01:46 2017 +0200

VERSION: Bump version up to 4.6.9...

and re-enable GIT_SNAPSHOTS.

Signed-off-by: Karolin Seeger 

commit adbe2ebe3ebdd37a38bf26f9609f44ba513d0325
Merge: c66a4d9 be2ffca
Author: Karolin Seeger 
Date:   Wed Sep 20 13:00:48 2017 +0200

Merge tag 'samba-4.6.8' into v4-6-test

samba: tag release samba-4.6.8

commit c66a4d91b1f6fd75d6d64ca30f04de88406589b6
Author: David Disseldorp 
Date:   Thu Jan 5 17:36:02 2017 +0100

smbd/ioctl: match WS2016 ReFS set compression behaviour

ReFS doesn't support compression, but responds to set-compression FSCTLs
with NT_STATUS_OK if (and only if) the requested compression format is
COMPRESSION_FORMAT_NONE.

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

Reported-by: Nick Barrett 
Signed-off-by: David Disseldorp 
Reviewed-by: Jeremy Allison 

Autobuild-User(master): Jeremy Allison 
Autobuild-Date(master): Mon Jan  9 23:14:28 CET 2017 on sn-devel-144

(cherry picked from commit 28cc347876b97b7409d6efd377f031fc6df0c5f3)

---

Summary of changes:
 VERSION   |  2 +-
 WHATSNEW.txt  | 84 ++-
 auth/credentials/credentials.c| 16 
 libcli/smb/smbXcli_base.c |  5 +++
 libcli/smb/smbXcli_base.h |  1 +
 libgpo/gpo_fetch.c|  2 +-
 selftest/flapping |  1 +
 source3/include/auth_info.h   |  1 +
 source3/lib/popt_common.c |  6 +--
 source3/lib/util_cmdline.c| 32 +++
 source3/libsmb/clidfs.c   | 20 +++---
 source3/libsmb/clientgen.c| 13 ++
 source3/libsmb/libsmb_context.c   |  2 +-
 source3/libsmb/proto.h|  1 +
 source3/libsmb/pylibsmb.c |  2 +-
 source3/smbd/reply.c  | 50 +++
 source3/smbd/smb2_ioctl_filesys.c | 26 ++--
 17 files changed, 227 insertions(+), 37 deletions(-)


Changeset truncated at 500 lines:

diff --git a/VERSION b/VERSION
index 3a8de1a..42fbbd7 100644
--- a/VERSION
+++ b/VERSION
@@ -25,7 +25,7 @@
 
 SAMBA_VERSION_MAJOR=4
 SAMBA_VERSION_MINOR=6
-SAMBA_VERSION_RELEASE=8
+SAMBA_VERSION_RELEASE=9
 
 
 # If a official release has a serious bug  #
diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index 87c4579..5b11c9f 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -1,4 +1,84 @@
=
+   Release Notes for Samba 4.6.8
+ September 20, 2017
+   =
+
+
+This is a security release in order to address the following defects:
+
+o  CVE-2017-12150 (SMB1/2/3 connections may not require signing where they
+   should)
+o  CVE-2017-12151 (SMB3 

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

2017-09-16 Thread Stefan Metzmacher
The branch, v4-6-test has been updated
   via  a86c837 ctdb-client: Initialize ctdb_ltdb_header completely for 
empty record
   via  bb709c1 ctdb-daemon: Free up record data if a call request is 
deferred
   via  4b86f6c s3: vfs: catia: compression get/set must act only on base 
file, and must cope with fsp==NULL.
   via  21ca207 s3: VFS: streams_xattr: Compression is only set/get on base 
filenames.
   via  9f768e2 vfs_streams_xattr: Fix segfault when running with log level 
10
   via  5ad9d78 charset: fix str[n]casecmp_m() by comparing lower case 
values
   via  a774df0 charset/tests: also tests the system str[n]casecmp()
   via  26bff68 charset/tests: add more str[n]casecmp_m() tests to 
demonstrate the bug
   via  03d8780 charset/tests: assert the exact values of str[n]casecmp_m()
  from  c258b78 ctdb-daemon: GET_DB_SEQNUM should read database 
conditionally

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


- Log -
commit a86c8379a0a39154c9481db60db24dfe080ba924
Author: Amitay Isaacs 
Date:   Mon Sep 11 14:05:17 2017 +1000

ctdb-client: Initialize ctdb_ltdb_header completely for empty record

ctdb_ltdb_fetch() only fills in relevant portion of ctdb_ltdb_header
if the record does not exist.  This can result in uninitialized writes
to ctdb_rec_buffer.

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

Signed-off-by: Amitay Isaacs 
Reviewed-by: Martin Schwenke 
(cherry picked from commit a878171cb432673f635a75cce0b72c92bb0d3ec7)

Autobuild-User(v4-6-test): Stefan Metzmacher 
Autobuild-Date(v4-6-test): Sat Sep 16 13:33:55 CEST 2017 on sn-devel-144

commit bb709c18aa6de2e4027b4a51b78fe22617800ddd
Author: Amitay Isaacs 
Date:   Mon Sep 11 15:59:19 2017 +1000

ctdb-daemon: Free up record data if a call request is deferred

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

If a call request for a key (migration request) is in flight, then all
the subsequent call requests for the same key are deferred.  In that case,
the data corresponding to key read from the local tdb is useless and there
is no need to keep it around.  Once the deferred call is reprocessed,
the data corresponding to that key will be fetched again.

Signed-off-by: Amitay Isaacs 
Reviewed-by: Martin Schwenke 
(cherry picked from commit 77c17b03cfc4734142fd86ba3cdd9663e75f34e3)

commit 4b86f6cb6e1bd5560dc8c6ab067a0e8d59d051d7
Author: Jeremy Allison 
Date:   Fri Sep 8 15:28:39 2017 -0700

s3: vfs: catia: compression get/set must act only on base file, and must 
cope with fsp==NULL.

Correctly do filename conversion.

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

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

Autobuild-User(master): Ralph Böhme 
Autobuild-Date(master): Tue Sep 12 10:50:57 CEST 2017 on sn-devel-144

(cherry picked from commit 3ff1b83ab7cb3a6ab94b87d0bf73857b731c869d)

commit 21ca20787a85b8132f92454482c5d101f8445b8e
Author: Jeremy Allison 
Date:   Fri Sep 8 15:27:37 2017 -0700

s3: VFS: streams_xattr: Compression is only set/get on base filenames.

Can be ignored (pass-through) in streams_xattr VFS module.

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

Signed-off-by: Jeremy Allison 
Reviewed-by: Ralph Boehme 
(cherry picked from commit 1a7c0f77e2203aa674eb8b06fe3220868f11)

commit 9f768e26d40e22851c8a304f6915c127986cc189
Author: Christof Schmitt 
Date:   Wed Sep 13 16:23:53 2017 -0700

vfs_streams_xattr: Fix segfault when running with log level 10

This happens when vfs_streams_xattr is loaded, log level is set to 10
and the default stream of a file or directory is accessed. In that case
streams_xattr_open does not allocate the stream_io fsp extension. The
DBG_DEBUG message in streams_xattr_fstat tries to access the stream_io
before checking for a NULL value, resulting in the crash. Fix this by
moving the debug message after the check for a NULL pointer.

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

Signed-off-by: Christof Schmitt 
Reviewed-by: Ralph Boehme 

Autobuild-User(master): Ralph Böhme 
Autobuild-Date(master): Thu Sep 14 10:58:12 CEST 2017 on sn-devel-144

(cherry picked from commit 1b6aa39fac0825b1f25fd62a6c67994b5c491170)

commit 5ad9d78a62d81146f4b8459d49c550ff0bfca7b7
Author: Stefan Metzmacher 
Date:   Wed Sep 6 09:47:20 2017 +0200

charset: fix str[n]casecmp_m() by 

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

2017-09-13 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  c258b78 ctdb-daemon: GET_DB_SEQNUM should read database 
conditionally
   via  9b93e44 ctdb-daemon: Add a function to check if db access is allowed
   via  0ce69f5 ctdb-tests: Fix ctdb test binary name in path testing
   via  bae034a ctdb-tests: Wait up to 30 seconds for process to be 
registered in ctdbd
   via  7b4d686 ctdb-tests: Fix ctdb process-exist tests
   via  037483d ctdb-tests: Add a dummy ctdb client for testing
   via  919e8b8 ctdb-tests: Fix the implementation of process-exists in 
fake daemon
   via  e9896f6 ctdb-daemon: Fix implementation of process_exists control
  from  dc47600 messaging: Avoid a socket leak after fork

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


- Log -
commit c258b783e013f7832873bbe9404aeaa60aed9e96
Author: Amitay Isaacs 
Date:   Thu Sep 7 17:21:03 2017 +1000

ctdb-daemon: GET_DB_SEQNUM should read database conditionally

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

Once the recovery starts and databases are frozen, then all the record
access is postponed till the recovery is complete except reading the
database sequence number.  Database access for reading sequence number
is done via a control which does not check if the databases are frozen
or not.

If the database is frozen and if the freeze transaction is not started
(this can happen when a node is inactive, or during recovery when the
database is frozen but the transaction has not yet started), then trying
to read sequence number will cause ctdb daemon to deadlock.

Before reading the sequence number, check if the database access is
allowed.

Signed-off-by: Amitay Isaacs 
Reviewed-by: Martin Schwenke 
(cherry picked from commit f57d379446c551bca5906247c622e857c77089b0)

Autobuild-User(v4-6-test): Karolin Seeger 
Autobuild-Date(v4-6-test): Wed Sep 13 18:48:58 CEST 2017 on sn-devel-144

commit 9b93e4476dbebea6c6fe4991e8e4445254858ab6
Author: Amitay Isaacs 
Date:   Thu Sep 7 17:18:18 2017 +1000

ctdb-daemon: Add a function to check if db access is allowed

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

Signed-off-by: Amitay Isaacs 
Reviewed-by: Martin Schwenke 
(cherry picked from commit 5d2f2677de65a0fd6683bb759d80ebced604fa6b)

commit 0ce69f53a8e22e27d42a3d1ea6660f0eabbad9e2
Author: Amitay Isaacs 
Date:   Tue Sep 5 13:52:47 2017 +1000

ctdb-tests: Fix ctdb test binary name in path testing

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

Signed-off-by: Amitay Isaacs 
Reviewed-by: Martin Schwenke 
(cherry picked from commit 96aef2371c6c1e0c6bd13874a71583eb9609959b)

commit bae034aaa3b6049957e18b302bc27d9b8d0a4b26
Author: Martin Schwenke 
Date:   Tue Sep 12 11:51:19 2017 +1000

ctdb-tests: Wait up to 30 seconds for process to be registered in ctdbd

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

This avoids a potential race where the client is not properly
registered before "ctdb process-exists" is called.

Signed-off-by: Martin Schwenke 
Reviewed-by: Amitay Isaacs 
(cherry picked from commit ff75f0836aef56476ec45a3bc8f3ca22c118e3a4)

commit 7b4d686b5ae6537a25636569d6331435c7090eba
Author: Amitay Isaacs 
Date:   Fri Aug 25 16:55:34 2017 +1000

ctdb-tests: Fix ctdb process-exist tests

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

Signed-off-by: Amitay Isaacs 
Reviewed-by: Martin Schwenke 

Autobuild-User(master): Amitay Isaacs 
Autobuild-Date(master): Sat Sep  9 14:44:57 CEST 2017 on sn-devel-144

(cherry picked from commit 87f7d32a906799e83cb9b023978e689a630de017)

commit 037483d19e1388821ba18b999382fd653f5a02b6
Author: Amitay Isaacs 
Date:   Wed Aug 30 13:05:32 2017 +1000

ctdb-tests: Add a dummy ctdb client for testing

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

Signed-off-by: Amitay Isaacs 
Reviewed-by: Martin Schwenke 
(cherry picked from commit 3067db5b50162fdae288aaad8e75beb924fc9494)

commit 919e8b8890cf11275c9ee27851984291c793e0a8
Author: Amitay Isaacs 
Date:   Fri Aug 25 16:54:47 2017 +1000

ctdb-tests: Fix the implementation of process-exists in fake daemon

Keep track of clients and their pids.

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

Signed-off-by: Amitay Isaacs 
Reviewed-by: Martin Schwenke 

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

2017-09-10 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  dc47600 messaging: Avoid a socket leak after fork
   via  2e17f87 pthreadpool: Test fork with an active thread
   via  7b1c746 pthreadpool: Fix fork behaviour
  from  a379231 tests/fake_snap: sanitize paths

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


- Log -
commit dc476002db8792732b80c26bb22f74363a4061e3
Author: Volker Lendecke 
Date:   Wed Aug 30 17:49:54 2017 +0200

messaging: Avoid a socket leak after fork

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

Signed-off-by: Volker Lendecke 
Reviewed-by: Stefan Metzmacher 

Autobuild-User(master): Stefan Metzmacher 
Autobuild-Date(master): Tue Sep  5 19:12:34 CEST 2017 on sn-devel-144

(cherry picked from commit d1c96dc0ac95322ce46703a11002873faf55a26c)

Autobuild-User(v4-6-test): Karolin Seeger 
Autobuild-Date(v4-6-test): Sun Sep 10 19:33:24 CEST 2017 on sn-devel-144

commit 2e17f87c9905d6a484beadda4cd22e39f5aea6b9
Author: Volker Lendecke 
Date:   Fri Sep 1 15:55:00 2017 -0700

pthreadpool: Test fork with an active thread

Bug: https://bugzilla.samba.org/show_bug.cgi?id=13006
Signed-off-by: Volker Lendecke 
Reviewed-by: Jeremy Allison 
Reviewed-by: Stefan Metzmacher 

Autobuild-User(master): Volker Lendecke 
Autobuild-Date(master): Thu Aug 31 21:34:57 CEST 2017 on sn-devel-144

(cherry picked from commit 981e674a7472017274c9b169c776d5c5e8bd1469)

commit 7b1c746fe2c7e954f422a759ed9c392348a74327
Author: Volker Lendecke 
Date:   Mon Aug 28 16:38:19 2017 +0200

pthreadpool: Fix fork behaviour

glibc's pthread_cond_wait(, ) increments m.__data.__nusers, making
pthread_mutex_destroy return EBUSY. Thus we can't allow any thread waiting 
for
a job across a fork. Also, the state of the condvar itself is unclear 
across a
fork. Right now to me it looks like an initialized but unused condvar can be
used in the child. Busy worker threads don't cause any trouble here, they 
don't
hold mutexes or condvars. Also, they can't reach the condvar because 
_prepare
holds all mutexes.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=13006
Signed-off-by: Volker Lendecke 
Reviewed-by: Jeremy Allison 
Reviewed-by: Stefan Metzmacher 
(cherry picked from commit ff98e3fb666b57b56a1427aa1196948ceebdec66)

---

Summary of changes:
 source3/lib/messages_dgm.c|   3 +-
 source3/lib/pthreadpool/pthreadpool.c |  67 +++-
 source3/lib/pthreadpool/tests.c   | 114 ++
 3 files changed, 181 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/lib/messages_dgm.c b/source3/lib/messages_dgm.c
index 49b3903..935007e 100644
--- a/source3/lib/messages_dgm.c
+++ b/source3/lib/messages_dgm.c
@@ -277,7 +277,8 @@ static int messaging_dgm_out_destructor(struct 
messaging_dgm_out *out)
 {
DLIST_REMOVE(out->ctx->outsocks, out);
 
-   if (tevent_queue_length(out->queue) != 0) {
+   if ((tevent_queue_length(out->queue) != 0) &&
+   (getpid() == out->ctx->pid)) {
/*
 * We have pending jobs. We can't close the socket,
 * this has been handed over to messaging_dgm_out_queue_state.
diff --git a/source3/lib/pthreadpool/pthreadpool.c 
b/source3/lib/pthreadpool/pthreadpool.c
index f97cdcc..23885aa 100644
--- a/source3/lib/pthreadpool/pthreadpool.c
+++ b/source3/lib/pthreadpool/pthreadpool.c
@@ -89,6 +89,13 @@ struct pthreadpool {
 * Number of idle threads
 */
int num_idle;
+
+   /*
+* Condition variable indicating that we should quickly go
+* away making way for fork() without anybody waiting on
+* pool->condvar.
+*/
+   pthread_cond_t *prefork_cond;
 };
 
 static pthread_mutex_t pthreadpools_mutex = PTHREAD_MUTEX_INITIALIZER;
@@ -148,6 +155,7 @@ int pthreadpool_init(unsigned max_threads, struct 
pthreadpool **presult,
pool->num_threads = 0;
pool->max_threads = max_threads;
pool->num_idle = 0;
+   pool->prefork_cond = NULL;
 
ret = pthread_mutex_lock(_mutex);
if (ret != 0) {
@@ -169,6 +177,47 @@ int pthreadpool_init(unsigned max_threads, struct 
pthreadpool **presult,
return 0;
 }
 
+static void pthreadpool_prepare_pool(struct pthreadpool *pool)
+{
+   pthread_cond_t prefork_cond = PTHREAD_COND_INITIALIZER;
+   int ret;
+
+   ret = pthread_mutex_lock(>mutex);
+   assert(ret == 0);
+
+   while (pool->num_idle != 0) {
+  

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

2017-08-31 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  a379231 tests/fake_snap: sanitize paths
  from  76da233 vfs_default: Fix passing of errno from async calls

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


- Log -
commit a379231ffb1ba5bf5ef5b041c9aa30f5251ad462
Author: David Disseldorp via samba-technical 
Date:   Sat Aug 26 23:40:37 2017 +0200

tests/fake_snap: sanitize paths

Ensure fake_snap.pl can be run in taint mode (-T), by sanitizing paths
and the PATH env. This fixes the following samba3.rpc.fsrvp selftest
failures:
Insecure dependency in mkdir while running setgid at (eval 2) line 4.
snap create failed: NT_STATUS_UNSUCCESSFUL
snap create failed for shadow copy of /home/ddiss/isms/samba/st/nt4_dc/share

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

Signed-off-by: David Disseldorp 
Reviewed-by: Jeremy Allison 

Autobuild-User(master): Jeremy Allison 
Autobuild-Date(master): Tue Aug 29 04:54:51 CEST 2017 on sn-devel-144

(cherry picked from commit f9d4158f0b002b482df0a919d4cb337cce81f9f8)

Autobuild-User(v4-6-test): Karolin Seeger 
Autobuild-Date(v4-6-test): Thu Aug 31 16:14:33 CEST 2017 on sn-devel-144

---

Summary of changes:
 source3/script/tests/fake_snap.pl | 19 ---
 1 file changed, 16 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/script/tests/fake_snap.pl 
b/source3/script/tests/fake_snap.pl
index d1233f3..18bbcb7 100755
--- a/source3/script/tests/fake_snap.pl
+++ b/source3/script/tests/fake_snap.pl
@@ -5,14 +5,25 @@ use strict;
 use File::Path qw(rmtree);
 use POSIX ();
 
+sub _untaint_path
+{
+   my ($path) = @_;
+
+   if ($path =~ /^(.*)$/) {
+   return $1;
+   }
+   die "bad path";
+}
+
 sub _create_snapshot
 {
-   my ($base_path) = @_;
+   my ($base_path) = _untaint_path(shift);
my $time_str = POSIX::strftime("%Y.%m.%d-%H.%M.%S" , localtime());
my $snap_path = $base_path . "/.snapshots/\@GMT-" . $time_str;
my $ret;
 
-   POSIX::mkdir($base_path . "/.snapshots", 0777);
+   $ENV{'PATH'} = '/bin:/usr/bin'; # untaint PATH
+   POSIX::mkdir($base_path . "/.snapshots", 0755);
 
# add trailing slash to src path to ensure that only contents is copied
$ret = system("rsync", "-a", "--exclude=.snapshots/", "${base_path}/",
@@ -28,7 +39,8 @@ sub _create_snapshot
 
 sub _delete_snapshot
 {
-   my ($base_path, $snap_path) = @_;
+   my $base_path = _untaint_path(shift);
+   my $snap_path = _untaint_path(shift);
 
# we're doing a recursive delete, so do some sanity checks
if ((index($snap_path, $base_path) != 0) || (index($snap_path, 
".snapshots") == -1)) {
@@ -36,6 +48,7 @@ sub _delete_snapshot
return -1;
}
 
+   $ENV{'PATH'} = '/bin:/usr/bin'; # untaint PATH
rmtree($snap_path, {error => \my $err});
if (@$err) {
for my $diag (@$err) {


-- 
Samba Shared Repository



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

2017-08-28 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  76da233 vfs_default: Fix passing of errno from async calls
   via  8506375 s3:utils: Remove pointless if-clause for remote_machine
   via  eabb9ca s3:utils: Make sure we authenticate against our SAM name in 
smbpasswd
   via  ae27c7d s3:utils: Pass domain to password_change() in smbpasswd
   via  0434034 s3:utils: Make strings const passed to password_change() in 
smbpasswd
   via  2523f77 s3:libsmb: Move prototye of remote_password_change()
   via  90b5cbb s3:libsmb: Pass domain to remote_password_change()
   via  0485080 s3:gse_krb5: make use of precalculated krb5 keys in 
fill_mem_keytab_from_secrets()
   via  b6449bc s3:secrets: allow secrets_fetch_or_upgrade_domain_info() on 
an AD DC
   via  c13ab92 blackbox: Add test for 'net ads changetrustpw'
   via  85175f8 s3:libads: Fix changing passwords with Kerberos
   via  27f76f4 s3:libsmb: Print the kinit failed message with DBGLVL_NOTICE
   via  2e4ac5e s3:utils: Do not report an invalid range for AD DC role
  from  ba9c6fb vfs_fruit: factor out common code from ad_get() and 
ad_fget()

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


- Log -
commit 76da233af1693d38482527bf054ec364f8ed21e5
Author: Christof Schmitt 
Date:   Wed Aug 23 14:37:28 2017 -0700

vfs_default: Fix passing of errno from async calls

Current code assigns errno from async pthreadpool calls to the
vfs_default internal vfswrap_*_state.  The callers of the vfs_*_recv
functions expect the value from errno in vfs_aio_state.error.

Correctly assign errno to vfs_aio_state.error and remove the unused
internal err variable.

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

Signed-off-by: Christof Schmitt 
Reviewed-by: Jeremy Allison 
(cherry picked from commit a6f391b8dd1fbfd1a370667dec1374284984c341)

Autobuild-User(v4-6-test): Karolin Seeger 
Autobuild-Date(v4-6-test): Mon Aug 28 14:42:02 CEST 2017 on sn-devel-144

commit 85063757ad2f437af1b70df6b194993e045b84c8
Author: Andreas Schneider 
Date:   Tue Aug 22 15:46:07 2017 +0200

s3:utils: Remove pointless if-clause for remote_machine

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

Review with: git show -U20

Signed-off-by: Andreas Schneider 
Reviewed-by: Andrew Bartlet 
(cherry picked from commit 4a4bfcb539b4489f397b2bc9369215b7e03e620e)

commit eabb9cafa209bbf1b220e030803c954dc3d6a1ac
Author: Andreas Schneider 
Date:   Fri Aug 18 16:17:08 2017 +0200

s3:utils: Make sure we authenticate against our SAM name in smbpasswd

If a local user wants to change his password using smbpasswd and the
machine is a domain member, we need to make sure we authenticate against
our SAM and not ask winbind.

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

Signed-off-by: Andreas Schneider 
Reviewed-by: Andrew Bartlet 
(cherry picked from commit dc129a968afdac8be70f9756bd18a7bf1f4c3b02)

commit ae27c7d28c79916edb60ee55c19b6ad6b209503b
Author: Andreas Schneider 
Date:   Fri Aug 18 16:14:57 2017 +0200

s3:utils: Pass domain to password_change() in smbpasswd

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

Signed-off-by: Andreas Schneider 
Reviewed-by: Andrew Bartlet 
(cherry picked from commit b483340639157fe95777672f5723455c48c3c616)

commit 04340343dbae780e979e73fdf32139299f03c5d1
Author: Andreas Schneider 
Date:   Fri Aug 18 16:13:15 2017 +0200

s3:utils: Make strings const passed to password_change() in smbpasswd

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

Signed-off-by: Andreas Schneider 
Reviewed-by: Andrew Bartlet 
(cherry picked from commit 41a31a71abe144362fc7483fabba39aafa866373)

commit 2523f779213b8fa358c1d933d71417a90016e4e3
Author: Andreas Schneider 
Date:   Fri Aug 18 16:10:06 2017 +0200

s3:libsmb: Move prototye of remote_password_change()

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

Signed-off-by: Andreas Schneider 
Reviewed-by: Andrew Bartlet 
(cherry picked from commit c773844e7529b83b2633671c7bcf1e7b84ad7950)

commit 90b5cbb7528f28391678db4b629d893051f1bf25
Author: Andreas Schneider 
Date:   Fri Aug 18 16:08:46 2017 +0200

s3:libsmb: Pass domain to remote_password_change()

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

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

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

2017-08-14 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  ba9c6fb vfs_fruit: factor out common code from ad_get() and 
ad_fget()
   via  4afdcbf vfs_fruit: return fake pipe fd in fruit_open_meta_netatalk()
   via  4d7835f vfs_fruit: don't open basefile in ad_open() and simplify API
   via  f608905 vfs_fruit: use path based setxattr call in ad_fset()
   via  534ee86 s4/torture: additional tests for kernel-oplocks
   via  c3177ac s4/torture: reproducer for kernel oplocks issue with streams
   via  ef7ce21 vfs_streams_xattr: return a fake fd in streams_xattr_open()
   via  d811440 vfs_streams_xattr: implement all missing handle based VFS 
functions
   via  7754581 vfs_streams_xattr: always pass NULL as fsp arg to 
get_ea_value()
   via  29e8d5c vfs_streams_xattr: remove fsp argument from get_xattr_size()
   via  eddec63 vfs_streams_xattr: remove all uses of fd, use name based 
functions
   via  35924ef vfs_streams_xattr: invalidate stat info if xattr was not 
found
   via  a82411ac s3: torture: Add a test for cli_setpathinfo_basic() to 
smbtorture3.
   via  0a2ea71 s3: libsmb: Implement cli_smb2_setatr() by calling 
cli_smb2_setpathinfo().
   via  426c863 s3: libsmb: Add cli_smb2_setpathinfo(), to be called by 
cli_setpathinfo_basic().
   via  5386d7f s3: libsmbclient: Fix cli_setpathinfo_basic() to treat mode 
== -1 as no change.
   via  aafdd59 vfs_gpfs: handle EACCES when fetching DOS attributes from 
xattr
   via  d909d99 s3/smbd: handle EACCES when fetching DOS attributes from 
xattr
   via  e934f02 s3/smbd: handling of failed DOS attributes reading
   via  20ec061 s3: libsmb: Reverse sense of 'clear all attributes', ignore 
attribute change in SMB2 to match SMB1.
  from  0effa0f VERSION: Bump version up to 4.6.8...

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


- Log -
commit ba9c6fb379c706981c1171ed7e46c87eccf21427
Author: Ralph Boehme 
Date:   Wed May 24 09:17:19 2017 +0200

vfs_fruit: factor out common code from ad_get() and ad_fget()

As a result of the previous changes ad_get() and ad_fget() do completey
the same, so factor out the common code to a new helper function. No
change in behaviour.

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

Signed-off-by: Ralph Boehme 
Reviewed-by: Richard Sharpe 

Autobuild-User(master): Volker Lendecke 
Autobuild-Date(master): Wed Aug  9 22:33:36 CEST 2017 on sn-devel-144

(backported from commit d55c27abc5a7357f740c7065bbe12e7f36b57125)

Autobuild-User(v4-6-test): Karolin Seeger 
Autobuild-Date(v4-6-test): Mon Aug 14 18:31:59 CEST 2017 on sn-devel-144

commit 4afdcbfcd138243ac23e39072cba6df4b6bfac80
Author: Ralph Boehme 
Date:   Tue May 23 17:44:16 2017 +0200

vfs_fruit: return fake pipe fd in fruit_open_meta_netatalk()

Do not open the basefile, that conflict with "kernel oplocks = yes". We
just return a fake file fd based on dup'ing a pipe fd and ensure all VFS
functions that go through vfs_fruit and work on the metadata stream can
deal with it.

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

Signed-off-by: Ralph Boehme 
Reviewed-by: Richard Sharpe 
Reviewed-by: Volker Lendecke 
(backported from commit 7583ee6e1c558067e4c7a7351085fcc0e4240366)

commit 4d7835f64801ee6ac373bd7f1069590b4eee4c3c
Author: Ralph Boehme 
Date:   Tue May 23 17:31:47 2017 +0200

vfs_fruit: don't open basefile in ad_open() and simplify API

We never need an fd on the basefile when operating on the metadata, as
we can always use path based syscalls. Opening the basefile conflicts
with "kernel oplocks" so just don't do it.

Additional changes:

- remove the adouble_type_t argument to ad_open(), the type is passed
  and set when allocating a struct adouble with ad_alloc()

- additionally pass an optional fsp to ad_open() (so the caller can pass
  NULL). With this change we can move the fd inheritance from fsp to ad
  into ad_open() itself where it belongs and remove it from the caller
  ad_fget()

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

Signed-off-by: Ralph Boehme 
Reviewed-by: Richard Sharpe 
(backported from commit e92a39255e66f655e2758f0a71a01eaf258cf711)

commit f6089059301d948aa8d6f69801f3e5fd56893b0e
Author: Ralph Boehme 
Date:   Tue May 23 17:39:46 2017 +0200

vfs_fruit: use path based setxattr call in ad_fset()

This allows later commits to remove opening of the basefile which
conflict with "kernel oplocks = yes".

Bug: 

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

2017-08-08 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  0effa0f VERSION: Bump version up to 4.6.8...
   via  a42a92b VERSION: Disable GIT_SNAPSHOTS for the 4.6.7 release.
   via  7f7e329 WHATSNEW: Add release notes for Samba 4.6.7.
  from  f2a0600 s4-cldap/netlogon: Match Windows 2012R2 and return 
NETLOGON_NT_VERSION_5 when version unspecified

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


- Log -
commit 0effa0f1427cc6558b2be749f71f33e54ff3e47e
Author: Karolin Seeger 
Date:   Tue Aug 8 08:53:13 2017 +0200

VERSION: Bump version up to 4.6.8...

and re-enable GIT_SNAPSHOTS.

Signed-off-by: Karolin Seeger 

commit a42a92b09dab03e7872c5f5ee21e651c1ab5542d
Author: Karolin Seeger 
Date:   Tue Aug 8 08:52:21 2017 +0200

VERSION: Disable GIT_SNAPSHOTS for the 4.6.7 release.

Signed-off-by: Karolin Seeger 

commit 7f7e329054fa99262011e75a09e8a806b7ef00b1
Author: Karolin Seeger 
Date:   Fri Aug 4 11:17:12 2017 +0200

WHATSNEW: Add release notes for Samba 4.6.7.

Signed-off-by: Karolin Seeger 

---

Summary of changes:
 VERSION  |  2 +-
 WHATSNEW.txt | 90 ++--
 2 files changed, 89 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/VERSION b/VERSION
index f8575ad..3a8de1a 100644
--- a/VERSION
+++ b/VERSION
@@ -25,7 +25,7 @@
 
 SAMBA_VERSION_MAJOR=4
 SAMBA_VERSION_MINOR=6
-SAMBA_VERSION_RELEASE=7
+SAMBA_VERSION_RELEASE=8
 
 
 # If a official release has a serious bug  #
diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index 75d90b7..87c4579 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -1,4 +1,90 @@
=
+   Release Notes for Samba 4.6.7
+   August 9, 2017
+   =
+
+
+This is the latest stable release of the Samba 4.6 release series.
+
+
+Changes since 4.6.6:
+-
+
+o  Jeremy Allison 
+   * BUG 12836: s3: smbd: Fix a read after free if a chained SMB1 call goes 
async.
+
+o  Andrew Bartlett 
+   * BUG 11392: s4-cldap/netlogon: Match Windows 2012R2 and return
+ NETLOGON_NT_VERSION_5 when version unspecified.
+
+o  Ralph Boehme 
+   * BUG 12885: s3/smbd: Let non_widelink_open() chdir() to directories 
directly.
+   * BUG 12910: s3/notifyd: Ensure notifyd doesn't return from
+ smbd_notifyd_init.
+
+o  Günther Deschner 
+   * BUG 12840: vfs_fruit: Add fruit:model =  parametric option.
+
+o  David Disseldorp 
+   * BUG 12911: vfs_ceph: Fix cephwrap_chdir().
+
+o  Dustin L. Howett
+   * BUG 12720: idmap_ad: Retry query_user exactly once if we get
+ TLDAP_SERVER_DOWN.
+
+o  Thomas Jarosch 
+   * BUG 12927: s3: libsmb: Fix use-after-free when accessing pointer *p.
+
+o  Volker Lendecke 
+   * BUG 12925: smbd: Fix a connection run-down race condition.
+
+o  Stefan Metzmacher 
+   * BUG 12782: winbindd changes the local password and gets
+ NT_STATUS_WRONG_PASSWORD for the remote change.
+   * BUG 12890: s3:smbd: consistently use talloc_tos() memory for
+ rpc_pipe_open_interface().
+
+o  Noel Power 
+   * BUG 12937: smbcacls: Don't fail against a directory on Windows using SMB2.
+
+o  Arvid Requate 
+   * BUG 11392: s4-dsdb/netlogon: Allow missing ntver in cldap ping.
+
+o  Garming Sam 
+   * BUG 12813: dnsserver: Stop dns_name_equal doing OOB read.
+
+o  Andreas Schneider 
+   * BUG 12886: s3:client: The smbspool krb5 wrapper needs negotiate for
+ authentication.
+
+o  Martin Schwenke 
+   * BUG 12898: ctdb-common: Set close-on-exec when creating PID file.
+
+
+###
+Reporting bugs & Development Discussion
+###
+
+Please discuss this release on the samba-technical mailing list or by
+joining the #samba-technical IRC channel on irc.freenode.net.
+
+If you do report problems then please try to send high quality
+feedback. If you don't provide vital information to help us track down
+the problem then you will probably be ignored.  All bug reports should
+be filed under the "Samba 4.1 and newer" product in the project's Bugzilla
+database (https://bugzilla.samba.org/).
+
+
+==
+== Our Code, Our Bugs, Our Responsibility.
+== The Samba Team

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

2017-08-01 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  f2a0600 s4-cldap/netlogon: Match Windows 2012R2 and return 
NETLOGON_NT_VERSION_5 when version unspecified
   via  0ee93fe s4-dsdb/netlogon: allow missing ntver in cldap ping
   via  38d8f3c s4:torture/ldap: Test netlogon without NtVer
   via  3a5cf43 s3/utils: smbcacls failed to detect DIRECTORIES using SMB2 
(windows only)
  from  fd96410 vfs_ceph: fix cephwrap_chdir()

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


- Log -
commit f2a06000cc8239c7631b168fbc0b109af7de9d09
Author: Andrew Bartlett 
Date:   Tue Jul 25 14:26:45 2017 +1200

s4-cldap/netlogon: Match Windows 2012R2 and return NETLOGON_NT_VERSION_5 
when version unspecified

The previous patch set this incorrectly to NETLOGON_NT_VERSION_1

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

Signed-off-by: Andrew Bartlett 
Reviewed-by: Douglas Bagnall 
(cherry picked from commit 0554bc237f1b84d672d36781bead8b2c33f2e5a4)

Autobuild-User(v4-6-test): Karolin Seeger 
Autobuild-Date(v4-6-test): Tue Aug  1 12:15:22 CEST 2017 on sn-devel-144

commit 0ee93fee3ae94d3a16478199729aedddef16002f
Author: Arvid Requate 
Date:   Thu Jun 22 13:37:13 2017 +0200

s4-dsdb/netlogon: allow missing ntver in cldap ping

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

Signed-off-by: Arvid Requate 
Reviewed-by: Douglas Bagnall 
Reviewed-by: Andrew Bartlett 
(cherry picked from commit 88db634ed84647e5105c4b4fdf37d5892bebfd8d)

commit 38d8f3c70d9b88eb501eb8bd6435f66c5873b4d9
Author: Arvid Requate 
Date:   Tue Jun 20 20:05:17 2017 +0200

s4:torture/ldap: Test netlogon without NtVer

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

Signed-off-by: Arvid Requate 
Reviewed-by: Douglas Bagnall 
Reviewed-by: Andrew Bartlett 
(cherry picked from commit 22a94b728bd5d513b2002b62c129271d2210ed73)

commit 3a5cf43fca3b3e2b0ccf9b4ce2be4968aa7baa80
Author: Noel Power 
Date:   Thu Jul 20 13:01:50 2017 +0100

s3/utils: smbcacls failed to detect DIRECTORIES using SMB2 (windows only)

uint16_t get_fileinfo(...) returns file attributes, this function
called

 cli_qfileinfo_basic(cli, fnum, , NULL, NULL, NULL,
 NULL, NULL, NULL);

which was failing with NT_STATUS_ACCESS_DENIED errors when fnum above
was obtained via (when using protocol > SMB). Note: This only seems to be
an issue when run against a windows server, with smbd SMB1 & SMB2 work fine.

status = cli_ntcreate(cli, filename, 0, CREATE_ACCESS_READ,
  0, FILE_SHARE_READ|FILE_SHARE_WRITE,
  FILE_OPEN, 0x0, 0x0, , NULL);

The failing cli_qfileinfo_basic call above is unnecessary as we can already
obtain the required information from the cli_ntcreate call

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

Signed-off-by: Noel Power 
Reviewed-by: Jeremy Allison 
Reviewed-by: David Disseldorp 
(cherry picked from commit c57dcafb150823b00fd873046e65a966a8488fa8)

---

Summary of changes:
 source3/utils/smbcacls.c  | 14 ++---
 source4/dsdb/samdb/ldb_modules/netlogon.c |  6 +---
 source4/torture/ldap/netlogon.c   | 48 +++
 3 files changed, 52 insertions(+), 16 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/utils/smbcacls.c b/source3/utils/smbcacls.c
index b56fba7..05f98f8 100644
--- a/source3/utils/smbcacls.c
+++ b/source3/utils/smbcacls.c
@@ -229,30 +229,22 @@ get fileinfo for filename
 static uint16_t get_fileinfo(struct cli_state *cli, const char *filename)
 {
uint16_t fnum = (uint16_t)-1;
-   uint16_t mode = 0;
NTSTATUS status;
+   struct smb_create_returns cr = {0};
 
/* The desired access below is the only one I could find that works
   with NT4, W2KP and Samba */
 
status = cli_ntcreate(cli, filename, 0, CREATE_ACCESS_READ,
  0, FILE_SHARE_READ|FILE_SHARE_WRITE,
- FILE_OPEN, 0x0, 0x0, , NULL);
+ FILE_OPEN, 0x0, 0x0, , );
if (!NT_STATUS_IS_OK(status)) {
printf("Failed to open %s: %s\n", filename, nt_errstr(status));
return 0;
}
 
-   status = cli_qfileinfo_basic(cli, fnum, , NULL, NULL, NULL,
-   

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

2017-07-25 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  fd96410 vfs_ceph: fix cephwrap_chdir()
  from  a81b8f2 s3: smbd: Fix a read after free if a chained SMB1 call goes 
async.

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


- Log -
commit fd96410de65a588bc8db5917ea8b865718c40f6c
Author: David Disseldorp 
Date:   Fri Jul 14 23:55:29 2017 +0200

vfs_ceph: fix cephwrap_chdir()

When provided a '/' path (i.e. CephFS root), vfs_ceph does a *local*
chdir() to the share path. This breaks smb client directory listings.

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

Signed-off-by: David Disseldorp 
Reviewed-by: Jeremy Allison 

Autobuild-User(master): David Disseldorp 
Autobuild-Date(master): Fri Jul 21 19:10:46 CEST 2017 on sn-devel-144

(cherry picked from commit 1dcacff083019810e207a3d123a81fe32d9dde1a)

Autobuild-User(v4-6-test): Karolin Seeger 
Autobuild-Date(v4-6-test): Tue Jul 25 19:51:08 CEST 2017 on sn-devel-144

---

Summary of changes:
 source3/modules/vfs_ceph.c | 7 ---
 1 file changed, 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_ceph.c b/source3/modules/vfs_ceph.c
index 75233ef..e3d22bf 100644
--- a/source3/modules/vfs_ceph.c
+++ b/source3/modules/vfs_ceph.c
@@ -916,13 +916,6 @@ static int cephwrap_chdir(struct vfs_handle_struct 
*handle,  const char *path)
 {
int result = -1;
DBG_DEBUG("[CEPH] chdir(%p, %s)\n", handle, path);
-   /*
-* If the path is just / use chdir because Ceph is below / and
-* cannot deal with changing directory above its mount point
-*/
-   if (path && !strcmp(path, "/"))
-   return chdir(path);
-
result = ceph_chdir(handle->data, path);
DBG_DEBUG("[CEPH] chdir(...) = %d\n", result);
WRAP_RETURN(result);


-- 
Samba Shared Repository



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

2017-07-24 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  a81b8f2 s3: smbd: Fix a read after free if a chained SMB1 call goes 
async.
  from  6155eba s3: libsmb: Fix use-after-free when accessing pointer *p.

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


- Log -
commit a81b8f2c1355976f48c0a791b868066526a63922
Author: Jeremy Allison 
Date:   Thu Jul 13 12:06:58 2017 -0700

s3: smbd: Fix a read after free if a chained SMB1 call goes async.

Reported to the Samba Team by Yihan Lian , a security
researcher of Qihoo 360 GearTeam. Thanks a lot!

smb1_parse_chain() incorrectly used talloc_tos() for the memory
context of the chained smb1 requests. This gets freed between
requests so if a chained request goes async, the saved request
array also is freed, which causes a crash on resume.

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

Signed-off-by: Jeremy Allison 
Reviewed-by: Stefan Metzmacher 
(cherry picked from commit 5fe76a5474823ed7602938a07c9c43226a7882a3)

Autobuild-User(v4-6-test): Karolin Seeger 
Autobuild-Date(v4-6-test): Tue Jul 25 06:16:37 CEST 2017 on sn-devel-144

---

Summary of changes:
 source3/smbd/process.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index 8f097ec..656f1c0 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -1784,7 +1784,7 @@ static void construct_reply_chain(struct 
smbXsrv_connection *xconn,
unsigned num_reqs;
bool ok;
 
-   ok = smb1_parse_chain(talloc_tos(), (uint8_t *)inbuf, xconn, encrypted,
+   ok = smb1_parse_chain(xconn, (uint8_t *)inbuf, xconn, encrypted,
  seqnum, , _reqs);
if (!ok) {
char errbuf[smb_size];


-- 
Samba Shared Repository



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

2017-07-23 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  6155eba s3: libsmb: Fix use-after-free when accessing pointer *p.
   via  378886b smbd: Fix a connection run-down race condition
   via  c1e5a22 s3/notifyd: ensure notifyd doesn't return from 
smbd_notifyd_init
   via  8c0f377 ctdb-common: Set close-on-exec when creating PID file
   via  791b217 vfs_fruit: don't use MS NFS ACEs with Windows clients
   via  6af5fcc s3:client: The smbspool krb5 wrapper needs negotiate for 
authentication
   via  1714d0c vfs_fruit: add fruit:model =  parametric option
   via  1ec8c4a idmap_ad: Retry query_user exactly once if we get 
TLDAP_SERVER_DOWN
  from  73550d1 selftest: Do not force run of kcc at start of selftest

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


- Log -
commit 6155eba0dbde13f5ba5122b590cad6e3de9af186
Author: Thomas Jarosch 
Date:   Sat Jul 22 09:36:18 2017 -0700

s3: libsmb: Fix use-after-free when accessing pointer *p.

talloc_asprintf_append() might call realloc()
and therefore move the memory address of "path".

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

Signed-off-by: Thomas Jarosch 
Reviewed-by: Jeremy Allison 
Reviewed-by: Ralph Böhme 

Autobuild-User(master): Jeremy Allison 
Autobuild-Date(master): Sat Jul 22 22:45:05 CEST 2017 on sn-devel-144

(cherry picked from commit 890137cffedcaf88a9ff808c01335ee14fcfd8da)

Autobuild-User(v4-6-test): Karolin Seeger 
Autobuild-Date(v4-6-test): Mon Jul 24 02:24:33 CEST 2017 on sn-devel-144

commit 378886b89c3570c8f4fee27a196dd347006d1445
Author: Volker Lendecke 
Date:   Wed Jul 19 14:51:33 2017 +0200

smbd: Fix a connection run-down race condition

When we do a server exit with active aio jobs, we need to keep the
aio state active for the helper thread. Right now I don't see another
chance than to leak memory in this case. And, I don't really oversee
how cancelling requests works in this case, but this does fix crashes
seen at a customer site.

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

Signed-off-by: Volker Lendecke 
Reviewed-by: Jeremy Allison 
(cherry picked from commit 0181fcc4aaa730e3a88ff5d397145332f4013950)

commit c1e5a2283e9d239e8a9ddbc02df2feb31180cfef
Author: Ralph Boehme 
Date:   Fri Jul 14 16:38:36 2017 +0200

s3/notifyd: ensure notifyd doesn't return from smbd_notifyd_init

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

Signed-off-by: Ralph Boehme 
Reviewed-by: Jeremy Allison 
(cherry picked from commit 7f4e7cfd1b0bd917395c631a1a8195fffd13bbad)

commit 8c0f3775dd9e488e47e65f9c5be1a5c6d50ac7aa
Author: Martin Schwenke 
Date:   Wed Jul 12 13:41:17 2017 +1000

ctdb-common: Set close-on-exec when creating PID file

Otherwise, for example, the file descriptor for the main PID file will
leak all the way down to event scripts.

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

Signed-off-by: Martin Schwenke 
Reviewed-by: Amitay Isaacs 
(cherry picked from commit 3e85cbfd7541d8f30ce1f3244ebcc44332b394fe)

commit 791b217458d89a9c9fad6d29dd1998856ef5214f
Author: Ralph Boehme 
Date:   Wed Jul 12 09:33:59 2017 +0200

vfs_fruit: don't use MS NFS ACEs with Windows clients

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

Signed-off-by: Ralph Boehme 
Reviewed-by: Guenther Deschner 

Autobuild-User(master): Günther Deschner 
Autobuild-Date(master): Thu Jul 13 22:21:08 CEST 2017 on sn-devel-144

(cherry picked from commit df0db9d8f893f9245c6289200303b94a6e2d48d0)

commit 6af5fccbb9a7e8a12e6e598a7f81f20b50aa84a1
Author: Andreas Schneider 
Date:   Fri Jul 7 14:08:49 2017 +0200

s3:client: The smbspool krb5 wrapper needs negotiate for authentication

If you create a new printer it doesn't have AuthInfoRequired set and so
cups calls the backend with:

  AUTH_INFO_REQUIRED=none

In this case we need to return:

  ATTR: auth-info-required=negotiate

and return an error that we require authentication.

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

Signed-off-by: Andreas Schneider 
Reviewed-by: Jeremy Allison 

(cherry picked from commit 4cced4da4ca97f0c6db227e6b2c7e03c2e5c1f28)

commit 1714d0cfa22d7deb93d90ef134c522a9e57d1064
Author: Günther Deschner 
Date:   Wed Jun 28 18:10:28 2017 +0200

vfs_fruit: 

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

2017-07-19 Thread Stefan Metzmacher
The branch, v4-6-test has been updated
   via  73550d1 selftest: Do not force run of kcc at start of selftest
  from  9251372 selftest:Samba3: call "net primarytrust dumpinfo" 
setup_nt4_member() after the join

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


- Log -
commit 73550d1e30e34869dbefa26994146910835fe98b
Author: Bob Campbell 
Date:   Tue Jan 10 09:20:47 2017 +1300

selftest: Do not force run of kcc at start of selftest

This should help to avoid clashes between periodic and manual runs of
the KCC during autobuild.

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

Pair-Programmed-With: Andrew Bartlett 

Signed-off-by: Bob Campbell 
Signed-off-by: Andrew Bartlett 
Reviewed-by: Stefan Metzmacher 
(cherry picked from commit c0a7d2bacdacc7a43e04f3b450ea069c000b3d8d)

Autobuild-User(v4-6-test): Stefan Metzmacher 
Autobuild-Date(v4-6-test): Thu Jul 20 01:54:41 CEST 2017 on sn-devel-144

---

Summary of changes:
 selftest/target/Samba4.pm | 53 +--
 1 file changed, 1 insertion(+), 52 deletions(-)


Changeset truncated at 500 lines:

diff --git a/selftest/target/Samba4.pm b/selftest/target/Samba4.pm
index a89773f..f66bfcd 100755
--- a/selftest/target/Samba4.pm
+++ b/selftest/target/Samba4.pm
@@ -2257,27 +2257,11 @@ sub setup_vampire_dc($$$)
# force replicated DC to update repsTo/repsFrom
# for vampired partitions
my $samba_tool =  Samba::bindir_path($self, "samba-tool");
-   my $cmd = "";
-   $cmd .= 
"SOCKET_WRAPPER_DEFAULT_IFACE=\"$env->{SOCKET_WRAPPER_DEFAULT_IFACE}\" ";
-   if (defined($env->{RESOLV_WRAPPER_CONF})) {
-   $cmd .= 
"RESOLV_WRAPPER_CONF=\"$env->{RESOLV_WRAPPER_CONF}\" ";
-   } else {
-   $cmd .= 
"RESOLV_WRAPPER_HOSTS=\"$env->{RESOLV_WRAPPER_HOSTS}\" ";
-   }
-   $cmd .= " KRB5_CONFIG=\"$env->{KRB5_CONFIG}\"";
-   $cmd .= "KRB5CCNAME=\"$env->{KRB5_CCACHE}\" ";
-   $cmd .= " $samba_tool drs kcc -k no $env->{DC_SERVER}";
-   $cmd .= " $env->{CONFIGURATION}";
-   $cmd .= " -U$dc_vars->{DC_USERNAME}\%$dc_vars->{DC_PASSWORD}";
-   unless (system($cmd) == 0) {
-   warn("Failed to exec kcc on remote DC\n$cmd");
-   return undef;
-   }
 
# as 'vampired' dc may add data in its local replica
# we need to synchronize data between DCs
my $base_dn = "DC=".join(",DC=", split(/\./, 
$dc_vars->{REALM}));
-   $cmd = "";
+   my $cmd = "";
$cmd .= 
"SOCKET_WRAPPER_DEFAULT_IFACE=\"$env->{SOCKET_WRAPPER_DEFAULT_IFACE}\" ";
if (defined($env->{RESOLV_WRAPPER_CONF})) {
$cmd .= 
"RESOLV_WRAPPER_CONF=\"$env->{RESOLV_WRAPPER_CONF}\" ";
@@ -2350,30 +2334,6 @@ sub setup_promoted_dc($$$)
# for vampired partitions
my $samba_tool =  Samba::bindir_path($self, "samba-tool");
my $cmd = "";
-   $cmd .= 
"SOCKET_WRAPPER_DEFAULT_IFACE=\"$env->{SOCKET_WRAPPER_DEFAULT_IFACE}\"";
-   $cmd .= " KRB5_CONFIG=\"$env->{KRB5_CONFIG}\"";
-   $cmd .= "KRB5CCNAME=\"$env->{KRB5_CCACHE}\" ";
-   $cmd .= " $samba_tool drs kcc $env->{DC_SERVER}";
-   $cmd .= " $env->{CONFIGURATION}";
-   $cmd .= " -U$dc_vars->{DC_USERNAME}\%$dc_vars->{DC_PASSWORD}";
-   unless (system($cmd) == 0) {
-   warn("Failed to exec kcc on remote DC\n$cmd");
-   return undef;
-   }
-
-   my $samba_tool =  Samba::bindir_path($self, "samba-tool");
-   my $cmd = "";
-   $cmd .= 
"SOCKET_WRAPPER_DEFAULT_IFACE=\"$env->{SOCKET_WRAPPER_DEFAULT_IFACE}\"";
-   $cmd .= " KRB5_CONFIG=\"$env->{KRB5_CONFIG}\"";
-   $cmd .= "KRB5CCNAME=\"$env->{KRB5_CCACHE}\" ";
-   $cmd .= " $samba_tool drs kcc $env->{SERVER}";
-   $cmd .= " $env->{CONFIGURATION}";
-   $cmd .= " -U$dc_vars->{DC_USERNAME}\%$dc_vars->{DC_PASSWORD}";
-   unless (system($cmd) == 0) {
-   warn("Failed to exec kcc on promoted DC\n$cmd");
-   return undef;
-   }
-
# as 'vampired' dc may add data in its local replica
# we need to synchronize data between DCs
my $base_dn = "DC=".join(",DC=", split(/\./, 
$dc_vars->{REALM}));
@@ -2417,17 +2377,6 @@ sub 

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

2017-07-13 Thread Stefan Metzmacher
The branch, v4-6-test has been updated
   via  9251372 selftest:Samba3: call "net primarytrust dumpinfo" 
setup_nt4_member() after the join
   via  dd573c0 s3:secrets: remove unused 
secrets_store_[prev_]machine_password()
   via  d71aa30 s3:libads: make use of secrets_*_password_change() in 
ads_change_trust_account_password()
   via  15a7a36 net: make use of secrets_*_password_change() for "net 
changesecretpw"
   via  13a2325 s3:trusts_util: make use the workstation password change 
more robust
   via  de1faa7 s3:libnet: make use of secrets_store_JoinCtx()
   via  56403c7 net: add "net primarytrust dumpinfo" command that dumps the 
details of the workstation trust
   via  835cc12 s3:secrets: add infrastructure to use secrets_domain_infoB 
to store credentials
   via  cc67ccb secrets.idl: add secrets_domain_info that will be used in 
secrets.tdb for machine account trusts
   via  d80ef0b netlogon.idl: use lsa_TrustType and lsa_TrustAttributes in 
netr_trust_extension
   via  59e23da netlogon.idl: make netr_TrustFlags [public]
   via  b7e7ac3 lsa.idl: make lsa_DnsDomainInfo [public]
   via  fc98574 s3:trusts_util: also pass the previous_nt_hash to 
netlogon_creds_cli_auth()
   via  f7c05a3 libcli/auth: pass the cleartext blob to 
netlogon_creds_cli_ServerPasswordSet*()
   via  5d56612 libcli/auth: add const to set_pw_in_buffer()
   via  29fa179 libcli/auth: pass an array of nt_hashes to 
netlogon_creds_cli_auth*()
   via  d41f361 s3:trusts_util: pass dcname to trust_pw_change()
   via  324af75 s3:secrets: use secrets_delete for all keys in 
secrets_delete_machine_password_ex()
   via  7481722 s3:secrets: let secrets_delete_machine_password_ex() also 
remove the des_salt key
   via  36ae6bc s3:secrets: let secrets_delete_machine_password_ex() remove 
SID and GUID too
   via  fc8506d s3:secrets: rewrite secrets_delete_machine_password_ex() 
using helper variables
   via  bce615d s3:secrets: replace secrets_delete_prev_machine_password() 
by secrets_delete()
   via  c54cf09 s3:secrets: let secrets_store_machine_pw_sync() delete the 
des_salt_key when there's no value
   via  dd0f49a s3:secrets: make use of secrets_delete() in 
secrets_store_machine_pw_sync()
   via  4e649f7 s3:secrets: re-add secrets_delete() helper to simplify 
deleting optional keys
   via  45ed7f3 s3:secrets: rename secrets_delete() to 
secrets_delete_entry()
   via  e67bc70 s3:secrets: make use of des_salt_key() in 
secrets_store_machine_pw_sync()
   via  f8dc7f3 s3:secrets: add some const to secrets_store_domain_guid()
   via  f297455 s3:secrets: split out a domain_guid_keystr() function
   via  3341df2 s3:secrets: rework des_salt_key() to take the realm as 
argument
   via  cfba2c4 s3:secrets: move kerberos_secrets_*salt related functions 
to machine_account_secrets.c
   via  f68f8f6 s3:libads: remove unused 
kerberos_fetch_salt_princ_for_host_princ()
   via  0ce8cd8 s3:libads: make use of kerberos_secrets_fetch_salt_princ() 
in ads_keytab_add_entry()
   via  bf90563 s3:libnet: make use of kerberos_secrets_fetch_salt_princ()
   via  14add2c s3:gse_krb5: simplify fill_keytab_from_password() by using 
kerberos_fetch_salt_princ()
   via  6e1f7e2 s3:libads: provide a simpler kerberos_fetch_salt_princ() 
function
   via  bfccba4 s3:libads: remove 
kerberos_secrets_fetch_salting_principal() fallback
   via  beb5f2b s3:libnet_join: move kerberos_secrets_store_des_salt() to 
libnet_join_joindomain_store_secrets()
   via  4e5c9b5 s3:libnet_join: move libnet_join_joindomain_store_secrets() 
to libnet_join_post_processing()
   via  cb36b61 s3:libnet_join: call do_JoinConfig() after we did remote 
changes on the server
   via  1b648aa s3:libnet_join: split libnet_join_post_processing_ads() 
into modify/sync
   via  b098b48 s3:libnet_join: move kerberos_secrets_store_des_salt() out 
of libnet_join_derive_salting_principal()
   via  e709972 s3:libnet_join: remember r->out.krb5_salt in 
libnet_join_derive_salting_principal()
   via  15cefb9 s3:libnet_join.idl: add krb5_salt to libnet_JoinCtx
   via  d353c40 s3:libnet_join: remember the domain_guid for AD domains
   via  0c9f0d5 s3:libnet_join.idl: return the domain_guid in libnet_JoinCtx
   via  43cce73 s3:libnet_join: calculate r->out.account_name in 
libnet_join_pre_processing()
   via  b76556f s3:libnet_join: remove dead code from 
libnet_join_connect_ads()
   via  691d69f krb5_wrap: add smb_krb5_salt_principal2data()
   via  ea40c72 krb5_wrap: add smb_krb5_salt_principal()
   via  cf5d62e s3:libads: remove unused 
kerberos_secrets_store_salting_principal()
   via  5687cb0 s3:librpc: let NDR_SECRETS depend on NDR_SECURITY
   via  6297a35 idl_types.h: add NDR_SECRET shortcut
   via  48a9a30 librpc/ndr: add LIBNDR_FLAG_IS_SECRET handling
   via  e73f37d librpc/ndr: align the 

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

2017-07-12 Thread Stefan Metzmacher
The branch, v4-6-test has been updated
   via  7b04fb4 VERSION: Bump version up to 4.6.7...
   via  b528634 Merge branch 'v4-6-stable' into v4-6-test
   via  55d7150 VERSION: Release Samba 4.6.6 for CVE-2017-11103
   via  64a40b5 WHATSNEW: Add release notes for Samba 4.6.6.
   via  9b0972c CVE-2017-11103: Orpheus' Lyre KDC-REP service name 
validation
  from  05782d5 s3:tests: Do *NOT* flush the complete gencache!

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


- Log -
commit 7b04fb46d2656f88a6b1084604eef44ef1220563
Author: Stefan Metzmacher 
Date:   Wed Jul 12 13:34:37 2017 +0200

VERSION: Bump version up to 4.6.7...

and re-enable GIT_SNAPSHOTS.

Signed-off-by: Stefan Metzmacher 

commit b528634c8376f52392dab5b5faf9980f390810fd
Merge: 05782d5 55d7150
Author: Stefan Metzmacher 
Date:   Wed Jul 12 13:32:22 2017 +0200

Merge branch 'v4-6-stable' into v4-6-test

---

Summary of changes:
 VERSION   |  2 +-
 WHATSNEW.txt  | 57 +--
 source4/heimdal/lib/krb5/ticket.c |  4 +--
 3 files changed, 58 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/VERSION b/VERSION
index a14f0ff..f8575ad 100644
--- a/VERSION
+++ b/VERSION
@@ -25,7 +25,7 @@
 
 SAMBA_VERSION_MAJOR=4
 SAMBA_VERSION_MINOR=6
-SAMBA_VERSION_RELEASE=6
+SAMBA_VERSION_RELEASE=7
 
 
 # If a official release has a serious bug  #
diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index ab2182c..75d90b7 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -1,4 +1,57 @@
=
+   Release Notes for Samba 4.6.6
+July 12, 2017
+   =
+
+
+This is a security release in order to address the following defect:
+
+o  CVE-2017-11103 (Orpheus' Lyre mutual authentication validation bypass)
+
+===
+Details
+===
+
+o  CVE-2017-11103 (Heimdal):
+   All versions of Samba from 4.0.0 onwards using embedded Heimdal
+   Kerberos are vulnerable to a man-in-the-middle attack impersonating
+   a trusted server, who may gain elevated access to the domain by
+   returning malicious replication or authorization data.
+
+   Samba binaries built against MIT Kerberos are not vulnerable.
+
+
+Changes since 4.6.5:
+-
+
+o  Jeffrey Altman 
+   * BUG 12894: CVE-2017-11103: Orpheus' Lyre KDC-REP service name validation
+
+
+###
+Reporting bugs & Development Discussion
+###
+
+Please discuss this release on the samba-technical mailing list or by
+joining the #samba-technical IRC channel on irc.freenode.net.
+
+If you do report problems then please try to send high quality
+feedback. If you don't provide vital information to help us track down
+the problem then you will probably be ignored.  All bug reports should
+be filed under the "Samba 4.1 and newer" product in the project's Bugzilla
+database (https://bugzilla.samba.org/).
+
+
+==
+== Our Code, Our Bugs, Our Responsibility.
+== The Samba Team
+==
+
+
+Release notes for older releases follow:
+
+
+   =
Release Notes for Samba 4.6.5
 June 6, 2017
=
@@ -78,8 +131,8 @@ database (https://bugzilla.samba.org/).
 ==
 
 
-Release notes for older releases follow:
-
+--
+
 
=
Release Notes for Samba 4.6.4
diff --git a/source4/heimdal/lib/krb5/ticket.c 
b/source4/heimdal/lib/krb5/ticket.c
index 064bbfb..5a317c7 100644
--- a/source4/heimdal/lib/krb5/ticket.c
+++ b/source4/heimdal/lib/krb5/ticket.c
@@ -641,8 +641,8 @@ _krb5_extract_ticket(krb5_context context,
 /* check server referral and save principal */
 ret = _krb5_principalname2krb5_principal (context,
  _principal,
- rep->kdc_rep.ticket.sname,
- rep->kdc_rep.ticket.realm);
+ rep->enc_part.sname,
+ 

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

2017-07-06 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  05782d5 s3:tests: Do *NOT* flush the complete gencache!
   via  24a5c45 selftest: Do *NOT* flush the complete gencache!
  from  cb6771c ldb: protect Samba < 4.7 against incompatible ldb versions 
and require ldb < 1.2.0

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


- Log -
commit 05782d5cc0ed8bacac9fe8b254bd0da543010b99
Author: Andreas Schneider 
Date:   Wed Jun 28 14:58:41 2017 +0200

s3:tests: Do *NOT* flush the complete gencache!

This removes important entries winbindd created during startup!

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

Pair-Programmed-With: Ralph Boehme 

Signed-off-by: Andreas Schneider 
Signed-off-by: Ralph Boehme 
(cherry picked from commit 45da755430c6b124335c9dfeb8a252060823ac4c)

Autobuild-User(v4-6-test): Karolin Seeger 
Autobuild-Date(v4-6-test): Thu Jul  6 13:17:19 CEST 2017 on sn-devel-144

commit 24a5c45b431b4eeec66b5b4002a58fb09b3dbae2
Author: Andreas Schneider 
Date:   Wed Jun 28 14:49:45 2017 +0200

selftest: Do *NOT* flush the complete gencache!

This removes *IMPORTANT* entries from the gencache winbindd creates on
startup.

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

Pair-Programmed-With: Ralph Boehme 

Signed-off-by: Andreas Schneider 
Signed-off-by: Ralph Boehme 
(cherry picked from commit 0a0fbaacbcbaa52ed5008e84958e2aea90cdba7c)

---

Summary of changes:
 selftest/target/Samba3.pm |  2 +-
 source3/script/tests/test_wbinfo_sids2xids_int.py | 25 ++-
 2 files changed, 16 insertions(+), 11 deletions(-)


Changeset truncated at 500 lines:

diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm
index 5cdbb9b..ee3fc86 100755
--- a/selftest/target/Samba3.pm
+++ b/selftest/target/Samba3.pm
@@ -2248,7 +2248,7 @@ sub wait_for_start($)
}
my $count = 0;
do {
-   system(Samba::bindir_path($self, "net") . " 
$envvars->{CONFIGURATION} cache flush");
+   system(Samba::bindir_path($self, "net") . " 
$envvars->{CONFIGURATION} cache del IDMAP/SID2XID/S-1-5-32-545");
$ret = system("SELFTEST_WINBINDD_SOCKET_DIR=" . 
$envvars->{SELFTEST_WINBINDD_SOCKET_DIR} . " " . Samba::bindir_path($self, 
"wbinfo") . " --sid-to-gid=S-1-5-32-545");
if ($ret != 0) {
sleep(2);
diff --git a/source3/script/tests/test_wbinfo_sids2xids_int.py 
b/source3/script/tests/test_wbinfo_sids2xids_int.py
index 3ad3156..2180445 100755
--- a/source3/script/tests/test_wbinfo_sids2xids_int.py
+++ b/source3/script/tests/test_wbinfo_sids2xids_int.py
@@ -10,8 +10,13 @@ if len(sys.argv) != 3:
 wbinfo = sys.argv[1]
 netcmd = sys.argv[2]
 
-def flush_cache():
-os.system(netcmd + " cache flush")
+def flush_cache(sids=[], uids=[], gids=[]):
+for sid in sids:
+os.system(netcmd + (" cache del IDMAP/SID2XID/%s" % (sid)))
+for uids in uids:
+os.system(netcmd + (" cache del IDMAP/UID2SID/%s" % (uid)))
+for gids in gids:
+os.system(netcmd + (" cache del IDMAP/GID2SID/%s" % (gid)))
 
 def fill_cache(inids, idtype='gid'):
 for inid in inids:
@@ -31,7 +36,7 @@ domsid = domsid.split(' ')[0]
 
 sids=[ domsid + '-512', 'S-1-5-32-545', domsid + '-513', 'S-1-1-0', 'S-1-3-1', 
'S-1-5-1' ]
 
-flush_cache()
+flush_cache(sids=sids)
 
 sids2xids = subprocess.Popen([wbinfo, '--sids-to-unix-ids=' +  ','.join(sids)],
  stdout=subprocess.PIPE).communicate()[0].strip()
@@ -74,7 +79,7 @@ def check_singular(sids, ids, idtype='gid'):
  
stdout=subprocess.PIPE).communicate()[0].strip()
 if outid != ids[i]:
 print "Expected %s, got %s\n" % (outid, ids[i])
-flush_cache()
+flush_cache(sids=sids, uids=uids, gids=gids)
 sys.exit(1)
 i += 1
 
@@ -90,7 +95,7 @@ def check_multiple(sids, idtypes):
 
 if result[0] != idtypes[i]:
 print "Expected %s, got %s\n" % (idtypes[i], result[0])
-flush_cache()
+flush_cache(sids=sids, uids=uids, gids=gids)
 sys.exit(1)
 i += 1
 
@@ -99,22 +104,22 @@ check_singular(sids, gids, 'gid')
 check_singular(sids, uids, 'uid')
 
 # second round: with empty cache
-flush_cache()
+flush_cache(sids=sids, gids=gids)
 check_singular(sids, gids, 'gid')
-flush_cache()
+flush_cache(sids=sids, uids=uids)
 check_singular(sids, uids, 'uid')
 
 # third round: with filled cache via uid-to-sid
-flush_cache()
+flush_cache(sids=uids, uids=uids)
 fill_cache(uids, 'uid')
 

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

2017-07-03 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  cb6771c ldb: protect Samba < 4.7 against incompatible ldb versions 
and require ldb < 1.2.0
   via  85dbd4d wafsamba: add maxversion and version_blacklist to 
CHECK_BUNDLED_SYSTEM[_PKG]()
   via  a971f23 s3:gse_krb5: fix a possible crash in 
fill_mem_keytab_from_system_keytab()
  from  eb587fb selftest: Also wait for winbindd to start

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


- Log -
commit cb6771c88a2284d1bbc99e1b2ef0e40717882ffa
Author: Stefan Metzmacher 
Date:   Fri Jun 30 06:24:01 2017 +0200

ldb: protect Samba < 4.7 against incompatible ldb versions and require ldb 
< 1.2.0

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

Signed-off-by: Stefan Metzmacher 

Autobuild-User(v4-6-test): Karolin Seeger 
Autobuild-Date(v4-6-test): Mon Jul  3 15:15:14 CEST 2017 on sn-devel-144

commit 85dbd4dc6e8c00a8f3f3912fac86278d80a868da
Author: Stefan Metzmacher 
Date:   Fri Jun 30 06:21:32 2017 +0200

wafsamba: add maxversion and version_blacklist to 
CHECK_BUNDLED_SYSTEM[_PKG]()

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

Signed-off-by: Stefan Metzmacher 
Reviewed-by: Andrew Bartlett 
(cherry picked from commit 4ca48ee4d060f773dcdf9f78a5e4c1b1263b61f4)

commit a971f23c05e849d4930ce470b12c8f5ea3172390
Author: Michael Saxl 
Date:   Sat Jun 24 13:41:48 2017 +0200

s3:gse_krb5: fix a possible crash in fill_mem_keytab_from_system_keytab()

If the keytab file isn't readable, we may call
krb5_kt_end_seq_get() with an invalid kt_cursor.

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

Pair-Programmed-With: Stefan Metzmacher 

Signed-off-by: Michael Saxl 
Signed-off-by: Stefan Metzmacher 
Reviewed-by: Andreas Schneider 
(cherry picked from commit a9780a2eaa9cba4ab87cc3371d97fa494fa0198c)

---

Summary of changes:
 buildtools/wafsamba/samba_bundled.py | 21 +++--
 lib/ldb/wscript  | 19 +--
 source3/librpc/crypto/gse_krb5.c |  8 
 3 files changed, 44 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/buildtools/wafsamba/samba_bundled.py 
b/buildtools/wafsamba/samba_bundled.py
index ea88807..aa6199e 100644
--- a/buildtools/wafsamba/samba_bundled.py
+++ b/buildtools/wafsamba/samba_bundled.py
@@ -110,6 +110,7 @@ def LIB_MUST_BE_PRIVATE(conf, libname):
 
 @conf
 def CHECK_BUNDLED_SYSTEM_PKG(conf, libname, minversion='0.0.0',
+maxversion=None, version_blacklist=[],
 onlyif=None, implied_deps=None, pkg=None):
 '''check if a library is available as a system library.
 
@@ -117,12 +118,15 @@ def CHECK_BUNDLED_SYSTEM_PKG(conf, libname, 
minversion='0.0.0',
 '''
 return conf.CHECK_BUNDLED_SYSTEM(libname,
  minversion=minversion,
+ maxversion=maxversion,
+ version_blacklist=version_blacklist,
  onlyif=onlyif,
  implied_deps=implied_deps,
  pkg=pkg)
 
 @conf
 def CHECK_BUNDLED_SYSTEM(conf, libname, minversion='0.0.0',
+ maxversion=None, version_blacklist=[],
  checkfunctions=None, headers=None, checkcode=None,
  onlyif=None, implied_deps=None,
  require_headers=True, pkg=None, set_target=True):
@@ -181,16 +185,29 @@ def CHECK_BUNDLED_SYSTEM(conf, libname, 
minversion='0.0.0',
 minversion = minimum_library_version(conf, libname, minversion)
 
 msg = 'Checking for system %s' % libname
+msg_ver = []
 if minversion != '0.0.0':
-msg += ' >= %s' % minversion
+msg_ver.append('>=%s' % minversion)
+if maxversion is not None:
+msg_ver.append('<=%s' % maxversion)
+for v in version_blacklist:
+msg_ver.append('!=%s' % v)
+if msg_ver != []:
+msg += " (%s)" % (" ".join(msg_ver))
 
 uselib_store=libname.upper()
 if pkg is None:
 pkg = libname
 
+version_checks = '%s >= %s' % (pkg, minversion)
+if maxversion is not None:
+version_checks += ' %s <= %s' % (pkg, maxversion)
+for v in version_blacklist:
+version_checks += ' %s != %s' % (pkg, v)
+
 # try pkgconfig first
 if (conf.CHECK_CFG(package=pkg,
-  args='"%s >= %s" --cflags --libs' % (pkg, minversion),
+  args='"%s" --cflags --libs' % (version_checks),
   msg=msg, 

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

2017-06-30 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  eb587fb selftest: Also wait for winbindd to start
   via  9bf2391 s3:smb2_create: avoid reusing the 'tevent_req' within 
smbd_smb2_create_send()
   via  d2bf63c auth/spnego: fix gensec_update_ev() argument order for the 
SPNEGO_FALLBACK case
   via  545b0c4 s3:smbd: unimplement FSCTL_VALIDATE_NEGOTIATE_INFO with 
"server max protocol = SMB2_02"
   via  18f3dbb samba-tool: fix log message of 'samba-tool user 
syncpasswords'
   via  15ed7a9 s3:tests: Do not delete the contets of LOCAL_PATH with 
tarmode test
  from  f625a63 auth/ntlmssp: enforce NTLMSSP_NEGOTIATE_NTLM2 for the 
NTLMv2 client case

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


- Log -
commit eb587fb5a611876de0e01e187bb41c4375cde6cd
Author: Andrew Bartlett 
Date:   Thu Jun 15 16:20:11 2017 +1200

selftest: Also wait for winbindd to start

This ensures that the posixacl.py test does not race against winbindd 
starting up and so
give wrong mappings

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

Signed-off-by: Andrew Bartlett 
Reviewed-by: Jeremy Allison 
Reviewed-by: Stefan Metzmacher 
(cherry picked from commit 1b88c5d4c0e5da2e4092a06f6cd6bf3c8b767883)

Autobuild-User(v4-6-test): Karolin Seeger 
Autobuild-Date(v4-6-test): Fri Jun 30 14:53:30 CEST 2017 on sn-devel-144

commit 9bf23912b3cc82639bf2e2f9138ddb6dff2559ee
Author: Stefan Metzmacher 
Date:   Fri Jun 9 12:30:33 2017 +0200

s3:smb2_create: avoid reusing the 'tevent_req' within 
smbd_smb2_create_send()

As the caller ("smbd_smb2_request_process_create()") already sets the 
callback,
the first time, it's not safe to reuse the tevent_req structure.

The typical 'tevent_req_nterror(); return tevent_req_post()' will
crash as the tevent_req_nterror() already triggered the former callback,
which calls smbd_smb2_create_recv(), were tevent_req_received() invalidates
the tevent_req structure, so that tevent_req_post() will crash.

We just remember the required values from the old state
and move them to the new state.

We tried to write reproducers for this, but sadly weren't able to trigger
the backtrace we had from a create a customer (using recent code)
with commit 6beba782f1bf951236813e0b46115b8102212c03
included. And this patch fixed the situation for the
customer.

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

Pair-Programmed-With: Volker Lendecke 

Signed-off-by: Stefan Metzmacher 
Signed-off-by: Volker Lendecke 
Reviewed-by: Jeremy Allison 
(cherry picked from commit 02146ea5ee729de0e49ecf617e6983f4e61fbe59)

commit d2bf63c93f2717a405727c4e1024d4c8347a142d
Author: Stefan Metzmacher 
Date:   Fri May 12 09:10:19 2017 +0200

auth/spnego: fix gensec_update_ev() argument order for the SPNEGO_FALLBACK 
case

This went unnoticed so long as we don't use -Wc++-compat
and gensec_update_ev() used the sync update() hook for all
NTLMSSP and Kerberos.

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

Signed-off-by: Stefan Metzmacher 
Reviewed-by: Andrew Bartlett 
(cherry picked from commit 31691963b3d9ac460df0c56d36f81ec815db0225)

commit 545b0c420d567f1f50dac734a97b478fd09bd985
Author: Stefan Metzmacher 
Date:   Fri May 5 18:49:37 2017 +0200

s3:smbd: unimplement FSCTL_VALIDATE_NEGOTIATE_INFO with "server max 
protocol = SMB2_02"

A client that supports SMB3 will do a signed FSCTL_VALIDATE_NEGOTIATE_INFO
after a tree connect. This FSCTL_VALIDATE_NEGOTIATE_INFO call contains
the client capabilities, client guid, security mode and the array of 
supported
dialects. But if SMB 2.02 is negotiated the doesn't send these values to the
server in the first connection attempt (when the client starts with a SMB1 
Negotiate).

Windows servers that only support SMB2 just return NT_STATUS_FILE_CLOSED
as answer to FSCTL_VALIDATE_NEGOTIATE_INFO.

We should do the same if we just pretend to support SMB 2.02,
as SMB 2.10 always include an SMB2 Negotiate request we can leave it as is.

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

Signed-off-by: Stefan Metzmacher 
Reviewed-by: Andreas Schneider 
(cherry picked from commit 295c9f7b322e6377d0df1b49cb26597d66e80eda)

commit 18f3dbb9941a173188eaddab546407b91bb7a2c5
Author: Stefan Metzmacher 
Date:   Tue Apr 25 13:25:10 2017 +0200

samba-tool: fix log message of 'samba-tool user syncpasswords'

BUG: 

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

2017-06-28 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  f625a63 auth/ntlmssp: enforce NTLMSSP_NEGOTIATE_NTLM2 for the 
NTLMv2 client case
   via  8aea504 s3: smbd: fix regression with non-wide symlinks to 
directories over SMB3.
   via  79afb2e s3: smbd: Add regression test for non-wide symlinks to 
directories fail over SMB3.
   via  c850f47 docs-xml: Sort input file list
   via  fad0c0d s3: libsmb: Correctly save and restore connection tcon in 
smbclient, smbcacls and smbtorture3.
   via  d2a309b s3: libsmb: Correctly do lifecycle management on 
cli->smb1.tcon and cli->smb2.tcon.
   via  de0fbbe s3: libsmb: Fix cli_state_has_tcon() to cope with SMB2 
connections.
   via  8edc00e s3: libsmb: Widen cli_state_get_tid() / cli_state_set_tid() 
to 32-bits.
   via  c519326 s3: smbtorture: Show correct use of cli_state_save_tcon() / 
cli_state_restore_tcon().
   via  b17ab94 s3: libsmb: Add cli_state_save_tcon() / 
cli_state_restore_tcon().
   via  d261f6d libcli: smb: Add smb2cli_tcon_set_id().
   via  0ea8e0b libcli: smb: Add smbXcli_tcon_copy().
   via  9d053cf s3: smbd: When deleting an fsp pointer ensure we don't keep 
any references to it around.
  from  f10ce74 ctdb-recovery: Do not run local ip verification when in 
recovery

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


- Log -
commit f625a639e75f5b3a20eb5e35ef1c6fdd9745b50e
Author: Stefan Metzmacher 
Date:   Sat Jun 24 13:16:03 2017 +0200

auth/ntlmssp: enforce NTLMSSP_NEGOTIATE_NTLM2 for the NTLMv2 client case

Some servers may not announce the NTLMSSP_NEGOTIATE_NTLM2
(a.k.a. NTLMSSP_NEGOTIATE_EXTENDED_SESSIONSECURITY) bit.

But if we're acting as a client using NTLMv2 we need to
enforce this flag, because it's not really a negotiationable
in that case.

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

Signed-off-by: Stefan Metzmacher 
Reviewed-by: Jeremy Allison 
(cherry picked from commit 8ee4f8236830eb3fa1b273fa6927792a800f86bd)

Autobuild-User(v4-6-test): Karolin Seeger 
Autobuild-Date(v4-6-test): Wed Jun 28 15:19:53 CEST 2017 on sn-devel-144

commit 8aea504d02800fa968a8d13de86134e128244f5d
Author: Daniel Kobras 
Date:   Fri Jun 23 15:39:21 2017 +0200

s3: smbd: fix regression with non-wide symlinks to directories over SMB3.

The errno returned by open() is ambiguous when called with flags O_NOFOLLOW 
and
O_DIRECTORY on a symlink. With ELOOP, we know for certain that we've tried 
to
open a symlink. With ENOTDIR, we might have hit a symlink, and need to 
perform
further checks to be sure. Adjust non_widelink_open() accordingly. This 
fixes
a regression where symlinks to directories within the same share were no
longer followed for some call paths on systems returning ENOTDIR in the 
above
case.

Also remove the knownfail added in previous commit.

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

Signed-off-by: Daniel Kobras 
Reviewed-by: Jeremy Allison 
Reviewed-by: Ralph Boehme 
(cherry picked from commit acc16592b451905dabc093f1d261e93cd3b59520)

commit 79afb2e2d962f161bee33ff234550c5eca4398cd
Author: Jeremy Allison 
Date:   Fri Jun 23 11:12:22 2017 -0700

s3: smbd: Add regression test for non-wide symlinks to directories fail 
over SMB3.

Mark as knownfail.

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

Signed-off-by: Jeremy Allison 
Reviewed-by: Ralph Boehme 
(cherry picked from commit f1f388ef80a6516c2f44b7778420f8ffe28c6471)

commit c850f47d11b1b73af1586d1f70beae1138df8485
Author: Bernhard M. Wiedemann via samba-technical 

Date:   Mon Jun 26 09:46:18 2017 +0200

docs-xml: Sort input file list

because filesystems return entries in undeterministic order
and that ends up in index.xml and influences index.html
preventing reproducible builds of samba packages (e.g. for openSUSE)

See https://reproducible-builds.org/ for why this matters

Signed-off-by: Bernhard M. Wiedemann 
Reviewed-by: Andrew Bartlett 
Reviewed-by: David Disseldorp 

Autobuild-User(master): David Disseldorp 
Autobuild-Date(master): Tue Jun 27 16:56:06 CEST 2017 on sn-devel-144

(cherry picked from commit eedebe2ef1b6ff92975289b6076f236650744621)

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

commit fad0c0da857b140932327962128e071eba965b9a
Author: Jeremy Allison 
Date:   Tue Jun 13 16:56:48 2017 -0700

s3: libsmb: Correctly save and restore 

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

2017-06-26 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  f10ce74 ctdb-recovery: Do not run local ip verification when in 
recovery
   via  9f25dff ctdb-recovery: Get recmode unconditionally in the main_loop
   via  59ac9bf ctdb-recovery: Finish processing for recovery mode ACTIVE 
first
   via  7ee7e65 ctdb-recovery: Simplify logging of recovery mode setting
   via  89ee737 ctdb-recovery: Setting up of recmode should be idempotent
   via  a227893 ctdb-recovery: Assign banning credits if database fails to 
freeze
   via  6e11262 ctdb-scripts: Don't send empty argument string to logger
  from  9670a0d Bug 15852. There are valid paths where 
conn->lsa_pipe_tcp->transport is NULL. Protect against this.

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


- Log -
commit f10ce74c333d1943e58456b600eac6eefb1767bb
Author: Amitay Isaacs 
Date:   Thu Jun 22 16:15:47 2017 +1000

ctdb-recovery: Do not run local ip verification when in recovery

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

If we drop public IPs because CTDB is in recovery for too long, then
avoid spamming logs "Trigger takeoverrun" every second.

Signed-off-by: Amitay Isaacs 
Reviewed-by: Martin Schwenke 
(cherry picked from commit ea46699b27ef8d4ac7b5dd07035465cb3df09ea4)

Autobuild-User(v4-6-test): Karolin Seeger 
Autobuild-Date(v4-6-test): Mon Jun 26 16:51:56 CEST 2017 on sn-devel-144

commit 9f25dffb4f2370888a20ce4d7d988bed99c1e676
Author: Amitay Isaacs 
Date:   Thu Jun 22 17:45:20 2017 +1000

ctdb-recovery: Get recmode unconditionally in the main_loop

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

This can be used later in the main_loop to avoid the local ip check.

Signed-off-by: Amitay Isaacs 
Reviewed-by: Martin Schwenke 
(cherry picked from commit 2fd2ccd4c8617cfa7374d7a5ee3d1cc61c4fa4ad)

commit 59ac9bfe6006a4e8596771af2c7ff3bf4512f4f4
Author: Amitay Isaacs 
Date:   Thu Jun 22 14:09:32 2017 +1000

ctdb-recovery: Finish processing for recovery mode ACTIVE first

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

This simplifies the code and avoids complicated conditions.

Signed-off-by: Amitay Isaacs 
Reviewed-by: Martin Schwenke 
(cherry picked from commit f8200153b21f5b19c9a1d57be3e05e739d9fafcd)

commit 7ee7e65f5212adefc5ea9351e30c6487b83dd0f1
Author: Amitay Isaacs 
Date:   Thu Jun 22 14:52:32 2017 +1000

ctdb-recovery: Simplify logging of recovery mode setting

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

Signed-off-by: Amitay Isaacs 
Reviewed-by: Martin Schwenke 
(cherry picked from commit d74dadd7f26a9e8c48ba92468d7d0c4a7aa5a8e5)

commit 89ee737cd41d49855f881d519f6736cfeaba9178
Author: Amitay Isaacs 
Date:   Thu Jun 22 14:49:02 2017 +1000

ctdb-recovery: Setting up of recmode should be idempotent

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

If the recovery mode is already set to the expected value, there is
nothing to do.

Signed-off-by: Amitay Isaacs 
Reviewed-by: Martin Schwenke 
(cherry picked from commit f2771fcbf438e8b06321752c7203f01bbe33b573)

commit a227893188bbf5c68dcf923d42ccd20ae366009a
Author: Amitay Isaacs 
Date:   Thu Jun 22 14:00:13 2017 +1000

ctdb-recovery: Assign banning credits if database fails to freeze

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

Signed-off-by: Amitay Isaacs 
Reviewed-by: Martin Schwenke 
(cherry picked from commit c9d9f56bffe1e19665dba8e0cf899399d3d9fb72)

commit 6e11262d60bfbc8e053de10a188beed52dd6d90a
Author: Amitay Isaacs 
Date:   Thu Jun 22 14:34:36 2017 +1000

ctdb-scripts: Don't send empty argument string to logger

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

This stops logger reading from stdin.

Signed-off-by: Amitay Isaacs 
Reviewed-by: Martin Schwenke 

Autobuild-User(master): Martin Schwenke 
Autobuild-Date(master): Sat Jun 24 14:37:48 CEST 2017 on sn-devel-144

(cherry picked from commit 2fa069e870c0e6f1daa2a08be5aacac7b1063a5e)

---

Summary of changes:
 ctdb/config/functions  |  2 +-
 ctdb/server/ctdb_recover.c | 28 ++--
 ctdb/server/ctdb_recoverd.c| 19 ---
 ctdb/server/ctdb_recovery_helper.c |  1 +
 4 files changed, 

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

2017-06-23 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  9670a0d Bug 15852. There are valid paths where 
conn->lsa_pipe_tcp->transport is NULL. Protect against this.
   via  8a7d05e s3:tests: Add test for smbclient -UDOMAIN+username
   via  282560e s3:popt_common: Reparse the username in 
popt_common_credentials_post()
   via  8dc2be5 s3:smb2_sesssetup: allow a compound request after a 
SessionSetup
   via  6e6fb56d s3:smb2_tcon: allow a compound request after a TreeConnect
  from  29c2411 s3:libsmb: add cli_state_update_after_sesssetup() helper 
function

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


- Log -
commit 9670a0d9973757f3be1a071f347eec03802bb57b
Author: Richard Sharpe 
Date:   Tue Jun 20 12:40:39 2017 -0700

Bug 15852. There are valid paths where conn->lsa_pipe_tcp->transport is 
NULL. Protect against this.

Based on a suggestion from Metze.

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

Signed-off-by: Richard Sharpe 
Reviewed-by: Jeremy Allison 

Autobuild-User(master): Jeremy Allison 
Autobuild-Date(master): Thu Jun 22 23:16:46 CEST 2017 on sn-devel-144

(cherry picked from commit 03042b85c8140842633b36f3124e504b97b852a1)

Autobuild-User(v4-6-test): Karolin Seeger 
Autobuild-Date(v4-6-test): Fri Jun 23 17:29:50 CEST 2017 on sn-devel-144

commit 8a7d05ebf8d3b2542c1ff8c61ada4a7f573198bf
Author: Andreas Schneider 
Date:   Mon Jun 19 15:52:23 2017 +0200

s3:tests: Add test for smbclient -UDOMAIN+username

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

Signed-off-by: Andreas Schneider 
Reviewed-by: Stefan Metzmacher 

Autobuild-User(master): Andreas Schneider 
Autobuild-Date(master): Tue Jun 20 14:48:33 CEST 2017 on sn-devel-144

(cherry picked from commit e60aeb6f56a26019788442247361ed516bf965af)

commit 282560e469b269e07c06e958c748207bfeafac41
Author: Andreas Schneider 
Date:   Mon Jun 19 14:50:33 2017 +0200

s3:popt_common: Reparse the username in popt_common_credentials_post()

When we parse the username in the options handling, the smb.conf file
has not been loaded yet. So we are not aware of a 'winbind separator'
set in the config file.

We need to read and set the username again in the post-processing of the
credentials.

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

Signed-off-by: Andreas Schneider 
Reviewed-by: Stefan Metzmacher 
(cherry picked from commit 0caf40ec0196de0de016fda0d4aff0734d498d2b)

commit 8dc2be59f526a9cd77496360f1eed784b4b10411
Author: Stefan Metzmacher 
Date:   Thu Jun 15 23:01:18 2017 +0200

s3:smb2_sesssetup: allow a compound request after a SessionSetup

This is not a full fix yet as we don't allow compound requests
after going async.

With SMB 3.11 requiring signed TreeConnect requests it's pointless
to try to compound requests after a SessionSetup.

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

Signed-off-by: Stefan Metzmacher 
Reviewed-by: Jeremy Allison 

Autobuild-User(master): Jeremy Allison 
Autobuild-Date(master): Sat Jun 17 10:55:25 CEST 2017 on sn-devel-144

(cherry picked from commit bb5c394fde03dc8230d5089a66fea1a2541952f5)

commit 6e6fb56da11cb30011cf46826a1bf8b76aed9ec1
Author: Stefan Metzmacher 
Date:   Thu Jun 15 23:01:18 2017 +0200

s3:smb2_tcon: allow a compound request after a TreeConnect

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

Signed-off-by: Stefan Metzmacher 
Reviewed-by: Jeremy Allison 
(cherry picked from commit f8974bcdbf8abe3803340dcd20206ff4de9d5079)

---

Summary of changes:
 source3/lib/popt_common.c| 15 +++
 source3/script/tests/test_smbclient_basic.sh | 62 
 source3/selftest/tests.py|  1 +
 source3/smbd/smb2_sesssetup.c|  1 +
 source3/smbd/smb2_tcon.c |  2 +
 source3/winbindd/winbindd_cm.c   |  8 ++--
 6 files changed, 86 insertions(+), 3 deletions(-)
 create mode 100755 source3/script/tests/test_smbclient_basic.sh


Changeset truncated at 500 lines:

diff --git a/source3/lib/popt_common.c b/source3/lib/popt_common.c
index 3589a4f..9928c70 100644
--- a/source3/lib/popt_common.c
+++ b/source3/lib/popt_common.c
@@ -238,6 +238,7 @@ void popt_common_credentials_set_delay_post(void)
 void popt_common_credentials_post(void)
 {
  

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

2017-06-19 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  29c2411 s3:libsmb: add cli_state_update_after_sesssetup() helper 
function
   via  ada73fa libcli/smb: Fix alignment problems of smb_bytes_pull_str()
   via  5a4f2e0 libcli:smb2: Gracefully handle not supported for 
FSCTL_VALIDATE_NEGOTIATE_INFO
   via  b4e1d73 ctdb-tests: Add more NFS eventscript tests for call-out 
failures
   via  6d5c1f6 ctdb-scripts: NFS call-out failures should cause event 
failure
  from  c08e056 messaging: fix net command failure due to unhandled return 
code

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


- Log -
commit 29c24113f6ba921cd635a0c92713b8df570ecdd6
Author: Stefan Metzmacher 
Date:   Wed Mar 15 17:04:44 2017 +

s3:libsmb: add cli_state_update_after_sesssetup() helper function

This function updates cli->server_{os,type,domain} to valid values
after a session setup.

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

Signed-off-by: Stefan Metzmacher 
Reviewed-by: Andreas Schneider 
(cherry picked from commit e0069bd2a4820eca17c59d91bd1853f2f053a7a3)

Autobuild-User(v4-6-test): Karolin Seeger 
Autobuild-Date(v4-6-test): Mon Jun 19 15:15:47 CEST 2017 on sn-devel-144

commit ada73fae662980521fd3c9e7f580dbc6f2c199e6
Author: Stefan Metzmacher 
Date:   Wed Mar 15 17:04:30 2017 +

libcli/smb: Fix alignment problems of smb_bytes_pull_str()

This function needs to get the whole smb buffer in order to get
the alignment for unicode correct.

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

Signed-off-by: Stefan Metzmacher 
Reviewed-by: Jeremy Allison 
Reviewed-by: Andreas Schneider 
(cherry picked from commit e60e77a8afd095bfdb3d678aa48570ca159d9b24)

commit 5a4f2e0fd26669002eb2885ad78fd9104b5d085c
Author: Andreas Schneider 
Date:   Tue May 30 16:30:33 2017 +0200

libcli:smb2: Gracefully handle not supported for 
FSCTL_VALIDATE_NEGOTIATE_INFO

If FSCTL_VALIDATE_NEGOTIATE_INFO is not implemented, e.g. in a SMB2 only
server then gracefully handle NT_STATUS_NOT_SUPPORTED too.

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

Signed-off-by: Andreas Schneider 
Signed-off-by: Guenther Deschner 
Pair-Programmed-With: Guenther Deschner 
Reviewed-by: Jeremy Allison 

Autobuild-User(master): Volker Lendecke 
Autobuild-Date(master): Thu Jun 15 17:32:45 CEST 2017 on sn-devel-144

(cherry picked from commit a4d9438ecf92614a0915b9cf61f905ea8170043a)

commit b4e1d734a66d3ed5159960309275a33caa6ddd23
Author: Martin Schwenke 
Date:   Fri Jun 9 10:57:28 2017 +1000

ctdb-tests: Add more NFS eventscript tests for call-out failures

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

Signed-off-by: Martin Schwenke 
Reviewed-by: Amitay Isaacs 
(cherry picked from commit 323291a46e26e0493d43052550e57e2989b83b97)

commit 6d5c1f683bc1c8a198bf7e5e72de7f9dc1b04a07
Author: Martin Schwenke 
Date:   Thu Jun 8 14:45:43 2017 +1000

ctdb-scripts: NFS call-out failures should cause event failure

Failures in startup/shutdown/releaseip/takeip are currently
incorrectly ignored.

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

Signed-off-by: Martin Schwenke 
Reviewed-by: Amitay Isaacs 
(cherry picked from commit 22f2068d456759612d340fdcc56276f39a710426)

---

Summary of changes:
 ctdb/config/events.d/60.nfs|  8 +--
 nfs.monitor.107.sh => 06.nfs.releaseip.001.sh} |  0
 ctdb/tests/eventscripts/06.nfs.releaseip.002.sh| 12 
 ...{60.nfs.monitor.107.sh => 06.nfs.takeip.001.sh} |  0
 ctdb/tests/eventscripts/06.nfs.takeip.002.sh   | 12 
 ctdb/tests/eventscripts/60.nfs.monitor.109.sh  | 12 
 nfs.monitor.107.sh => 60.nfs.releaseip.001.sh} |  0
 ctdb/tests/eventscripts/60.nfs.releaseip.002.sh| 12 
 ...0.nfs.monitor.107.sh => 60.nfs.shutdown.001.sh} |  0
 ctdb/tests/eventscripts/60.nfs.shutdown.002.sh | 12 
 ...60.nfs.monitor.107.sh => 60.nfs.startup.001.sh} |  0
 ctdb/tests/eventscripts/60.nfs.startup.002.sh  | 12 
 ...{60.nfs.monitor.107.sh => 60.nfs.takeip.001.sh} |  0
 ctdb/tests/eventscripts/60.nfs.takeip.002.sh   | 12 
 libcli/smb/smb1cli_session.c   | 28 
 libcli/smb/smbXcli_base.c  | 15 +
 libcli/smb/smb_util.h  |  3 +-
 libcli/smb/util.c   

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

2017-06-12 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  c08e056 messaging: fix net command failure due to unhandled return 
code
  from  ad1f953 shadow_copy_get_shadow_copy_data: fix GCC snprintf warning

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


- Log -
commit c08e05675f056b1a47b2d2cdb0f5ce0b0aed663b
Author: David Mulder via samba-technical 
Date:   Wed Jun 7 06:43:07 2017 -0600

messaging: fix net command failure due to unhandled return code

messaging_init_internal() blanket returned NT_STATUS_INTERNAL_ERROR
instead of correctly changing the return code to an NTSTATUS code. Also
return more appropriate mem error.

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

Signed-off-by: David Mulder 
Reviewed-by: Jeremy Allison 
Reviewed-by: David Disseldorp 

Autobuild-User(master): David Disseldorp 
Autobuild-Date(master): Thu Jun  8 08:04:05 CEST 2017 on sn-devel-144

(cherry picked from commit 08a21f3539fef76a22189b1751fd2a081937a057)

Autobuild-User(v4-6-test): Karolin Seeger 
Autobuild-Date(v4-6-test): Mon Jun 12 12:59:41 CEST 2017 on sn-devel-144

---

Summary of changes:
 source3/lib/messages.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/lib/messages.c b/source3/lib/messages.c
index 533e869..69dfbf3 100644
--- a/source3/lib/messages.c
+++ b/source3/lib/messages.c
@@ -302,7 +302,7 @@ static NTSTATUS messaging_init_internal(TALLOC_CTX *mem_ctx,
 );
if (ctx->msg_dgm_ref == NULL) {
DEBUG(2, ("messaging_dgm_ref failed: %s\n", strerror(ret)));
-   status = NT_STATUS_INTERNAL_ERROR;
+   status = map_nt_error_from_unix(ret);
goto done;
}
talloc_set_destructor(ctx, messaging_context_destructor);
@@ -313,7 +313,7 @@ static NTSTATUS messaging_init_internal(TALLOC_CTX *mem_ctx,
if (ret != 0) {
DEBUG(2, ("messaging_ctdbd_init failed: %s\n",
  strerror(ret)));
-   status = NT_STATUS_INTERNAL_ERROR;
+   status = map_nt_error_from_unix(ret);
goto done;
}
}
@@ -326,7 +326,7 @@ static NTSTATUS messaging_init_internal(TALLOC_CTX *mem_ctx,
  
TDB_INCOMPATIBLE_HASH|TDB_CLEAR_IF_FIRST);
if (ctx->names_db == NULL) {
DBG_DEBUG("server_id_db_init failed\n");
-   status = NT_STATUS_INTERNAL_ERROR;
+   status = NT_STATUS_NO_MEMORY;
goto done;
}
 


-- 
Samba Shared Repository



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

2017-06-08 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  ad1f953 shadow_copy_get_shadow_copy_data: fix GCC snprintf warning
   via  e550c8a ndr tests: silence a harmless warning
   via  123bfe0 s4:torture: Fix comparison between pointer and zero 
character constant
   via  fdcfdcd waf: Do not trhow a format-truncation error for 
test/snprintf.c
   via  3afa33b replace: Use the same size as d_name member of struct dirent
  from  553433a VERSION: Bump version up to 4.6.6...

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


- Log -
commit ad1f95356b88202eeaf0ebd5be59afb3af247c8d
Author: Douglas Bagnall 
Date:   Thu Feb 9 13:02:52 2017 +1300

shadow_copy_get_shadow_copy_data: fix GCC snprintf warning

GCC 7 warns about snprintf truncating a dirent d_name (potentially 255 
bytes) to 25 bytes,
even though we have checked that it is 25 long in shadow_copy_match_name().

Using strlcpy instead of snprintf lets us check it again, JUST TO BE SURE.

Signed-off-by: Douglas Bagnall 
Reviewed-by: Andrew Bartlett 
(cherry picked from commit a091a30a5bd50bc02df3e9c01b11f70c94dbd053)

Autobuild-User(v4-6-test): Karolin Seeger 
Autobuild-Date(v4-6-test): Thu Jun  8 17:04:34 CEST 2017 on sn-devel-144

commit e550c8ae7dfb09cd1503a75083b25e5458d27b68
Author: Douglas Bagnall 
Date:   Sat Feb 25 13:38:17 2017 +1300

ndr tests: silence a harmless warning

gcc 7.

"duplicate ‘const’ declaration specifier [-Wduplicate-decl-specifier]"

Signed-off-by: Douglas Bagnall 
Reviewed-by: Andrew Bartlett 
(cherry picked from commit f1b2d356585d43f2bac24d5c32cbef4a90c43f36)

commit 123bfe0250b38d08069237d39d0f6bb9960550d0
Author: Andreas Schneider 
Date:   Thu Jun 1 14:28:08 2017 +0200

s4:torture: Fix comparison between pointer and zero character constant

Fixes building with GCC 7.1

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

Signed-off-by: Andreas Schneider 
Reviewed-by: Jeremy Allison 

(cherry picked from commit 1f4b07e5942235bddcfa999b3575f719752d81c4)

commit fdcfdcd6f0bd74cb38797fa790907fa6787d507d
Author: Andreas Schneider 
Date:   Thu Jun 1 14:24:42 2017 +0200

waf: Do not trhow a format-truncation error for test/snprintf.c

This fixes building with GCC 7.1

Error:
../lib/replace/test/testsuite.c:355:6: error: ‘%d’ directive output
truncated writing 1 byte into a region of size 0
[-Werror=format-truncation=]

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

Signed-off-by: Andreas Schneider 
Reviewed-by: Jeremy Allison 
(cherry picked from commit 1670d00be88108a483f04c9763012504499b99e4)

commit 3afa33b1f63d7b50b5f7f4ea8c70fb6a5cfe32c6
Author: Andreas Schneider 
Date:   Thu Jun 1 14:16:56 2017 +0200

replace: Use the same size as d_name member of struct dirent

This fixes an error with GCC 7.1

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

Signed-off-by: Andreas Schneider 
Reviewed-by: Jeremy Allison 
(cherry picked from commit 94e21c139f9b0c1d28ee85fdcb9b7490cc64e27b)

---

Summary of changes:
 lib/replace/test/os2_delete.c |  2 +-
 lib/replace/wscript   |  3 ++-
 source3/include/ntioctl.h |  2 +-
 source3/modules/vfs_shadow_copy.c | 11 ++-
 source4/torture/masktest.c|  2 +-
 source4/torture/ndr/string.c  | 20 ++--
 6 files changed, 25 insertions(+), 15 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/replace/test/os2_delete.c b/lib/replace/test/os2_delete.c
index 0816f61..4b99ccf 100644
--- a/lib/replace/test/os2_delete.c
+++ b/lib/replace/test/os2_delete.c
@@ -63,7 +63,7 @@ static int os2_delete(DIR *d)
off_t offsets[READDIR_SIZE];
int i, j;
struct dirent *de;
-   char names[READDIR_SIZE][30];
+   char names[READDIR_SIZE][256];
 
/* scan, remembering offsets */
for (i=0, de=readdir(d); 
diff --git a/lib/replace/wscript b/lib/replace/wscript
index ea0d5d0..80e8257 100644
--- a/lib/replace/wscript
+++ b/lib/replace/wscript
@@ -706,7 +706,8 @@ def build(bld):
 bld.SAMBA_SUBSYSTEM('replace-test',
   source='''test/testsuite.c test/strptime.c
   test/os2_delete.c test/getifaddrs.c''',
-  deps='replace')
+  deps='replace',
+  cflags="-Wno-format-zero-length -Wno-format-truncation")
 
 if 

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

2017-06-06 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  553433a VERSION: Bump version up to 4.6.6...
   via  1d13a64 VERSION: Disable GIT_SNAPSHOTS for the 4.6.5 release.
   via  c9ad5ad WHATSNEW: Add release notes for Samba 4.6.5.
  from  66529e1 ctdb-common: Fix crash in logging initialisation

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


- Log -
commit 553433aee480dfdbf830fe3bc484f892c9cd6dd4
Author: Karolin Seeger 
Date:   Fri Jun 2 11:39:07 2017 +0200

VERSION: Bump version up to 4.6.6...

and re-enable GIT_SNAPSHOTS.

Signed-off-by: Karolin Seeger 

commit 1d13a64f2775c9df026665bdaa7bacf5ba752857
Author: Karolin Seeger 
Date:   Fri Jun 2 11:38:19 2017 +0200

VERSION: Disable GIT_SNAPSHOTS for the 4.6.5 release.

Signed-off-by: Karolin Seeger 

commit c9ad5ad560dac8b4b2329dfe3f8c969663404443
Author: Karolin Seeger 
Date:   Fri Jun 2 11:37:07 2017 +0200

WHATSNEW: Add release notes for Samba 4.6.5.

Signed-off-by: Karolin Seeger 

---

Summary of changes:
 VERSION  |  2 +-
 WHATSNEW.txt | 87 ++--
 2 files changed, 86 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/VERSION b/VERSION
index 4614794..a14f0ff 100644
--- a/VERSION
+++ b/VERSION
@@ -25,7 +25,7 @@
 
 SAMBA_VERSION_MAJOR=4
 SAMBA_VERSION_MINOR=6
-SAMBA_VERSION_RELEASE=5
+SAMBA_VERSION_RELEASE=6
 
 
 # If a official release has a serious bug  #
diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index fb533f3..ab2182c 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -1,4 +1,87 @@
=
+   Release Notes for Samba 4.6.5
+June 6, 2017
+   =
+
+
+This is the latest stable release of the Samba 4.6 release series.
+
+
+Changes since 4.6.4:
+-
+
+o  Jeremy Allison 
+   * BUG 12804: s3: VFS: Catia: Ensure path name is also converted.
+
+o  Christian Ambach 
+   * BUG 12765: s3:smbcacls add prompt for password.
+
+o  Ralph Boehme 
+   * BUG 12562: vfs_acl_xattr|tdb: Ensure create mask is at least 0666 if
+ ignore_system_acls is set.
+   * BUG 12702: Wrong sid->uid mapping for SIDs residing in sIDHistory.
+   * BUG 12749: vfs_fruit: lp_case_sensitive() does not return a bool.
+   * BUG 12766: s3/smbd: Update exclusive oplock optimisation to the lease 
area.
+   * BUG 12798: s3/smbd: Fix exclusive lease optimisation.
+
+o  Alexander Bokovoy 
+   * BUG 12751: Allow passing trusted domain password as plain-text to PASSDB
+ layer.
+   * BUG 12764: systemd: Fix detection of libsystemd.
+
+o  Amitay Isaacs 
+   * BUG 12697: ctdb-readonly: Avoid a tight loop waiting for revoke to
+ complete.
+   * BUG 12770: ctdb-logging: Initialize DEBUGLEVEL before changing the value.
+
+o  Shilpa Krishnareddy 
+   * BUG 12756: notify: Fix ordering of events in notifyd.
+
+o  Volker Lendecke 
+   * BUG 12757: idmap_rfc2307: Lookup of more than two SIDs fails.
+
+o  Stefan Metzmacher 
+   * BUG 12767: samba-tool: Let 'samba-tool user syncpasswords' report 
deletions
+ immediately.
+
+o  Doug Nazar 
+   * BUG 12760: s3: smbd: inotify_map_mask_to_filter incorrectly indexes an
+ array.
+
+o  Andreas Schneider 
+   * BUG 12687: vfs_expand_msdfs tries to open the remote address as a file
+ path.
+
+o  Martin Schwenke 
+   * BUG 12802: 'ctdb nodestatus' incorrectly displays status for all nodes 
with
+ wrong exit code.
+   * BUG 12814: ctdb-common: Fix crash in logging initialisation.
+
+
+###
+Reporting bugs & Development Discussion
+###
+
+Please discuss this release on the samba-technical mailing list or by
+joining the #samba-technical IRC channel on irc.freenode.net.
+
+If you do report problems then please try to send high quality
+feedback. If you don't provide vital information to help us track down
+the problem then you will probably be ignored.  All bug reports should
+be filed under the "Samba 4.1 and newer" product in the project's Bugzilla
+database (https://bugzilla.samba.org/).
+
+
+==
+== Our Code, Our Bugs, Our Responsibility.
+== The Samba Team
+==
+
+
+Release notes for older releases 

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

2017-06-02 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  66529e1 ctdb-common: Fix crash in logging initialisation
   via  620aac7 s3:smbd: Set up local and remote address for fake connection
   via  b925818 s3:smbd: Pass down remote and local address to 
get_referred_path()
   via  4fc1e91 s4/torture: test for bug 12798
   via  29196ec s3/smbd: fix exclusive lease optimisation
   via  44ca450 s3/locking: make find_share_mode_entry public
  from  06e8eec s3: VFS: Catia: Ensure path name is also converted.

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


- Log -
commit 66529e19471a036204d2b74ff3fcd70588562aee
Author: Martin Schwenke 
Date:   Thu Jun 1 14:37:40 2017 +1000

ctdb-common: Fix crash in logging initialisation

Setting CTDB_LOGGING to syslog:nonblocking or syslog:udp will cause
ctdbd to crash at startup due to NULL pointer dereference.
Refactoring in commit c9124a001f5abf7bb577a8f5341da4cc7411ed22
introduced this regression.

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

Signed-off-by: Martin Schwenke 
Reviewed-by: Amitay Isaacs 

Autobuild-User(master): Amitay Isaacs 
Autobuild-Date(master): Thu Jun  1 15:26:19 CEST 2017 on sn-devel-144

(cherry picked from commit c47e6b140d0c7cc15a93782957090625a832ba59)

Autobuild-User(v4-6-test): Karolin Seeger 
Autobuild-Date(v4-6-test): Fri Jun  2 14:06:37 CEST 2017 on sn-devel-144

commit 620aac74b1834714b9f64a85649a7c1531bc63ce
Author: Andreas Schneider 
Date:   Tue Mar 21 15:45:34 2017 +0100

s3:smbd: Set up local and remote address for fake connection

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

Pair-Programmed-With: Ralph Boehme 

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

(cherry picked from commit e530e43d67436881fd039877f956f0ad9b562af9)

commit b9258183a5fd5b7235a42a719f4f033c5b135b55
Author: Andreas Schneider 
Date:   Tue Mar 21 15:32:37 2017 +0100

s3:smbd: Pass down remote and local address to get_referred_path()

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

Pair-Programmed-With: Ralph Boehme 

Signed-off-by: Andreas Schneider 
Signed-off-by: Ralph Boehme 
Reviewed-by: Jeremy Allison 
(cherry picked from commit cbf67123e037207662ec0d4e53c55990e21b157e)

commit 4fc1e91306de7ec0c07f274884838a29edf51a38
Author: Ralph Boehme 
Date:   Fri May 26 15:35:54 2017 +0200

s4/torture: test for bug 12798

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

Pair-Programmed-With: Stefan Metzmacher 

Signed-off-by: Ralph Boehme 
Signed-off-by: Stefan Metzmacher 
Reviewed-by: Jeremy Allison 
(cherry picked from commit bd43939ec07a2fc6858d1265fc75a68a7cd96f58)

commit 29196ec24a7a184efc0e9f7b49ecfee31c689c4c
Author: Ralph Boehme 
Date:   Fri May 26 11:57:08 2017 +0200

s3/smbd: fix exclusive lease optimisation

We need to expect any amount of "stat" opens on the file without
triggering an assert.

This is the correct fix for bug #11844. I guess we haven't seens this
very often before bug #12766 got fixed, because most clients were using
LEASES instead of OPLOCKS.

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

See also:
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11844
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12766

Pair-Programmed-With: Stefan Metzmacher 

Signed-off-by: Ralph Boehme 
Signed-off-by: Stefan Metzmacher 
Reviewed-by: Jeremy Allison 
(cherry picked from commit 19b938e1fa9822ac417a3b3a34519087470d7a18)

commit 44ca4507743602686ecc233ecd9a97aa31dcdfbf
Author: Ralph Boehme 
Date:   Fri May 26 11:35:52 2017 +0200

s3/locking: make find_share_mode_entry public

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

Signed-off-by: Ralph Boehme 
Reviewed-by: Stefan Metzmacher 
Reviewed-by: Jeremy Allison 
(cherry picked from commit 9d7739e819d5699209b5eacad4a0e2a8b8da0a86)

---

Summary of changes:
 ctdb/common/logging.c   |  1 +
 source3/locking/locking.c   |  2 +-
 source3/locking/proto.h |  2 +
 source3/modules/vfs_default.c   |  2 +
 source3/rpc_server/dfs/srv_dfs_nt.c |  6 

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

2017-05-30 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  06e8eec s3: VFS: Catia: Ensure path name is also converted.
   via  c9b3e8f ctdb-tests: Add some extra tests for "ctdb nodestatus"
   via  0089a4c ctdb-tools: "ctdb nodestatus" should only display header 
for "all"
   via  3c596dc ctdb-tools: Stop "ctdb nodestatus" from always showing all 
nodes
   via  5906140 ctdb-readonly: Avoid a tight loop waiting for revoke to 
complete
   via  049484b Revert "ctdb-readonly: Avoid a tight loop waiting for 
revoke to complete"
  from  96b8f72 VERSION: Bump version up to 4.6.5.

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


- Log -
commit 06e8eec8392ce80b000d8f22c019b05b691fddf8
Author: Jeremy Allison 
Date:   Wed May 24 11:45:35 2017 -0700

s3: VFS: Catia: Ensure path name is also converted.

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

Signed-off-by: Jeremy Allison 
Reviewed-by: Ralph Boehme 
(cherry picked from commit fda1e701af804db81dcb3844921e9a327563bc5c)

Autobuild-User(v4-6-test): Karolin Seeger 
Autobuild-Date(v4-6-test): Tue May 30 16:36:35 CEST 2017 on sn-devel-144

commit c9b3e8f6fee8b1ca5de2164c4f838eeaf3d6c652
Author: Martin Schwenke 
Date:   Wed May 24 20:21:55 2017 +1000

ctdb-tests: Add some extra tests for "ctdb nodestatus"

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

Signed-off-by: Martin Schwenke 
Reviewed-by: Amitay Isaacs 

Autobuild-User(master): Martin Schwenke 
Autobuild-Date(master): Fri May 26 05:24:34 CEST 2017 on sn-devel-144

(cherry picked from commit ade535371b86294c12ca3f7eb98d8ef7ecd29caa)

commit 0089a4c4399964c97e10b9f17ac35648bb0627b1
Author: Martin Schwenke 
Date:   Wed May 24 20:27:58 2017 +1000

ctdb-tools: "ctdb nodestatus" should only display header for "all"

The "Number of nodes:" header should only be displayed when "all" is
specified.  This is how the command behaved in Samba <= 4.4.

Printing the number of nodes is not helpful and is rather confusing in
the default case where only the status of the current node is printed.

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

Signed-off-by: Martin Schwenke 
Reviewed-by: Amitay Isaacs 
(cherry picked from commit 1d10c8e9e637619b754b4a273d3c714fbca7d503)

commit 3c596dc4b98c5b391a34322e0d585ed3b4e7711b
Author: Martin Schwenke 
Date:   Wed May 24 20:24:54 2017 +1000

ctdb-tools: Stop "ctdb nodestatus" from always showing all nodes

Exit code should only reflect current or specified nodes too.

Drop an unwanted call to get_nodemap() that overwrites the previously
calculated node map.

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

Signed-off-by: Martin Schwenke 
Reviewed-by: Amitay Isaacs 
(cherry picked from commit a600d467e2842ab05e429c5a67be5b222ddd1c12)

commit 5906140fb1f0ba1154f8754eaa3a7f6d51ef4823
Author: Amitay Isaacs 
Date:   Thu May 18 11:50:09 2017 +1000

ctdb-readonly: Avoid a tight loop waiting for revoke to complete

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

During revoking readonly delegations, if one of the nodes disappears,
then there is no point re-trying revoking readonly delegation immedately.
The database needs to be recovered before the revoke operation can
succeed.

However, if the revoke is successful, then all the write requests need
to be processed immediately before the read-only requests.  This avoids
starving write requests, in case there are read-only requests coming
from other nodes.

In deferred_call_destructor, the result of revoke is not available and
deferred calls cannot be correctly ordered.  To correctly order the
deferred calls, process them in revokechild_destructor where the result
of revoke is known.

Signed-off-by: Amitay Isaacs 
Reviewed-by: Martin Schwenke 
(cherry picked from commit f5f05a644dadc0b1858c99c5f1f5af1ef80f3a28)

commit 049484b65587fee2049487ceffb8c802fc0d4e37
Author: Amitay Isaacs 
Date:   Thu May 18 10:15:01 2017 +1000

Revert "ctdb-readonly: Avoid a tight loop waiting for revoke to complete"

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

This reverts commit ad758cb869ac83534993caa212abc9fe9905ec68.

This is an incomplete fix and introduces a regression.

Signed-off-by: Amitay Isaacs 
Reviewed-by: Martin Schwenke 
(cherry picked from commit 

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

2017-05-30 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  96b8f72 VERSION: Bump version up to 4.6.5.
   via  e3f2d7f Merge tag 'samba-4.6.4' into v4-6-test
   via  b0b0bf1 VERSION: Disable GIT_SNAPSHOTS for the 4.6.4 release.
   via  85d8992 WHATSNEW: Add release notes for Samba 4.6.4.
   via  04a3ba4 CVE-2017-7494: rpc_server3: Refuse to open pipe names with 
/ inside
   via  3bb4485 VERSION: Bump version up to 4.6.4...
  from  4de3ddc s3: smbd: Fix open_files.idl to correctly ignore 
share_mode_lease *lease in share_mode_entry.

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


- Log -
commit 96b8f723b589bede9af90331a46fea28000f7265
Author: Karolin Seeger 
Date:   Tue May 30 11:59:40 2017 +0200

VERSION: Bump version up to 4.6.5.

Signed-off-by: Karolin Seeger 

commit e3f2d7ff44620a4f169c8006e09b62376348b6d4
Merge: 4de3ddc b0b0bf1
Author: Karolin Seeger 
Date:   Tue May 30 11:57:49 2017 +0200

Merge tag 'samba-4.6.4' into v4-6-test

samba: tag release samba-4.6.4

---

Summary of changes:
 VERSION   |  2 +-
 WHATSNEW.txt  | 56 +--
 source3/rpc_server/srv_pipe.c |  5 
 3 files changed, 60 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/VERSION b/VERSION
index 2f581c4..4614794 100644
--- a/VERSION
+++ b/VERSION
@@ -25,7 +25,7 @@
 
 SAMBA_VERSION_MAJOR=4
 SAMBA_VERSION_MINOR=6
-SAMBA_VERSION_RELEASE=4
+SAMBA_VERSION_RELEASE=5
 
 
 # If a official release has a serious bug  #
diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index 9a16862..fb533f3 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -1,4 +1,56 @@
=
+   Release Notes for Samba 4.6.4
+May 24, 2017
+   =
+
+
+This is a security release in order to address the following defect:
+
+o  CVE-2017-7494 (Remote code execution from a writable share)
+
+===
+Details
+===
+
+o  CVE-2017-7494:
+   All versions of Samba from 3.5.0 onwards are vulnerable to a remote
+   code execution vulnerability, allowing a malicious client to upload a
+   shared library to a writable share, and then cause the server to load
+   and execute it.
+
+
+Changes since 4.6.3:
+-
+
+o  Volker Lendecke 
+   * BUG 12780: CVE-2017-7494: Avoid remote code execution from a writable
+ share.
+
+
+###
+Reporting bugs & Development Discussion
+###
+
+Please discuss this release on the samba-technical mailing list or by
+joining the #samba-technical IRC channel on irc.freenode.net.
+
+If you do report problems then please try to send high quality
+feedback. If you don't provide vital information to help us track down
+the problem then you will probably be ignored.  All bug reports should
+be filed under the "Samba 4.1 and newer" product in the project's Bugzilla
+database (https://bugzilla.samba.org/).
+
+
+==
+== Our Code, Our Bugs, Our Responsibility.
+== The Samba Team
+==
+
+
+Release notes for older releases follow:
+
+
+   =
Release Notes for Samba 4.6.3
April 25, 2017
=
@@ -104,8 +156,8 @@ database (https://bugzilla.samba.org/).
 ==
 
 
-Release notes for older releases follow:
-
+--
+
 
=
Release Notes for Samba 4.6.2
diff --git a/source3/rpc_server/srv_pipe.c b/source3/rpc_server/srv_pipe.c
index 0633b5f..c3f0cd8 100644
--- a/source3/rpc_server/srv_pipe.c
+++ b/source3/rpc_server/srv_pipe.c
@@ -475,6 +475,11 @@ bool is_known_pipename(const char *pipename, struct 
ndr_syntax_id *syntax)
 {
NTSTATUS status;
 
+   if (strchr(pipename, '/')) {
+   DEBUG(1, ("Refusing open on pipe %s\n", pipename));
+   return false;
+   }
+
if (lp_disable_spoolss() && strequal(pipename, "spoolss")) {
DEBUG(10, ("refusing spoolss access\n"));
return false;


-- 
Samba Shared Repository



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

2017-05-19 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  4de3ddc s3: smbd: Fix open_files.idl to correctly ignore 
share_mode_lease *lease in share_mode_entry.
   via  f71feca ctdb-tests: Use tighter pattern for matching expected output
   via  4a33726 ctdb-tests: Explicitly search for the specific log entry
  from  3e50a50 ctdb-logging: Initialize DEBUGLEVEL before changing the 
value

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


- Log -
commit 4de3ddc572ba119e9414f8ae6547dd14a574e56f
Author: Jeremy Allison 
Date:   Tue May 16 16:12:19 2017 -0700

s3: smbd: Fix open_files.idl to correctly ignore share_mode_lease *lease in 
share_mode_entry.

This is currently marked 'skip', which means it isn't stored in the
db, but printed out in ndr dump. However, this pointer can be invalid
if the lease_idx is set to 0x (invalid).

This is fixed up inside parse_share_modes(), but not until after
ndr_pull_share_mode_data() is called. If lease_idx == 0x
then ndr_print_share_mode_lease() prints an invalid value and
crashes.

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

Signed-off-by: Jeremy Allison 
Reviewed-by: Alexander Bokovoy 

Autobuild-User(master): Jeremy Allison 
Autobuild-Date(master): Thu May 18 03:01:40 CEST 2017 on sn-devel-144

(cherry picked from commit b691f6d32f79ef8427f567612243dd51ea8d5584)

Autobuild-User(v4-6-test): Karolin Seeger 
Autobuild-Date(v4-6-test): Fri May 19 13:33:08 CEST 2017 on sn-devel-144

commit f71fecac77c4d8922ebb4771b8430bcb90e4f100
Author: Amitay Isaacs 
Date:   Thu Apr 20 14:34:54 2017 +1000

ctdb-tests: Use tighter pattern for matching expected output

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

Signed-off-by: Amitay Isaacs 
Reviewed-by: Martin Schwenke 

Autobuild-User(master): Martin Schwenke 
Autobuild-Date(master): Mon May 15 08:08:10 CEST 2017 on sn-devel-144

(cherry picked from commit 9b5078919796da8dd7893e0a4f716dc1f1991de5)

commit 4a337266d64c6dbbb788a0318aab75d20cf7b8a7
Author: Amitay Isaacs 
Date:   Tue Mar 7 16:52:26 2017 +1100

ctdb-tests: Explicitly search for the specific log entry

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

... instead of expecting the last line to be the matching log entry.

Signed-off-by: Amitay Isaacs 
Reviewed-by: Martin Schwenke 
(cherry picked from commit 3db572832e9b99ea5b6d531d3b7331b8c0131fd6)

---

Summary of changes:
 ctdb/tests/eventd/eventd_051.sh| 2 +-
 ctdb/tests/eventd/scripts/local.sh | 2 +-
 source3/librpc/idl/open_files.idl  | 2 +-
 source3/locking/share_mode_lock.c  | 4 ++--
 4 files changed, 5 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/ctdb/tests/eventd/eventd_051.sh b/ctdb/tests/eventd/eventd_051.sh
index 213965a..46162de 100755
--- a/ctdb/tests/eventd/eventd_051.sh
+++ b/ctdb/tests/eventd/eventd_051.sh
@@ -20,4 +20,4 @@ simple_test run monitor 30
 required_result 0 

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

2017-05-16 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  3e50a50 ctdb-logging: Initialize DEBUGLEVEL before changing the 
value
  from  10b04d7 s3:smbcacls add prompt for password

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


- Log -
commit 3e50a507e87d4fff1b84be14176de14e311b919b
Author: Amitay Isaacs 
Date:   Sat May 6 02:08:50 2017 +1000

ctdb-logging: Initialize DEBUGLEVEL before changing the value

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

DEBUGLEVEL is defined as a const array reference at compile time.
debug_init() converts that to an allocated array reference at run time.
Since debug_init() is a static function, initialize DEBUGLEVEL via
setup_logging().

Signed-off-by: Amitay Isaacs 
Reviewed-by: Volker Lendecke 

Autobuild-User(master): Volker Lendecke 
Autobuild-Date(master): Mon May  8 00:12:25 CEST 2017 on sn-devel-144

(cherry picked from commit af09a733e953072707cde7df0126652e646970f6)

Autobuild-User(v4-6-test): Karolin Seeger 
Autobuild-Date(v4-6-test): Tue May 16 13:25:31 CEST 2017 on sn-devel-144

---

Summary of changes:
 ctdb/common/logging.c | 2 ++
 1 file changed, 2 insertions(+)


Changeset truncated at 500 lines:

diff --git a/ctdb/common/logging.c b/ctdb/common/logging.c
index 8e547c9..e1b8e7f 100644
--- a/ctdb/common/logging.c
+++ b/ctdb/common/logging.c
@@ -501,6 +501,8 @@ int logging_init(TALLOC_CTX *mem_ctx, const char *logging,
char *str, *name, *option;
int ret, i;
 
+   setup_logging(app_name, DEBUG_STDERR);
+
if (debug_level == NULL) {
debug_level = getenv("CTDB_DEBUGLEVEL");
}


-- 
Samba Shared Repository



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

2017-05-12 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  10b04d7 s3:smbcacls add prompt for password
   via  db9553e idmap_rfc2307: Test unix-ids-to-sids with 35 groups
   via  ea5dd00 selftest: Avoid idmap caching when testing idmap_rfc2307
   via  e0060df idmap_rfc2307: "ldap_next_entry" needs the previous entry, 
not the start
   via  0160f27 idmap_rfc2307: Don't stop after 30 entries
   via  c66a8b0 test_idmap_rfc2307: Test wbinfo -r for 35 supplementary 
group memberships
   via  cbf96d9 test_idmap_rfc2307: Do a recursive delete in ou=idmap
   via  bdea676 test_idmap_rfc2307: Correct usage
   via  301abae test_idmap_rfc2307: Avoid a tmpfile
   via  c2d7a72 test_idmap_rfc2307: Remove the correct file
   via  c73b49e idmap_rfc2307: "ldap_next_entry" needs the previous entry, 
not the start
   via  117547d idmap_rfc2307: Don't stop after 30 entries
   via  c7bead7 samba-tool: let 'samba-tool user syncpasswords' report 
deletions immediately
   via  ade0e8f4 s3/smbd: update exclusive oplock optimisation to the lease 
area
   via  6b3ebfb s3/smbd: update exclusive oplock optimisation to the lease 
area
   via  11a866e s3/locking: helper functions for lease types
   via  c82072f s3/locking: add const to fsp_lease_type
  from  82317ad systemd: fix detection of libsystemd

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


- Log -
commit 10b04d77a8369112fb88fe83500918e5aa01b6f7
Author: Christian Ambach 
Date:   Thu May 4 12:21:45 2017 +0200

s3:smbcacls add prompt for password

if no password was given, ask for one

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12765
Signed-off-by: Christian Ambach 
Reviewed-by: Andreas Schneider 

Autobuild-User(master): Christian Ambach 
Autobuild-Date(master): Thu May  4 20:36:50 CEST 2017 on sn-devel-144

(cherry picked from commit 770edb6aab2a1c2cbd85b975511b33b5fc580f13)

Autobuild-User(v4-6-test): Karolin Seeger 
Autobuild-Date(v4-6-test): Fri May 12 12:57:38 CEST 2017 on sn-devel-144

commit db9553e89b22caab556018bc66193f58f1c5d2b4
Author: Volker Lendecke 
Date:   Thu Apr 6 12:50:08 2017 +0200

idmap_rfc2307: Test unix-ids-to-sids with 35 groups

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

Signed-off-by: Volker Lendecke 
Reviewed-by: Christof Schmitt 
(cherry picked from commit ee3b17ba4674a17a411c9ec4271e087c8cd7dad1)

commit ea5dd00ddc7964aeb3a39f1dbff10078b9166f65
Author: Volker Lendecke 
Date:   Tue Apr 4 17:15:10 2017 +0200

selftest: Avoid idmap caching when testing idmap_rfc2307

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

Signed-off-by: Volker Lendecke 
Reviewed-by: Christof Schmitt 
(cherry picked from commit da7481f835ddc1fab16d11ccbaf7f33c213af23a)

commit e0060dfe96e18410f56d806edd399b4b1f37e3db
Author: Volker Lendecke 
Date:   Fri Mar 31 15:23:39 2017 +

idmap_rfc2307: "ldap_next_entry" needs the previous entry, not the start

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

Signed-off-by: Volker Lendecke 
Reviewed-by: Christof Schmitt 
(cherry picked from commit 803ea2d2b7820939d03f7eb381c3cf719a00ff4a)

commit 0160f27a8b3a094686c8d56742eab97fea3aedb7
Author: Volker Lendecke 
Date:   Fri Mar 31 15:20:07 2017 +

idmap_rfc2307: Don't stop after 30 entries

We start over again and again, so we need to search in the whole list.
This is a quick hack generating a bad O(n^2). The real fix is to
call idmap_rfc2307_find_map with "maps" starting at the right offset,
but that's an optimization for later when it's restructured

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

Signed-off-by: Volker Lendecke 
Reviewed-by: Christof Schmitt 
(cherry picked from commit c0f12170e8b9fb3ab75f53bba637c72f6465192e)

commit c66a8b0e5e878135f889168808c16ef179df99f5
Author: Volker Lendecke 
Date:   Tue Apr 4 15:28:36 2017 +0200

test_idmap_rfc2307: Test wbinfo -r for 35 supplementary group memberships

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

Signed-off-by: Volker Lendecke 
Reviewed-by: Christof Schmitt 
(cherry picked from commit e663357b4d7d5cb0c4d8a0ebc97cfcb58429b894)

commit cbf96d9b6850602a00e6a92bf65736f5feec694e
Author: Volker Lendecke 
Date:   Tue Apr 4 15:12:02 2017 +0200

test_idmap_rfc2307: Do a recursive delete in ou=idmap

We'll create more posix objects soon

BUG: 

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

2017-05-03 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  82317ad systemd: fix detection of libsystemd
  from  17d5052 s3: smbd: inotify_map_mask_to_filter incorrectly indexes an 
array.

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


- Log -
commit 82317ada6e79af928d8e880f1f38498e3caae508
Author: Alexander Bokovoy 
Date:   Thu Sep 29 00:09:12 2016 +0300

systemd: fix detection of libsystemd

On Fedora 25 detection of libsystemd actually fails due to wrong
assumptions in the configure test. conf.CHECK_LIB returns a list
so 'not conf.CHECK_LIB(...)' is always False and we never get to check
libsystemd.

Instead, remember result of checking pkg-config for separate
libsystemd-daemon and libsystemd-journal libraries. If they miss,
attempt to use libsystemd library instead.

Signed-off-by: Alexander Bokovoy 
Reviewed-by: Andreas Schneider 

Autobuild-User(master): Andreas Schneider 
Autobuild-Date(master): Tue May  2 13:05:43 CEST 2017 on sn-devel-144

(cherry picked from commit 09bc5b5374227a555f580c3d7c1d82f15bb818bc)

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12764
systemd: fix detection of libsystemd

Autobuild-User(v4-6-test): Karolin Seeger 
Autobuild-Date(v4-6-test): Wed May  3 20:43:57 CEST 2017 on sn-devel-144

---

Summary of changes:
 lib/util/wscript_configure | 15 ---
 1 file changed, 8 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/util/wscript_configure b/lib/util/wscript_configure
index a1e5801..7c17633 100644
--- a/lib/util/wscript_configure
+++ b/lib/util/wscript_configure
@@ -110,16 +110,17 @@ conf.SET_TARGET_TYPE('systemd-journal', 'EMPTY')
 conf.SET_TARGET_TYPE('systemd', 'EMPTY')
 
 if Options.options.enable_systemd != False:
-conf.CHECK_CFG(package='libsystemd-daemon', args='--cflags --libs',
+r_daemon = conf.CHECK_CFG(package='libsystemd-daemon', args='--cflags 
--libs',
msg='Checking for libsystemd-daemon')
-if not conf.CHECK_LIB('systemd-daemon', shlib=True):
-conf.CHECK_LIB('systemd', shlib=True)
-
-if Options.options.enable_systemd != False:
-conf.CHECK_CFG(package='libsystemd-journal', args='--cflags --libs',
+r_journal = conf.CHECK_CFG(package='libsystemd-journal', args='--cflags 
--libs',
msg='Checking for libsystemd-journal')
-if not conf.CHECK_LIB('systemd-journal', shlib=True):
+if r_daemon is None and r_journal is None:
+conf.CHECK_CFG(package='libsystemd', args='--cflags --libs',
+   msg='Checking for libsystemd')
 conf.CHECK_LIB('systemd', shlib=True)
+else:
+conf.CHECK_LIB('systemd-daemon', shlib=True)
+conf.CHECK_LIB('systemd-journal', shlib=True)
 
 if Options.options.enable_lttng != False:
 conf.CHECK_CFG(package='lttng-ust', args='--cflags --libs',


-- 
Samba Shared Repository



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

2017-05-03 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  17d5052 s3: smbd: inotify_map_mask_to_filter incorrectly indexes an 
array.
  from  0636b93 s3-tests: assignement in shell shall have no spaces around 
equal sign

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


- Log -
commit 17d505226a2212f0a13b35ba411a8b7edd37296f
Author: Doug Nazar 
Date:   Thu Apr 27 15:41:24 2017 -0700

s3: smbd: inotify_map_mask_to_filter incorrectly indexes an array.

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

Signed-off-by: Doug Nazar 
Reviewed-by: Jeremy Allison 
Reviewed-by: Christof Schmitt 
(cherry picked from commit a939db725ea81944532ba3b035da0d145bc3b62a)

Autobuild-User(v4-6-test): Karolin Seeger 
Autobuild-Date(v4-6-test): Wed May  3 13:31:27 CEST 2017 on sn-devel-144

---

Summary of changes:
 source3/smbd/notify_inotify.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/notify_inotify.c b/source3/smbd/notify_inotify.c
index 3848dd6..74855a9 100644
--- a/source3/smbd/notify_inotify.c
+++ b/source3/smbd/notify_inotify.c
@@ -97,7 +97,7 @@ static uint32_t inotify_map_mask_to_filter(uint32_t mask)
uint32_t filter = 0;
 
for (i = 0; i < ARRAY_SIZE(inotify_mapping); i++) {
-   if (inotify_mapping[0].inotify_mask & mask) {
+   if (inotify_mapping[i].inotify_mask & mask) {
filter |= inotify_mapping[i].notify_mask;
}
}


-- 
Samba Shared Repository



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

2017-04-28 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  0636b93 s3-tests: assignement in shell shall have no spaces around 
equal sign
   via  249607c _netr_ServerPasswordSet2: use info level 26 to set plain 
text machine password
   via  30586d3 vfs_fruit: lp_case_sensitive() does not return a bool
   via  6ffea89 winbindd: only use the domain name from lookup sids if the 
domain matches
   via  37e26bf winbindd: handling of SIDs without domain reference in 
wb_sids2xids_lookupsids_done()
   via  73e1f00 vfs_acl_xattr|tdb: ensure create mask is at least 0666 if 
ignore_system_acls is set
   via  6915ad5 notify: Fix ordering of events in notifyd
  from  9602cd0 VERSION: Bump version up to 4.6.4...

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


- Log -
commit 0636b9303dee8ecb44540a7dea7003159b370168
Author: Alexander Bokovoy 
Date:   Tue Apr 18 18:28:29 2017 +0300

s3-tests: assignement in shell shall have no spaces around equal sign

When assigning value to 'failed', no spaces should be around '=' sign.

Signed-off-by: Alexander Bokovoy 
Reviewed-by: Jeremy Allison 

Autobuild-User(master): Jeremy Allison 
Autobuild-Date(master): Wed Apr 19 02:53:25 CEST 2017 on sn-devel-144

(cherry picked from commit d58481bd133a8f59ae553eeff6335162f3c7071c)

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

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

commit 249607ce5e9ae9a9e5ba6b5864b9473871357543
Author: Alexander Bokovoy 
Date:   Fri Mar 31 12:44:58 2017 +0300

_netr_ServerPasswordSet2: use info level 26 to set plain text machine 
password

To support password change for machine or trusted domain accounts in Active
Directory environment we need to pass down actual plain text password
instead of NT hashes. This would allow a backend like ipasam to update
Kerberos keys as well as NT hashes.

By calling samr_SetUserInfo2 info level 26 we ensure PASSDB layer can
actually get the plain text password. If PASSDB backend implements
pdb_update_sam_account() callback, it then gets the plain text password
from samr_SetUserInfo2.

A plain text password is a data blob represented as up to 256 WCHARs. It
is UTF-16 coded on wire and we have its length from the buffer.
SetUserInfo2 SAMR call chain in decode_pw_buffer() does explicitly
expect 512+4 bytes in the buffer. It then calls convert_string_talloc()
to convert it to UNIX charset passing the correct value of the plaintext
password length. However, convert_string_talloc() expects the length of
input string *including* the terminating null and we pass just the
string length.

convert_string_talloc() then explicitly null-terminates the resulting
string by adding two nulls. In most cases UNIX charset is UTF-8, so we
get null-terminated UTF-8 string down to PASSDB layer.

MS-SAMR does not limit what does the password should contain.  It says
it is 'userPassword' value. Either 'userPassword' or 'unicodePwd' cannot
contain null characters according to MS-ADTS 3.1.1.3.1.5 because they
must be proper UTF-8 and UTF-16 strings accordingly.

We are talking to our own SAMR service here.

Signed-off-by: Alexander Bokovoy 
Reviewed-by: Andrew Bartlett 
(cherry picked from commit ff4fb6935a32e33ef01c97d4ee103bc11ac31da0)

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

commit 30586d36be13507fb4f8fabb806b69035fc98096
Author: Ralph Boehme 
Date:   Wed Apr 19 13:12:55 2017 +0200

vfs_fruit: lp_case_sensitive() does not return a bool

lp_case_sensitive() returns an int, not a bool, so with the default
setting of "Auto" by default we set the AAPL flag
SMB2_CRTCTX_AAPL_CASE_SENSITIVE.

This caused the client to believe the volume is case sensitive where it
wasn't, leading to an error when trying to rename files changing only
the case of the name.

Also fix the existing torture test that verifies AAPL context
negotiation and actually expected the server to return "case sensitive",
while the Samba default is really "case insensitive".

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

Signed-off-by: Ralph Boehme 
Reviewed-by: Jeremy Allison 
(cherry picked from commit 36612723b2b18675116b6197183bdfe5e1d9e06f)

commit 6ffea89a6d62f3a8684614c735b09f5a8043fa6b
Author: Ralph Boehme 
Date:   Mon Apr 10 14:28:18 2017 +0200

winbindd: only use the domain name from lookup sids if the domain matches

With the use of sIDHistory it 

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

2017-04-24 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  9602cd0 VERSION: Bump version up to 4.6.4...
   via  bbdd585 VERSION: Disable GIT_SNAPSHOTS for the 4.6.3 release.
   via  dcff483 WHATSNEW: Add release notes for Samba 4.6.3.
  from  c13244a cleanupdb: Fix a memory read error

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


- Log -
commit 9602cd0b5373aacc22c262b04b828b93cadf6df5
Author: Karolin Seeger 
Date:   Fri Apr 21 11:13:49 2017 +0200

VERSION: Bump version up to 4.6.4...

and re-enable GIT_SNAPSHOTS.

Signed-off-by: Karolin Seeger 

commit bbdd5850b1d5fa44bbedcee8be60e4066ae0d680
Author: Karolin Seeger 
Date:   Fri Apr 21 11:12:58 2017 +0200

VERSION: Disable GIT_SNAPSHOTS for the 4.6.3 release.

Signed-off-by: Karolin Seeger 

commit dcff4834f15b04b32203a8a6336531d05b9cc987
Author: Karolin Seeger 
Date:   Fri Apr 21 11:12:24 2017 +0200

WHATSNEW: Add release notes for Samba 4.6.3.

Signed-off-by: Karolin Seeger 

---

Summary of changes:
 VERSION  |   2 +-
 WHATSNEW.txt | 113 +--
 2 files changed, 112 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/VERSION b/VERSION
index e197b1f..2f581c4 100644
--- a/VERSION
+++ b/VERSION
@@ -25,7 +25,7 @@
 
 SAMBA_VERSION_MAJOR=4
 SAMBA_VERSION_MINOR=6
-SAMBA_VERSION_RELEASE=3
+SAMBA_VERSION_RELEASE=4
 
 
 # If a official release has a serious bug  #
diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index a5feff8..9a16862 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -1,4 +1,113 @@
=
+   Release Notes for Samba 4.6.3
+   April 25, 2017
+   =
+
+
+This is the latest stable release of the Samba 4.6 release series.
+
+
+Changes since 4.6.2:
+
+
+o  Michael Adam 
+   * BUG 12743: s3:vfs:shadow_copy2: vfs_shadow_copy2 fails to list snapshots
+ from shares with GlusterFS backend.
+
+o  Jeremy Allison 
+   * BUG 12559: Fix for Solaris C compiler.
+   * BUG 12628: s3: locking: Update oplock optimization for the leases era.
+   * BUG 12693: Make the Solaris C compiler happy.
+   * BUG 12695: s3: libgpo: Allow skipping GPO objects that don't have the
+ expected LDAP attributes.
+   * BUG 12747: Fix buffer overflow caused by wrong use of getgroups.
+
+o  Hanno Boeck 
+   * BUG 12746: lib: debug: Avoid negative array access.
+   * BUG 12748: cleanupdb: Fix a memory read error.
+
+o  Ralph Boehme 
+   * BUG 7537: streams_xattr and kernel oplocks results in
+ NT_STATUS_NETWORK_BUSY.
+   * BUG 11961: winbindd: idmap_autorid allocates ids for unknown SIDs from 
other
+ backends.
+   * BUG 12565: vfs_fruit: Resource fork open request with
+ flags=O_CREAT|O_RDONLY.
+   * BUG 12615: manpages/vfs_fruit: Document global options.
+   * BUG 12624: lib/pthreadpool: Fix a memory leak.
+   * BUG 12727: Lookup-domain for well-known SIDs on a DC.
+   * BUG 12728: winbindd: Fix error handling in rpc_lookup_sids().
+   * BUG 12729: winbindd: Trigger possible passdb_dsdb initialisation.
+
+o  Alexander Bokovoy 
+   * BUG 12611: credentials_krb5: use gss_acquire_cred for client-side GSSAPI
+ use case.
+   * BUG 12690: lib/crypto: Implement samba.crypto Python module for RC4.
+
+o  Amitay Isaacs 
+   * BUG 12697: ctdb-readonly: Avoid a tight loop waiting for revoke to
+ complete.
+   * BUG 12723: ctdb_event monitor command crashes if event is not specified.
+   * BUG 12733: ctdb-docs: Fix documentation of "-n" option to 'ctdb tool'.
+
+o  Volker Lendecke 
+   * BUG 12558: smbd: Fix smb1 findfirst with DFS.
+   * BUG 12610: smbd: Do an early exit on negprot failure.
+   * BUG 12699: winbindd: Fix substitution for 'template homedir'.
+
+o  Stefan Metzmacher 
+   * BUG 12554: s4:kdc: Disable principal based autodetected referral 
detection.
+   * BUG 12613: idmap_autorid: Allocate new domain range if the callers knows
+ the sid is valid.
+   * BUG 12724: LINKFLAGS_PYEMBED should not contain -L/some/path.
+   * BUG 12725: PAM auth with WBFLAG_PAM_GET_PWD_POLICY returns wrong policy 
for
+ trusted domain.
+   * BUG 12731: rpcclient: Allow -U'OTHERDOMAIN\user' again.
+
+o  Christof Schmitt 
+   * BUG 12725: winbindd: Fix password policy for pam authentication.
+
+o  Andreas Schneider 
+   * BUG 12554: s3:gse: Correctly handle external 

[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-6-test updated

2017-04-20 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  12c24f3 s3:smbd: Fix incorrect use of sys_getgroups()
   via  ee420c1 s3:lib: Fix incorrect logic in sys_broken_getgroups()
   via  72d1724 lib: debug: Avoid negative array access.
   via  71abf1a vfs_acl_xattr: avoid needlessly supplying a large buffer to 
getxattr()
   via  ec39296 vfs_acl_xattr: factor out fetching of an extended attribute
   via  fb375e3 vfs_xattr_tdb: handle case of zero size.
   via  70a2e2e selftest: test fetching a large ACL from vfs_acl_xattr
   via  7a806d7 ctdb-docs: Fix documentation of -n option to ctdb tool
   via  c9a5199 rpcclient: allow -U'OTHERDOMAIN\user' again
   via  8719babb winbindd: trigger possible passdb_dsdb initialisation
   via  d0d8663 winbindd: error handling in rpc_lookup_sids()
   via  a323631 s3/rpc_client: lookupsids error handling of 
NT_STATUS_NONE_MAPPED
   via  9afba47 s3/rpc_client: use NT_STATUS_LOOKUP_ERR
   via  6526a27 s3/include: add NT_STATUS_LOOKUP_ERR
   via  b6ea6f7 selftest: fix for wbinfo -s tests for wellknown SIDs
   via  5083579 winbindd: explicit check for well-known SIDs in 
wb_lookupsids_bulk()
   via  1a6802e selftest: wbinfo --sids-to-unix-ids tests for wellknown SIDs
   via  1d66d33 selftest: wbinfo -s tests for wellknown SIDs
   via  fd6ec35 winbindd: use passdb backend for well-known SIDs
   via  50583a6 selftest: tests idmap mapping with idmap_rid
   via  d0643c5 selftest: new environment "ad_member_idmap_rid"
   via  ff5865a winbindd: remove unused single_domains array
   via  b86a793 winbindd: use correct domain name for failed lookupsids
   via  4c5f50c autobuild: Stop waf uninstall from removing test_tmpdir
   via  dce116d script/autobuild.py: ignore missing test_tmpdir
   via  da065cd script/autobuild.py: try to make TMPDIR handling more 
verbose
   via  286a9fd script/autobuild.py: add a do_print() wrapper function that 
flushes after each message
   via  5d964e1 script/autobuild.py: export PYTHONUNBUFFERED=1
   via  a727300 script/autobuild.py: cleanup the task subdirs when they're 
done.
   via  3cd5d41 s4/torture: vfs_fruit: test for bug 12565
   via  fe3fe4f vfs_fruit: resource fork open request with 
flags=O_CREAT|O_RDONLY
   via  981e667 wafsamba: move -L/some/path from LINKFLAGS_PYEMBED to 
LIBPATH_PYEMBED
   via  122e46f selftest: Test for bug 12558
   via  ef48aa4 smbd: Fix smb1 findfirst with DFS
   via  6f05903 winbindd: Fix password policy for pam authentication
   via  f37537b ctdb-tools: Avoid deferencing argv[0] if argc == 0
   via  208dc58 selftest: Define template homedir for 'ad_member' env
   via  2cad042 s3:tests: Add a subsitution test for %D %u %g
   via  bc93a47 s3:winbind: Use the correct talloc context for user 
information
  from  925aa47 VERSION: Bump version up to 4.6.3.

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


- Log -
commit 12c24f3e338599529f880ff4de176e07a8019aee
Author: Jeremy Allison 
Date:   Mon Apr 17 14:30:54 2017 -0700

s3:smbd: Fix incorrect use of sys_getgroups()

Second arg must be NULL when first arg is 0 (it is in all other places).

Bug report and patch from Hanno Böck 

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

Signed-off-by: Jeremy Allison 
Reviewed-by: Andreas Schneider 

Autobuild-User(master): Andreas Schneider 
Autobuild-Date(master): Tue Apr 18 15:43:02 CEST 2017 on sn-devel-144

(cherry picked from commit 76b351e907f67cc7d4af4e7d800c7a3aa1269ee8)

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

commit ee420c1bc61a1b4fd25b7c2d93e59ede10261926
Author: Jeremy Allison 
Date:   Mon Apr 17 14:30:04 2017 -0700

s3:lib: Fix incorrect logic in sys_broken_getgroups()

If setlen == 0 then the second argument must be ignored.

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

Signed-off-by: Jeremy Allison 
Reviewed-by: Andreas Schneider 
(cherry picked from commit 60af864f751706c48b8af448700bf06e33e45946)

commit 72d172434df7655620d1bee41b39ba316229cf1f
Author: Jeremy Allison 
Date:   Mon Apr 17 14:09:24 2017 -0700

lib: debug: Avoid negative array access.

Report and patch from Hanno Böck .

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

Signed-off-by: Jeremy Allison 
Reviewed-by: Martin Schwenke 
Reviewed-by: Andreas Schneider 
(cherry picked from commit 600f8787e3b605c9f3e8f724c726e63157ee9efc)

commit 

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

2017-03-31 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  925aa47 VERSION: Bump version up to 4.6.3.
   via  dd75f39 Merge tag 'samba-4.6.2' into v4-6-test
   via  36d0070 VERSION: Disable GIT_SNAPSHOTS for the 4.6.2 release.
   via  8f35980 WHATSNEW: Add release notes for 4.6.2.
   via  2b9a812 s3: Test for CVE-2017-2619 regression with "follow symlinks 
= no" - part 2
   via  9e81c83 s3: smbd: Fix "follow symlink = no" regression part 2.
   via  9e2ce69 s3: smbd: Fix "follow symlink = no" regression part 2.
   via  076f01e s3: Fixup test for CVE-2017-2619 regression with "follow 
symlinks = no"
   via  5a573c2 s3: Test for CVE-2017-2619 regression with "follow symlinks 
= no".
   via  faea234 s3: smbd: Fix incorrect logic exposed by fix for the 
security bug 12496 (CVE-2017-2619).
   via  7b7f6a0 VERSION: Re-enable GIT_SNAPSHOTS.
   via  6cd0b59 VERSION: Bump version up to 4.6.2.
  from  cf02564 s3: Test for CVE-2017-2619 regression with "follow symlinks 
= no" - part 2

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


- Log -
commit 925aa47db2e7ca194443a189c750f6285c816a26
Author: Karolin Seeger 
Date:   Fri Mar 31 10:18:05 2017 +0200

VERSION: Bump version up to 4.6.3.

Signed-off-by: Karolin Seeger 

commit dd75f3945f689fc639f4f5bf70294c63b12210ae
Merge: cf02564 36d0070
Author: Karolin Seeger 
Date:   Fri Mar 31 10:17:48 2017 +0200

Merge tag 'samba-4.6.2' into v4-6-test

samba: tag release samba-4.6.2

---

Summary of changes:
 VERSION   |  2 +-
 WHATSNEW.txt  | 45 +++--
 selftest/target/Samba3.pm |  4 
 3 files changed, 48 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/VERSION b/VERSION
index 3a831c8..e197b1f 100644
--- a/VERSION
+++ b/VERSION
@@ -25,7 +25,7 @@
 
 SAMBA_VERSION_MAJOR=4
 SAMBA_VERSION_MINOR=6
-SAMBA_VERSION_RELEASE=2
+SAMBA_VERSION_RELEASE=3
 
 
 # If a official release has a serious bug  #
diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index 02935d7..a5feff8 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -1,4 +1,45 @@
=
+   Release Notes for Samba 4.6.2
+   March 31, 2017
+   =
+
+
+This is a bug fix release to address a regression introduced by the security
+fixes for CVE-2017-2619 (Symlink race allows access outside share definition).
+Please see https://bugzilla.samba.org/show_bug.cgi?id=12721 for details.
+
+
+Changes since 4.6.1:
+
+
+o  Jeremy Allison 
+   * BUG 12721: Fix regression with "follow symlinks = no".
+
+
+###
+Reporting bugs & Development Discussion
+###
+
+Please discuss this release on the samba-technical mailing list or by
+joining the #samba-technical IRC channel on irc.freenode.net.
+
+If you do report problems then please try to send high quality
+feedback. If you don't provide vital information to help us track down
+the problem then you will probably be ignored.  All bug reports should
+be filed under the "Samba 4.1 and newer" product in the project's Bugzilla
+database (https://bugzilla.samba.org/).
+
+
+==
+== Our Code, Our Bugs, Our Responsibility.
+== The Samba Team
+==
+
+
+Release notes for older releases follow:
+
+
+   =
Release Notes for Samba 4.6.1
March 23, 2017
=
@@ -66,8 +107,8 @@ database (https://bugzilla.samba.org/).
 ==
 
 
-Release notes for older releases follow:
-
+--
+
 
   ==
Release Notes for Samba 4.6.0
diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm
index d7b8d77..7722a5e 100755
--- a/selftest/target/Samba3.pm
+++ b/selftest/target/Samba3.pm
@@ -1861,6 +1861,10 @@ sub provision()
copy = tmp
acl_xattr:ignore system acls = yes
acl_xattr:default acl style = posix
+[nosymlinks]
+   copy = tmp
+   path = $nosymlinks_shrdir
+   follow symlinks = no
 [acl_xattr_ign_sysacl_windows]
copy = tmp

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

2017-03-30 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  cf02564 s3: Test for CVE-2017-2619 regression with "follow symlinks 
= no" - part 2
   via  30aa17d s3: smbd: Fix "follow symlink = no" regression part 2.
   via  3f52654 s3: smbd: Fix "follow symlink = no" regression part 2.
   via  178 s3: Fixup test for CVE-2017-2619 regression with "follow 
symlinks = no"
   via  35f100d s3: Test for CVE-2017-2619 regression with "follow symlinks 
= no".
   via  c6199c2 s3: smbd: Fix incorrect logic exposed by fix for the 
security bug 12496 (CVE-2017-2619).
  from  07437b0 selftest: tests for vfs_fruite file-id behavior

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


- Log -
commit cf02564e4e6c06fe50492726e412b2694987414e
Author: Jeremy Allison 
Date:   Mon Mar 27 22:10:29 2017 -0700

s3: Test for CVE-2017-2619 regression with "follow symlinks = no" - part 2

Add tests for regular access.

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

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

Autobuild-User(master): Ralph Böhme 
Autobuild-Date(master): Tue Mar 28 17:05:27 CEST 2017 on sn-devel-144

(cherry picked from commit 4e734fcd1bf82c08aa303ce44e9735acccffcf06)

Autobuild-User(v4-6-test): Karolin Seeger 
Autobuild-Date(v4-6-test): Thu Mar 30 12:30:32 CEST 2017 on sn-devel-144

commit 30aa17dc27f552b0f0f48b53d8897a42dad30091
Author: Jeremy Allison 
Date:   Mon Mar 27 17:09:38 2017 -0700

s3: smbd: Fix "follow symlink = no" regression part 2.

Use the cwd_name parameter to reconstruct the original
client name for symlink testing.

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

Signed-off-by: Jeremy Allison 
Reviewed-by: Ralph Boehme 
(cherry picked from commit e182a4d39e86c9694e255efdf6ee2ea3ccb9af4a)

commit 3f526546179d4670bace181d0991a8bbb4999dae
Author: Jeremy Allison 
Date:   Mon Mar 27 17:04:58 2017 -0700

s3: smbd: Fix "follow symlink = no" regression part 2.

Add an extra paramter to cwd_name to check_reduced_name().

If cwd_name == NULL then fname is a client given path relative
to the root path of the share.

If cwd_name != NULL then fname is a client given path relative
to cwd_name. cwd_name is relative to the root path of the share.

Not yet used, logic added in the next commit.

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

Signed-off-by: Jeremy Allison 
Reviewed-by: Ralph Boehme 
(cherry picked from commit 83e30cb48859b412b76572b6a3ba84d8fde167af)

commit 17834c6a6743482cebbb368a2667b850b2b7
Author: Jeremy Allison 
Date:   Mon Mar 27 22:07:50 2017 -0700

s3: Fixup test for CVE-2017-2619 regression with "follow symlinks = no"

Use correct bash operators (not string operators).
Add missing "return".

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

Signed-off-by: Jeremy Allison 
Reviewed-by: Ralph Boehme 
(cherry picked from commit 037297a1c50e90a0092e3b94f472623f41ccc015)

commit 35f100d2a37bacda0dbc80596476584fc0a1624d
Author: Jeremy Allison 
Date:   Mon Mar 27 11:48:25 2017 -0700

s3: Test for CVE-2017-2619 regression with "follow symlinks = no".

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

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

Back-ported from commit 782172a9bef0040981d20e49519b13dd744df6a0

commit c6199c2b35ae66b198f9efc7a72f7c3427598a83
Author: Jeremy Allison 
Date:   Mon Mar 27 10:46:47 2017 -0700

s3: smbd: Fix incorrect logic exposed by fix for the security bug 12496 
(CVE-2017-2619).

In a UNIX filesystem, the names "." and ".." by definition can *never*
be symlinks - they are already reserved names.

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

Signed-off-by: Jeremy Allison 
Reviewed-by: Uri Simchoni 
(cherry picked from commit ae17bebd250bdde5614b2ac17e53512f19fe9b68)

---

Summary of changes:
 selftest/target/Samba3.pm |   7 ++
 source3/script/tests/test_smbclient_s3.sh | 111 ++
 source3/smbd/filename.c   |   2 +-
 source3/smbd/open.c   |   2 +-
 source3/smbd/proto.h  |   4 +-
 source3/smbd/vfs.c|  40 ++-
 6 files changed, 160 insertions(+), 6 deletions(-)


Changeset truncated at 500 lines:

diff --git 

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

2017-03-28 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  07437b0 selftest: tests for vfs_fruite file-id behavior
   via  6b3cc69 torture: add torture_assert_mem_not_equal_goto()
   via  cdf3f57 vfs_fruit: document added zero_file_id parameter
   via  9e7cfc4 vfs_fruit: enable zero file id
   via  2732b0c smbd: add zero_file_id flag
   via  2e9450a nsswtich: Add negative tests for authentication with wbinfo
   via  4a6c2da s3:libads: Remove obsolete 
smb_krb5_get_ntstatus_from_init_creds()
  from  705149d s3: locking: Update oplock optimization for the leases era !

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


- Log -
commit 07437b080d292af086e6db7e739ff8f65f1a9be6
Author: Uri Simchoni 
Date:   Thu Mar 23 21:32:04 2017 +0200

selftest: tests for vfs_fruite file-id behavior

The test is in its own suite because it validates
our hackish workaround rather than some reference
implementation behavior.

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

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

Autobuild-User(master): Ralph Böhme 
Autobuild-Date(master): Sun Mar 26 23:31:08 CEST 2017 on sn-devel-144

(cherry picked from commit b6baf35ebde68db75515910ede26e74bb8313284)

Autobuild-User(v4-6-test): Karolin Seeger 
Autobuild-Date(v4-6-test): Tue Mar 28 16:14:58 CEST 2017 on sn-devel-144

commit 6b3cc693907731591b8a9e2492efbaa483522558
Author: Uri Simchoni 
Date:   Thu Mar 23 21:30:50 2017 +0200

torture: add torture_assert_mem_not_equal_goto()

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

Signed-off-by: Uri Simchoni 
Reviewed-by: Ralph Boehme 
(cherry picked from commit f31fd41ca728d664ded940a7309ef1e32383bb66)

commit cdf3f5717605e7b3ef9cccd53fad08390b6a2c84
Author: Uri Simchoni 
Date:   Thu Mar 23 14:51:32 2017 +0200

vfs_fruit: document added zero_file_id parameter

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

Signed-off-by: Uri Simchoni 
Reviewed-by: Ralph Boehme 
(cherry picked from commit e11d4eb4d5c6cfc6daa3dbdcc301a4fa83298f0e)

commit 9e7cfc4384620b4f1587895613b73c19c0025670
Author: Uri Simchoni 
Date:   Thu Mar 23 14:08:45 2017 +0200

vfs_fruit: enable zero file id

Enable zero_file_id if both conditions are met:
- AAPL negotiated
- fruit:zero_file_id is set

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

Signed-off-by: Uri Simchoni 
Reviewed-by: Ralph Boehme 
(cherry picked from commit 245a325532c9a46ec3e459ceca38e903b203f691)

commit 2732b0cb29a9182abc6473748c71d7eb6a044b49
Author: Uri Simchoni 
Date:   Thu Mar 23 14:08:26 2017 +0200

smbd: add zero_file_id flag

This flag instructs the SMB layer to report a zero on-disk
file identifier.

According to [MS-SMB2] 3.3.5.9.9, the reported on-disk file ID
SHOULD be unique. However, macOS clients seem to expect it to be
unique over time as well, like the HFS+ CNID. Reporting a file ID
of 0 seems to instruct the Mac client not to trust the server-reported
file ID.

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

Signed-off-by: Uri Simchoni 
Reviewed-by: Ralph Boehme 
(cherry picked from commit 6711522e1e57980e50e245f43167d0daf5a705ad)

commit 2e9450af90b48ab1f9b5db079a47ce49b43dd811
Author: Andreas Schneider 
Date:   Mon Mar 20 12:22:44 2017 +0100

nsswtich: Add negative tests for authentication with wbinfo

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

Signed-off-by: Andreas Schneider 
Reviewed-by: Uri Simchoni 

Autobuild-User(master): Uri Simchoni 
Autobuild-Date(master): Wed Mar 22 10:58:58 CET 2017 on sn-devel-144

(cherry picked from commit e7d1d8c49322a131e7ca1993f9956f0bddcaff3c)

commit 4a6c2da1228173dd2e3a8e13f7ce283d6ea9143b
Author: Andreas Schneider 
Date:   Tue Mar 21 09:57:30 2017 +0100

s3:libads: Remove obsolete smb_krb5_get_ntstatus_from_init_creds()

There is no way we can get a better error code out of this. The original
function called was krb5_get_init_creds_opt_get_error() which has been
deprecated in 2008.

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

Signed-off-by: Andreas Schneider 
Reviewed-by: Uri Simchoni 
(cherry picked from commit e2028837b958618a66449a77ee628e4e176e521e)

---

Summary of changes:

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

2017-03-27 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  705149d s3: locking: Update oplock optimization for the leases era !
   via  a619054 s3: locking: Move two leases functions into a new file.
  from  32f7ba9 Changes to make the Solaris C compiler happy.

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


- Log -
commit 705149d93b2ce380945aa776a9f1e431181e457b
Author: Jeremy Allison 
Date:   Tue Mar 14 13:34:07 2017 -0700

s3: locking: Update oplock optimization for the leases era !

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

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

Autobuild-User(master): Ralph Böhme 
Autobuild-Date(master): Wed Mar 15 20:04:32 CET 2017 on sn-devel-144

(cherry picked from commit 1c4b15aa5f6707e7bcfc21435e26929fb7f45c0f)

Autobuild-User(v4-6-test): Karolin Seeger 
Autobuild-Date(v4-6-test): Mon Mar 27 16:19:12 CEST 2017 on sn-devel-144

commit a619054b4b210433df44b0d1852ee57e90b35318
Author: Jeremy Allison 
Date:   Tue Mar 14 13:23:13 2017 -0700

s3: locking: Move two leases functions into a new file.

map_oplock_to_lease_type(), fsp_lease_type().

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

Signed-off-by: Jeremy Allison 
Reviewed-by: Ralph Boehme 
(cherry picked from commit 125c78ad0b8f9caaef1ba2f1aeb5ec593375fccd)

---

Summary of changes:
 source3/locking/leases_util.c | 55 +++
 source3/locking/locking.c | 22 ++---
 source3/locking/proto.h   |  4 
 source3/smbd/files.c  |  8 ---
 source3/smbd/oplock.c | 22 -
 source3/smbd/proto.h  |  2 --
 source3/wscript_build |  6 +
 7 files changed, 78 insertions(+), 41 deletions(-)
 create mode 100644 source3/locking/leases_util.c


Changeset truncated at 500 lines:

diff --git a/source3/locking/leases_util.c b/source3/locking/leases_util.c
new file mode 100644
index 000..cb307c8
--- /dev/null
+++ b/source3/locking/leases_util.c
@@ -0,0 +1,55 @@
+/*
+   Unix SMB/CIFS implementation.
+   Lease utility functions
+
+   Copyright (C) Jeremy Allison 2017.
+   Copyright (C) Stefan (metze) Metzmacher 2017.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see .
+*/
+
+#define DBGC_CLASS DBGC_LOCKING
+#include "includes.h"
+#include "../librpc/gen_ndr/open_files.h"
+#include "locking/proto.h"
+
+uint32_t map_oplock_to_lease_type(uint16_t op_type)
+{
+   uint32_t ret;
+
+   switch(op_type) {
+   case BATCH_OPLOCK:
+   case BATCH_OPLOCK|EXCLUSIVE_OPLOCK:
+   ret = SMB2_LEASE_READ|SMB2_LEASE_WRITE|SMB2_LEASE_HANDLE;
+   break;
+   case EXCLUSIVE_OPLOCK:
+   ret = SMB2_LEASE_READ|SMB2_LEASE_WRITE;
+   break;
+   case LEVEL_II_OPLOCK:
+   ret = SMB2_LEASE_READ;
+   break;
+   default:
+   ret = SMB2_LEASE_NONE;
+   break;
+   }
+   return ret;
+}
+
+uint32_t fsp_lease_type(struct files_struct *fsp)
+{
+   if (fsp->oplock_type == LEASE_OPLOCK) {
+   return fsp->lease->lease.lease_state;
+   }
+   return map_oplock_to_lease_type(fsp->oplock_type);
+}
diff --git a/source3/locking/locking.c b/source3/locking/locking.c
index 5a97460..e6d3918 100644
--- a/source3/locking/locking.c
+++ b/source3/locking/locking.c
@@ -118,17 +118,21 @@ bool strict_lock_default(files_struct *fsp, struct 
lock_struct *plock)
}
 
if (strict_locking == Auto) {
-   if  (EXCLUSIVE_OPLOCK_TYPE(fsp->oplock_type) &&
-(plock->lock_type == READ_LOCK ||
- plock->lock_type == WRITE_LOCK)) {
-   DEBUG(10, ("is_locked: optimisation - exclusive oplock "
-  "on file %s\n", fsp_str_dbg(fsp)));
+   uint32_t lease_type = fsp_lease_type(fsp);
+
+   if ((lease_type & SMB2_LEASE_READ) &&
+(plock->lock_type == READ_LOCK))
+   {
+   

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

2017-03-23 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  32f7ba9 Changes to make the Solaris C compiler happy.
   via  36a2ee2 lib/crypto: implement samba.crypto Python module for RC4
   via  137b26f Fix for Solaris C compiler.
   via  e418059 s3:libsmb: Only print error message if kerberos use is 
forced
   via  177dba4 ctdb-readonly: Avoid a tight loop waiting for revoke to 
complete
   via  71b8b1d s3: libgpo: Allow skipping GPO objects that don't have the 
expected LDAP attributes.
   via  9c8b11b s3:vfs_expand_msdfs: Do not open the remote address as a 
file
   via  1fc5090 testprogs: Test 'net ads join' with a dedicated keytab
   via  a54601e param: Allow to specify kerberos method on the commandline
   via  6717c67 s3:libads: Correctly handle the keytab kerberos methods
   via  323ba48 krb5_wrap: Print a warning for an invalid keytab name
   via  0abbc39 testprogs: Correctly expand shell parameters
   via  d6c9486 auth/credentials: Always set the the realm if we set the 
principal from the ccache
   via  906c8a3 s3-gse: move krb5 fallback to smb_gss_krb5_import_cred 
wrapper
   via  9bf6381 s3-gse: convert to use smb_gss_krb5_import_cred
   via  92e6351 libads: convert to use smb_gss_krb5_import_cred
   via  4b74d31 credentials_krb5: convert to use smb_gss_krb5_import_cred
   via  cb44a31 lib/krb5_wrap: add smb_gss_krb5_import_cred wrapper
   via  7f963d9 gssapi: check for gss_acquire_cred_from
  from  c47fee6 VERSION: Bump version up to 4.6.2.

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


- Log -
commit 32f7ba9dad215dd177a19b9c04d35c9e4d69f77e
Author: Jeremy Allison 
Date:   Thu Mar 16 09:17:51 2017 -0700

Changes to make the Solaris C compiler happy.

Fix Bug 12693 dbwrap_watch.c syntax error before or at: }

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

Signed-off-by: Tom schulz 
Reviewed-by: Volker Lendecke 
Reviewed-by: Jeremy Allison 
(cherry picked from commit 2780a56d0bb7848e017314a033ef22ee944d8b05)

Autobuild-User(v4-6-test): Karolin Seeger 
Autobuild-Date(v4-6-test): Thu Mar 23 16:58:20 CET 2017 on sn-devel-144

commit 36a2ee20bcbad64d61a51fd395565a4fb63075ca
Author: Alexander Bokovoy 
Date:   Fri Mar 10 16:20:06 2017 +0200

lib/crypto: implement samba.crypto Python module for RC4

Implement a small Python module that exposes arcfour_crypt_blob()
function widely used in Samba C code.

When Samba Python bindings are used to call LSA CreateTrustedDomainEx2,
there is a need to encrypt trusted credentials with RC4 cipher.

Current Samba Python code relies on Python runtime to provide RC4
cipher. However, in FIPS 140-2 mode system crypto libraries do not
provide access RC4 cipher at all. According to Microsoft dochelp team,
Windows is treating AuthenticationInformation blob encryption as 'plain
text' in terms of FIPS 140-2, thus doing application-level encryption.

Replace samba.arcfour_encrypt() implementation with a call to
samba.crypto.arcfour_crypt_blob().

Signed-off-by: Alexander Bokovoy 
Reviewed-by: Simo Sorce 
Reviewed-by: Guenther Deschner 

Autobuild-User(master): Günther Deschner 
Autobuild-Date(master): Wed Mar 15 01:30:24 CET 2017 on sn-devel-144

(cherry picked from commit bbeef554f2c15e739f6095fcb57d9ef6646b411c)

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12690
Include samba.crypto Python module to 4.6

commit 137b26fd57fb029e3957c4048805612fb9a5e223
Author: Jeremy Allison 
Date:   Thu Mar 16 09:10:52 2017 -0700

Fix for Solaris C compiler.

Inspired by comment 4 in bug 12559.

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

Signed-off-by: Tom Schulz 
Reviewed-by: Jeremy Allison 
Reviewed-by: Martin Schwenke 
(cherry picked from commit 59229276bcf5e2b7fa0ddf3ceb6fd3adccc01f9a)

commit e418059fbd799700776a4fe80b80437123b7bc57
Author: Andreas Schneider 
Date:   Mon Mar 20 16:08:20 2017 +0100

s3:libsmb: Only print error message if kerberos use is forced

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

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

Autobuild-User(master): Andreas Schneider 
Autobuild-Date(master): Tue Mar 21 14:25:54 CET 2017 on sn-devel-144

(cherry picked from commit c0e196b2238914f88015c0f8a9073beee473120b)

commit 177dba42d0625be450c0ffba6ee0be090fab615e
Author: Amitay Isaacs 
Date:   Tue Mar 14 16:12:55 2017 +1100


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

2017-03-23 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  c47fee6 VERSION: Bump version up to 4.6.2.
   via  0cfe9fa Merge tag 'samba-4.6.1' into v4-6-test
   via  1a8f3cf VERSION: Disable GIT_SNAPSHOTS for the 4.6.1 release.
   via  2d44083 WHATSNEW: Add release notes for Samba 4.6.1.
   via  d9475c9 CVE-2017-2619: s3: smbd: Use the new non_widelink_open() 
function.
   via  22a8d4e CVE-2017-2619: s3: smbd: Add the core functions to prevent 
symlink open races.
   via  86b913f CVE-2017-2619: s3: smbd: Move special handling of symlink 
errno's into a utility function.
   via  49edefe CVE-2017-2619: s3: smbd: Remove O_NOFOLLOW guards. We 
insist on O_NOFOLLOW existing.
   via  7a61eb2 CVE-2017-2619: s3: smbd: Correctly fallback to 
open_dir_safely if FDOPENDIR not supported on system.
   via  16de606 CVE-2017-2619: s3: smbd: Move the reference counting and 
destructor setup to just before retuning success.
   via  e558347 CVE-2017-2619: s3: smbd: OpenDir_fsp() - Fix memory leak on 
error.
   via  a98b3a1 CVE-2017-2619: s3: smbd: OpenDir_fsp() use early returns.
   via  556f7dd CVE-2017-2619: s3: smbd: Create and use open_dir_safely(). 
Use from OpenDir().
   via  a028e01 CVE-2017-2619: s3: smbd: Opendir_internal() early return if 
SMB_VFS_OPENDIR failed.
   via  0eae801 CVE-2017-2619: s3: smbd: Create wrapper function for 
OpenDir in preparation for making robust.
   via  7609944 CVE-2017-2619: s4/torture: add SMB2_FIND tests with 
SMB2_CONTINUE_FLAG_REOPEN flag
   via  d7644e3 CVE-2017-2619: s3/smbd: re-open directory after 
dptr_CloseDir()
   via  1325da1 VERSION: Bump version up to 4.6.1...
   via  bef5582 s4:kdc: disable principal based autodetected referral 
detection
   via  b84c967 HEIMDAL:kdc: make it possible to disable the principal 
based referral detection
   via  f8ae8e8 s3:gse: Correctly handle external trusts with MIT
   via  73d13c0 s3:gse: Check if we have a target_princpal set we should use
   via  c2b3115 s3:gse: Move setup of service_principal to update function
   via  3f67876 s3:gse: Pass down the gensec_security pointer
   via  38f3e64 krb5_wrap: Remove obsolete 
smb_krb5_get_principal_from_service_hostname()
   via  bc50ac4 s3:gse: Use smb_krb5_get_realm_from_hostname()
   via  82898b8 s4:gensec_gssapi: Correctly handle external trusts with MIT
   via  be1e158 s4:gensec_gssapi: Use smb_krb5_get_realm_from_hostname()
   via  43bc67a s4:gensec_gssapi: Move setup of service_principal to update 
function
   via  825bfed s4:gensec-gssapi: Create a helper function to setup 
server_principal
   via  97fa6c2 krb5_wrap: Make smb_krb5_get_realm_from_hostname() public
   via  f3940ac krb5_wrap: pass client_realm to 
smb_krb5_get_realm_from_hostname()
   via  ec8cf1c krb5_wrap: Try to guess the correct realm from the service 
hostname
   via  eaebcde krb5_wrap: Do not return an empty realm from 
smb_krb5_get_realm_from_hostname()
   via  885 testprogs: Add kinit_trusts tests with smbclient4
   via  9b10b35 testprogs: Use smbclient by default in test_kinit_trusts
   via  202604d s4:gensec_gssapi: require a realm in 
gensec_gssapi_client_start()
   via  22e473e s4:gensec_gssapi: the value gensec_get_target_principal() 
should overwrite gensec_get_target_hostname()
   via  c6e5b84 replace: Include sysmacros.h
   via  cc03f50 manpages/vfs_fruit: document global options
   via  5acfa04 s4/torture: some tests for kernel oplocks
   via  48a346f s3/selftest: adopt config.h check from source4
   via  b6cddc1 s3/smbd: fix deferred open with streams and kernel oplocks
   via  b375bae s3/smbd: all callers of defer_open() pass a lck
   via  eeed4ff s3/smbd: remove async_open arg from defer_open()
   via  dcde5b1 s3/smbd: fix schedule_async_open() timer
   via  1d16e5f s3/smbd: add and use retry_open() instead of defer_open() 
in two places
   via  dc328aa s3/smbd: simplify defer_open()
   via  93b789c s3/smbd: req is already validated at the beginning of 
open_file_ntcreate()
   via  26f7b6f s3/smbd: add comments and some reformatting to 
open_file_ntcreate()
   via  d15c966 s3/smbd: add const to get_lease_type() args
   via  30495b1 s3/wscript: fix Linux kernel oplock detection
  from  1ad29ae lib/pthreadpool: fix a memory leak

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


- Log -
commit c47fee64a6419894713fde18907aff68c7d4c000
Author: Karolin Seeger 
Date:   Thu Mar 23 10:17:00 2017 +0100

VERSION: Bump version up to 4.6.2.

Signed-off-by: Karolin Seeger 

commit 0cfe9fa893a6be61137855904bd2324438925965
Merge: bef5582 1a8f3cf
Author: Karolin Seeger 
Date:   Thu Mar 23 10:16:34 2017 +0100

Merge tag 'samba-4.6.1' into v4-6-test

samba: tag release 

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

2017-03-13 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  1ad29ae lib/pthreadpool: fix a memory leak
   via  68d6aa8 torture3: Add test for smbd crash
   via  ff94f79 smbd: Do an early exit on negprot failure
   via  768acab idmap_autorid: allocate new domain range if the callers 
knows the sid is valid
  from  074aaeb VERSION: Bump version up to 4.6.1...

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


- Log -
commit 1ad29ae69d3463eb92b39c41216bfdc35f232c09
Author: Ralph Boehme 
Date:   Thu Mar 9 19:49:56 2017 +0100

lib/pthreadpool: fix a memory leak

When copying large files from the server to the client with aio enabled
we noticed that smbd kept growing RSS and VSZ.

valgrind was reporting:

==2503== 4,093,440 bytes in 6,560 blocks are possibly lost in loss record 
460 of 460
==2503==at 0x4C299CE: calloc (vg_replace_malloc.c:711)
==2503==by 0x4011C24: _dl_allocate_tls (in /usr/lib64/ld-2.17.so)
==2503==by 0x4E3C960: pthread_create@@GLIBC_2.2.5 (in 
/usr/lib64/libpthread-2.17.so)
==2503==by 0x9B298AE: pthreadpool_add_job (in 
/usr/lib64/samba/libmessages-dgm-samba4.so)
==2503==by 0x9B29FDC: pthreadpool_tevent_job_send (in 
/usr/lib64/samba/libmessages-dgm-samba4.so)
==2503==by 0x56A78EF: ??? (in /usr/lib64/samba/libsmbd-base-samba4.so)
==2503==by 0x55D86B7: smb_vfs_call_pread_send (in 
/usr/lib64/samba/libsmbd-base-samba4.so)
==2503==by 0x55F7543: schedule_smb2_aio_read (in 
/usr/lib64/samba/libsmbd-base-samba4.so)
==2503==by 0x5608F57: smbd_smb2_request_process_read (in 
/usr/lib64/samba/libsmbd-base-samba4.so)
==2503==by 0x55FCB6C: smbd_smb2_request_dispatch (in 
/usr/lib64/samba/libsmbd-base-samba4.so)
==2503==by 0x55FD7DC: ??? (in /usr/lib64/samba/libsmbd-base-samba4.so)
==2503==by 0x641B977: ??? (in /usr/lib64/samba/libtevent.so.0.9.31)

The problem seems to be caused by worked threads that are not properly
started in detached state and thus their tls is not reclaimed upon
thread termination.

In pthreadpool.c we prepare a pthread attribute with
PTHREAD_CREATE_DETACHED, but we don't pass it to pthread_create().

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

Signed-off-by: Ralph Boehme 
Reviewed-by: Volker Lendecke 
Reviewed-by: Stefan Metzmacher 

Autobuild-User(master): Ralph Böhme 
Autobuild-Date(master): Fri Mar 10 22:06:02 CET 2017 on sn-devel-144

(cherry picked from commit c9a7a065bb5ec09286fef8b52b4fd23a966a94a8)

Autobuild-User(v4-6-test): Karolin Seeger 
Autobuild-Date(v4-6-test): Mon Mar 13 13:30:49 CET 2017 on sn-devel-144

commit 68d6aa89e4c0d2abdb0a132d068eb0c71eb42612
Author: Volker Lendecke 
Date:   Tue Feb 28 16:17:03 2017 +0100

torture3: Add test for smbd crash

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

Signed-off-by: Volker Lendecke 
Reviewed-by: Ralph Böhme 
Reviewed-by: Jeremy Allison 

Autobuild-User(master): Jeremy Allison 
Autobuild-Date(master): Fri Mar  3 06:20:50 CET 2017 on sn-devel-144

(cherry picked from commit a52c7f4d52df6853f925e680eadefcdfdc7bea85)

commit ff94f7972cc3340be79c677768e8b3e5b5603527
Author: Volker Lendecke 
Date:   Tue Feb 28 15:03:45 2017 +

smbd: Do an early exit on negprot failure

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

Signed-off-by: Volker Lendecke 
Reviewed-by: Ralph Böhme 
Reviewed-by: Jeremy Allison 
(cherry picked from commit cf9acf9a3da932fca115967eb3d9d9ed48fcbbfc)

commit 768acabb29d47a4eed97b36a0cb552722833cfff
Author: Stefan Metzmacher 
Date:   Mon Mar 6 11:53:09 2017 +

idmap_autorid: allocate new domain range if the callers knows the sid is 
valid

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

Signed-off-by: Stefan Metzmacher 
Reviewed-by: Jeremy Allison 

Autobuild-User(master): Jeremy Allison 
Autobuild-Date(master): Wed Mar  8 04:06:59 CET 2017 on sn-devel-144

(cherry picked from commit e015748657e9ee755b04f55f088c78bd025378cc)

---

Summary of changes:
 source3/lib/pthreadpool/pthreadpool.c |  2 +-
 source3/smbd/negprot.c| 21 +++---
 source3/torture/torture.c | 76 +++
 source3/winbindd/idmap_autorid.c  | 13 ++
 4 files changed, 105 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git 

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

2017-03-07 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  074aaeb VERSION: Bump version up to 4.6.1...
   via  f17816a VERSION: Disable GIT_SNAPSHOTS for the 4.6.0 release.
   via  93e804a WHATSNEW: Update release notes for Samba 4.6.0.
  from  5fe0984 Re-enable token groups fallback

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


- Log -
commit 074aaeb61ea2f48965becc66df9083628b9a2508
Author: Karolin Seeger 
Date:   Tue Mar 7 10:06:53 2017 +0100

VERSION: Bump version up to 4.6.1...

and re-enable GIT_SNAPSHOTS.

Signed-off-by: Karolin Seeger 

commit f17816a4ae2bb0ed45561347a4c578ca9ab28ccf
Author: Karolin Seeger 
Date:   Tue Mar 7 10:03:23 2017 +0100

VERSION: Disable GIT_SNAPSHOTS for the 4.6.0 release.

And bump version up to 4.6.0

Signed-off-by: Karolin Seeger 

commit 93e804a8b0e63f90c166f063fa16a1238cd8f8f3
Author: Karolin Seeger 
Date:   Mon Mar 6 10:03:29 2017 +0100

WHATSNEW: Update release notes for Samba 4.6.0.

Signed-off-by: Karolin Seeger 

---

Summary of changes:
 VERSION  |  4 ++--
 WHATSNEW.txt | 44 +++-
 2 files changed, 29 insertions(+), 19 deletions(-)


Changeset truncated at 500 lines:

diff --git a/VERSION b/VERSION
index a632af4..4e4b204 100644
--- a/VERSION
+++ b/VERSION
@@ -25,7 +25,7 @@
 
 SAMBA_VERSION_MAJOR=4
 SAMBA_VERSION_MINOR=6
-SAMBA_VERSION_RELEASE=0
+SAMBA_VERSION_RELEASE=1
 
 
 # If a official release has a serious bug  #
@@ -87,7 +87,7 @@ SAMBA_VERSION_PRE_RELEASE=
 # e.g. SAMBA_VERSION_RC_RELEASE=1  #
 #  ->  "3.0.0rc1"  #
 
-SAMBA_VERSION_RC_RELEASE=5
+SAMBA_VERSION_RC_RELEASE=
 
 
 # To mark SVN snapshots this should be set to 'yes'#
diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index ecfdecc..66597bf 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -89,7 +89,7 @@ The OS Version for the printing server has been increased to 
announce
 Windows Server 2003 R2 SP2. If a driver needs a newer version then you should
 check the smb.conf manpage for details.
 
-new option for owner inheritance
+New option for owner inheritance
 
 The "inherit owner" smb.conf parameter instructs smbd to set the
 owner of files to be the same as the parent directory's owner.
@@ -185,9 +185,9 @@ CTDB changes
   Symbolic debug levels are recommended.  See the DEBUG LEVEL section
   of ctdb(7) for details.
 
-*  Tunable IPAllocAlgorithm replaces LCP2PublicIPs, DeterministicIPs
+* Tunable IPAllocAlgorithm replaces LCP2PublicIPs, DeterministicIPs
 
-   See ctdb-tunables(7) for details
+  See ctdb-tunables(7) for details.
 
 * CTDB's configuration tunables should be consistently set across a cluster
 
@@ -196,16 +196,14 @@ CTDB changes
 
 * CTDB ships with recovery lock helper call-outs for etcd and Ceph RADOS
 
-  To build/install these, use the --enable-etcd-reclock and
-  --enable-ceph-reclock configure options.
+  To build/install these, use the "--enable-etcd-reclock" and
+  "--enable-ceph-reclock" configure options.
 
 winbind changes
 ---
 
-4.6 winbind simplifies the calculation of supplementary groups to make
-it more reliable and predictable. Before 4.6, winbind contained code
-that tried to emulate the group membership calculation that domain
-controllers do when a user logs in. This group membership calculation
+winbind contains code that tries to emulate the group membership calculation
+that domain controllers do when a user logs in. This group membership 
calculation
 is a very complex process, in particular for domain trust relationship
 situations. Also, in many scenarios it is impossible for winbind to
 correctly do this calculation due to access restrictions in the
@@ -217,14 +215,21 @@ calculates the user's group memberships authoritatively 
and makes the
 information available to the Samba server. This is the only reliable
 way Samba can get informed about the groups a user is member of.
 
-Because of its flakiness, the fallback group membership code was
-removed.
+Because of its flakiness, the fallback group membership code is unwished,
+and our code pathes try hard to only use of the group memberships
+calculated by the domain controller.
 
-This means that "id " without the user having logged in
-previously stops showing any supplementary groups. Also, it will show
-"DOMAIN\Domain Users" as the primary group. Once the user has logged
-in, "id " will correctly show the primary group and

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

2017-03-06 Thread Stefan Metzmacher
The branch, v4-6-test has been updated
   via  5fe0984 Re-enable token groups fallback
   via  501d5d9 winbindd: find the domain based on the sid within 
wb_lookupusergroups_send()
   via  d08929e Revert "winbind: Remove wb_lookupusergroups"
   via  86c025f Revert "winbind: Remove wbint_LookupUserGroups"
   via  0c68d73 Revert "winbind: Remove wb_cache_lookup_usergroups"
   via  06f5398 Revert "winbind: Remove wcache_lookup_usergroups"
   via  3e6f1d5 Revert "winbind: Remove validate_ug"
   via  f4d5d16 Revert "winbind: Remove "lookup_usergroups" winbind method"
   via  d7b5e92 Revert "winbind: Remove rpc_lookup_usergroups"
   via  76e643c WHATSNEW: Add release notes for Samba 4.6.0.
   via  53b73f1 s4:ldap_server: match windows in the error messages of 
failing LDAP Bind requests
   via  00e45e9 ldb-samba: remember the error string of a failing bind in 
ildb_connect()
   via  632c6b5 s3: smbd: Restart reading the incoming SMB2 fd when the 
send queue is drained.
   via  525752e0 s3:winbindd: fix endless forest trust scan
   via  605e069 vfs_fruit: enabling AAPL extensions must be a global switch
   via  f9755bf ctdb-logging: CID 1396883 Dereference null return value 
(NULL_RETURNS)
   via  888f433 WHATSNEW: Add idmap_hash deprecation warning
   via  824faf6 idmap_hash: Add a deprecation message
   via  fdb1522 docs: Improve the idmap_hash manpage
   via  145e98c s3:librpc: Handle gss_min in gse_get_client_auth_token() 
correctly
   via  f43ff04 gensec:spnego: Add debug message for the failed principal
   via  83628b4 vfs_fruit: only veto AppleDouble files with 
fruit:resource=file
   via  f355f68 s4/torture: vfs_fruit: add stream with illegal ntfs 
characters to copyile test
   via  9b9e88b vfs_fruit: use stat info from base_fsp
   via  d35e6f6 s4/torture: vfs_fruit: test invalid AFPINFO_STREAM_NAME
   via  05d0b6d vfs_fruit: ignore or delete invalid AFP_AfpInfo streams
   via  aad3ccc selftest: add shares without vfs_fruit for the vfs_fruit 
tests
   via  0631c0e s4/torture: change shares in used 
torture_suite_add_2ns_smb2_test()
   via  8478500 docs/vfs_fruit: document known limitations with 
fruit:encoding=native
   via  5f1284e s4/torture: add test for AAPL find with name with illegal 
NTFS characters
   via  7f3c130 lib/torture: add torture_assert_mem_equal_goto
   via  72031de s4/torture: add a vfs_fruit renaming test with open rsrc 
fork
   via  81c8fd4 s4/torture: vfs_fruit: test deleting a file with resource 
fork
   via  3d5674d s4/torture: vfs_fruit: add test_null_afpinfo test
   via  64feccf selftest: add description to vfs_fruit testsuites
   via  82b2bb2 selftest: also run vfs_fruit tests with streams_depot
   via  d6197d6 selftest: run vfs_fruit tests against share with 
fruit:metadata=stream
   via  b98e7ac selftest: move vfs_fruit tests that require 
"fruit:metadata=netatalk" to vfs.fruit_netatalk
   via  7fb2f57 selftest: reenable vfs_fruit tests
   via  31f7562 vfs_fruit: refactor fruit_ftruncate and use new adouble API
   via  94616d1 vfs_fruit: use fio in fruit_fallocate
   via  3e1a5bb vfs_fruit: refactor fruit_fstat and use new adouble API
   via  408d21f vfs_fruit: refactor fruit_pread and fruit_pwrite and use 
new adouble API
   via  96b51a4 vfs_fruit: refactor fruit_open and use new adouble API
   via  a55528b vfs_fruit: rework struct adouble API
   via  db79f89 selftest: disable vfs_fruit tests
   via  a6a0583 vfs_fruit: fix fruit_check_access()
   via  abf4ab6 vfs_fruit: remove base_fsp name translation
   via  d8d8360 vfs_fruit: use SMB_VFS_NEXT_OPEN in two places
   via  3c7331a vfs_fruit: refactor readdir_attr_macmeta() resource fork 
size
   via  9870810 vfs_fruit: refactor fruit_ftruncate() and fix stream case
   via  744a042 vfs_fruit: fix fruit_ntimes() for the 
fruit:metadata!=netatalk case
   via  41407c6 vfs_fruit: refactor fruit_streaminfo()
   via  ad59cbc vfs_fruit: add fruit_stat_rsrc_xattr() implementation
   via  39c321f vfs_fruit: add fruit_stat_rsrc_stream() implementation
   via  2a76f87 vfs_fruit: refactor fruit_stat_rsrc()
   via  70842a8 vfs_fruit: refactor fruit_open_rsrc()
   via  5a54bed vfs_fruit: in fruit_rmdir() check ._ files before deleting 
them
   via  a3c2db7 vfs_fruit: fix fruit_rmdir() for the fruit:resource!=file 
case
   via  e59e603 vfs_fruit: fix fruit_chown() for the fruit:resource!=file 
case
   via  66c0572 vfs_fruit: fix fruit_chmod() for the fruit:resource!=file 
case
   via  0ee7ebd vfs_fruit: refactor fruit_unlink()
   via  6f43b66 vfs_fruit: fix fruit_rename() for the fruit:resource!=file 
case
   via  a72ad4f vfs_fruit: correct readdir_attr_meta_finderi_stream() 
implementation
   via  5f568b9 vfs_fruit: refactor readdir_attr_meta()
   via  e074745 vfs_fruit: 

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

2017-03-02 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  7a29fe4 s3:winbind: work around coverity false positive.
   via  d4ac505 ctdb: Fix posible NULL deref in logging_init()
   via  002bfb9 s3:librpc: Fix OM_uint32 comparsion in if-clause
   via  7dddc61 s3:librpc: Make sure kt_curser and kt_entry are initialized
   via  3e5207d pam_winbind: Return if we do not have a domain
   via  efeb8b3 s3:lib: Do not segfault if username is NULL
   via  17463ee s3:torture: Fix uint64_t comparsion in if-clause
   via  f34ff6a s4:torture: Make sure handles are initialized
   via  33fdd9f ndrdump: Fix a possible NULL pointer dereference
   via  c240402 s3-vfs: Do not deref a NULL pointer in 
shadow_copy2_snapshot_to_gmt()
   via  c563d22 s4-kcc: Do not dereference a NULL pointer
   via  2281afd s4-torture: Use the correct variable type in 
torture_smb2_maxfid()
  from  f50fa9f VERSION: Bump version up to 4.6.0rc5...

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


- Log -
commit 7a29fe42da4365e54cb46c6b82eb936c1412d6f4
Author: Jeremy Allison 
Date:   Thu Feb 23 09:41:03 2017 -0800

s3:winbind: work around coverity false positive.

Signed-off-by: Jeremy Allison 
Reviewed-by: Andreas Schneider 

Autobuild-User(master): Jeremy Allison 
Autobuild-Date(master): Thu Feb 23 23:54:48 CET 2017 on sn-devel-144

(cherry picked from commit 2e09407c5b992db0da5ca3a6d1f38341dc42d070)

Autobuild-User(v4-6-test): Karolin Seeger 
Autobuild-Date(v4-6-test): Thu Mar  2 13:06:40 CET 2017 on sn-devel-144

commit d4ac5058958cfdadfce9d298d201a0dcb66cd611
Author: Andreas Schneider 
Date:   Thu Feb 16 17:38:41 2017 +0100

ctdb: Fix posible NULL deref in logging_init()

Found by covscan.

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

Signed-off-by: Andreas Schneider 
Reviewed-by: Jeremy Allison 
(cherry picked from commit 08e03fa7f5fdc7f988fbbb26929e8c5727f36c2e)

commit 002bfb9ec4d0103c1e8d7e0e3c976d326983e8be
Author: Andreas Schneider 
Date:   Fri Feb 17 09:49:39 2017 +0100

s3:librpc: Fix OM_uint32 comparsion in if-clause

Found by covscan.

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

Signed-off-by: Andreas Schneider 
Reviewed-by: Jeremy Allison 
(cherry picked from commit 8ac43e0e6ef9236a5c6d2c27ebe24171582c1d49)

commit 7dddc614fab21bd54214cada5320f899a26bd960
Author: Andreas Schneider 
Date:   Thu Feb 16 17:42:53 2017 +0100

s3:librpc: Make sure kt_curser and kt_entry are initialized

Found by covscan.

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

Signed-off-by: Andreas Schneider 
Reviewed-by: Jeremy Allison 
(cherry picked from commit 2f83cfdb90d687673cfc4be14cd66425fb7f3e76)

commit 3e5207d9f1cb07e13fd6ade7f51e22d25bfe6c86
Author: Andreas Schneider 
Date:   Fri Feb 17 11:53:52 2017 +0100

pam_winbind: Return if we do not have a domain

Found by covscan.

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

Signed-off-by: Andreas Schneider 
Reviewed-by: Jeremy Allison 
(cherry picked from commit 1df1d873c849f68a91d067c7049dda12c22e98c5)

commit efeb8b3a272c1b5190283682a0e74e426b7ccefd
Author: Andreas Schneider 
Date:   Fri Feb 17 10:08:17 2017 +0100

s3:lib: Do not segfault if username is NULL

Found by covscan.

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

Signed-off-by: Andreas Schneider 
Reviewed-by: Jeremy Allison 
(cherry picked from commit 9297ac44f7e0455bb74ee77ad8b68f2e8c4a070d)

commit 17463ee527cf1245704a448765f4bd89564ce961
Author: Andreas Schneider 
Date:   Fri Feb 17 09:45:33 2017 +0100

s3:torture: Fix uint64_t comparsion in if-clause

Found by covscan.

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

Signed-off-by: Andreas Schneider 
Reviewed-by: Jeremy Allison 
(cherry picked from commit 13690569ee5893e3dbd96f2b28a41a35e3da42ff)

commit f34ff6ae9ef97ce9338ce192cc16753bdbdc503d
Author: Andreas Schneider 
Date:   Thu Feb 16 17:52:41 2017 +0100

s4:torture: Make sure handles are initialized

The CHECK_STATUS macro might goto done which checks the values of the
handle so they should be initialized in this case.

Found by covscan.

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

Signed-off-by: Andreas Schneider 
Reviewed-by: Jeremy Allison 
  

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

2017-02-28 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  f50fa9f VERSION: Bump version up to 4.6.0rc5...
   via  7600d32 VERSION: Disable git snapshots for the 4.6.0rc4 release.
  from  351ff91 WHATSNEW: Add release notes for Samba 4.6.0rc4.

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


- Log -
commit f50fa9f7c7e866d47ec587ebc294d55171311d76
Author: Karolin Seeger 
Date:   Tue Feb 28 21:02:50 2017 +0100

VERSION: Bump version up to 4.6.0rc5...

and re-enable git snapshots.

Signed-off-by: Karolin Seeger 

commit 7600d323a24bfd98cf309773d121e1b8cbd4c8a0
Author: Karolin Seeger 
Date:   Tue Feb 28 21:01:44 2017 +0100

VERSION: Disable git snapshots for the 4.6.0rc4 release.

Signed-off-by: Karolin Seeger 

---

Summary of changes:
 VERSION | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


Changeset truncated at 500 lines:

diff --git a/VERSION b/VERSION
index d6df00c..a632af4 100644
--- a/VERSION
+++ b/VERSION
@@ -87,7 +87,7 @@ SAMBA_VERSION_PRE_RELEASE=
 # e.g. SAMBA_VERSION_RC_RELEASE=1  #
 #  ->  "3.0.0rc1"  #
 
-SAMBA_VERSION_RC_RELEASE=4
+SAMBA_VERSION_RC_RELEASE=5
 
 
 # To mark SVN snapshots this should be set to 'yes'#


-- 
Samba Shared Repository



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

2017-02-24 Thread Stefan Metzmacher
The branch, v4-6-test has been updated
   via  39582f3 vfs_streams_xattr: use fsp, not base_fsp
   via  0c9bc50 libcli/auth: use the correct creds value against servers 
without LogonSamLogonEx
   via  8ee5fe5 librpc/rpc: fix regression in 
NT_STATUS_RPC_ENUM_VALUE_OUT_OF_RANGE error mapping
   via  8cb9f77 build: Fix generation of CTDB manpages while creating 
tarball
   via  a39218d ctdb-build: Add make target for generating manpages
   via  706141a ctdb-build: Split dist() target to generate manpages 
separately
   via  a2c013b krb5_wrap: use our own code to calculate the 
ENCTYPE_ARCFOUR_HMAC key
   via  dfb3795 s4:scripting: use generate_random_machine_password() for 
machine passwords
   via  6153b15 samba-tool:provision: use 
generate_random_machine_password() for machine passwords
   via  f5df4eb samba-tool:domain: use generate_random_machine_password() 
for machine passwords
   via  f6dc073 samba-tool:domain: use generate_random_machine_password() 
for trusted domains
   via  40366fd pyglue: add generate_random_machine_password() wrapper
   via  705686e python/samba: use an explicit .encode('utf-8') where we 
expect utf8 passwords
   via  00d3c8e python/samba: provision_dns_add_samba.ldif expects 
utf-16-le passwords
   via  c5a4e47 s4:dsdb: autogenerate a random utf16 buffer for krbtgt 
password resets.
   via  7c75976 s4:libnet: make use of generate_random_machine_password()
   via  53ef65b s4:libcli/raw: remove unused 
DEFAULT_TRUST_ACCOUNT_PASSWORD_LENGTH
   via  e0119dd s3:include: remove unused 
DEFAULT_TRUST_ACCOUNT_PASSWORD_LENGTH
   via  aa79c0d s3:net_rpc_trust: make use of trust_pw_new_value()
   via  2e125de s3:libnet_join: make use of trust_pw_new_value()
   via  fd09929 s3:libads: use trust_pw_new_value() for krb5 machine 
passwords
   via  c01b2c2 s3:libsmb: use trust_pw_new_value() in trust_pw_change()
   via  ae300c7 s3:libsmb: add trust_pw_new_value() helper function
   via  38cfd61 s3:libsmb: let trust_pw_change() verify the new password at 
the end.
   via  60d48a8 s3:libsmb: let trust_pw_change() debug more verbose 
information
   via  39ebdf7 lib/util: add generate_random_machine_password() function
   via  7132f093 libcli/auth: add netlogon_creds_cli_debug_string()
   via  bcfa544 libcli/auth: check E_md4hash() result in 
netlogon_creds_cli_ServerPasswordSet_send()
  from  7567c0e WHATSNEW: Fix spelling of Messages

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


- Log -
commit 39582f31d34b3fa29a7deb112ea1fb83e76aa294
Author: Ralph Boehme 
Date:   Fri Feb 17 08:10:53 2017 +0100

vfs_streams_xattr: use fsp, not base_fsp

The base_fsp's fd is always -1 as it's closed after being openend in
create_file_unixpath().

Additionally in streams_xattr_open force using of SMB_VFS_FSETXATTR() by
sticking the just created fd into the fsp (and removing it afterwards).

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

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

Autobuild-User(master): Jeremy Allison 
Autobuild-Date(master): Wed Feb 22 08:25:46 CET 2017 on sn-devel-144

(cherry picked from commit 021189e32ba507832b5e821e5cda8a2889225955)

Autobuild-User(v4-6-test): Stefan Metzmacher 
Autobuild-Date(v4-6-test): Sat Feb 25 05:28:51 CET 2017 on sn-devel-144

commit 0c9bc50bfeb63547382d6afd335130dc96caf7a4
Author: Stefan Metzmacher 
Date:   Wed Feb 15 08:58:20 2017 +0100

libcli/auth: use the correct creds value against servers without 
LogonSamLogonEx

If we use the credential chain we need to use the value from
netlogon_creds_client_authenticator() to make sure we have the current
value to encrypt in logon info.

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

Signed-off-by: Stefan Metzmacher 
Reviewed-by: Jeremy Allison 
Reviewed-by: Ralph Boehme 
(cherry picked from commit 0ed2a65593b5abc9ba7f40992ed0ed8f448f5836)

commit 8ee5fe5ddb404b815fe33def0d731936e0c7cecb
Author: Stefan Metzmacher 
Date:   Wed Feb 15 08:07:06 2017 +0100

librpc/rpc: fix regression in NT_STATUS_RPC_ENUM_VALUE_OUT_OF_RANGE error 
mapping

Commit 1eef70872930fa4f9d3dedd23476b34cae638428 changed the mapping for
DCERPC_NCA_S_FAULT_INVALID_TAG from NT_STATUS_RPC_ENUM_VALUE_OUT_OF_RANGE
to NT_STATUS_RPC_PROCNUM_OUT_OF_RANGE.

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

Signed-off-by: Stefan Metzmacher 
Reviewed-by: Ralph Boehme 
(cherry picked from commit c97e39b34fcf260ded42ef1a9efe7ed55e65a1cf)

commit 

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

2017-02-23 Thread Stefan Metzmacher
The branch, v4-6-test has been updated
   via  7567c0e WHATSNEW: Fix spelling of Messages
   via  e049016 WHATSNEW: Clarify and extend the the AD DC performance 
improvement text
  from  632a38e Modify smbspool_krb5_wrapper to just fall through to 
smbspool if AUTH_INFO_REQUIRED is not set or is not "negotiate".

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


- Log -
commit 7567c0e7efaaa241a254d845e79250ed1abe8ca9
Author: Andrew Bartlett 
Date:   Thu Feb 23 06:32:20 2017 +1300

WHATSNEW: Fix spelling of Messages

Signed-off-by: Andrew Bartlett 
Reviewed-by: Alexander Bokovoy 

Autobuild-User(v4-6-test): Stefan Metzmacher 
Autobuild-Date(v4-6-test): Thu Feb 23 17:22:50 CET 2017 on sn-devel-144

commit e049016c0ca037081a9708b3d806585f95c69c23
Author: Andrew Bartlett 
Date:   Thu Feb 23 06:02:01 2017 +1300

WHATSNEW: Clarify and extend the the AD DC performance improvement text

Signed-off-by: Andrew Bartlett 
Reviewed-by: Alexander Bokovoy 

---

Summary of changes:
 WHATSNEW.txt | 25 +
 1 file changed, 17 insertions(+), 8 deletions(-)


Changeset truncated at 500 lines:

diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index 1063972..8b2f665 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -125,14 +125,23 @@ RPC services other than Netlogon.  The Netlogon server 
honours instead
 the 'rpc server port:netlogon' option.  The default value for both
 these options is the first available port including or after 1024.
 
-Improve AD performance and replication improvements

+AD LDAP and replication performance improvements
+
 
-Samba's LDB and replication code continues to improve, particularly in
-respect to the handling of large numbers of linked attributes.  We now
-respect an 'uptodateness vector' which will dramatically reduce the
-over-replication of links from new DCs.  We have also made the parsing
-of on-disk linked attributes much more efficient.
+Samba's LDB (the database holding the AD directory tree, as seen via
+LDAP) and our DRSUAPI replication code continues to improve,
+particularly in respect to the handling of large numbers of objects or
+linked attributes.
+
+ * We now respect an 'uptodateness vector' which will dramatically
+   reduce the over-replication of links from new DCs.
+
+ * We have also made the parsing of on-disk linked attributes much
+   more efficient.
+
+ * We rely on ldb 1.1.28.  This ldb version has improved memory
+   handling for ldb search results, improving poorly indexed and
+   unindexed search result processing speed by around 20%.
 
 DNS improvements
 
@@ -172,7 +181,7 @@ CTDB changes
   ctdb-recoverd: Messages from CTDB's recovery daemon
   ctdb-recovery: Messages from CTDB database recovery
   ctdb-eventd: Messages from CTDB's event daemon
-  ctdb-takeover: Messgaes from CTDB's public IP takeover subsystem
+  ctdb-takeover: Messages from CTDB's public IP takeover subsystem
 
 * The mapping between symbolic and numeric debug levels has changed
 


-- 
Samba Shared Repository



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

2017-02-22 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  632a38e Modify smbspool_krb5_wrapper to just fall through to 
smbspool if AUTH_INFO_REQUIRED is not set or is not "negotiate".
  from  6bc0acf ctdb-scripts: Initialise CTDB_NFS_CALLOUT in statd-callout

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


- Log -
commit 632a38e05d5a7ed3eeff62aa0720f3ce301ec6e4
Author: Bryan Mason 
Date:   Wed Feb 15 22:57:42 2017 -0800

Modify smbspool_krb5_wrapper to just fall through to smbspool if 
AUTH_INFO_REQUIRED is not set or is not "negotiate".

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

Signed-off-by: Bryan Mason 
Reviewed-by: Andreas Schneider 
Reviewed-by: Jeremy Allison 

(cherry picked from commit adbdce78ecb4e852596108b69eeb8a4cba32fa83)

Autobuild-User(v4-6-test): Karolin Seeger 
Autobuild-Date(v4-6-test): Wed Feb 22 12:41:35 CET 2017 on sn-devel-144

---

Summary of changes:
 source3/client/smbspool_krb5_wrapper.c | 32 +---
 1 file changed, 17 insertions(+), 15 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/client/smbspool_krb5_wrapper.c 
b/source3/client/smbspool_krb5_wrapper.c
index d26a7a6..bf97d82 100644
--- a/source3/client/smbspool_krb5_wrapper.c
+++ b/source3/client/smbspool_krb5_wrapper.c
@@ -90,27 +90,29 @@ int main(int argc, char *argv[])
int cmp;
int rc;
 
-   uid = getuid();
-
-   CUPS_SMB_DEBUG("Started with uid=%d\n", uid);
-   if (uid != 0) {
-   goto smbspool;
-   }
-
/* Check if AuthInfoRequired is set to negotiate */
env = getenv("AUTH_INFO_REQUIRED");
+
+/* If not set, then just call smbspool. */
if (env == NULL) {
CUPS_SMB_ERROR("AUTH_INFO_REQUIRED is not set");
-   fprintf(stderr, "ATTR: auth-info-required=negotiate\n");
-   return CUPS_BACKEND_AUTH_REQUIRED;
+goto smbspool;
+   } else {
+CUPS_SMB_DEBUG("AUTH_INFO_REQUIRED=%s", env);
+cmp = strcmp(env, "negotiate");
+/* If AUTH_INFO_REQUIRED != "negotiate" then call smbspool. */
+if (cmp != 0) {
+  CUPS_SMB_ERROR(
+"AUTH_INFO_REQUIRED is not set to negotiate");
+  goto smbspool;
+}
}
 
-   CUPS_SMB_DEBUG("AUTH_INFO_REQUIRED=%s", env);
-   cmp = strcmp(env, "negotiate");
-   if (cmp != 0) {
-   CUPS_SMB_ERROR("AUTH_INFO_REQUIRED is not set to negotiate");
-   fprintf(stderr, "ATTR: auth-info-required=negotiate\n");
-   return CUPS_BACKEND_AUTH_REQUIRED;
+   uid = getuid();
+
+   CUPS_SMB_DEBUG("Started with uid=%d\n", uid);
+   if (uid != 0) {
+   goto smbspool;
}
 
/*


-- 
Samba Shared Repository



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

2017-02-20 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  6bc0acf ctdb-scripts: Initialise CTDB_NFS_CALLOUT in statd-callout
   via  00723fa ctdb-tests: Add more comm tests
   via  1284283 ctdb-common: Fix use-after-free error in comm_fd_handler()
   via  dd79298 s3: torture: Regression test for smbd trying to open an 
invalid symlink.
   via  27c25fc s3: smbd: Don't loop infinitely on bad-symlink resolution.
   via  7c74e90 s3-vfs: Only walk the directory once in open_and_sort_dir()
   via  91c0bf9 s3/rpc_server/mdssvc: add attribute "kMDItemContentType"
   via  caf33c5 s3/smbd: check for invalid access_mask 
smbd_calculate_access_mask()
   via  964ecb1 selftest: also run test base.createx_access against ad_dc
   via  ca34320 WHATSNEW: vfs_fruit metadata xattr name on *BSD and mvxattr
   via  6b3f1be s3/util: mvxattr, a tool to rename extended attributes
   via  6745bf2 lib/replace: validate xattr namespace prefix on FreeBSD
   via  0e22dda vfs_fruit: fix resource fork xattr name
   via  1a79870 vfs_fruit: cleanup metadata and resource xattr name defines
   via  283cfd4 vfs_fruit: correct Netatalk metadata xattr on FreeBSD
   via  c28902d WHATSNEW: Fix obvious typo.
  from  0c2a848 WHATSNEW: Add link to known issues.

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


- Log -
commit 6bc0acfb8dc73a3b096ddf83fda0b36a05b3d8ab
Author: Martin Schwenke 
Date:   Tue Feb 14 09:04:41 2017 +1100

ctdb-scripts: Initialise CTDB_NFS_CALLOUT in statd-callout

Some configurations may set CTDB_NFS_CALLOUT to the empty string.
They may do this if they allow a choice of NFS implementations.  In
this case the default call-out for Linux kernel NFS should be used.
However, statd-callout does not call nfs_callout_init() to set the
default.  Therefore, statd-callout is unable to restart the lock
manager, so the grace period is never entered.

statd-callout must call nfs_callout_init() before trying to restart
the lock manager.

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

Signed-off-by: Martin Schwenke 
Reviewed-by: Amitay Isaacs 

Autobuild-User(master): Martin Schwenke 
Autobuild-Date(master): Thu Feb 16 09:21:03 CET 2017 on sn-devel-144

(cherry picked from commit 5e7ae1b1e2fa8137aaa6a2a2f446156ae61f4c84)

Autobuild-User(v4-6-test): Karolin Seeger 
Autobuild-Date(v4-6-test): Mon Feb 20 14:44:10 CET 2017 on sn-devel-144

commit 00723fa1213a354248b0cbbe0558739f261a572c
Author: Amitay Isaacs 
Date:   Tue Feb 7 15:18:02 2017 +1100

ctdb-tests: Add more comm tests

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

Signed-off-by: Amitay Isaacs 
Reviewed-by: Martin Schwenke 
(cherry picked from commit 024a2c20d2bcdbcc43d16d492c7cd2d09b93c8f0)

commit 128428390b06c0f859cdecd25d23f7ab7701f664
Author: Amitay Isaacs 
Date:   Mon Feb 6 15:54:55 2017 +1100

ctdb-common: Fix use-after-free error in comm_fd_handler()

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

comm_write_send() creates a new tevent_req and adds it to the queue
of requests to be processed.  If this tevent_req is freed, then the
queue entry is not removed causing use-after-free error.

If the tevent_req returned by comm_write_send() is freed, then that
request should be removed from the queue and any pending actions based
on that request should also be removed.

Signed-off-by: Amitay Isaacs 
Reviewed-by: Martin Schwenke 
(cherry picked from commit 9db7785fc6ffbaad434ee189c0f46c488358aab5)

commit dd792986e7da9fce7d2e123a4b9d6582c4692e1e
Author: Jeremy Allison 
Date:   Tue Feb 14 12:59:58 2017 -0800

s3: torture: Regression test for smbd trying to open an invalid symlink.

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

Pair-programmed-with: Ralph Boehme 

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

Autobuild-User(master): Jeremy Allison 
Autobuild-Date(master): Thu Feb 16 22:06:51 CET 2017 on sn-devel-144

(cherry picked from commit 40d813cdb312fd8378db310543e0778193a1a684)

commit 27c25fcaadd2357d48142c5b21767b723130aec6
Author: Jeremy Allison 
Date:   Wed Feb 15 15:42:52 2017 -0800

s3: smbd: Don't loop infinitely on bad-symlink resolution.

In the FILE_OPEN_IF case we have O_CREAT, but not
O_EXCL. Previously we went into a loop trying first
~(O_CREAT|O_EXCL), and if that returned ENOENT
try 

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

2017-02-16 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  0c2a848 WHATSNEW: Add link to known issues.
  from  b975620 VERSION: Bump version up to 4.6.0rc4...

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


- Log -
commit 0c2a848296a4cd511988a6e526772ca439cb1dfa
Author: Karolin Seeger 
Date:   Thu Feb 16 10:26:34 2017 +0100

WHATSNEW: Add link to known issues.

Signed-off-by: Karolin Seeger 
Reviewed-by: Stefan Metzmacher 

Autobuild-User(v4-6-test): Karolin Seeger 
Autobuild-Date(v4-6-test): Thu Feb 16 14:16:52 CET 2017 on sn-devel-144

---

Summary of changes:
 WHATSNEW.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


Changeset truncated at 500 lines:

diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index 751704b..d380a86 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -237,7 +237,7 @@ smb.conf changes
 KNOWN ISSUES
 
 
-Currently none.
+https://wiki.samba.org/index.php/Release_Planning_for_Samba_4.6#Release_blocking_bugs
 
 
 CHANGES SINCE 4.5.0rc2


-- 
Samba Shared Repository



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

2017-02-14 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  b975620 VERSION: Bump version up to 4.6.0rc4...
   via  a7d9079 VERSION: Disable git snapshots for the 4.6.0rc3 release.
   via  2b256a7 WHATSNEW: Add release notes for Samba 4.6.0rc3.
  from  96f439d waf: Do not install the unit test binary for krb5samba

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


- Log -
commit b9756204ce6bdd55ab6342f6c39abe1c308a9e0e
Author: Karolin Seeger 
Date:   Tue Feb 14 13:26:43 2017 +0100

VERSION: Bump version up to 4.6.0rc4...

and re-enable git snapshots.

Signed-off-by: Karolin Seeger 

commit a7d907975aa947104dd601822c485886fa0b5e22
Author: Karolin Seeger 
Date:   Tue Feb 14 13:25:19 2017 +0100

VERSION: Disable git snapshots for the 4.6.0rc3 release.

Signed-off-by: Karolin Seeger 

commit 2b256a7daf62d48280ee7f438006d6e9dc3d9187
Author: Karolin Seeger 
Date:   Tue Feb 14 09:50:43 2017 +0100

WHATSNEW: Add release notes for Samba 4.6.0rc3.

Signed-off-by: Karolin Seeger 

---

Summary of changes:
 VERSION  |  2 +-
 WHATSNEW.txt | 54 +-
 2 files changed, 54 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/VERSION b/VERSION
index ef452ea..d6df00c 100644
--- a/VERSION
+++ b/VERSION
@@ -87,7 +87,7 @@ SAMBA_VERSION_PRE_RELEASE=
 # e.g. SAMBA_VERSION_RC_RELEASE=1  #
 #  ->  "3.0.0rc1"  #
 
-SAMBA_VERSION_RC_RELEASE=3
+SAMBA_VERSION_RC_RELEASE=4
 
 
 # To mark SVN snapshots this should be set to 'yes'#
diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index 43c5200..751704b 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -1,7 +1,7 @@
 Release Announcements
 =
 
-This is the second release candidate of Samba 4.6.  This is *not*
+This is the third release candidate of Samba 4.6.  This is *not*
 intended for production environments and is designed for testing
 purposes only.  Please report any defects via the Samba bug reporting
 system at https://bugzilla.samba.org/.
@@ -240,6 +240,58 @@ KNOWN ISSUES
 Currently none.
 
 
+CHANGES SINCE 4.5.0rc2
+==
+
+o  Jeremy Allison 
+   * BUG 12499: s3: vfs: dirsort doesn't handle opendir of "." correctly.
+   * BUG 12546: s3: VFS: vfs_streams_xattr.c: Make streams_xattr_open() store
+ the same path as streams_xattr_recheck().
+   * BUG 12531: Make vfs_shadow_copy2 cope with server changing directories.
+
+o  Andrew Bartlett 
+   * BUG 12543: samba-tool: Correct handling of default value for use_ntvfs and
+ use_xattrs.
+   * BUG 12573: Samba < 4.7 does not know about compatibleFeatures and
+ requiredFeatures.
+   * BUG 12577: 'samba-tool dbcheck' gives errors on one-way links after a
+ rename.
+
+o  Ralph Boehme 
+   * BUG 12184: s3/rpc_server: Shared rpc modules loading.
+   * BUG 12520: Ensure global "smb encrypt = off" is effective.
+   * BUG 12524: s3/rpc_server: Move rpc_modules.c to its own subsystem.
+   * BUG 12541: vfs_fruit: checks wrong AAPL config state and so always uses
+ readdirattr.
+
+o  Volker Lendecke 
+   * BUG 12551: smbd: Fix "map acl inherit" = yes.
+
+o  Stefan Metzmacher 
+   * BUG 12398: Replication with DRSUAPI_DRS_CRITICAL_ONLY and
+ DRSUAPI_DRS_GET_ANC results in WERR_DS_DRA_MISSING_PARENT S
+   * BUG 12540: s3:smbd: allow "server min protocol = SMB3_00" to go via "SMB
+ 2.???" negprot.
+
+o  John Mulligan 
+   * BUG 12542: docs: Improve description of "unix_primary_group" parameter in
+ idmap_ad manpage.
+
+o  Andreas Schneider 
+   * BUG 12552: waf: Do not install the unit test binary for krb5samba.
+
+o  Amitay Isaacs 
+   * BUG 12547: ctdb-build: Install CTDB tests correctly from toplevel.
+   * BUG 12549: ctdb-common: ioctl(.. FIONREAD ..) returns an int value.
+
+o  Garming Sam 
+   * BUG 12577: 'samba-tool dbcheck' gives errors on one-way links after a
+ rename.
+
+o  Uri Simchoni 
+   * BUG 12529: waf: Backport finding of pkg-config.
+
+
 CHANGES SINCE 4.5.0rc1
 ==
 


-- 
Samba Shared Repository



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

2017-02-14 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  96f439d waf: Do not install the unit test binary for krb5samba
  from  6e6cf90 s4:tests/sec_descriptor: use more unique oid values

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


- Log -
commit 96f439d8b68cdb8ee4edd9e642581fc33216aebb
Author: Andreas Schneider 
Date:   Wed Feb 1 15:53:44 2017 +0100

waf: Do not install the unit test binary for krb5samba

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

Signed-off-by: Andreas Schneider 
Reviewed-by: David Disseldorp 

(cherry picked from commit 85d5b4339237a12d369c3522dbb44e98fd3a6c54)

Autobuild-User(v4-6-test): Karolin Seeger 
Autobuild-Date(v4-6-test): Tue Feb 14 12:46:23 CET 2017 on sn-devel-144

---

Summary of changes:
 testsuite/unittests/wscript | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)


Changeset truncated at 500 lines:

diff --git a/testsuite/unittests/wscript b/testsuite/unittests/wscript
index ea4af07..e256951 100644
--- a/testsuite/unittests/wscript
+++ b/testsuite/unittests/wscript
@@ -12,4 +12,5 @@ def build(bld):
 if bld.CONFIG_SET('HAVE_CMOCKA'):
 bld.SAMBA_BINARY('test_krb5samba',
  source='test_krb5_samba.c',
- deps='krb5samba cmocka')
+ deps='krb5samba cmocka',
+ install=False)


-- 
Samba Shared Repository



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

2017-02-13 Thread Stefan Metzmacher
The branch, v4-6-test has been updated
   via  6e6cf90 s4:tests/sec_descriptor: use more unique oid values
   via  b641595 ctdb-build: Install CTDB tests correctly from toplevel
   via  612a3be s3: VFS: Don't allow symlink, link or rename on already 
converted paths.
   via  a52e728 s3: VFS: shadow_copy2: Fix usage of saved_errno to only set 
errno on error.
   via  d5b1ef7 s3: VFS: shadow_copy2: Fix a memory leak in the connectpath 
function.
   via  5caa093 s3: VFS: shadow_copy2: Fix module to work with variable 
current working directory.
   via  bc44e33 s3: VFS: Add utility function check_for_converted_path().
   via  fc6845f s3: VFS: Ensure shadow:format cannot contain a / path 
separator.
   via  805a7e3 s3: VFS: Allow shadow_copy2_connectpath() to return the 
cached path derived from $cwd.
   via  2caa219 s3: VFS: shadow_copy2: Fix chdir to store off the needed 
private variables.
   via  d45ee17 s3: VFS: shadow_copy2: Add two currently unused functions 
to make pathnames absolute or relative to $cwd.
   via  7ed2e5c s3: VFS: shadow_copy2: Change a parameter name.
   via  fa24756 s3: VFS: shadow_copy2: Add a wrapper function to call the 
original shadow_copy2_strip_snapshot().
   via  5f0ded3 s3: VFS: shadow_copy2: Add two new variables to the private 
data. Not yet used.
   via  5377a0b s3: VFS: shadow_copy2: Fix length comparison to ensure we 
don't overstep a length.
   via  28bd3b7 s3: VFS: shadow_copy2: Ensure pathnames for parameters are 
correctly relative and terminated.
   via  ba1091c s3: VFS: shadow_copy2: Correctly initialize timestamp and 
stripped variables.
   via  8d5bb11 s3: smbd: Make set_conn_connectpath() call 
canonicalize_absolute_path().
   via  d3446cd s3: smbtorture: Add new local test LOCAL-CANONICALIZE-PATH
   via  0cb108f s3: lib: Fix two old, old bugs in set_conn_connectpath(), 
now in canonicalize_absolute_path().
   via  747da44 s3: lib: Add canonicalize_absolute_path().
   via  10e63a1 s3: smbd: Correctly canonicalize any incoming shadow copy 
path.
   via  3ebe6e4 waf: backport finding of pkg-config
   via  c290e63 torture/drs: expand test for DRSUAPI_DRS_GET_ANC
   via  f0f6c6e getncchanges: implement DRSUAPI_DRS_GET_ANC more correctly
   via  616767e getncchanges: calculate getnc_state->min_usn calculation 
based on the uptodateness vector
   via  5983215 getncchanges: improve get_nc_changes_add_links() by 
checking uSNChanged
   via  be30185 getncchanges: improve get_nc_changes_build_object() by 
checking uSNChanged
   via  8bf05d4 getncchanges: fix highest_usn off by one calculation in 
get_nc_changes_add_links()
   via  e958fcc getncchanges: remove unused c++ comments/code in 
getncchanges_collect_objects()
   via  8d65efb getncchanges: do not replicate links for non critical 
objects if DRSUAPI_DRS_CRITICAL_ONLY is set
   via  bf69e32 getncchanges: don't process DRSUAPI_DRS_CRITICAL_ONLY for 
EXOPs
   via  1f3a081 getncchanges: remember the ncRoot_guid on the getncchanges 
state
   via  200b298 getncchanges: pass struct ldb_message as const
   via  b7deef9 getncchanges: only set nc_{object,linked_attributes}_count 
with DRSUAPI_DRS_GET_NC_SIZE
   via  8b38bec torture/drs: remove pointless nc_object_count replication 
checks in test_link_utdv_hwm()
   via  7016056 python/join: use DRSUAPI_DRS_GET_NC_SIZE for the initial 
replication
   via  e8d8720 python/join: set common replica_flags in dc_join.__init__()
   via  58b8958 drsuapi.idl: make drsuapi_DsGetNCChangesRequest10 [public]
   via  8cb905d drsuapi.idl: add drsuapi_DrsMoreOptions with 
DRSUAPI_DRS_GET_TGT
   via  8bcb35a s4:libnet: s/highestCommitedUSN/highestCommittedUSN
   via  cad7d1c s4:dsdb/repl: s/highestCommitedUsn/highestCommittedUSN
   via  87d6207 dbcheck-links: Test that dbcheck against one-way links does 
not error
   via  7890e42 dbcheck: Do not regard old one-way-links as errors
   via  c56b9b8 samba_dsdb: Use and maintain compatibleFeatures and 
requiredFeatures in @SAMBA_DSDB
   via  d3c8b54 samba-tool: Correct handling of default value for use_ntvfs 
and use_xattrs
  from  b162acb ctdb-tests: Use replace headers instead of system headers

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


- Log -
commit 6e6cf9030862e1f1f2f36d4aafc1a7e5a9d2b519
Author: Stefan Metzmacher 
Date:   Wed Jan 11 13:34:28 2017 +0100

s4:tests/sec_descriptor: use more unique oid values

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

Signed-off-by: Stefan Metzmacher 
Reviewed-by: David Disseldorp 

Autobuild-User(master): David Disseldorp 
Autobuild-Date(master): Thu Jan 12 04:02:21 CET 2017 on sn-devel-144

(cherry picked from commit 

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

2017-02-03 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  b162acb ctdb-tests: Use replace headers instead of system headers
   via  eb90262 ctdb-tests: Do not build mutex test if robust mutexes are 
not supported
   via  cb1a9e7 ctdb-common: ioctl(.. FIONREAD ..) returns an int value
   via  6d83ec9 s3: VFS: vfs_streams_xattr.c: Make streams_xattr_open() 
store the same path as streams_xattr_recheck().
   via  2a0c2b6 smbd: Fix "map acl inherit" = yes
   via  64a14a3 s3: vfs: dirsort doesn't handle opendir of "." correctly.
  from  de82686 docs: Improve description of "unix_primary_group" parameter 
in idmap_ad manpage

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


- Log -
commit b162acb229635ca207cf42336f72e09f75d2c148
Author: Amitay Isaacs 
Date:   Tue Jan 31 16:49:14 2017 +1100

ctdb-tests: Use replace headers instead of system headers

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

This ensures that PTHREAD_MUTEX_ROBUST, pthread_mutexattr_setrobust()
and pthread_mutex_consistent() are always defined.

Signed-off-by: Amitay Isaacs 
Reviewed-by: Stefan Metzmacher 

Autobuild-User(master): Stefan Metzmacher 
Autobuild-Date(master): Tue Jan 31 11:57:01 CET 2017 on sn-devel-144

(cherry picked from commit 39ac4ae65eb3b8d4d3574987eab47eb7a290f2e4)

Autobuild-User(v4-6-test): Karolin Seeger 
Autobuild-Date(v4-6-test): Fri Feb  3 13:04:01 CET 2017 on sn-devel-144

commit eb90262cc2f9a0f2d37d10228c17370ba76f64e4
Author: Amitay Isaacs 
Date:   Tue Jan 31 14:50:53 2017 +1100

ctdb-tests: Do not build mutex test if robust mutexes are not supported

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

Signed-off-by: Amitay Isaacs 
Reviewed-by: Stefan Metzmacher 
(cherry picked from commit 08b4a5f9f1575c882ab7174eb3249b574df6976f)

commit cb1a9e77709db2b0b0b4fa11612b15077404531e
Author: Amitay Isaacs 
Date:   Wed Feb 1 15:52:48 2017 +1100

ctdb-common: ioctl(.. FIONREAD ..) returns an int value

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

Signed-off-by: Amitay Isaacs 
Reviewed-by: Volker Lendecke 

Autobuild-User(master): Volker Lendecke 
Autobuild-Date(master): Wed Feb  1 14:29:14 CET 2017 on sn-devel-144

(cherry picked from commit 2bea45e450e5ebd6544c2a8be4493242158b712e)

commit 6d83ec9eac4dc5255d248c47ef82cb995307c85b
Author: Jeremy Allison 
Date:   Wed Feb 1 11:36:25 2017 -0800

s3: VFS: vfs_streams_xattr.c: Make streams_xattr_open() store the same path 
as streams_xattr_recheck().

If the open is changing directories, fsp->fsp_name->base_name
will be the full path from the share root, whilst
smb_fname will be relative to the $cwd.

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

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

Autobuild-User(master): Jeremy Allison 
Autobuild-Date(master): Thu Feb  2 01:55:42 CET 2017 on sn-devel-144

(cherry picked from commit a24ba3e4083200ec9885363efc5769f43183fb6b)

commit 2a0c2b6d0955ad897a09fad87fa666b3968619b8
Author: Volker Lendecke 
Date:   Wed Feb 1 14:41:43 2017 +

smbd: Fix "map acl inherit" = yes

Brown-Paper-Bag bug in f85c2a6852a. The assignment contains a self-reference
in get_pai_flags which I missed.

Fix an uninitialized read.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=12551
Signed-off-by: Volker Lendecke 
Reviewed-by: Stefan Metzmacher 

Autobuild-User(master): Volker Lendecke 
Autobuild-Date(master): Wed Feb  1 22:06:50 CET 2017 on sn-devel-144

(cherry picked from commit 129bc58eee4b1868b1aaec6194808752520517b4)

commit 64a14a37c1b0ce53ac7701db88d83bba822d39e3
Author: Jeremy Allison 
Date:   Thu Jan 5 12:38:07 2017 -0800

s3: vfs: dirsort doesn't handle opendir of "." correctly.

Needs to store $cwd path for correct sorting.

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

Signed-off-by: Jeremy Allison 
Reviewed-by: Uri Simchoni 
(cherry picked from commit e2f34116ab6328e2b872999dc7c4bcda69c03ab2)

---

Summary of changes:
 ctdb/common/run_proc.c  |  3 ++-
 ctdb/tests/src/test_mutex_raw.c | 24 +++-
 ctdb/wscript|  9 +
 source3/modules/vfs_dirsort.c   |  4 
 source3/modules/vfs_streams_xattr.c |  

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

2017-02-01 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  de82686 docs: Improve description of "unix_primary_group" parameter 
in idmap_ad manpage
   via  5be0e74 vfs_fruit: checks wrong AAPL config state and so always 
uses readdirattr
   via  2f981c3 selftest/Samba3: use "server min protocol = SMB3_00" for 
"ktest"
   via  9dd155e s3:smbd: allow "server min protocol = SMB3_00" to go via 
"SMB 2.???" negprot
   via  25ff2b7 s3/rpc_server: move rpc_modules.c to its own subsystem
   via  edbffe9 selftest: add test for global "smb encrypt=off"
   via  227d16c selftest: disable SMB encryption in simpleserver environment
   via  d2cf308 docs: impact of a global "smb encrypt=off" on a share with 
"smb encrypt=required"
   via  1231b71 s3/smbd: ensure global "smb encrypt = off" is effective for 
share with "smb encrypt = desired"
   via  e138848 s3/smbd: ensure global "smb encrypt = off" is effective for 
SMB 3.1.1 clients
   via  4f1ac97 s3/smbd: ensure global "smb encrypt = off" is effective for 
SMB 1 clients
   via  a6fd161 s3/rpc_server: shared rpc modules loading
  from  1f2ebda VERSION: Bump version up to 4.6.0rc3...

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


- Log -
commit de8268609960ef3e6191a912ba73fe5aa4d256cf
Author: John Mulligan 
Date:   Fri Jan 13 07:33:01 2017 +0100

docs: Improve description of "unix_primary_group" parameter in idmap_ad 
manpage

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

Signed-off-by: John Mulligan 
Reviewed-by: Volker Lendecke 
Reviewed-by: Ralph Boehme 

Autobuild-User(master): Ralph Böhme 
Autobuild-Date(master): Fri Jan 27 20:58:18 CET 2017 on sn-devel-144

(cherry picked from commit f605332e1b87d87e0c454bcae2a374013d3ebf82)

Autobuild-User(v4-6-test): Karolin Seeger 
Autobuild-Date(v4-6-test): Wed Feb  1 16:49:18 CET 2017 on sn-devel-144

commit 5be0e742a9216e6e45ea8aa60315c09b5a0d497a
Author: Ralph Boehme 
Date:   Thu Jan 26 11:49:55 2017 +0100

vfs_fruit: checks wrong AAPL config state and so always uses readdirattr

readdirattr should only be enabled if the client enables it via AAPL
negotitiation, not for all clients when vfs_fruit is loaded.

Unfortunately the check in fruit_readdir_attr() is

  if (!config->use_aapl) {
return SMB_VFS_NEXT_READDIR_ATTR(handle, fname, mem_ctx, pattr_data);
  }

This uses the wrong config state "use_aapl" which is always true by
default (config option "fruit:aapl").

We must use "nego_aapl" instead which is only true if the client
really negotiated this feature.

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

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

Autobuild-User(master): Jeremy Allison 
Autobuild-Date(master): Sat Jan 28 01:49:11 CET 2017 on sn-devel-144

(cherry picked from commit 9a3b64a24cc21124485b423c9b70b67ff5a96f10)

commit 2f981c3d1b96a22136370edb4d1d6dfe747ebd3a
Author: Stefan Metzmacher 
Date:   Wed Jan 25 21:15:44 2017 +0100

selftest/Samba3: use "server min protocol = SMB3_00" for "ktest"

This verifies that clients can still connect with that setting.

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

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

Autobuild-User(master): Stefan Metzmacher 
Autobuild-Date(master): Fri Jan 27 12:03:39 CET 2017 on sn-devel-144

(cherry picked from commit 348bcca76855798d60c04ddb30f1e13b2ac2d7cd)

commit 9dd155eb5752f4cd573620b787bf7a97cd10f774
Author: Stefan Metzmacher 
Date:   Wed Jan 18 08:37:30 2017 +0100

s3:smbd: allow "server min protocol = SMB3_00" to go via "SMB 2.???" negprot

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

Signed-off-by: Stefan Metzmacher 
Reviewed-by: Andreas Schneider 
Reviewed-by: Ralph Boehme 
(cherry picked from commit c207f2a989fc791b5f9bf9043d3c6ac31db5cdfd)

commit 25ff2b7c2e74cf8cfc7b9f25375ef73cc742b9cf
Author: Ralph Boehme 
Date:   Mon Jan 16 12:24:54 2017 +0100

s3/rpc_server: move rpc_modules.c to its own subsystem

The source file rpc_modules.c was used in two places which lead to the
following build error when configuring with '--nonshared-binary=smbd/smbd':

  ERROR: source source3/rpc_server/rpc_modules.c is in more than one
  subsystem of target 'smbd/smbd': ['RPC_SERVICE', 'MDSSD']

Bug: 

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

2017-01-26 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  1f2ebda VERSION: Bump version up to 4.6.0rc3...
  from  54b08f2 VERSION: Disable git snapshots for the 4.2.0rc2 release.

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


- Log -
commit 1f2ebdad05407a2df40625efab3fbdcdde804d5e
Author: Karolin Seeger 
Date:   Thu Jan 26 13:20:16 2017 +0100

VERSION: Bump version up to 4.6.0rc3...

and re-enable git snapshots.

Signed-off-by: Karolin Seeger 

---

Summary of changes:
 VERSION | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/VERSION b/VERSION
index 7a4c23b..ef452ea 100644
--- a/VERSION
+++ b/VERSION
@@ -87,7 +87,7 @@ SAMBA_VERSION_PRE_RELEASE=
 # e.g. SAMBA_VERSION_RC_RELEASE=1  #
 #  ->  "3.0.0rc1"  #
 
-SAMBA_VERSION_RC_RELEASE=2
+SAMBA_VERSION_RC_RELEASE=3
 
 
 # To mark SVN snapshots this should be set to 'yes'#
@@ -99,7 +99,7 @@ SAMBA_VERSION_RC_RELEASE=2
 # e.g. SAMBA_VERSION_IS_SVN_SNAPSHOT=yes   #
 #  ->  "3.0.0-SVN-build-199"   #
 
-SAMBA_VERSION_IS_GIT_SNAPSHOT=no
+SAMBA_VERSION_IS_GIT_SNAPSHOT=yes
 
 
 # This is for specifying a release nickname#


-- 
Samba Shared Repository



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

2017-01-26 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  54b08f2 VERSION: Disable git snapshots for the 4.2.0rc2 release.
   via  0270762 WHATSNEW: Add release notes for Samba 4.6.0rc2.
  from  4817385 script/release.sh: fix off by 1 error in 
announce.${tagname}.mail.txt creation

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


- Log -
commit 54b08f213d10379b0e488e044e7f939a18169db5
Author: Karolin Seeger 
Date:   Thu Jan 26 13:16:23 2017 +0100

VERSION: Disable git snapshots for the 4.2.0rc2 release.

Signed-off-by: Karolin Seeger 

commit 02707628059e5898f112ca710d26a926a7aae1c2
Author: Karolin Seeger 
Date:   Thu Jan 26 10:17:16 2017 +0100

WHATSNEW: Add release notes for Samba 4.6.0rc2.

Signed-off-by: Karolin Seeger 

---

Summary of changes:
 VERSION  |  2 +-
 WHATSNEW.txt | 32 +++-
 2 files changed, 32 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/VERSION b/VERSION
index 1352042..7a4c23b 100644
--- a/VERSION
+++ b/VERSION
@@ -99,7 +99,7 @@ SAMBA_VERSION_RC_RELEASE=2
 # e.g. SAMBA_VERSION_IS_SVN_SNAPSHOT=yes   #
 #  ->  "3.0.0-SVN-build-199"   #
 
-SAMBA_VERSION_IS_GIT_SNAPSHOT=yes
+SAMBA_VERSION_IS_GIT_SNAPSHOT=no
 
 
 # This is for specifying a release nickname#
diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index c040bd8..43c5200 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -1,7 +1,7 @@
 Release Announcements
 =
 
-This is the first preview release of Samba 4.6.  This is *not*
+This is the second release candidate of Samba 4.6.  This is *not*
 intended for production environments and is designed for testing
 purposes only.  Please report any defects via the Samba bug reporting
 system at https://bugzilla.samba.org/.
@@ -239,6 +239,36 @@ KNOWN ISSUES
 
 Currently none.
 
+
+CHANGES SINCE 4.5.0rc1
+==
+
+o  Amitay Isaacs 
+   * BUG 12469: CTDB lock helper getting stuck trying to lock a record.
+   * BUG 12500: ctdb-common: Fix a bug in packet reading code for generic 
socket
+ I/O.
+   * BUG 12510: sock_daemon_test 4 crashes with SEGV.
+   * BUG 12513: ctdb-daemon: Remove stale eventd socket.
+
+o  Björn Jacke 
+   * BUG 12535: vfs_default: Unlock the right file in copy chunk.
+
+o  Volker Lendecke 
+   * BUG 12509: messaging: Fix dead but not cleaned-up-yet destination sockets.
+   * BUG 12538: Backport winbind fixes.
+
+o  Stefan Metzmacher 
+   * BUG 12501: s3:winbindd: talloc_steal the extra_data in
+ winbindd_list_users_recv().
+
+o  Martin Schwenke 
+   * BUG 12511: ctdb-takeover: Handle case where there are no RELEASE_IPs to
+ send.
+   * BUG 12512: ctdb-scripts: Fix remaining uses of "ctdb gratiousarp".
+   * BUG 12516: /etc/iproute2/rt_tables gets populated with multiple
+ 'default' entries.
+
+
 ###
 Reporting bugs & Development Discussion
 ###


-- 
Samba Shared Repository



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

2017-01-25 Thread Stefan Metzmacher
The branch, v4-6-test has been updated
   via  4817385 script/release.sh: fix off by 1 error in 
announce.${tagname}.mail.txt creation
  from  d5eebe5 winbind: Don't add duplicate IDs in wbinfo -r

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


- Log -
commit 4817385baccf67e962572c7f1c293dde81e14d19
Author: Stefan Metzmacher 
Date:   Thu Jan 12 10:40:37 2017 +0100

script/release.sh: fix off by 1 error in announce.${tagname}.mail.txt 
creation

Pair-Programmed-With: Karolin Seeger 

Signed-off-by: Stefan Metzmacher 
Signed-off-by: Karolin Seeger 

Autobuild-User(master): Karolin Seeger 
Autobuild-Date(master): Thu Jan 12 15:34:25 CET 2017 on sn-devel-144

(cherry picked from commit 7870c645b79da647bae45b4dc95e7d6e9abcd91a)

Autobuild-User(v4-6-test): Stefan Metzmacher 
Autobuild-Date(v4-6-test): Thu Jan 26 04:06:28 CET 2017 on sn-devel-144

---

Summary of changes:
 script/release.sh | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/script/release.sh b/script/release.sh
index 769f742..b533e25 100755
--- a/script/release.sh
+++ b/script/release.sh
@@ -830,7 +830,8 @@ announcement_samba_stable() {
top=$(cat ${TMPDIR}/WHATSNEW.txt | wc -l)
}
local skip=$(cat ${TMPDIR}/WHATSNEW.txt | grep -n '^[^ ]' | 
head -1 | cut -d ':' -f1)
-   local bottom=$(expr ${top} - \( ${skip} - 1 \))
+   local headlimit=$(expr ${top} - 1 )
+   local taillimit=$(expr ${headlimit} - \( ${skip} - 1 \))
 
cat "announce.${tagname}.quotation.txt"
echo ""
@@ -838,7 +839,7 @@ announcement_samba_stable() {
echo "Release Announcements"
echo "-"
echo ""
-   head -${top} ${TMPDIR}/WHATSNEW.txt | tail -${bottom}
+   head -${headlimit} ${TMPDIR}/WHATSNEW.txt | tail -${taillimit}
echo ""
echo ""
echo "Download Details"


-- 
Samba Shared Repository



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

2017-01-25 Thread Karolin Seeger
The branch, v4-6-test has been updated
   via  d5eebe5 winbind: Don't add duplicate IDs in wbinfo -r
   via  4773e25 winbind: Fix a typo
   via  1166de1 s3/winbindd: fix invalid free
   via  6a87647 winbind: Fix CID 1398534 Dereference before null check
   via  8c49f54 winbind: Fix CID 1398530 Resource leak
   via  bfd0fb3 winbind: Fix CID 1398530 Resource leak
   via  f629f59 winbind: Fix CID 1398531 Resource leak
   via  ff102c9 winbind: Fix CID 1398533 Resource leak
   via  bd82056 winbind: Fix CID 1398533 Resource leak
   via  1a234f5 WHATSNEW: document winbind changes
   via  56e9090 vfs_default: unlock the right file in copy chunk
   via  479fd27 ctdb-tests: Add "13.per_ip_routing shutdown" test
   via  bcdf945 ctdb-scripts: Fix regression when cleaning up routing table 
IDs
   via  5319e50 ctdb-daemon: Remove stale eventd socket
   via  e3c4968 ctdb-scripts: Fix remaining uses of "ctdb gratiousarp"
   via  77a80b7 ctdb-tests: Add takeover helper tests with 
banned/disconnected nodes
   via  e733776 ctdb-takeover: Handle case where there are no RELEASE_IPs 
to send
   via  11841d3 ctdb-takeover: Known and available IP lists should be the 
same size as nodemap
   via  c331736 ctdb-common: Add wait_send/wait_recv to sock_daemon_funcs
   via  a13e48f ctdb-common: Avoid any processing after finishing tevent_req
   via  2930832 ctdb-common: Pass tevent_req to the computation 
sub-functions
   via  6b67083 ctdb-common: Use consistent naming for sock_daemon_run 
computation functions
   via  bc79bda ctdb-common: Correct name of sock_daemon_run_send/recv 
state structure
   via  bc8e36a ctdb-tests: Add robust mutex test
   via  f1c8b35 ctdb-locking: Explicitly unlock record/db in lock helper
   via  cb31b71 ctdb-locking: Remove support for locking multiple databases
   via  28ed3cd python/schema: fix tests flapping due to oid collision
  from  63b9e1c messaging: Fix dead but not cleaned-up-yet destination 
sockets

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


- Log -
commit d5eebe5e7c3c1c037218de87cb92e2bc6509fa97
Author: Volker Lendecke 
Date:   Wed Jan 18 16:54:03 2017 +0100

winbind: Don't add duplicate IDs in wbinfo -r

We look at the netsamlogon_cache entry twice: Once in queryuser and
once in lookupusergroups_cached. This can add the group SID twice.

Use add_sid_to_array_unique to avoid this.

Signed-off-by: Volker Lendecke 
Reviewed-by: Jeremy Allison 

Autobuild-User(master): Jeremy Allison 
Autobuild-Date(master): Tue Jan 24 02:36:19 CET 2017 on sn-devel-144

The last 9 patches address
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12538
Backport winbind fixes.

Autobuild-User(v4-6-test): Karolin Seeger 
Autobuild-Date(v4-6-test): Thu Jan 26 00:17:35 CET 2017 on sn-devel-144

commit 4773e25a5b206895aa8b8990097fc83bed0fceb5
Author: Volker Lendecke 
Date:   Fri Jan 13 07:33:24 2017 +0100

winbind: Fix a typo

Signed-off-by: Volker Lendecke 
Reviewed-by: Jeremy Allison 

commit 1166de1cb0e9e22f7f980844c773b475aa23973b
Author: Aurelien Aptel 
Date:   Tue Jan 17 14:39:03 2017 +0100

s3/winbindd: fix invalid free

coverity fix.

TALLOC_FREE() might be called on uninitialized 'rids' at the end of the
function in case of an early error. Initialize it to NULL to turn the
TALLOC_FREE() to a noop in this case.

Signed-off-by: Aurelien Aptel 
Reviewed-by: Volker Lendecke 
Reviewed-by: David Disseldorp 

Autobuild-User(master): Volker Lendecke 
Autobuild-Date(master): Wed Jan 18 17:19:39 CET 2017 on sn-devel-144

commit 6a8764730d0b8e0f1bcadea2d2df96d712969abb
Author: Jeremy Allison 
Date:   Wed Jan 11 11:52:44 2017 -0800

winbind: Fix CID 1398534 Dereference before null check

Make all query_user_list backends consistent.

Signed-off-by: Jeremy Allison 
Reviewed-by: Andreas Schneider 

Autobuild-User(master): Andreas Schneider 
Autobuild-Date(master): Fri Jan 13 13:33:37 CET 2017 on sn-devel-144

commit 8c49f5421ff76bdd25cdba73bd8dda844895b609
Author: Volker Lendecke 
Date:   Tue Jan 10 13:29:38 2017 +

winbind: Fix CID 1398530 Resource leak

Signed-off-by: Volker Lendecke 
Reviewed-by: Jeremy Allison 

Autobuild-User(master): Jeremy Allison 
Autobuild-Date(master): Wed Jan 11 04:38:25 CET 2017 on sn-devel-144

commit bfd0fb3b28427b84263f2939d5c4ca7492b74b36
Author: 

  1   2   >