[SCM] Samba Shared Repository - branch master updated

2018-05-02 Thread Jeremy Allison
The branch, master has been updated
   via  795ec75 s3: libsmbclient: Fix hard-coded connection error return of 
ETIMEDOUT.
  from  0c78aa1 s3: VFS: Default. Move vfs_read_data() out of 
source3/smbd/vfs.c to the printing code, which is the only caller.

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


- Log -
commit 795ec751ac5f6e58966385bec25063c4af4f185d
Author: Jeremy Allison 
Date:   Wed May 2 11:19:31 2018 -0700

s3: libsmbclient: Fix hard-coded connection error return of ETIMEDOUT.

We shouldn't hard-code the connection error as ETIMEDOUT when
we have a perfectly good NT_STATUS to map from.

Found by the ChromeOS guys trying to connect an SMB2-only client
to an SMB1-only supporting server.

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

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

Autobuild-User(master): Jeremy Allison 
Autobuild-Date(master): Thu May  3 02:42:20 CEST 2018 on sn-devel-144

---

Summary of changes:
 source3/libsmb/libsmb_server.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


Changeset truncated at 500 lines:

diff --git a/source3/libsmb/libsmb_server.c b/source3/libsmb/libsmb_server.c
index e6067be..67dfcf7 100644
--- a/source3/libsmb/libsmb_server.c
+++ b/source3/libsmb/libsmb_server.c
@@ -500,7 +500,7 @@ SMBC_server_internal(TALLOC_CTX *ctx,
 lp_client_max_protocol());
if (!NT_STATUS_IS_OK(status)) {
cli_shutdown(c);
-   errno = ETIMEDOUT;
+   errno = map_errno_from_nt_status(status);
return NULL;
}
 


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch master updated

2018-05-02 Thread Ralph Böhme
The branch, master has been updated
   via  0c78aa1 s3: VFS: Default. Move vfs_read_data() out of 
source3/smbd/vfs.c to the printing code, which is the only caller.
   via  c68cfbc s3: VFS: default: Remove recursion into the VFS inside the 
default pread call.
   via  ff3a23e s3: VFS: default: Remove fallback if we don't have 
HAVE_PREAD set. Samba doesn't work without pread.
  from  bc71cd0 s3: VFS: Remove fsync_fn() from the VFS and all modules. 
VFS ABI change.

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


- Log -
commit 0c78aa1f3a6eb9c08c2fdd10c304d6192cb1b6c2
Author: Jeremy Allison 
Date:   Mon Apr 30 10:15:49 2018 -0700

s3: VFS: Default. Move vfs_read_data() out of source3/smbd/vfs.c to the 
printing code, which is the only caller.

Make static.

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

Autobuild-User(master): Ralph Böhme 
Autobuild-Date(master): Wed May  2 22:20:23 CEST 2018 on sn-devel-144

commit c68cfbcee6a19a19401893706d72994725b05ef5
Author: Jeremy Allison 
Date:   Mon Apr 30 09:51:34 2018 -0700

s3: VFS: default: Remove recursion into the VFS inside the default pread 
call.

We already know we're at the POSIX level here.

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

commit ff3a23e90f85508de39610eb3503562b76c22773
Author: Jeremy Allison 
Date:   Mon Apr 30 09:50:04 2018 -0700

s3: VFS: default: Remove fallback if we don't have HAVE_PREAD set. Samba 
doesn't work without pread.

Start of the changes to remove synchronous VFS read.

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

---

Summary of changes:
 source3/modules/vfs_default.c  | 26 +++---
 source3/printing/nt_printing.c | 28 
 source3/smbd/proto.h   |  1 -
 source3/smbd/vfs.c | 25 -
 4 files changed, 31 insertions(+), 49 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index 6de0329..56dd5c7 100644
--- a/source3/modules/vfs_default.c
+++ b/source3/modules/vfs_default.c
@@ -636,33 +636,13 @@ static ssize_t vfswrap_pread(vfs_handle_struct *handle, 
files_struct *fsp, void
 
if (result == -1 && errno == ESPIPE) {
/* Maintain the fiction that pipes can be seeked (sought?) on. 
*/
-   result = SMB_VFS_READ(fsp, data, n);
+   result = sys_read(fsp->fh->fd, data, n);
fsp->fh->pos = 0;
}
 
 #else /* HAVE_PREAD */
-   off_t   curr;
-   int lerrno;
-
-   curr = SMB_VFS_LSEEK(fsp, 0, SEEK_CUR);
-   if (curr == -1 && errno == ESPIPE) {
-   /* Maintain the fiction that pipes can be seeked (sought?) on. 
*/
-   result = SMB_VFS_READ(fsp, data, n);
-   fsp->fh->pos = 0;
-   return result;
-   }
-
-   if (SMB_VFS_LSEEK(fsp, offset, SEEK_SET) == -1) {
-   return -1;
-   }
-
-   errno = 0;
-   result = SMB_VFS_READ(fsp, data, n);
-   lerrno = errno;
-
-   SMB_VFS_LSEEK(fsp, curr, SEEK_SET);
-   errno = lerrno;
-
+   errno = ENOSYS;
+   result = -1;
 #endif /* HAVE_PREAD */
 
return result;
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index 54357b7..bf54fd4 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -312,6 +312,34 @@ const char *get_short_archi(const char *long_archi)
 }
 
 /
+ Read data from fsp on the vfs.
+ (note: EINTR re-read differs from vfs_write_data)
+/
+
+static ssize_t vfs_read_data(files_struct *fsp, char *buf, size_t byte_count)
+{
+   size_t total=0;
+
+   while (total < byte_count) {
+   ssize_t ret = SMB_VFS_READ(fsp, buf + total,
+   byte_count - total);
+
+   if (ret == 0) {
+   return total;
+   }
+   if (ret == -1) {
+   if (errno == EINTR) {
+   continue;
+   } else {
+   return -1;
+   }
+   }
+   total += ret;
+   }
+   return (ssize_t)total;
+}
+
+/
  Version information in Microsoft files is held in a VS_VERSION_INFO structure.
  There are two case to be covered here: PE (Portable 

[SCM] Samba Shared Repository - annotated tag ldb-1.3.3 created

2018-05-02 Thread Stefan Metzmacher
The annotated tag, ldb-1.3.3 has been created
at  f5897ce28b4dacf9414467cc352690d47863f715 (tag)
   tagging  bf0a6646108bd447c05f099a7f345cf2a3bda070 (commit)
  replaces  samba-4.8.1
 tagged by  Stefan Metzmacher
on  Wed May 2 21:38:55 2018 +0200

- Log -
ldb: tag release ldb-1.3.3
-BEGIN PGP SIGNATURE-
Version: GnuPG v1

iQEcBAABAgAGBQJa6hPPAAoJEEeTkWETCEAlYbEH+wcYUTlF9AZSd5VLa/mndkwX
v7BoxBsT/FNu4GucvBUpsvLHUIIwM6kTIlmIWN6EOAi6B/SEx+hRiiyBYu16QSXC
zKAbZRospDbCngydIfLJ7UZIDzlXxjFEjvCNceB1UvTuEFSpWoC9rhwofYBviwJj
sCeTb4nvHlHtDwkUDJF3xzBqTh93RH7ISMk2gz7E9HBIrUbTuzed84YFgflNLq06
L4iP80FDS+Xz3H3VT53bwDAVZfiLVSpuDlCJZPAELgJ3/WkGjtfqzGu5bkiQ68Cu
lVTtcJUBrfj00HiRUpv7sCy3ZvUXNGgRLVOcUAx7hR8bPvpsR5ioxe2JdMiCIk4=
=ZFOX
-END PGP SIGNATURE-

Andrew Bartlett (3):
  ldb_tdb: Ensure we can not commit an index that is corrupt due to partial 
re-index
  ldb: Add test to show a reindex failure must not leave the DB corrupt
  ldb: Release ldb 1.3.3

Gary Lockyer (3):
  ldb_tdb: Do not fail in GUID index mode if there is a duplicate attribute
  ldb_tdb: Add tests for truncated index keys
  lib ldb tests: Prepare to run api and index test on tdb and lmdb

Karolin Seeger (1):
  VERSION: Bump version up to 4.8.2...

---


-- 
Samba Shared Repository



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

2018-05-02 Thread Stefan Metzmacher
The branch, v4-8-test has been updated
   via  13f23ec nsswitch: fix memory leak in winbind_open_pipe_sock() when 
the privileged pipe is not accessable.
   via  bf0a664 ldb: Release ldb 1.3.3
   via  21e10ff ldb: Add test to show a reindex failure must not leave the 
DB corrupt
   via  89ce0d9 lib ldb tests: Prepare to run api and index test on tdb and 
lmdb
   via  7f70fcd ldb_tdb: Ensure we can not commit an index that is corrupt 
due to partial re-index
   via  3f15f1c ldb_tdb: Add tests for truncated index keys
   via  b1ac094 ldb_tdb: Do not fail in GUID index mode if there is a 
duplicate attribute
  from  f1bf8d7 VERSION: Bump version up to 4.8.2...

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


- Log -
commit 13f23ec11ef3c932b0cb2000613dfbc6dd14554b
Author: Stefan Metzmacher 
Date:   Tue Apr 24 10:59:05 2018 +0200

nsswitch: fix memory leak in winbind_open_pipe_sock() when the privileged 
pipe is not accessable.

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

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

Autobuild-User(v4-8-test): Stefan Metzmacher 
Autobuild-Date(v4-8-test): Wed May  2 18:56:45 CEST 2018 on sn-devel-144

commit bf0a6646108bd447c05f099a7f345cf2a3bda070
Author: Andrew Bartlett 
Date:   Mon Apr 30 11:15:55 2018 +1200

ldb: Release ldb 1.3.3

* Fix failure to upgrade to the GUID index DB format
* Add tests for GUID index behaviour

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

Signed-off-by: Andrew Bartlett 
Reviewed-by: Stefan Metzmacher 

commit 21e10ff3d46814c170ed9b35e341f3c6a72406ef
Author: Andrew Bartlett 
Date:   Mon Mar 26 16:07:45 2018 +1300

ldb: Add test to show a reindex failure must not leave the DB corrupt

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

Signed-off-by: Andrew Bartlett 
Reviewed-by: Gary Lockyer 

Autobuild-User(master): Andrew Bartlett 
Autobuild-Date(master): Thu Apr  5 07:53:10 CEST 2018 on sn-devel-144

(cherry picked from commit 653a0a1ba932fc0cc567253f3e153b2928505ba2)

commit 89ce0d90f70140b28a3cf6fa15e4fc6e803b5495
Author: Gary Lockyer 
Date:   Tue Mar 6 09:13:31 2018 +1300

lib ldb tests: Prepare to run api and index test on tdb and lmdb

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

Signed-off-by: Gary Lockyer 
Reviewed-by: Andrew Bartlett 
(cherry picked from commit 06d9566ef7005588de18c5a1d07a5b9cd179d17b)

commit 7f70fcd8baa82ae13ce1a29fc493643bbe29c6b7
Author: Andrew Bartlett 
Date:   Mon Mar 26 16:01:13 2018 +1300

ldb_tdb: Ensure we can not commit an index that is corrupt due to partial 
re-index

The re-index traverse can abort part-way though and we need to ensure
that the transaction is never committed as that will leave an un-useable db.

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

Signed-off-by: Andrew Bartlett 
Reviewed-by: Gary Lockyer 
(cherry picked from commit e481e4f30f4dc540f6f129b4f2faea48ee195673)

commit 3f15f1c63b994066e4ea9bc5e407c1d182511918
Author: Gary Lockyer 
Date:   Wed Feb 21 15:12:40 2018 +1300

ldb_tdb: Add tests for truncated index keys

Tests for the index truncation code as well as the GUID index
format in general.

Covers truncation of both the DN and equality search keys.

Signed-off-by: Gary Lockyer 
Reviewed-by: Douglas Bagnall 
Reviewed-by: Andrew Bartlett 

Autobuild-User(master): Andrew Bartlett 
Autobuild-Date(master): Sat Mar  3 09:58:40 CET 2018 on sn-devel-144

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

(cherry picked into 4.8 and cut down to operate without truncated
index values from master commit 4c0c888b571d4c21ab267024178353925a8c087c
by Andrew Bartlett)

commit b1ac0944146705ed13a89b0d0ac1b4656641c170
Author: Gary Lockyer 
Date:   Wed Feb 28 11:47:22 2018 +1300

ldb_tdb: Do not fail in GUID index mode if there is a duplicate attribute

It is not the job of the index code to enforce this, but do give a
a warning given it has been detected.

However, now that we do allow it, we must never return the same
object twice to the caller, so filter for it in ltdb_index_filter().

The GUID list is 

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

2018-05-02 Thread Stefan Metzmacher
The branch, v4-7-test has been updated
   via  d6ac540 nsswitch: fix memory leak in winbind_open_pipe_sock() when 
the privileged pipe is not accessable.
  from  825aea7 s4:rpc_server: fix call_id truncation in 
dcesrv_find_fragmented_call()

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


- Log -
commit d6ac5408f7c4d2fc0bb648a302bc012b725bec41
Author: Stefan Metzmacher 
Date:   Tue Apr 24 10:59:05 2018 +0200

nsswitch: fix memory leak in winbind_open_pipe_sock() when the privileged 
pipe is not accessable.

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

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

Autobuild-User(v4-7-test): Stefan Metzmacher 
Autobuild-Date(v4-7-test): Wed May  2 15:36:48 CEST 2018 on sn-devel-144

---

Summary of changes:
 nsswitch/wb_common.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/nsswitch/wb_common.c b/nsswitch/wb_common.c
index 262181a..336092b 100644
--- a/nsswitch/wb_common.c
+++ b/nsswitch/wb_common.c
@@ -420,14 +420,14 @@ static int winbind_open_pipe_sock(struct winbindd_context 
*ctx,
ctx->winbindd_fd = fd;
ctx->is_privileged = 1;
}
+
+   SAFE_FREE(response.extra_data.data);
}
 
if ((need_priv != 0) && (ctx->is_privileged == 0)) {
return -1;
}
 
-   SAFE_FREE(response.extra_data.data);
-
return ctx->winbindd_fd;
 #else
return -1;


-- 
Samba Shared Repository



[SCM] Socket Wrapper Repository - branch master updated

2018-05-02 Thread Andreas Schneider
The branch, master has been updated
   via  f152f98 tests: Increase wait time for setup and teardown to 5ms
  from  142024a tests: Remove extra test by moving getsockname() to another

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


- Log -
commit f152f98a98d5b56b26386ae570f343253743289c
Author: Andreas Schneider 
Date:   Wed May 2 12:23:50 2018 +0200

tests: Increase wait time for setup and teardown to 5ms

Signed-off-by: Andreas Schneider 
Reviewed-by: Michael Adam 

---

Summary of changes:
 tests/torture.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/tests/torture.c b/tests/torture.c
index 55c27c6..0579779 100644
--- a/tests/torture.c
+++ b/tests/torture.c
@@ -188,7 +188,7 @@ static void torture_setup_echo_srv_ip(void **state,
}
 
rc = stat(s->srv_pidfile, );
-   usleep(2000);
+   usleep(5000);
} while (rc != 0);
assert_int_equal(rc, 0);
 
@@ -288,7 +288,7 @@ void torture_teardown_echo_srv(void **state)
/* Make sure the daemon goes away! */
kill(pid, SIGTERM);
 
-   usleep(200);
+   usleep(5000);
 
rc = kill(pid, 0);
if (rc != 0) {


-- 
Socket Wrapper Repository