[SCM] Samba Website Repository - branch master updated

2023-04-14 Thread David Disseldorp
The branch, master has been updated
   via  a7132cd team: add Namjae Jeon to team list
  from  e09c817 NEWS[4.18.1]: Samba 4.18.1, 4.17.7 and 4.16.10 Security 
Releases are available for Download

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


- Log -
commit a7132cd1b02879b45d72db10b14cd2ef24176e33
Author: David Disseldorp 
Date:   Fri Apr 14 13:25:31 2023 +0200

team: add Namjae Jeon to team list

As per <380c75cf-f524-a2e3-8b7a-7f4d6f605...@samba.org>

Move Derrell to the alumni list as per


Also, move a few names around to balance the column lengths.

Signed-off-by: David Disseldorp 

---

Summary of changes:
 team/index.html | 11 ++-
 1 file changed, 6 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/team/index.html b/team/index.html
index b63f0ee..5f55b90 100755
--- a/team/index.html
+++ b/team/index.html
@@ -71,14 +71,14 @@ mailing list and start contributing to the development 
of Samba.
 mailto:ami...@samba.org;>Amitay Isaacs
 mailto:nivan...@samba.org;>Nadezhda Ivanova
 https://www.j3e.de/;>Bjrn Jacke(https://www.sernet.de/en/;>SerNet)
-https://www.samba.org/~jlayton/jlayton_resume.html;>Jeff 
Layton
-mailto:v...@samba.org;>Volker Lendecke(http://www.sernet.de/en/;>SerNet)
+Namjae Jeon
 
 
 
 
+https://www.samba.org/~jlayton/jlayton_resume.html;>Jeff 
Layton
+mailto:v...@samba.org;>Volker Lendecke(http://www.sernet.de/en/;>SerNet)
 mailto:h...@samba.org;>Herb Lewis
-mailto:derr...@samba.org;>Derrell Lipman
 mailto:g...@samba.org;>Gary Lockyer(http://catalyst.net.nz/what-we-offer/enterprise-solutions/samba;>Catalyst)
 mailto:j...@samba.org;>Jim McDonough(https://www.suse.com/;>SUSE)
 mailto:me...@samba.org;>Stefan Metzmacher(https://www.sernet.de/en/;>SerNet)
@@ -164,6 +164,8 @@ during their time as team members.
 mailto:mkap...@samba.org;>Marc Kaplan
 mailto:pke...@ets.net;>Peter Kelly
 mailto:ku...@samba.org;>Gnter Kukkukk
+mailto:va...@samba.org;>Vance Lankhaar
+mailto:l...@samba-tng.org;>Luke Leighton
 
 
 
@@ -172,8 +174,7 @@ during their time as team members.
 
 
 
-mailto:va...@samba.org;>Vance Lankhaar
-mailto:l...@samba-tng.org;>Luke Leighton
+mailto:derr...@samba.org;>Derrell Lipman
 mailto:kame...@samba.org;>Kamen Mazdrashki
 mailto:me...@ifn.ing.tu-bs.de;>Eckart Meyer
 Jean-François Micouleau


-- 
Samba Website Repository



[SCM] Samba Website Repository - branch master updated

2022-06-22 Thread David Disseldorp
The branch, master has been updated
   via  5453aae team: add Paulo and David M. to team list
  from  705061f NEWS[4.16.2]: Samba 4.16.2 Available for Download

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


- Log -
commit 5453aae01793d65199cefe634d588da1f34d2a86
Author: David Disseldorp 
Date:   Wed Jun 22 17:37:15 2022 +0200

team: add Paulo and David M. to team list

Move Simo to the Alumni section.

Signed-off-by: David Disseldorp 

---

Summary of changes:
 team/index.html | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)


Changeset truncated at 500 lines:

diff --git a/team/index.html b/team/index.html
index ec7e369..9a54754 100755
--- a/team/index.html
+++ b/team/index.html
@@ -48,6 +48,7 @@ mailing list and start contributing to the development of 
Samba.
 
 
 https://www.samba.org/~obnox/;>Michael Adam(https://www.redhat.com/;>Red Hat)
+https://cjr.nz;>Paulo Alcantara(https://www.suse.com/;>SUSE)
 https://www.samba.org/~jra;>Jeremy Allison
 mailto:a...@samba.org;>Christian Ambach
 mailto:jan...@samba.org;>Jule Anger(http://www.sernet.de/en/;>SerNet)
@@ -80,6 +81,7 @@ mailing list and start contributing to the development of 
Samba.
 mailto:j...@samba.org;>Jim McDonough(https://www.suse.com/;>SUSE)
 mailto:me...@samba.org;>Stefan Metzmacher(https://www.sernet.de/en/;>SerNet)
 mailto:mmuehlf...@samba.org;>Marc Muehlfeld
+mailto:dmul...@samba.org;>David Mulder(https://www.suse.com/;>SUSE)
 mailto:m...@samba.org;>Matthieu Patou
 Rowland Penny
 Noel Power(https://www.suse.com/;>SUSE)
@@ -91,7 +93,6 @@ mailing list and start contributing to the development of 
Samba.
 https://meltin.net/martin/;>Martin Schwenke(https://www.ddn.com/;>DDN)
 mailto:ksee...@samba.org;>Karolin Seeger(https://www.sernet.de/en/;>SerNet)
 http://www.richardsharpe.com;>Richard Sharpe
-mailto:i...@samba.org;>Simo Sorce(https://www.redhat.com/;>Red Hat)
 https://www.samba.org/~tridge/;>Andrew Tridgell
 mailto:u...@samba.org;>Uri Simchoni
 https://www.samba.org/~jelmer/;>Jelmer Vernooij
@@ -183,6 +184,7 @@ during their time as team members.
 Brian Roberson
 https://www.samba.org/~sahlberg/;>Ronnie Sahlberg
 http://shearer.org/;>Dan Shearer
+mailto:i...@samba.org;>Simo Sorce(https://www.redhat.com/;>Red Hat)
 mailto:stri...@samba-tng.org;>Sander Striker
 mailto:mi...@samba.org;>Rafal Szczesniak
 mailto:mo...@samba.org;>Motonobu Takahashi


-- 
Samba Website Repository



[SCM] Samba Shared Repository - branch master updated

2022-01-17 Thread David Disseldorp
The branch, master has been updated
   via  493fe1a4315 build: reduce printf() calls in generated 
build_options.c
   via  7a8c6c362e0 build: reduce fp.write calls for build_options.c 
generation
   via  6a463c40d75 s3:smbd: handle --build-options without parsing smb.conf
  from  da2e1047f1f WHATSNEW: Document CTDB leader and cluster lock changes

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


- Log -
commit 493fe1a4315a8da3403b18233cbcbdc4e43fb4ee
Author: David Disseldorp 
Date:   Fri Jan 14 10:38:40 2022 +0100

build: reduce printf() calls in generated build_options.c

build_options.c is inefficient in multiple ways:
1) it's generated via one python fp.write() call per line
2) the generated code calls output() for each and every build option

This commit addresses (2), modifying write_build_options_header() and
write_build_options_footer(). write_build_options_section() could also
be collapsed into a single output() call, but this may lead to oversize
string literals, so has been left as is.

I observe no change in smbd --build-options output.

Signed-off-by: David Disseldorp 
Reviewed-by: Andreas Schneider 

Autobuild-User(master): David Disseldorp 
Autobuild-Date(master): Mon Jan 17 13:17:53 UTC 2022 on sn-devel-184

commit 7a8c6c362e0151bc1bbd9cca8e2bfb03ba8320de
Author: David Disseldorp 
Date:   Fri Jan 14 10:38:40 2022 +0100

build: reduce fp.write calls for build_options.c generation

build_options.c is inefficient in multiple ways:
1) it's generated via one python fp.write() call per line
2) the generated code calls output() for each and every build option

This commit reduces fp.write() calls for (1). I observe no change in the
generated build_options.c .

Signed-off-by: David Disseldorp 
Reviewed-by: Andreas Schneider 

commit 6a463c40d755b75b02884f123c19cc2c2845d729
Author: Andreas Schneider 
Date:   Thu Jan 13 15:31:33 2022 +0100

s3:smbd: handle --build-options without parsing smb.conf

The smb.conf is parsed in post mode of a popt callback. The smbd
--build-options parameter should be handled when first encountered
to avoid requiring smb.conf presence.

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

Signed-off-by: Andreas Schneider 
Reviewed-by: David Disseldorp 

---

Summary of changes:
 buildtools/wafsamba/samba_patterns.py | 238 +++---
 source3/smbd/server.c |   9 +-
 2 files changed, 136 insertions(+), 111 deletions(-)


Changeset truncated at 500 lines:

diff --git a/buildtools/wafsamba/samba_patterns.py 
b/buildtools/wafsamba/samba_patterns.py
index bf62ee88070..a9c5fcc4b4c 100644
--- a/buildtools/wafsamba/samba_patterns.py
+++ b/buildtools/wafsamba/samba_patterns.py
@@ -32,112 +32,142 @@ Build.BuildContext.SAMBA_MKVERSION = SAMBA_MKVERSION
 
 def write_build_options_header(fp):
 '''write preamble for build_options.c'''
-fp.write("/*\n")
-fp.write("   Unix SMB/CIFS implementation.\n")
-fp.write("   Build Options for Samba Suite\n")
-fp.write("   Copyright (C) Vance Lankhaar  2003\n")
-fp.write("   Copyright (C) Andrew Bartlett  2001\n")
-fp.write("\n")
-fp.write("   This program is free software; you can redistribute it and/or 
modify\n")
-fp.write("   it under the terms of the GNU General Public License as 
published by\n")
-fp.write("   the Free Software Foundation; either version 3 of the 
License, or\n")
-fp.write("   (at your option) any later version.\n")
-fp.write("\n")
-fp.write("   This program is distributed in the hope that it will be 
useful,\n")
-fp.write("   but WITHOUT ANY WARRANTY; without even the implied warranty 
of\n")
-fp.write("   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See 
the\n")
-fp.write("   GNU General Public License for more details.\n")
-fp.write("\n")
-fp.write("   You should have received a copy of the GNU General Public 
License\n")
-fp.write("   along with this program; if not, see 
<http://www.gnu.org/licenses/>.\n")
-fp.write("*/\n")
-fp.write("\n")
-fp.write("#include \"includes.h\"\n")
-fp.write("#include \"dynconfig/dynconfig.h\"\n")
-fp.write("#include \"lib/cluster_support.h\"\n")
-
-fp.write("\n")
-fp.write("static int output(bool screen, const char *format, ...) 
PRINTF_ATTRIBUTE(2,3);\n")
-fp.write("void build_options(bool screen);\n")
-fp.write("\n")

[SCM] Samba Shared Repository - branch master updated

2020-10-05 Thread David Disseldorp
The branch, master has been updated
   via  83ab59d929a Revert "vfs_ceph: drop fdopendir handler"
  from  666d2a38fcf libcli: Use GUID_to_ndr_buf() in 
smb2cli_validate_negotiate_info_send()

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


- Log -
commit 83ab59d929a6319c18341cb69d5084b563fb59bb
Author: David Disseldorp 
Date:   Mon Oct 5 12:28:27 2020 +0200

Revert "vfs_ceph: drop fdopendir handler"

This reverts commit 76d7d05b1da6c0703b1c2bade0c4467c7cc1adec.
OpenDir_fsp() no longer falls back to regular open, so this hook is
required.

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

Signed-off-by: David Disseldorp 
Reviewed-by: Samuel Cabrero 

Autobuild-User(master): David Disseldorp 
Autobuild-Date(master): Mon Oct  5 12:38:34 UTC 2020 on sn-devel-184

---

Summary of changes:
 source3/modules/vfs_ceph.c | 15 ---
 1 file changed, 12 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_ceph.c b/source3/modules/vfs_ceph.c
index 0378d633782..a87d162e573 100644
--- a/source3/modules/vfs_ceph.c
+++ b/source3/modules/vfs_ceph.c
@@ -306,9 +306,18 @@ static DIR *cephwrap_fdopendir(struct vfs_handle_struct 
*handle,
   const char *mask,
   uint32_t attributes)
 {
-   /* OpenDir_fsp() falls back to regular open */
-   errno = ENOSYS;
-   return NULL;
+   int ret = 0;
+   struct ceph_dir_result *result;
+   DBG_DEBUG("[CEPH] fdopendir(%p, %p)\n", handle, fsp);
+
+   ret = ceph_opendir(handle->data, fsp->fsp_name->base_name, );
+   if (ret < 0) {
+   result = NULL;
+   errno = -ret; /* We return result which is NULL in this case */
+   }
+
+   DBG_DEBUG("[CEPH] fdopendir(...) = %d\n", ret);
+   return (DIR *) result;
 }
 
 static struct dirent *cephwrap_readdir(struct vfs_handle_struct *handle,


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch master updated

2020-09-23 Thread David Disseldorp
The branch, master has been updated
   via  68b981ee8a1 ctdb/test_ceph_rados_reclock: check for service 
registration
   via  55dbd1080d8 ctdb/doc: mention ctdb_mutex_ceph_rados_helper mgr 
registration
   via  ff36cb74025 ctdb/ceph: register recovery lock holder with ceph-mgr
  from  56f022c3f8b smbd: Propagate reload-config message to all worker 
smbds

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


- Log -
commit 68b981ee8a1f2feb39ea679ac504f398ad5d71e8
Author: David Disseldorp 
Date:   Wed Sep 23 00:14:25 2020 +0200

ctdb/test_ceph_rados_reclock: check for service registration

Signed-off-by: David Disseldorp 
Reviewed-by: Samuel Cabrero 

Autobuild-User(master): David Disseldorp 
Autobuild-Date(master): Thu Sep 24 00:52:42 UTC 2020 on sn-devel-184

commit 55dbd1080d876c92eebf31c50b8b38a11bb7a8de
Author: David Disseldorp 
Date:   Tue Sep 22 23:53:58 2020 +0200

ctdb/doc: mention ctdb_mutex_ceph_rados_helper mgr registration

Signed-off-by: David Disseldorp 
Reviewed-by: Samuel Cabrero 

commit ff36cb740251e64661f3877397b7c97efc4f2b4d
Author: David Disseldorp 
Date:   Tue Sep 22 23:17:14 2020 +0200

ctdb/ceph: register recovery lock holder with ceph-mgr

The Ceph Manager's service map is useful for tracking the status of
Ceph related services. By registering the CTDB recovery lock holder,
Ceph storage administrators can more easily identify where and when a
CTDB cluster is up and running.

Signed-off-by: David Disseldorp 
Reviewed-by: Samuel Cabrero 

---

Summary of changes:
 ctdb/doc/ctdb_mutex_ceph_rados_helper.7.xml|  4 
 ctdb/utils/ceph/ctdb_mutex_ceph_rados_helper.c | 33 +-
 ctdb/utils/ceph/test_ceph_rados_reclock.sh |  8 ++-
 3 files changed, 43 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/ctdb/doc/ctdb_mutex_ceph_rados_helper.7.xml 
b/ctdb/doc/ctdb_mutex_ceph_rados_helper.7.xml
index b9a5d3aecc3..e055dbba614 100644
--- a/ctdb/doc/ctdb_mutex_ceph_rados_helper.7.xml
+++ b/ctdb/doc/ctdb_mutex_ceph_rados_helper.7.xml
@@ -42,6 +42,10 @@ Object: Ceph RADOS object name
   located in a librados default search path (e.g. /etc/ceph/).
   Pool must already exist.
 
+
+  For informational purposes, ctdb_mutex_ceph_rados_helper will also
+  register the recovery lock holder in Ceph Manager's service map.
+
   
 
   
diff --git a/ctdb/utils/ceph/ctdb_mutex_ceph_rados_helper.c 
b/ctdb/utils/ceph/ctdb_mutex_ceph_rados_helper.c
index 7ef76c26e02..bdbb8df7104 100644
--- a/ctdb/utils/ceph/ctdb_mutex_ceph_rados_helper.c
+++ b/ctdb/utils/ceph/ctdb_mutex_ceph_rados_helper.c
@@ -1,7 +1,7 @@
 /*
CTDB mutex helper using Ceph librados locks
 
-   Copyright (C) David Disseldorp 2016-2018
+   Copyright (C) David Disseldorp 2016-2020
 
Based on ctdb_mutex_fcntl_helper.c, which is:
Copyright (C) Martin Schwenke 2015
@@ -267,6 +267,31 @@ static int ctdb_mutex_rados_state_destroy(struct 
ctdb_mutex_rados_state *cmr_sta
return 0;
 }
 
+/* register this host+service with ceph-mgr for visibility */
+static int ctdb_mutex_rados_mgr_reg(rados_t ceph_cluster)
+{
+   int ret;
+   uint64_t instance_guid;
+   char id_buf[128];
+
+   instance_guid = rados_get_instance_id(ceph_cluster);
+   ret = snprintf(id_buf, sizeof(id_buf), "%s:0x%016llx",
+   "ctdb_mutex_ceph_rados_helper",
+   (unsigned long long)instance_guid);
+   if (ret < 0 || ret >= sizeof(id_buf)) {
+   fprintf(stderr, "Ceph instance name too long\n");
+   return -ENAMETOOLONG;
+   }
+
+   ret = rados_service_register(ceph_cluster, "ctdb", id_buf, "");
+   if (ret < 0) {
+   fprintf(stderr, "failed to register service with ceph-mgr\n");
+   return ret;
+   }
+
+   return 0;
+}
+
 int main(int argc, char *argv[])
 {
int ret;
@@ -380,6 +405,12 @@ int main(int argc, char *argv[])
goto err_ctx_cleanup;
}
 
+   ret = ctdb_mutex_rados_mgr_reg(cmr_state->ceph_cluster);
+   if (ret < 0) {
+   fprintf(stderr, "Failed to register with ceph-mgr\n");
+   /* ignore: ceph-mgr service registration is informational */
+   }
+
ret = ctdb_mutex_rados_lock(cmr_state->ioctx, cmr_state->object,
cmr_state->lock_duration_s,
0);
diff --git a/ctdb/utils/ceph/test_ceph_rados_reclock.sh 
b/ctdb/utils/ceph/test_ceph_rados_reclock.sh
index 68b44ff997f..1848c104ea5 100755
--- a/ctdb/utils/ceph/test_ceph_rados_reclock.sh
+++ b/ctdb/utils/ceph/test_ceph_rados_reclock.sh
@@ -1,7 +1,7

[SCM] Samba Shared Repository - branch master updated

2020-09-16 Thread David Disseldorp
The branch, master has been updated
   via  ed625d66943 tests: Disable kerberos for weak crypto test
   via  63b0d2dc760 selftest: set pid directory in client's smb.conf
   via  ebada816ded selftest: Create client directories in a loop
  from  67498ffd787 s3: libsmb: Cleanup - in internal_resolve_name() only 
write the out parameters on success.

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


- Log -
commit ed625d669437bb940a98a0e51c67a85d947dc2d5
Author: Samuel Cabrero 
Date:   Tue Sep 15 12:32:44 2020 +0200

tests: Disable kerberos for weak crypto test

Otherwise the test fails because the client is authenticated using
spnego and gse_krb5, not triggering the weak crypto restrictions.

Signed-off-by: Samuel Cabrero 
Reviewed-by: David Disseldorp 

Autobuild-User(master): David Disseldorp 
Autobuild-Date(master): Thu Sep 17 00:05:51 UTC 2020 on sn-devel-184

commit 63b0d2dc7608ba30b1269a1937da1ac3ba3e40d3
Author: Samuel Cabrero 
Date:   Tue Sep 15 13:32:00 2020 +0200

selftest: set pid directory in client's smb.conf

Set a pid file directory to avoid the following testparm error:

ERROR: pid directory /usr/local/samba/var/run does not exist

Signed-off-by: Samuel Cabrero 
Reviewed-by: David Disseldorp 

commit ebada816dedf5ea86fdb17b78998890114344b6d
Author: Samuel Cabrero 
Date:   Wed Sep 16 13:00:33 2020 +0200

selftest: Create client directories in a loop

Signed-off-by: Samuel Cabrero 
Reviewed-by: David Disseldorp 

---

Summary of changes:
 selftest/selftest.pl   | 74 +++---
 testprogs/blackbox/test_weak_crypto.sh | 12 +-
 2 files changed, 35 insertions(+), 51 deletions(-)


Changeset truncated at 500 lines:

diff --git a/selftest/selftest.pl b/selftest/selftest.pl
index d14df92a11c..6ea21fa6bfe 100755
--- a/selftest/selftest.pl
+++ b/selftest/selftest.pl
@@ -22,6 +22,7 @@ use warnings;
 use FindBin qw($RealBin $Script);
 use File::Spec;
 use File::Temp qw(tempfile);
+use File::Path qw(remove_tree);
 use Getopt::Long;
 use POSIX;
 use Cwd qw(abs_path);
@@ -501,67 +502,39 @@ sub write_clientconf($$$)
 
mkdir("$clientdir", 0777) unless -d "$clientdir";
 
-   if ( -d "$clientdir/private" ) {
-   unlink <$clientdir/private/*>;
-   } else {
-   mkdir("$clientdir/private", 0777);
-   }
-
-   if ( -d "$clientdir/bind-dns" ) {
-   unlink <$clientdir/bind-dns/*>;
-   } else {
-   mkdir("$clientdir/bind-dns", 0777);
-   }
-
-   if ( -d "$clientdir/lockdir" ) {
-   unlink <$clientdir/lockdir/*>;
-   } else {
-   mkdir("$clientdir/lockdir", 0777);
-   }
-
-   if ( -d "$clientdir/statedir" ) {
-   unlink <$clientdir/statedir/*>;
-   } else {
-   mkdir("$clientdir/statedir", 0777);
-   }
-
-   if ( -d "$clientdir/cachedir" ) {
-   unlink <$clientdir/cachedir/*>;
-   } else {
-   mkdir("$clientdir/cachedir", 0777);
+   my @subdirs = (
+   { name => "private", mask => 0777 },
+   { name => "bind-dns", mask => 0777 },
+   { name => "lockdir", mask => 0777 },
+   { name => "statedir", mask => 0777 },
+   { name => "cachedir", mask => 0777 },
+   { name => "pkinit", mask => 0700 },
+   { name => "pid", mask => 0777 },
+   # the ncalrpcdir needs exactly 0755 otherwise tests fail.
+   { name => "ncalrpcdir", mask => 0755, umask => 0022 },
+   );
+
+   foreach my $sub (@subdirs) {
+   my $dir = "$clientdir/$sub->{name}";
+   remove_tree($dir);
+   my $mask = umask;
+   if (defined($sub->{umask})) {
+   umask $sub->{umask};
+   }
+   mkdir($dir, $sub->{mask});
+   umask $mask;
}
 
-   # this is ugly, but the ncalrpcdir needs exactly 0755
-   # otherwise tests fail.
-   my $mask = umask;
-   umask 0022;
-   if ( -d "$clientdir/ncalrpcdir/np" ) {
-   unlink <$clientdir/ncalrpcdir/np/*>;
-   rmdir "$clientdir/ncalrpcdir/np";
-   }
-   if ( -d "$clientdir/ncalrpcdir" ) {
-   unlink <$clientdir/ncalrpcdir/*>;
-   rmdir "$clientdir/ncalrpcdir";
-   }
-   mkdir("$clientdir/ncalrpcdir", 07

[SCM] Samba Shared Repository - branch master updated

2020-09-03 Thread David Disseldorp
The branch, master has been updated
   via  12fbd5dcb1e build: avoid some unnecessary list.extend() calls
   via  ff39211d432 build: avoid unnecessary TO_LIST() calls for static 
strings
  from  b6805d5e0bc build: toggle vfs_snapper using --with-shared-modules

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


- Log -
commit 12fbd5dcb1e86ae4217c29ed641f8e111082b425
Author: David Disseldorp 
Date:   Wed Sep 2 15:19:52 2020 +0200

build: avoid some unnecessary list.extend() calls

Signed-off-by: David Disseldorp 
Reviewed-by: Douglas Bagnall 

Autobuild-User(master): David Disseldorp 
Autobuild-Date(master): Thu Sep  3 13:33:54 UTC 2020 on sn-devel-184

commit ff39211d43296be546bc9615a2ad06664281412b
Author: David Disseldorp 
Date:   Wed Sep 2 14:35:21 2020 +0200

build: avoid unnecessary TO_LIST() calls for static strings

Signed-off-by: David Disseldorp 
Reviewed-by: Douglas Bagnall 

---

Summary of changes:
 source3/wscript | 104 +++-
 1 file changed, 51 insertions(+), 53 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/wscript b/source3/wscript
index 335cfd797f1..4ad7a883701 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -120,7 +120,7 @@ def configure(conf):
 # We crash without vfs_default
 # and vfs_not_implemented provides helper function
 # for other modules
-required_static_modules.extend(TO_LIST('vfs_default vfs_not_implemented'))
+required_static_modules.extend(['vfs_default', 'vfs_not_implemented'])
 
 conf.CHECK_HEADERS('netdb.h')
 conf.CHECK_HEADERS('linux/falloc.h linux/ioctl.h')
@@ -527,11 +527,11 @@ vsyslog
 Logs.info('Using HPUX ACLs')
 conf.DEFINE('HAVE_HPUX_ACLS',1)
 conf.DEFINE('POSIX_ACL_NEEDS_MASK',1)
-default_static_modules.extend(TO_LIST('vfs_hpuxacl'))
+default_static_modules.extend(['vfs_hpuxacl'])
 elif (host_os.rfind('aix') > -1):
 Logs.info('Using AIX ACLs')
 conf.DEFINE('HAVE_AIX_ACLS',1)
-default_static_modules.extend(TO_LIST('vfs_aixacl 
vfs_aixacl2'))
+default_static_modules.extend(['vfs_aixacl', 'vfs_aixacl2'])
 elif (host_os.rfind('darwin') > -1):
 Logs.warn('ACLs on Darwin currently not supported')
 conf.fatal("ACL support not available on Darwin/MacOS. "
@@ -559,16 +559,16 @@ return acl_get_perm_np(permset_d, perm);
 headers='sys/types.h sys/acl.h', link=True,
 msg="Checking whether acl_get_perm_np() is available")
 # source3/lib/sysacls.c calls posixacl_sys_acl_get_file()
-required_static_modules.extend(TO_LIST('vfs_posixacl'))
+required_static_modules.extend(['vfs_posixacl'])
 conf.CHECK_VARIABLE('ACL_EVERYONE', headers='sys/acl.h')
 elif conf.CHECK_FUNCS_IN(['facl'], 'sec'):
 Logs.info('Using solaris or UnixWare ACLs')
 conf.DEFINE('HAVE_SOLARIS_UNIXWARE_ACLS',1)
-default_static_modules.extend(TO_LIST('vfs_solarisacl'))
+default_static_modules.extend(['vfs_solarisacl'])
 elif conf.CHECK_FUNCS_IN(['acl_get_fd'], 'pacl'):
 Logs.info('Using Tru64 ACLs')
 conf.DEFINE('HAVE_TRU64_ACLS',1)
-default_static_modules.extend(TO_LIST('vfs_tru64acl'))
+default_static_modules.extend(['vfs_tru64acl'])
 else:
 conf.fatal("ACL support not found. Try installing libacl1-dev "
"or libacl-devel.  "
@@ -828,7 +828,7 @@ msg.msg_accrightslen = sizeof(fd);
 conf.env['HAVE_ADS'] = '1'
 Logs.info("Building with Active Directory support.")
 # these have broken dependencies
-forced_shared_modules.extend(TO_LIST('idmap_ad idmap_rfc2307'))
+forced_shared_modules.extend(['idmap_ad', 'idmap_rfc2307'])
 elif Options.options.with_ads == False:
 Logs.info("Building without Active Directory support (--without-ads).")
 if not Options.options.without_ad_dc:
@@ -1915,7 +1915,7 @@ main() {
 conf.fatal("Unmet dependencies for Spotlight backends")
 
 Logs.info("Building with Spotlight support, available backends: %s" % 
', '.join(backends))
-default_static_modules.extend(TO_LIST('rpc_mdssvc_module'))
+default_static_modules.extend(['rpc_mdssvc_module'])
 conf.DEFINE('WITH_SPOTLIGHT', '1')
 conf.env.with_spotlight = True
 
@@ -1925,94 +1925,92 @@ main() {
 if conf.CHECK_FUNCS_IN('nscd_flush_

[SCM] Samba Shared Repository - branch master updated

2020-09-02 Thread David Disseldorp
The branch, master has been updated
   via  b6805d5e0bc build: toggle vfs_snapper using --with-shared-modules
  from  50d900b6f9b tests: Make sure that idmap_ad retrieves unix nss 
attributes

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


- Log -
commit b6805d5e0bcf1716f87e84bcbb2fd8f93c38a8a3
Author: David Disseldorp 
Date:   Wed Sep 2 10:50:04 2020 +0200

build: toggle vfs_snapper using --with-shared-modules

7ae03a19b3c ("build: add configure option to control vfs_snapper build")
added new --enable-snapper and --disable-snapper configure parameters to
control whether the vfs_snapper module was built.
The new parameters conflicted with existing
--with-shared-modules=[!]vfs_snapper behaviour.

This change reinstates working --with-shared-modules=[!]vfs_snapper
functionality. vfs_snapper stays enabled by default, but only on Linux.
Linux systems lacking the dbus library and header files should
explicitly disable the module via --with-shared-modules=!vfs_snapper as
documented.

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

Signed-off-by: David Disseldorp 
Reviewed-by: Björn Jacke 

Autobuild-User(master): David Disseldorp 
Autobuild-Date(master): Wed Sep  2 16:24:50 UTC 2020 on sn-devel-184

---

Summary of changes:
 source3/wscript | 27 ---
 1 file changed, 12 insertions(+), 15 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/wscript b/source3/wscript
index 5e94c6f6c71..335cfd797f1 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -95,7 +95,6 @@ def options(opt):
 
 opt.samba_add_onoff_option('glusterfs', with_name="enable", 
without_name="disable", default=True)
 opt.samba_add_onoff_option('cephfs', with_name="enable", 
without_name="disable", default=True)
-opt.samba_add_onoff_option('snapper', with_name="enable", 
without_name="disable", default=True)
 
 opt.add_option('--enable-vxfs',
   help=("enable support for VxFS (default=no)"),
@@ -1774,17 +1773,6 @@ main() {
 if Options.options.enable_vxfs:
 conf.DEFINE('HAVE_VXFS', '1')
 
-if Options.options.with_snapper:
-if conf.CHECK_CFG(package='dbus-1', args='--cflags --libs',
-  msg='Checking for dbus', uselib_store="DBUS-1"):
-if (conf.CHECK_HEADERS('dbus/dbus.h', lib='dbus-1')
-  and conf.CHECK_LIB('dbus-1', 
shlib=True)):
-conf.DEFINE('HAVE_DBUS', '1')
-else:
-conf.fatal("vfs_snapper is enabled but prerequisite DBUS libraries 
"
-   "or headers not found. Use --disable-snapper to disable 
"
-   "vfs_snapper support.");
-
 if conf.CHECK_CFG(package='liburing', args='--cflags --libs',
   msg='Checking for liburing package', 
uselib_store="URING"):
 if (conf.CHECK_HEADERS('liburing.h', lib='uring')
@@ -1954,6 +1942,9 @@ main() {
   vfs_commit vfs_worm vfs_crossrename 
vfs_linux_xfs_sgid
   vfs_time_audit vfs_offline 
vfs_virusfilter vfs_widelinks
   '''))
+if host_os.rfind('linux') > -1:
+default_shared_modules.extend(['vfs_snapper'])
+
 default_shared_modules.extend(TO_LIST('idmap_tdb2 idmap_script'))
 # these have broken dependencies
 forced_shared_modules.extend(TO_LIST('idmap_autorid idmap_rid idmap_hash'))
@@ -2023,9 +2014,6 @@ main() {
 if conf.CONFIG_SET('HAVE_VXFS'):
 default_shared_modules.extend(TO_LIST('vfs_vxfs'))
 
-if conf.CONFIG_SET('HAVE_DBUS'):
-default_shared_modules.extend(TO_LIST('vfs_snapper'))
-
 explicit_shared_modules = TO_LIST(Options.options.shared_modules, 
delimiter=',')
 explicit_static_modules = TO_LIST(Options.options.static_modules, 
delimiter=',')
 
@@ -2146,4 +2134,13 @@ main() {
 Logs.info("%s: %s" % (static_env, ','.join(conf.env[static_env])))
 Logs.info("%s: %s" % (shared_env, ','.join(conf.env[shared_env])))
 
+if (('vfs_snapper' in shared_list.get('vfs', []) or 'vfs_snapper' in 
static_list.get('vfs', []))
+and not (conf.CHECK_CFG(package='dbus-1', args='--cflags --libs',
+msg='Checking for dbus', uselib_store="DBUS-1")
+ and conf.CHECK_HEADERS('dbus/dbus.h', lib='dbus-1')
+ and conf.CHECK_LIB('dbus-1', shlib=True))):
+conf.fatal("vfs_snapper is enabled but prerequisite dbus-1 package not 
"
+   "found. Use --with-shared-modules=!vfs_snapper to disable "
+   "vfs_snapper support.")
+
 conf.SAMBA_CONFIG_H('include/config.h')


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch master updated

2020-04-27 Thread David Disseldorp
The branch, master has been updated
   via  1f97aeac6b8 traffic_packets: fix SyntaxWarning: "is" with a literal
  from  e7dfe87ac64 smbd: unix_convert_step(). Fix use of state->end as a 
boolean, always compare with NULL.

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


- Log -
commit 1f97aeac6b866ff4ecdb704ecf15130eb2f87a9a
Author: David Disseldorp 
Date:   Tue Apr 21 14:43:14 2020 +0200

traffic_packets: fix SyntaxWarning: "is" with a literal

Python 3.8 adds this warning via https://bugs.python.org/issue34850:
  the "is" and "is not" operator sometimes is used with string and
  numerical literals. This code "works" on CPython by accident, because
  of caching on different levels (small integers and strings caches,
  interned strings, deduplicating constants at compile time). But it
  shouldn't work on other implementations, and can not work even on
  early or future CPython versions.
    
    Reported-by: L. van Belle 
Signed-off-by: David Disseldorp 
Reviewed-by: Noel Power 

Autobuild-User(master): David Disseldorp 
Autobuild-Date(master): Mon Apr 27 12:19:59 UTC 2020 on sn-devel-184

---

Summary of changes:
 python/samba/emulate/traffic_packets.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


Changeset truncated at 500 lines:

diff --git a/python/samba/emulate/traffic_packets.py 
b/python/samba/emulate/traffic_packets.py
index a585482ccd4..95c7465d2fc 100644
--- a/python/samba/emulate/traffic_packets.py
+++ b/python/samba/emulate/traffic_packets.py
@@ -336,7 +336,7 @@ def packet_ldap_3(packet, conversation, context):
 
 # try to guess the search expression (don't bother for base searches, as
 # they're only looking up a single object)
-if (filter is None or filter is '') and scope != SCOPE_BASE:
+if (filter is None or filter == '') and scope != SCOPE_BASE:
 filter = context.guess_search_filter(attrs, dn_sig, dn)
 
 samdb.search(dn,


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch master updated

2020-01-11 Thread David Disseldorp
The branch, master has been updated
   via  e61ddeef4cc vfs_ceph: drop support for pre-hammer libcephfs versions
   via  888002f99e1 vfs_ceph: drop support for building without statx
  from  748379c66bc s3: smbd: msdfs: Change create_msdfs_link() to call 
SMB_VFS_CREATE_DFS_PATHAT().

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


- Log -
commit e61ddeef4cc35402b623dbb655ab06058866bfc4
Author: David Disseldorp 
Date:   Thu Jan 9 16:01:22 2020 +0100

vfs_ceph: drop support for pre-hammer libcephfs versions

The last Ceph Hammer release (0.94.10) came in Feb 2017, as is no longer
supported upstream. Drop support for building Samba vfs_ceph against
version prior to 0.94.0.

Signed-off-by: David Disseldorp 
Reviewed-by: Samuel Cabrero 

Autobuild-User(master): David Disseldorp 
Autobuild-Date(master): Sat Jan 11 14:59:36 UTC 2020 on sn-devel-184

commit 888002f99e113bceec5329b0962b4068e0df49ce
Author: David Disseldorp 
Date:   Thu Jan 9 17:11:39 2020 +0100

vfs_ceph: drop support for building without statx

libcephfs statx became available with the Kraken (11.2.0) release of
Ceph in Jan 2017. Versions prior to this are no longer supported
upstream, so we can drop support within Samba vfs_ceph.

Signed-off-by: David Disseldorp 
Reviewed-by: Samuel Cabrero 

---

Summary of changes:
 source3/modules/vfs_ceph.c | 141 -
 source3/wscript|  10 ++--
 2 files changed, 5 insertions(+), 146 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_ceph.c b/source3/modules/vfs_ceph.c
index 848e369e5c2..e73e3ab4f2e 100644
--- a/source3/modules/vfs_ceph.c
+++ b/source3/modules/vfs_ceph.c
@@ -294,11 +294,7 @@ static uint32_t cephwrap_fs_capabilities(struct 
vfs_handle_struct *handle,
 {
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;
 }
@@ -669,7 +665,6 @@ static int cephwrap_fsync_recv(struct tevent_req *req,
return 0;
 }
 
-#ifdef HAVE_CEPH_STATX
 #define SAMBA_STATX_ATTR_MASK  (CEPH_STATX_BASIC_STATS|CEPH_STATX_BTIME)
 
 static void init_stat_ex_from_ceph_statx(struct stat_ex *dst, const struct 
ceph_statx *stx)
@@ -809,126 +804,6 @@ static int cephwrap_ntimes(struct vfs_handle_struct 
*handle,
return result;
 }
 
-#else /* HAVE_CEPH_STATX */
-
-static int cephwrap_stat(struct vfs_handle_struct *handle,
-   struct smb_filename *smb_fname)
-{
-   int result = -1;
-   struct stat stbuf;
-
-   DBG_DEBUG("[CEPH] stat(%p, %s)\n", handle, 
smb_fname_str_dbg(smb_fname));
-
-   if (smb_fname->stream_name) {
-   errno = ENOENT;
-   return result;
-   }
-
-   result = ceph_stat(handle->data, smb_fname->base_name, (struct stat *) 
);
-   DBG_DEBUG("[CEPH] stat(...) = %d\n", result);
-   if (result < 0) {
-   WRAP_RETURN(result);
-   }
-
-   DBG_DEBUG("[CEPH]\tstbuf = {dev = %llu, ino = %llu, mode = 0x%x, nlink 
= %llu, "
-  "uid = %d, gid = %d, rdev = %llu, size = %llu, blksize = 
%llu, "
-  "blocks = %llu, atime = %llu, mtime = %llu, ctime = %llu}\n",
-  llu(stbuf.st_dev), llu(stbuf.st_ino), stbuf.st_mode, 
llu(stbuf.st_nlink),
-  stbuf.st_uid, stbuf.st_gid, llu(stbuf.st_rdev), 
llu(stbuf.st_size), llu(stbuf.st_blksize),
-  llu(stbuf.st_blocks), llu(stbuf.st_atime), 
llu(stbuf.st_mtime), llu(stbuf.st_ctime));
-
-   init_stat_ex_from_stat(
-   _fname->st, ,
-   lp_fake_directory_create_times(SNUM(handle->conn)));
-   DBG_DEBUG("[CEPH] mode = 0x%x\n", smb_fname->st.st_ex_mode);
-   return result;
-}
-
-static int cephwrap_fstat(struct vfs_handle_struct *handle, files_struct *fsp, 
SMB_STRUCT_STAT *sbuf)
-{
-   int result = -1;
-   struct stat stbuf;
-
-   DBG_DEBUG("[CEPH] fstat(%p, %d)\n", handle, fsp->fh->fd);
-   result = ceph_fstat(handle->data, fsp->fh->fd, (struct stat *) );
-   DBG_DEBUG("[CEPH] fstat(...) = %d\n", result);
-   if (result < 0) {
-   WRAP_RETURN(result);
-   }
-
-   DBG_DEBUG("[CEPH]\tstbuf = {dev = %llu, ino = %llu, mode = 0x%x, nlink 
= %llu, "
-  "uid = %d, gid = %d, rdev = %llu, size = %llu, blksize = 
%llu, "
-  "blocks = %llu, atime = %llu, mtime = %llu, ctime = %llu}\n",
-  llu(stbuf.st_dev), llu(stbuf.st_ino), stbuf.st_mode, 
llu(s

[SCM] Samba Shared Repository - branch master updated

2020-01-02 Thread David Disseldorp
The branch, master has been updated
   via  1d0ffcf30e6 smbd: Remove an unused parameter from defer_open()
   via  ed3ee452549 smbd: Avoid a "? True : False"
   via  5954a0688ae lsasd: Align integer types
   via  fd406528b79 dsdb: Align integer types
   via  f53c8fbd7ff audit_log: Align integer types
   via  605bb4e9077 ntlm_auth: Fix a DEBUG message
   via  ba97f408d81 lib: Remove an unused variable from 
security_token_debug()
  from  9edf15afc21 ctdb-tests: Skip some tests that don't work with IPv6

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


- Log -
commit 1d0ffcf30e625e7570daa800cf5adf3113c99ce5
Author: Volker Lendecke 
Date:   Sun Dec 22 18:20:12 2019 +0100

smbd: Remove an unused parameter from defer_open()

Signed-off-by: Volker Lendecke 
Reviewed-by: David Disseldorp 

Autobuild-User(master): David Disseldorp 
Autobuild-Date(master): Fri Jan  3 01:30:24 UTC 2020 on sn-devel-184

commit ed3ee452549f5c25800dd7da1c6dc30a826fe28f
Author: Volker Lendecke 
Date:   Mon Dec 16 16:47:38 2019 +0100

smbd: Avoid a "? True : False"

VALID_STAT() already is a boolean expression

Signed-off-by: Volker Lendecke 
    Reviewed-by: David Disseldorp 

commit 5954a0688ae7fa992f8b5a19793b8662ca2794e1
Author: Volker Lendecke 
Date:   Sat Dec 7 14:13:04 2019 +0100

lsasd: Align integer types

Signed-off-by: Volker Lendecke 
    Reviewed-by: David Disseldorp 

commit fd406528b79a2fe4aefe0e04495cdaebe381e3d1
Author: Volker Lendecke 
Date:   Sun Dec 1 16:21:12 2019 +0100

dsdb: Align integer types

Signed-off-by: Volker Lendecke 
    Reviewed-by: David Disseldorp 

commit f53c8fbd7ff2be62c1c488cd56507516d85c670d
Author: Volker Lendecke 
Date:   Sun Dec 1 16:10:18 2019 +0100

audit_log: Align integer types

Signed-off-by: Volker Lendecke 
    Reviewed-by: David Disseldorp 

commit 605bb4e9077aca1fa06c1c5beca42ca3b91308f7
Author: Volker Lendecke 
Date:   Mon Dec 30 13:56:14 2019 +0100

ntlm_auth: Fix a DEBUG message

This is not routine auth_generic_prepare

Signed-off-by: Volker Lendecke 
    Reviewed-by: David Disseldorp 

commit ba97f408d81e98863732a8c6bcb59de7a8fedd6b
Author: Volker Lendecke 
Date:   Thu Jan 2 11:15:48 2020 +0100

lib: Remove an unused variable from security_token_debug()

Signed-off-by: Volker Lendecke 
    Reviewed-by: David Disseldorp 

---

Summary of changes:
 libcli/security/security_token.c|  8 
 source3/rpc_server/lsasd.c  |  2 +-
 source3/smbd/open.c |  8 +++-
 source3/utils/ntlm_auth.c   |  2 +-
 source4/dsdb/samdb/ldb_modules/audit_log.c  |  2 +-
 source4/dsdb/samdb/ldb_modules/encrypted_secrets.c  | 13 ++---
 .../dsdb/samdb/ldb_modules/tests/test_encrypted_secrets.c   |  3 ++-
 7 files changed, 14 insertions(+), 24 deletions(-)


Changeset truncated at 500 lines:

diff --git a/libcli/security/security_token.c b/libcli/security/security_token.c
index de75033deae..ef6ee0ff661 100644
--- a/libcli/security/security_token.c
+++ b/libcli/security/security_token.c
@@ -46,7 +46,6 @@ struct security_token *security_token_initialise(TALLOC_CTX 
*mem_ctx)
 /
 void security_token_debug(int dbg_class, int dbg_lev, const struct 
security_token *token)
 {
-   TALLOC_CTX *mem_ctx;
uint32_t i;
 
if (!token) {
@@ -54,11 +53,6 @@ void security_token_debug(int dbg_class, int dbg_lev, const 
struct security_toke
return;
}
 
-   mem_ctx = talloc_init("security_token_debug()");
-   if (!mem_ctx) {
-   return;
-   }
-
DEBUGC(dbg_class, dbg_lev, ("Security token SIDs (%lu):\n",
   (unsigned long)token->num_sids));
for (i = 0; i < token->num_sids; i++) {
@@ -70,8 +64,6 @@ void security_token_debug(int dbg_class, int dbg_lev, const 
struct security_toke
}
 
security_token_debug_privileges(dbg_class, dbg_lev, token);
-
-   talloc_free(mem_ctx);
 }
 
 /* These really should be cheaper... */
diff --git a/source3/rpc_server/lsasd.c b/source3/rpc_server/lsasd.c
index 0d8ba304f67..556a8299072 100644
--- a/source3/rpc_server/lsasd.c
+++ b/source3/rpc_server/lsasd.c
@@ -597,7 +597,7 @@ static bool lsasd_create_sockets(struct tevent_context 
*ev_ctx,
struct dcerpc_binding_vector *v, *v_orig;
TALLOC_CTX *tmp_ctx;
NTSTATUS status;
-   uint32_t i;
+   int i;
int fd = -1;
int rc;
bool ok = false;
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
in

[SCM] Samba Shared Repository - branch master updated

2019-09-09 Thread David Disseldorp
The branch, master has been updated
   via  560c3abf453 s3:smbcontrol: avoid printing NULL help strings
  from  3bd68261eca ctdb-eventscripts: Remove non-posix -v option to mkdir

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


- Log -
commit 560c3abf453597794e5ddf3782bc05d8ba4e5299
Author: David Disseldorp 
Date:   Sun Sep 8 15:08:54 2019 +0200

s3:smbcontrol: avoid printing NULL help strings

Some smbcontrol commands leave the .help pointer NULL, resulting in the
following usage text:
disconnect-dc (null)
notify-cleanup(null)
...
msg-cleanup   (null)

Improve this by printing an empty string instead.

Signed-off-by: David Disseldorp 
Reviewed-by: Douglas Bagnall 

Autobuild-User(master): David Disseldorp 
Autobuild-Date(master): Mon Sep  9 10:32:53 UTC 2019 on sn-devel-184

---

Summary of changes:
 source3/utils/smbcontrol.c | 10 +++---
 1 file changed, 7 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/utils/smbcontrol.c b/source3/utils/smbcontrol.c
index 739ee93e28b..1435cc57d0a 100644
--- a/source3/utils/smbcontrol.c
+++ b/source3/utils/smbcontrol.c
@@ -1562,9 +1562,13 @@ static void usage(poptContext pc)
fprintf(stderr, "\n");
fprintf(stderr, " is one of:\n");
 
-   for (i = 0; msg_types[i].name; i++) 
-   fprintf(stderr, "\t%-30s%s\n", msg_types[i].name, 
-   msg_types[i].help);
+   for (i = 0; msg_types[i].name; i++) {
+   const char *help = msg_types[i].help;
+   if (help == NULL) {
+   help = "";
+   }
+   fprintf(stderr, "\t%-30s%s\n", msg_types[i].name, help);
+   }
 
fprintf(stderr, "\n");
 


-- 
Samba Shared Repository



[SCM] Samba Website Repository - branch master updated

2019-09-02 Thread David Disseldorp
The branch, master has been updated
   via  f12bbb4 team: fix alphabetical order
  from  11b893d Add Aurélien

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


- Log -
commit f12bbb4be1b671fc2b4f9ac8960a7e65db186cfa
Author: David Disseldorp 
Date:   Mon Sep 2 16:10:59 2019 +0200

team: fix alphabetical order

Signed-off-by: David Disseldorp 

---

Summary of changes:
 team/index.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


Changeset truncated at 500 lines:

diff --git a/team/index.html b/team/index.html
index 46875ae..f2d7450 100755
--- a/team/index.html
+++ b/team/index.html
@@ -47,10 +47,10 @@ mailing list and start contributing to the development 
of Samba.
 
 
 
-mailto:aap...@samba.org;>Aurlien Aptel(https://www.suse.com/;>SUSE)
 https://www.samba.org/~obnox/;>Michael Adam(https://www.redhat.com/;>Red Hat)
 https://www.samba.org/~jra;>Jeremy Allison
 mailto:a...@samba.org;>Christian Ambach
+mailto:aap...@samba.org;>Aurlien Aptel(https://www.suse.com/;>SUSE)
 http://halo.gen.nz/;>Douglas Bagnall(http://catalyst.net.nz/what-we-offer/enterprise-solutions/samba;>Catalyst)
 https://www.samba.org/~abartlet/;>Andrew Bartlett(http://catalyst.net.nz/what-we-offer/enterprise-solutions/samba;>Catalyst)
 mailto:bbaumb...@samba.org;>Bjrn Baumbach(https://www.sernet.de/en/;>SerNet)


-- 
Samba Website Repository



[SCM] Samba Website Repository - branch master updated

2019-09-02 Thread David Disseldorp
The branch, master has been updated
   via  11b893d Add Aurélien
  from  2578900 Add Samba 4.9.12.

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


- Log -
commit 11b893d9b85e656df1c1490c28b6d93590f5b7d1
Author: David Disseldorp 
Date:   Mon Sep 2 15:50:56 2019 +0200

Add Aurélien

Signed-off-by: David Disseldorp 

---

Summary of changes:
 team/index.html | 9 +
 1 file changed, 5 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/team/index.html b/team/index.html
index ccdbb6c..46875ae 100755
--- a/team/index.html
+++ b/team/index.html
@@ -47,6 +47,7 @@ mailing list and start contributing to the development of 
Samba.
 
 
 
+mailto:aap...@samba.org;>Aurlien Aptel(https://www.suse.com/;>SUSE)
 https://www.samba.org/~obnox/;>Michael Adam(https://www.redhat.com/;>Red Hat)
 https://www.samba.org/~jra;>Jeremy Allison
 mailto:a...@samba.org;>Christian Ambach
@@ -58,7 +59,7 @@ mailing list and start contributing to the development of 
Samba.
 mailto:k...@samba.org;>Kai Blin
 mailto:s...@samba.org;>Ralph Bhme(http://www.sernet.de/en/;>SerNet)
 mailto:a...@samba.org;>Alexander Bokovoy(https://www.redhat.com/;>Red Hat)
-Samuel Cabrero
+Samuel Cabrero(https://www.suse.com/;>SUSE)
 https://www.samba.org/~gd;>Gnther Deschner(https://www.redhat.com/;>Red Hat)
 mailto:dd...@samba.org;>David Disseldorp(https://www.suse.com/;>SUSE)
 mailto:sfre...@samba.org;>Steve French
@@ -69,19 +70,19 @@ mailing list and start contributing to the development 
of Samba.
 https://www.samba.org/~jlayton/jlayton_resume.html;>Jeff 
Layton
 mailto:v...@samba.org;>Volker Lendecke(http://www.sernet.de/en/;>SerNet)
 mailto:h...@samba.org;>Herb Lewis
-mailto:derr...@samba.org;>Derrell Lipman
 
 
 
 
+mailto:derr...@samba.org;>Derrell Lipman
 mailto:g...@samba.org;>Gary Lockyer(http://catalyst.net.nz/what-we-offer/enterprise-solutions/samba;>Catalyst)
 mailto:j...@samba.org;>Jim McDonough(https://www.suse.com/;>SUSE)
 mailto:me...@samba.org;>Stefan Metzmacher(https://www.sernet.de/en/;>SerNet)
 mailto:mmuehlf...@samba.org;>Marc Muehlfeld
 mailto:m...@samba.org;>Matthieu Patou
 Rowland Penny
-Noel Power
-mailto:jar...@samba.org;>José A. Rivera(https://www.redhat.com/;>Red Hat)
+Noel Power(https://www.suse.com/;>SUSE)
+mailto:jar...@samba.org;>Jos A. Rivera(https://www.redhat.com/;>Red Hat)
 http://ozlabs.org/~rusty/;>Rusty Russell
 Garming Sam(http://catalyst.net.nz/what-we-offer/enterprise-solutions/samba;>Catalyst)
 mailto:c...@samba.org;>Christof Schmitt


-- 
Samba Website Repository



[SCM] Samba Shared Repository - branch master updated

2019-08-11 Thread David Disseldorp
The branch, master has been updated
   via  e6b7d782020 s3: VFS: vfs_snapper: Make setxattr return errno = 
EROFS on a shadow copy path.
   via  3beffd18add s3: VFS: vfs_snapper: Make removexattr return errno = 
EROFS on a shadow copy path.
   via  5d791718532 s3: VFS: vfs_snapper: Make chflags return errno = EROFS 
on a shadow copy path.
   via  2022338b7f9 s3: VFS: vfs_snapper: Make rmdir return errno = EROFS 
on a shadow copy path.
   via  6539d3be92f s3: VFS: vfs_snapper: Make mkdir return errno = EROFS 
on a shadow copy path.
   via  f5dbda6f327 s3: VFS: vfs_snapper: Make mknod return errno = EROFS 
on a shadow copy path.
   via  78b3784f3ff s3: VFS: vfs_snapper: Make ntimes return errno = EROFS 
on a shadow copy path.
   via  872cd6fbda9 s3: VFS: vfs_snapper: Make chown return errno = EROFS 
on a shadow copy path.
   via  8eb79cd0524 s3: VFS: vfs_snapper: Make chmod return errno = EROFS 
on a shadow copy path.
   via  0b64e84c01a s3: VFS: vfs_snapper: Make unlink return errno = EROFS 
on a shadow copy path.
  from  9f193b747f3 loadparm: fix mem leak found by ASAN

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


- Log -
commit e6b7d782020e86fc8e28438c969a2e9e1da288f1
Author: Jeremy Allison 
Date:   Fri Aug 9 10:32:41 2019 -0700

s3: VFS: vfs_snapper: Make setxattr return errno = EROFS on a shadow copy 
path.

smbd has no business modifying a shadow copy filesystem, it should be 
read-only.

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

Autobuild-User(master): David Disseldorp 
Autobuild-Date(master): Mon Aug 12 01:18:45 UTC 2019 on sn-devel-184

commit 3beffd18adddbf7f4c1e01e68440a760e866183f
Author: Jeremy Allison 
Date:   Fri Aug 9 10:31:38 2019 -0700

s3: VFS: vfs_snapper: Make removexattr return errno = EROFS on a shadow 
copy path.

smbd has no business modifying a shadow copy filesystem, it should be 
read-only.

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

commit 5d791718532502ce1ec79ccd2a9b129f73a5
Author: Jeremy Allison 
Date:   Fri Aug 9 10:30:19 2019 -0700

s3: VFS: vfs_snapper: Make chflags return errno = EROFS on a shadow copy 
path.

smbd has no business modifying a shadow copy filesystem, it should be 
read-only.

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

commit 2022338b7f9d6e44c43f3d8c4280cfcca346514c
Author: Jeremy Allison 
Date:   Fri Aug 9 10:29:23 2019 -0700

s3: VFS: vfs_snapper: Make rmdir return errno = EROFS on a shadow copy path.

smbd has no business modifying a shadow copy filesystem, it should be 
read-only.

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

commit 6539d3be92f044174b862e6cbb04b5ca47651ff4
Author: Jeremy Allison 
Date:   Fri Aug 9 10:27:25 2019 -0700

s3: VFS: vfs_snapper: Make mkdir return errno = EROFS on a shadow copy path.

smbd has no business modifying a shadow copy filesystem, it should be 
read-only.

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

commit f5dbda6f32771afbd44db6dc0d865d3c221b22b4
Author: Jeremy Allison 
Date:   Fri Aug 9 10:26:20 2019 -0700

s3: VFS: vfs_snapper: Make mknod return errno = EROFS on a shadow copy path.

smbd has no business modifying a shadow copy filesystem, it should be 
read-only.

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

commit 78b3784f3ffd1c76a4a41f95cbcc6fe4c68b012f
Author: Jeremy Allison 
Date:   Fri Aug 9 10:25:14 2019 -0700

s3: VFS: vfs_snapper: Make ntimes return errno = EROFS on a shadow copy 
path.

smbd has no business modifying a shadow copy filesystem, it should be 
read-only.

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

commit 872cd6fbda959936d6b0c3b3e403377837c3abba
Author: Jeremy Allison 
Date:   Fri Aug 9 10:24:11 2019 -0700

s3: VFS: vfs_snapper: Make chown return errno = EROFS on a shadow copy path.

smbd has no business modifying a shadow copy filesystem, it should be 
read-only.

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

commit 8eb79cd0524e4a9792017ca7999085b5cd6f01c4
Author: Jeremy Allison 
Date:   Fri Aug 9 10:19:31 2019 -0700

s3: VFS: vfs_snapper: Make chmod return errno = EROFS on a shadow copy path.

smbd has no business modifying a shadow copy filesystem, it should be 
read-only.

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

commit 0b64e84c01a36302a2298c1d1af4c7f4c41ed6eb
Author: Jeremy Allison 
Date:   Fri Aug 9 10:07:04 2019 -0700

s3: VFS: vfs_snapper: Make unlink return errno = EROFS on a shadow copy 
path.

smbd has no business modifying a shadow copy filesystem, it should be 
read-only.

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

[SCM] Samba Shared Repository - branch master updated

2019-06-25 Thread David Disseldorp
The branch, master has been updated
   via  2436496e71b client: enable allinfo and altname tab completion
  from  05667d36de7 s3: torture: Add POSIX-ACL-OPLOCK test to check 
interaction of posix ACL operations with an oplocked Windows handle.

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


- Log -
commit 2436496e71be877ded851a9333606d24665a1083
Author: David Disseldorp 
Date:   Mon May 7 16:02:29 2018 +0200

client: enable allinfo and altname tab completion

Should tab-complete a single remote path.

Signed-off-by: David Disseldorp 
Reviewed-by: Andreas Schneider 

Autobuild-User(master): David Disseldorp 
Autobuild-Date(master): Tue Jun 25 10:55:45 UTC 2019 on sn-devel-184

---

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


Changeset truncated at 500 lines:

diff --git a/source3/client/client.c b/source3/client/client.c
index a69ab5daa76..7a7ecd92eb6 100644
--- a/source3/client/client.c
+++ b/source3/client/client.c
@@ -5535,8 +5535,8 @@ static struct {
 } commands[] = {
   {"?",cmd_help,"[command] give help on a command",{COMPL_NONE,COMPL_NONE}},
   {"allinfo",cmd_allinfo," show all available info",
-   {COMPL_NONE,COMPL_NONE}},
-  {"altname",cmd_altname," show alt name",{COMPL_NONE,COMPL_NONE}},
+   {COMPL_REMOTE,COMPL_NONE}},
+  {"altname",cmd_altname," show alt name",{COMPL_REMOTE,COMPL_NONE}},
   {"archive",cmd_archive,"\n0=ignore archive bit\n1=only get archive 
files\n2=only get archive files and reset archive bit\n3=get all files and 
reset archive bit",{COMPL_NONE,COMPL_NONE}},
   {"backup",cmd_backup,"toggle backup intent state",{COMPL_NONE,COMPL_NONE}},
   {"blocksize",cmd_block,"blocksize  (default 
20)",{COMPL_NONE,COMPL_NONE}},


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch master updated

2019-05-14 Thread David Disseldorp
The branch, master has been updated
   via  9345d11c44e docs: add vfs_ceph_snapshots manpage
   via  76f3b194c25 vfs: add ceph_snapshots module
   via  76d7d05b1da vfs_ceph: drop fdopendir handler
  from  43958af1d50 CVE-2018-16860 Heimdal KDC: Reject PA-S4U2Self with 
unkeyed checksum

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


- Log -
commit 9345d11c44e55e9ad1eb6b55975d04561f5d2ba3
Author: David Disseldorp 
Date:   Wed Mar 27 15:57:45 2019 +0100

docs: add vfs_ceph_snapshots manpage

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

Autobuild-User(master): David Disseldorp 
Autobuild-Date(master): Tue May 14 23:31:27 UTC 2019 on sn-devel-184

commit 76f3b194c25e8d388cde2da971d116479ac63d9d
Author: David Disseldorp 
Date:   Tue Mar 26 16:35:18 2019 +0100

vfs: add ceph_snapshots module

vfs_ceph_snapshots is a module for accessing CephFS snapshots as
Previous Versions. The module is separate from vfs_ceph, so that it can
also be used atop a CephFS kernel backed share with vfs_default.

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

commit 76d7d05b1da6c0703b1c2bade0c4467c7cc1adec
Author: David Disseldorp 
Date:   Wed Mar 27 13:10:04 2019 +0100

vfs_ceph: drop fdopendir handler

libcephfs doesn't currently offer an fdopendir equivalent, so the
existing implementation peeks at fsp->fsp_name->base_name, which can
break if vfs_ceph is used under a separate path-munging VFS module.

Return ENOSYS instead and rely on existing OpenDir_fsp() fallback.

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

---

Summary of changes:
 docs-xml/manpages/vfs_ceph_snapshots.8.xml |  130 ++
 docs-xml/wscript_build |1 +
 source3/modules/vfs_ceph.c |   15 +-
 source3/modules/vfs_ceph_snapshots.c   | 1835 
 source3/modules/wscript_build  |8 +
 source3/wscript|5 +
 6 files changed, 1982 insertions(+), 12 deletions(-)
 create mode 100644 docs-xml/manpages/vfs_ceph_snapshots.8.xml
 create mode 100644 source3/modules/vfs_ceph_snapshots.c


Changeset truncated at 500 lines:

diff --git a/docs-xml/manpages/vfs_ceph_snapshots.8.xml 
b/docs-xml/manpages/vfs_ceph_snapshots.8.xml
new file mode 100644
index 000..7fa2806fd95
--- /dev/null
+++ b/docs-xml/manpages/vfs_ceph_snapshots.8.xml
@@ -0,0 +1,130 @@
+
+http://www.samba.org/samba/DTD/samba-doc;>
+
+
+
+   vfs_ceph_snapshots
+   8
+   Samba
+   System Administration tools
+   
+
+
+
+
+   vfs_ceph_snapshots
+   
+   Expose CephFS snapshots as shadow-copies
+   
+
+
+
+   
+   vfs objects = ceph_snapshots
+   
+
+
+
+   DESCRIPTION
+
+   This VFS module is part of the
+   samba
+   8 suite.
+
+   
+   The vfs_ceph_snapshots VFS module exposes
+   CephFS snapshots for use by Samba. When enabled, SMB clients
+   such as Windows Explorer's Previous Versions dialog, can
+   enumerate snaphots and access them via "timewarp" tokens.
+   
+
+   
+   This module can be combined with vfs_ceph,
+   but vfs_ceph_snapshots must be listed first
+   in the vfs objects parameter list.
+   
+
+   
+   CephFS support for ceph.snap.btime virtual extended attributes
+   is required for this module to work properly. This support was
+   added via https://tracker.ceph.com/issues/38838.
+   
+
+
+
+   CONFIGURATION
+
+   
+   When used atop vfs_ceph,
+   path refers to an absolute path within the
+   Ceph filesystem and should not be mounted locally:
+   
+
+   
+   
+   ceph_snapshots 
ceph
+   /non-mounted/cephfs/path
+   no
+   
+
+   
+   vfs_ceph_snapshots can also be used atop a
+   kernel CephFS mounted share path, without
+   vfs_ceph. In this case Samba's default VFS
+   backend vfs_default is used:
+   
+
+   
+   
+   ceph_snapshots
+   /mnt/cephfs/
+   
+
+
+
+   OPTIONS
+
+   
+   
+   ceph:snapdir = subdirectory
+   
+   
+   Allows for the configuration of the special CephFS
+   snapshot subdirectory name. This parameter should only
+   be changed from the ".snap" default if the ceph.conf
+   client snapdir or
+   snapdirname mount option settings
+  

[SCM] Samba Shared Repository - branch master updated

2019-05-10 Thread David Disseldorp
The branch, master has been updated
   via  21dc6f8e8d8 vfs_ceph: fix cephwrap_flistxattr() debug message
  from  a5d1df4a8f9 s3 rpc_client: Fix Asan stack use after scope

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


- Log -
commit 21dc6f8e8d82f84e4afda355a48fbbd39c7fe800
Author: David Disseldorp 
Date:   Fri May 10 13:18:49 2019 +0200

vfs_ceph: fix cephwrap_flistxattr() debug message

The @list buffer may be uninitialised prior to ceph_flistxattr()
invocation, so only log the address.

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

Signed-off-by: David Disseldorp 
Reviewed-by: Andreas Schneider 

Autobuild-User(master): David Disseldorp 
Autobuild-Date(master): Fri May 10 12:59:05 UTC 2019 on sn-devel-184

---

Summary of changes:
 source3/modules/vfs_ceph.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_ceph.c b/source3/modules/vfs_ceph.c
index 57de8bc891a..6f29629566e 100644
--- a/source3/modules/vfs_ceph.c
+++ b/source3/modules/vfs_ceph.c
@@ -1315,7 +1315,8 @@ static ssize_t cephwrap_listxattr(struct 
vfs_handle_struct *handle,
 static ssize_t cephwrap_flistxattr(struct vfs_handle_struct *handle, struct 
files_struct *fsp, char *list, size_t size)
 {
int ret;
-   DBG_DEBUG("[CEPH] flistxattr(%p, %p, %s, %llu)\n", handle, fsp, list, 
llu(size));
+   DBG_DEBUG("[CEPH] flistxattr(%p, %p, %p, %llu)\n",
+ handle, fsp, list, llu(size));
 #if LIBCEPHFS_VERSION_CODE >= LIBCEPHFS_VERSION(0, 94, 0)
ret = ceph_flistxattr(handle->data, fsp->fh->fd, list, size);
 #else


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch master updated

2019-03-15 Thread David Disseldorp
The branch, master has been updated
   via  1375e08580d smbd: fix check_parent_access() talloc stackframe leaks
  from  edd4a23d763 ctdb-version: Simplify version string usage

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


- Log -
commit 1375e08580d642c069170e3e3bddc690bf3c5e89
Author: David Disseldorp 
Date:   Tue Mar 12 18:49:09 2019 +0100

smbd: fix check_parent_access() talloc stackframe leaks

check_parent_access() currently leaks a number of allocations onto the
talloc_tos() context in both success and error paths.

Signed-off-by: David Disseldorp 
Reviewed-by: Volker Lendecke 

Autobuild-User(master): David Disseldorp 
Autobuild-Date(master): Fri Mar 15 11:32:04 UTC 2019 on sn-devel-144

---

Summary of changes:
 source3/smbd/open.c | 31 ++-
 1 file changed, 18 insertions(+), 13 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index bab9286751f..22f6715c6c0 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -258,21 +258,24 @@ NTSTATUS check_parent_access(struct connection_struct 
*conn,
uint32_t name_hash;
bool delete_on_close_set;
int ret;
+   TALLOC_CTX *frame = talloc_stackframe();
 
-   if (!parent_dirname(talloc_tos(),
+   if (!parent_dirname(frame,
smb_fname->base_name,
_dir,
NULL)) {
-   return NT_STATUS_NO_MEMORY;
+   status = NT_STATUS_NO_MEMORY;
+   goto out;
}
 
-   parent_smb_fname = synthetic_smb_fname(talloc_tos(),
+   parent_smb_fname = synthetic_smb_fname(frame,
parent_dir,
NULL,
NULL,
smb_fname->flags);
if (parent_smb_fname == NULL) {
-   return NT_STATUS_NO_MEMORY;
+   status = NT_STATUS_NO_MEMORY;
+   goto out;
}
 
if (get_current_uid(conn) == (uid_t)0) {
@@ -281,13 +284,14 @@ NTSTATUS check_parent_access(struct connection_struct 
*conn,
"on %s. Granting 0x%x\n",
smb_fname_str_dbg(smb_fname),
(unsigned int)access_mask ));
-   return NT_STATUS_OK;
+   status = NT_STATUS_OK;
+   goto out;
}
 
status = SMB_VFS_GET_NT_ACL(conn,
parent_smb_fname,
SECINFO_DACL,
-   talloc_tos(),
+   frame,
_sd);
 
if (!NT_STATUS_IS_OK(status)) {
@@ -295,7 +299,7 @@ NTSTATUS check_parent_access(struct connection_struct *conn,
"%s with error %s\n",
parent_dir,
nt_errstr(status)));
-   return status;
+   goto out;
}
 
/*
@@ -322,14 +326,16 @@ NTSTATUS check_parent_access(struct connection_struct 
*conn,
access_mask,
access_granted,
nt_errstr(status) ));
-   return status;
+   goto out;
}
 
if (!(access_mask & (SEC_DIR_ADD_FILE | SEC_DIR_ADD_SUBDIR))) {
-   return NT_STATUS_OK;
+   status = NT_STATUS_OK;
+   goto out;
}
if (!lp_check_parent_directory_delete_on_close(SNUM(conn))) {
-   return NT_STATUS_OK;
+   status = NT_STATUS_OK;
+   goto out;
}
 
/* Check if the directory has delete-on-close set */
@@ -346,7 +352,7 @@ NTSTATUS check_parent_access(struct connection_struct *conn,
goto out;
}
 
-   lck = get_existing_share_mode_lock(talloc_tos(), id);
+   lck = get_existing_share_mode_lock(frame, id);
if (lck == NULL) {
status = NT_STATUS_OK;
goto out;
@@ -361,8 +367,7 @@ NTSTATUS check_parent_access(struct connection_struct *conn,
status = NT_STATUS_OK;
 
 out:
-   TALLOC_FREE(lck);
-   TALLOC_FREE(parent_smb_fname);
+   TALLOC_FREE(frame);
return status;
 }
 


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch master updated

2019-02-28 Thread David Disseldorp
The branch, master has been updated
   via  5cf0764bc4b libcli/security: add "Owner Rights" calculation to 
access_check_max_allowed()
   via  3ca38d2cd11 s4:torture: add a Maximum Access check with an Owner 
Rights ACE
   via  9f4ee052958 s4:libcli: remember return code from maximum access
  from  c906153cc7a lib: Remove some unused code

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


- Log -
commit 5cf0764bc4b65dbc59d8626760dbe946a2234833
Author: Ralph Boehme 
Date:   Wed Feb 27 18:07:03 2019 +0100

libcli/security: add "Owner Rights" calculation to 
access_check_max_allowed()

This was missing in 44590c1b70c0a24f853c02d5fcdb3c609401e2ca.

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

Signed-off-by: Ralph Boehme 
    Reviewed-by: David Disseldorp 

Autobuild-User(master): David Disseldorp 
Autobuild-Date(master): Thu Feb 28 19:18:16 UTC 2019 on sn-devel-144

commit 3ca38d2cd1189a5040e13ddab016063280be2b4d
Author: Ralph Boehme 
Date:   Thu Feb 28 14:48:02 2019 +0100

s4:torture: add a Maximum Access check with an Owner Rights ACE

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

Signed-off-by: Ralph Boehme 
    Reviewed-by: David Disseldorp 

commit 9f4ee05295827c9a607e1f63694a17906f777176
Author: Ralph Boehme 
Date:   Thu Feb 28 14:47:18 2019 +0100

s4:libcli: remember return code from maximum access

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

Signed-off-by: Ralph Boehme 
    Reviewed-by: David Disseldorp 

---

Summary of changes:
 libcli/security/access_check.c  |  33 +--
 source4/libcli/raw/interfaces.h |   1 +
 source4/libcli/smb2/create.c|   4 +-
 source4/torture/smb2/acls.c | 125 
 4 files changed, 156 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/libcli/security/access_check.c b/libcli/security/access_check.c
index 03a7dca4adf..5d49b718f0c 100644
--- a/libcli/security/access_check.c
+++ b/libcli/security/access_check.c
@@ -110,13 +110,15 @@ static uint32_t access_check_max_allowed(const struct 
security_descriptor *sd,
 {
uint32_t denied = 0, granted = 0;
unsigned i;
-
-   if (security_token_has_sid(token, sd->owner_sid)) {
-   granted |= SEC_STD_WRITE_DAC | SEC_STD_READ_CONTROL;
-   }
+   uint32_t owner_rights_allowed = 0;
+   uint32_t owner_rights_denied = 0;
+   bool owner_rights_default = true;
 
if (sd->dacl == NULL) {
-   return granted & ~denied;
+   if (security_token_has_sid(token, sd->owner_sid)) {
+   granted |= SEC_STD_WRITE_DAC | SEC_STD_READ_CONTROL;
+   }
+   return granted;
}
 
for (i = 0;idacl->num_aces; i++) {
@@ -126,6 +128,18 @@ static uint32_t access_check_max_allowed(const struct 
security_descriptor *sd,
continue;
}
 
+   if (dom_sid_equal(>trustee, _sid_Owner_Rights)) {
+   if (ace->type == SEC_ACE_TYPE_ACCESS_ALLOWED) {
+   owner_rights_allowed |= ace->access_mask;
+   owner_rights_default = false;
+   } else if (ace->type == SEC_ACE_TYPE_ACCESS_DENIED) {
+   owner_rights_denied |= (owner_rights_allowed &
+   ace->access_mask);
+   owner_rights_default = false;
+   }
+   continue;
+   }
+
if (!security_token_has_sid(token, >trustee)) {
continue;
}
@@ -143,6 +157,15 @@ static uint32_t access_check_max_allowed(const struct 
security_descriptor *sd,
}
}
 
+   if (security_token_has_sid(token, sd->owner_sid)) {
+   if (owner_rights_default) {
+   granted |= SEC_STD_WRITE_DAC | SEC_STD_READ_CONTROL;
+   } else {
+   granted |= owner_rights_allowed;
+   granted &= ~owner_rights_denied;
+   }
+   }
+
return granted & ~denied;
 }
 
diff --git a/source4/libcli/raw/interfaces.h b/source4/libcli/raw/interfaces.h
index 732ba1512dc..43a53f834df 100644
--- a/source4/libcli/raw/interfaces.h
+++ b/source4/libcli/raw/interfaces.h
@@ -1779,6 +1779,7 @@ union smb_open {
/* uint32_t blob_size; */
 
/* optional return values matching tagged values in the 
call */
+   uint32_t maximal_access_status;
uint32_t maximal_access;
uint8_t on_

[SCM] Samba Shared Repository - branch master updated

2019-02-27 Thread David Disseldorp
The branch, master has been updated
   via  eb62dc39eb4 docs: fix minor typo in smb.conf "log level" section
   via  f43cc62fb25 vfs_ceph: drop ifdef HAVE_FCHOWN/_FCHMOD
   via  155f1289ba7 vfs_ceph: remove ceph_fallocate/ceph_ftruncate fallback
   via  70329c36ed9 vfs_ceph: fix strict_allocate_ftruncate()
   via  5a7e7280813 vfs_ceph: add missing fallocate hook
  from  4f307f2302b selftest: force running with TZ=UTC

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


- Log -
commit eb62dc39eb48b4e2207c80c232664ca37af9c2e6
Author: David Disseldorp 
Date:   Wed Feb 27 12:09:52 2019 +0100

docs: fix minor typo in smb.conf "log level" section

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

Autobuild-User(master): David Disseldorp 
Autobuild-Date(master): Wed Feb 27 16:22:27 UTC 2019 on sn-devel-144

commit f43cc62fb25d607a489cafd96b21cf0788773bbf
Author: David Disseldorp 
Date:   Tue Feb 26 13:54:21 2019 +0100

vfs_ceph: drop ifdef HAVE_FCHOWN/_FCHMOD

The cephwrap_fchown() and cephwrap_fchmod() wrappers call the
corresponding libcephfs functions. It doesn't make sense to make this
logic dependent on regular fchown()/fchmod() function presence, so remove
the ifdefs.

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

commit 155f1289ba7a4802fbb99fbc9ea90d8bc6cff0c9
Author: David Disseldorp 
Date:   Wed Feb 27 11:52:42 2019 +0100

vfs_ceph: remove ceph_fallocate/ceph_ftruncate fallback

Both libcephfs functions are supported and capable of extending files,
so fallback can be dropped.

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

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

commit 70329c36ed91dd0e50ff66f9b0a85c62ac8a621e
Author: David Disseldorp 
Date:   Tue Feb 26 16:07:27 2019 +0100

vfs_ceph: fix strict_allocate_ftruncate()

The vfs_ceph "strict allocate = yes" ftruncate wrapper may attempt
*local* filesystem ftruncate(). Fix this.

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

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

commit 5a7e7280813559fb70a9fc8e4238cb6015ee3b53
Author: David Disseldorp 
Date:   Tue Feb 26 21:26:27 2019 +0100

vfs_ceph: add missing fallocate hook

SMB_VFS_FALLOCATE() calls atop a vfs_ceph share currently fall through
to vfs_default, which results in a local filesystem I/O attempt using a
libcephfs file-descriptor. Add the missing fallocate hook to vfs_ceph.

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

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

---

Summary of changes:
 docs-xml/smbdotconf/logging/loglevel.xml |   2 +-
 source3/modules/vfs_ceph.c   | 124 +++
 2 files changed, 26 insertions(+), 100 deletions(-)


Changeset truncated at 500 lines:

diff --git a/docs-xml/smbdotconf/logging/loglevel.xml 
b/docs-xml/smbdotconf/logging/loglevel.xml
index 1bc4146dac9..d3bed8a939b 100644
--- a/docs-xml/smbdotconf/logging/loglevel.xml
+++ b/docs-xml/smbdotconf/logging/loglevel.xml
@@ -6,7 +6,7 @@
 debuglevel
 
 
-The value of the parameter (a astring) allows the debug level (logging 
level) to be specified in the 
+The value of the parameter (a string) allows the debug level (logging 
level) to be specified in the
 smb.conf file. 
 
 
diff --git a/source3/modules/vfs_ceph.c b/source3/modules/vfs_ceph.c
index 60afd73efe6..67b8d139891 100644
--- a/source3/modules/vfs_ceph.c
+++ b/source3/modules/vfs_ceph.c
@@ -961,15 +961,9 @@ static int cephwrap_fchmod(struct vfs_handle_struct 
*handle, files_struct *fsp,
int result;
 
DBG_DEBUG("[CEPH] fchmod(%p, %p, %d)\n", handle, fsp, mode);
-
-#if defined(HAVE_FCHMOD)
result = ceph_fchmod(handle->data, fsp->fh->fd, mode);
DBG_DEBUG("[CEPH] fchmod(...) = %d\n", result);
WRAP_RETURN(result);
-#else
-   errno = ENOSYS;
-#endif
-   return -1;
 }
 
 static int cephwrap_chown(struct vfs_handle_struct *handle,
@@ -987,17 +981,11 @@ static int cephwrap_chown(struct vfs_handle_struct 
*handle,
 static int cephwrap_fchown(struct vfs_handle_struct *handle, files_struct 
*fsp, uid_t uid, gid_t gid)
 {
int result;
-#ifdef HAVE_FCHOWN
 
DBG_DEBUG("[CEPH] fchown(%p, %p, %d, %d)\n", handle, fsp, uid, gid);
result = ceph_fchown(handle->data, fsp->fh->fd, uid, gid);
DBG_DEBUG("[CEPH] fchown(...) = %d\n", result);
WRAP_RETURN(result);
-#else
-   errno = ENOSYS;
-   result = -1;
-#endif
-   return result;
 }
 
 static int cephwrap_lchown(struct vfs_handle_struct *handle,
@@

[SCM] Samba Shared Repository - branch master updated

2019-02-09 Thread David Disseldorp
The branch, master has been updated
   via  584dfc15fd3 libsmb,s3/smbd: dump SMB3+ session keys if debug parm 
is set
   via  0732499f23c docs-xml: add "debug encryption" global parm
   via  67825c96473 libcli: add getters for smb2 
{signing,encryption,decryption} keys
  from  7ff94b18e2e s3:vfs: Correctly check if OFD locks should be enabled 
or not

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


- Log -
commit 584dfc15fd33f665a0bd2287a6a981568032ec74
Author: Aurelien Aptel 
Date:   Fri Feb 8 12:13:25 2019 +0100

libsmb,s3/smbd: dump SMB3+ session keys if debug parm is set

Use of previously added smb.conf global param.

Sample usage:

$ smbclient //localhost/scratch --option='debugencryption=yes' \
 -e -mSMB3 -U aaptel%aaptel -c quit
debug encryption: dumping generated session keys
Session Id[] 26 48 BF FD 00 00 00 00 

Session Key   [] 63 D6 CA BC 08 C8 4A D2   45 F6 AE 35 AB 4A B3 3B   
c.J. E..5.J.;
Signing Key   [] 4E FE 35 92 AC 13 14 FC   C9 17 62 B1 82 20 A4 12   
N.5. ..b.. ..
App Key   [] A5 0F F4 8B 2F FB 0D FF   F2 BF EE 39 E6 6D F5 0A   
/... ...9.m..
ServerIn Key  [] 2A 02 7E E1 D3 58 D8 12   4C 63 76 AE 59 17 5A E4   
*.~..X.. Lcv.Y.Z.
ServerOut Key [] 59 F2 5B 7F 66 8F 31 A0   A5 E4 A8 D8 2F BA 00 38   
Y.[.f.1. /..8

We can now simply pass -ouat:smb2_seskey_list:, to
wireshark or tshark:

$ tshark 
-ouat:smb2_seskey_list:2648BFFD,63D6CABC08C84AD245F6AE35AB4AB33B \
  -Y smb2 -r capture.pcap -Tfields -e _ws.col.Info
Negotiate Protocol Response
Negotiate Protocol Request
Negotiate Protocol Response
Session Setup Request, NTLMSSP_NEGOTIATE
Session Setup Response, Error: STATUS_MORE_PROCESSING_REQUIRED, 
NTLMSSP_CHALLENGE
Session Setup Request, NTLMSSP_AUTH, User: WORKGROUP\aaptel
Session Setup Response
Tree Connect Request Tree: \\localhost\IPC$
Tree Connect Response
Decrypted SMB3;Ioctl Request FSCTL_DFS_GET_REFERRALS, File: 
\localhost\scratch
Decrypted SMB3;Ioctl Response, Error: STATUS_NOT_FOUND
Decrypted SMB3;Tree Disconnect Request
Decrypted SMB3;Tree Disconnect Response
Decrypted SMB3;Tree Connect Request Tree: \\localhost\scratch
Decrypted SMB3;Tree Connect Response
Decrypted SMB3;Tree Disconnect Request
Decrypted SMB3;Tree Disconnect Response

For more info on Wireshark decryption support see
https://wiki.samba.org/index.php/Wireshark_Decryption

Signed-off-by: Aurelien Aptel 
Reviewed-by: Noel Power 
Reviewed-by: Ralph Boehme 
Reviewed-by: David Disseldorp 

Autobuild-User(master): David Disseldorp 
Autobuild-Date(master): Sat Feb  9 21:43:25 CET 2019 on sn-devel-144

commit 0732499f23cebe6c5e24f596ff4fe41f8ab1d156
Author: Aurelien Aptel 
Date:   Fri Feb 8 12:04:42 2019 +0100

docs-xml: add "debug encryption" global parm

Add debug option to dump in the log the session id & keys in smbd and
libsmb-based code for offline decryption.

Wireshark can make use of this to decrypt encrypted traffic.

Signed-off-by: Aurelien Aptel 
Reviewed-by: Noel Power 
Reviewed-by: Ralph Boehme 
Reviewed-by: David Disseldorp 

commit 67825c96473ff8731af415683b4a74caca7a6809
Author: Aurelien Aptel 
Date:   Wed Feb 6 19:23:35 2019 +0100

libcli: add getters for smb2 {signing,encryption,decryption} keys

Adds:
- smb2cli_session_signing_key()
- smb2cli_session_encryption_key()
- smb2cli_session_decryption_key()

Signed-off-by: Aurelien Aptel 
Reviewed-by: Noel Power 
Reviewed-by: Ralph Boehme 
Reviewed-by: David Disseldorp 

---

Summary of changes:
 docs-xml/smbdotconf/security/debugencryption.xml | 22 +++
 lib/param/loadparm.c |  2 +
 libcli/smb/smbXcli_base.c| 79 
 libcli/smb/smbXcli_base.h|  9 +++
 source3/libsmb/cliconnect.c  | 57 +
 source3/smbd/smb2_sesssetup.c| 25 
 6 files changed, 194 insertions(+)
 create mode 100644 docs-xml/smbdotconf/security/debugencryption.xml


Changeset truncated at 500 lines:

diff --git a/docs-xml/smbdotconf/security/debugencryption.xml 
b/docs-xml/smbdotconf/security/debugencryption.xml
new file mode 100644
index 000..5b51b4afe0e
--- /dev/null
+++ b/docs-xml/smbdotconf/security/debugencryption.xml
@@ -0,0 +1,22 @@
+http://www.samba.org/samba/DTD/samba-doc;>
+  
+
+  This option will make the smbd server and client code using
+  libsmb (smbclient, smbget, smbspool, ...) dump the Session Id,
+

[SCM] Samba Shared Repository - branch master updated

2019-02-07 Thread David Disseldorp
The branch, master has been updated
   via  eaf63f0b845 docs-xml: "cluster addresses" dns registration
   via  3e25d4d55f8 docs-xml: Update documentation for 'restrict anonymous' 
option
   via  f132c3767ef s3/lib/popt_common: use stack buffer in set_logfile()
   via  901ca24e43a s3/lib/popt_common: don't assume stackframe presence
   via  c824240cd48 lib/debug: retain full string in state.prog_name global
  from  61670169d52 Clean up reference used with PyDict_Setxxx

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


- Log -
commit eaf63f0b845fb766ff243b1a7d0587c9507ab31e
Author: David Disseldorp 
Date:   Tue Jan 29 12:49:28 2019 +0100

docs-xml: "cluster addresses" dns registration

Bug 7871 added functionality to register smb.conf "cluster addresses"
when net ads dns register is called with clustering=yes, but the man
page was not updated. Add documentation for this behaviour.

Signed-off-by: David Disseldorp 
Reviewed-by: Andreas Schneider 
    
    Autobuild-User(master): David Disseldorp 
Autobuild-Date(master): Thu Feb  7 21:33:15 CET 2019 on sn-devel-144

commit 3e25d4d55f85be3323861b9a2f59626246b57182
Author: Andreas Schneider 
Date:   Tue Feb 5 16:08:46 2019 +0100

docs-xml: Update documentation for 'restrict anonymous' option

Signed-off-by: Andreas Schneider 
Reviewed-by: Rowland Penny 
    Reviewed-by: David Disseldorp 

commit f132c3767efd4197ae32a7114a7b91b55759adb4
Author: David Disseldorp 
Date:   Wed Feb 6 12:01:12 2019 +0100

s3/lib/popt_common: use stack buffer in set_logfile()

Signed-off-by: David Disseldorp 
Reviewed-by: Andreas Schneider 

commit 901ca24e43a1b2b441f070e5dc40a6c7ddcba883
Author: David Disseldorp 
Date:   Wed Feb 6 00:58:17 2019 +0100

s3/lib/popt_common: don't assume stackframe presence

popt_common_callback() should be leak-safe if a talloc stackframe isn't
available, as it's invoked early on.

Signed-off-by: David Disseldorp 
Reviewed-by: Andreas Schneider 

commit c824240cd48aea9e0655287c98c8de7c3ffd5f94
Author: David Disseldorp 
Date:   Wed Feb 6 12:39:03 2019 +0100

lib/debug: retain full string in state.prog_name global

setup_logging() retains a global pointer to the provided const string in
state.prog_name, which is later used in the debug_backend->reload()
callback.
Some setup_logging() callers, such as popt_common_callback(),
incorrectly assume that a dynamic buffer is safe to provide as a
prog_name parameter. Fix this by copying the entire string in
setup_logging().

    Signed-off-by: David Disseldorp 
Reviewed-by: Andreas Schneider 

---

Summary of changes:
 docs-xml/smbdotconf/misc/clusteraddresses.xml  | 12 +++---
 docs-xml/smbdotconf/security/restrictanonymous.xml | 45 +++---
 lib/util/debug.c   | 12 --
 source3/lib/popt_common.c  | 42 ++--
 4 files changed, 67 insertions(+), 44 deletions(-)


Changeset truncated at 500 lines:

diff --git a/docs-xml/smbdotconf/misc/clusteraddresses.xml 
b/docs-xml/smbdotconf/misc/clusteraddresses.xml
index d01a4f9004b..66878cdb642 100644
--- a/docs-xml/smbdotconf/misc/clusteraddresses.xml
+++ b/docs-xml/smbdotconf/misc/clusteraddresses.xml
@@ -3,12 +3,12 @@
  type="cmdlist"
  xmlns:samba="http://www.samba.org/samba/DTD/samba-doc;>
 
-   With this parameter you can add additional addresses
-   nmbd will register with a WINS server. These addresses are not
-   necessarily present on all nodes simultaneously, but they will
-   be registered with the WINS server so that clients can contact
-   any of the nodes.
-   
+   With this parameter you can add additional addresses that
+   nmbd will register with a WINS server. Similarly, these
+   addresses will be registered by default when
+   net ads dns register is called with
+   yes
+   configured.
 
 
 
diff --git a/docs-xml/smbdotconf/security/restrictanonymous.xml 
b/docs-xml/smbdotconf/security/restrictanonymous.xml
index 78cafd21d55..06abe7b2bf7 100644
--- a/docs-xml/smbdotconf/security/restrictanonymous.xml
+++ b/docs-xml/smbdotconf/security/restrictanonymous.xml
@@ -3,34 +3,35 @@
  context="G"
  xmlns:samba="http://www.samba.org/samba/DTD/samba-doc;>
 
-The setting of this parameter determines whether user and
-group list information is returned for an anonymous connection.
-and mirrors the effects of the
-
-HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\
-   Control\LSA\RestrictAnonymous
-
-   registry key in Windows 2000 and Windows NT.  When set to 0, user
-  

[SCM] Samba Shared Repository - branch master updated

2019-01-28 Thread David Disseldorp
The branch, master has been updated
   via  e1324580391 tests: don't rely on implicit int return type
   via  f1b43dfe4a7 s3/lib: clean up have_syscall() formatting
   via  45a202a197d s3/lib: don't rely on implicit int return type
  from  232273bfac3 s4:torture: Enforce Printer Class

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


- Log -
commit e13245803918a90c3e4eb074579885888bfc9310
Author: David Disseldorp 
Date:   Sun Jan 27 13:31:16 2019 +0100

tests: don't rely on implicit int return type

Signed-off-by: David Disseldorp 
Reviewed-by: Andreas Schneider 

Autobuild-User(master): David Disseldorp 
Autobuild-Date(master): Tue Jan 29 03:47:27 CET 2019 on sn-devel-144

commit f1b43dfe4a75683d881811bd0830e38e16822d6a
Author: David Disseldorp 
Date:   Sun Jan 27 00:41:28 2019 +0100

s3/lib: clean up have_syscall() formatting

Signed-off-by: David Disseldorp 
Reviewed-by: Andreas Schneider 

commit 45a202a197d7615a6285768545a691cfb05deb22
Author: David Disseldorp 
Date:   Sun Jan 27 00:41:28 2019 +0100

s3/lib: don't rely on implicit int return type

C99 removed this behaviour.

Signed-off-by: David Disseldorp 
Reviewed-by: Andreas Schneider 

---

Summary of changes:
 source3/lib/util_sec.c | 7 ---
 tests/ftruncate.c  | 2 +-
 tests/getgroups.c  | 2 +-
 tests/readlink.c   | 2 +-
 tests/shared_mmap.c| 2 +-
 tests/trivial.c| 2 +-
 6 files changed, 9 insertions(+), 8 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/lib/util_sec.c b/source3/lib/util_sec.c
index 94082697def..974e458b06e 100644
--- a/source3/lib/util_sec.c
+++ b/source3/lib/util_sec.c
@@ -544,12 +544,13 @@ static int have_syscall(void)
samba_setuidx(ID_EFFECTIVE, -1);
 #endif
 
-   if (errno == ENOSYS) return -1;
-   
+   if (errno == ENOSYS) {
+   return -1;
+   }
return 0;
 }
 
-main()
+int main(void)
 {
 if (getuid() != 0) {
 #if (defined(AIX) && defined(USE_SETREUID))
diff --git a/tests/ftruncate.c b/tests/ftruncate.c
index d3e5de3afbe..46123762ef7 100644
--- a/tests/ftruncate.c
+++ b/tests/ftruncate.c
@@ -11,7 +11,7 @@
 #define DATA "conftest.trunc"
 #define LEN 7663
 
-main()
+int main(void)
 {
int *buf;
int fd = open(DATA,O_RDWR|O_CREAT|O_TRUNC,0666);
diff --git a/tests/getgroups.c b/tests/getgroups.c
index 343fd5a184f..ab5648030a8 100644
--- a/tests/getgroups.c
+++ b/tests/getgroups.c
@@ -16,7 +16,7 @@
 #include 
 #include 
 
-main()
+int main(void)
 {
int i;
int *igroups;
diff --git a/tests/readlink.c b/tests/readlink.c
index 3784288ba01..65311c2ff79 100644
--- a/tests/readlink.c
+++ b/tests/readlink.c
@@ -11,7 +11,7 @@
 #define DATA "readlink.test"
 #define FNAME "rdlnk.file"
 
-main()
+int main(void)
 {
char buf[7];
int ret;
diff --git a/tests/shared_mmap.c b/tests/shared_mmap.c
index 40d462302ef..5c32a66c299 100644
--- a/tests/shared_mmap.c
+++ b/tests/shared_mmap.c
@@ -15,7 +15,7 @@
 #define MAP_FILE 0
 #endif
 
-main()
+int main(void)
 {
int *buf;
int i; 
diff --git a/tests/trivial.c b/tests/trivial.c
index f7e96d8109c..a137c8c9727 100644
--- a/tests/trivial.c
+++ b/tests/trivial.c
@@ -1,7 +1,7 @@
 
 void exit(int);
 
-main()
+int main(void)
 {
exit(0);
 }


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch master updated

2018-11-13 Thread David Disseldorp
The branch, master has been updated
   via  3634e20c760 s3: lib: nmbname: Ensure we limit the NetBIOS name 
correctly. CID: 1433607
  from  5a8583ed701 libcli/smb: don't overwrite status code

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


- Log -
commit 3634e20c7603103b0f2e00e5b61cc63f905d780d
Author: Jeremy Allison 
Date:   Mon Nov 12 11:37:31 2018 -0800

s3: lib: nmbname: Ensure we limit the NetBIOS name correctly. CID: 1433607

Firstly, make the exit condition from the loop explicit (we must
never write into byte n, where n >= sizeof(name->name).

Secondly ensure exiting from the loop that n==MAX_NETBIOSNAME_LEN,
as this is the sign of a correct NetBIOS name encoding (RFC1002)
in order to properly read the NetBIOS name type (which is always
encoded in byte 16 == name->name[15]).

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

Autobuild-User(master): David Disseldorp 
Autobuild-Date(master): Tue Nov 13 20:54:56 CET 2018 on sn-devel-144

---

Summary of changes:
 source3/libsmb/nmblib.c | 34 +-
 1 file changed, 21 insertions(+), 13 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/libsmb/nmblib.c b/source3/libsmb/nmblib.c
index ef6177e5209..727939575a7 100644
--- a/source3/libsmb/nmblib.c
+++ b/source3/libsmb/nmblib.c
@@ -207,25 +207,33 @@ static int parse_nmb_name(char *inbuf,int ofs,int length, 
struct nmb_name *name)
unsigned char c1,c2;
c1 = ubuf[offset++]-'A';
c2 = ubuf[offset++]-'A';
-   if ((c1 & 0xF0) || (c2 & 0xF0) || (n > sizeof(name->name)-1))
+   if ((c1 & 0xF0) || (c2 & 0xF0)) {
return(0);
+   }
+   if (n >= sizeof(name->name)) {
+   return 0;
+   }
name->name[n++] = (c1<<4) | c2;
m -= 2;
}
-   name->name[n] = 0;
-
-   if (n==MAX_NETBIOSNAME_LEN) {
-   /* parse out the name type, its always
-* in the 16th byte of the name */
-   name->name_type = ((unsigned char)name->name[15]) & 0xff;
-
-   /* remove trailing spaces */
-   name->name[15] = 0;
-   n = 14;
-   while (n && name->name[n]==' ')
-   name->name[n--] = 0;
+   /*
+* RFC1002: For a valid NetBIOS name, exiting from the above,
+* n *must* be MAX_NETBIOSNAME_LEN (16).
+*/
+   if (n != MAX_NETBIOSNAME_LEN) {
+   return 0;
}
 
+   /* parse out the name type, its always
+* in the 16th byte of the name */
+   name->name_type = ((unsigned char)name->name[15]) & 0xff;
+
+   /* remove trailing spaces */
+   name->name[15] = 0;
+   n = 14;
+   while (n && name->name[n]==' ')
+   name->name[n--] = 0;
+
/* now the domain parts (if any) */
n = 0;
while (ubuf[offset]) {


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch master updated

2018-08-09 Thread David Disseldorp
The branch, master has been updated
   via  4abf348 ctdb: add expiry test for ctdb_mutex_ceph_rados_helper
   via  ce289e8 ctdb_mutex_ceph_rados_helper: fix deadlock via lock renewals
   via  91a89c1 ctdb_mutex_ceph_rados_helper: rename timer_ev to 
ppid_timer_ev
   via  8d30fd5 ctdb_mutex_ceph_rados_helper: use talloc destructor for 
cleanup
   via  85706bd ctdb_mutex_ceph_rados_helper: Set SIGINT signal handler
   via  bd64af6 ctdb/build: link ctdb_mutex_ceph_rados_helper against 
ceph-common
  from  9b10565 Shorten description in vfs_linux_xfs_sgid manual

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


- Log -
commit 4abf348ec4cbb78d3216d5e8c5f3020d4499f10a
Author: David Disseldorp 
Date:   Fri Jul 20 17:20:08 2018 +0200

ctdb: add expiry test for ctdb_mutex_ceph_rados_helper

Kill the ctdb_mutex_ceph_rados_helper with SIGKILL and then confirm
that the lock is automatically released following expiry.

Signed-off-by: David Disseldorp 
Reviewed-by: Samuel Cabrero 
Reviewed-by: Amitay Isaacs 

Autobuild-User(master): David Disseldorp 
Autobuild-Date(master): Thu Aug  9 16:26:36 CEST 2018 on sn-devel-144

commit ce289e89e5c469cf2c5626dc7f2666b945dba3bd
Author: David Disseldorp 
Date:   Thu Jul 19 11:55:23 2018 +0200

ctdb_mutex_ceph_rados_helper: fix deadlock via lock renewals

RADOS locks without expiry persist indefinitely. This results in CTDB
deadlock during failover if the recovery master dies unexpectedly, as
subsequently elected recovery master nodes can't obtain the recovery
lock.
Avoid deadlock by using a lock expiration time (10s by default), and
renewing it periodically.

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

Signed-off-by: David Disseldorp 
Reviewed-by: Samuel Cabrero 
Reviewed-by: Amitay Isaacs 

commit 91a89c146453ca203a83dc2ba555bb93276c4d7f
Author: David Disseldorp 
Date:   Tue Jul 17 23:36:36 2018 +0200

ctdb_mutex_ceph_rados_helper: rename timer_ev to ppid_timer_ev

In preparation for adding a lock refresh timer.

Signed-off-by: David Disseldorp 
Reviewed-by: Samuel Cabrero 
Reviewed-by: Amitay Isaacs 

commit 8d30fd591600ac17c742cd78c7bc4056bba6b877
Author: David Disseldorp 
Date:   Thu Jul 19 18:46:27 2018 +0200

ctdb_mutex_ceph_rados_helper: use talloc destructor for cleanup

Signed-off-by: David Disseldorp 
Reviewed-by: Samuel Cabrero 
Reviewed-by: Amitay Isaacs 

commit 85706bd27535eaa4ec653f99b1910fbd8f2aab88
Author: Samuel Cabrero 
Date:   Fri Jun 15 18:15:53 2018 +0200

ctdb_mutex_ceph_rados_helper: Set SIGINT signal handler

Set a handler for SIGINT to release the lock.

Signed-off-by: Samuel Cabrero 
Reviewed-by: David Disseldorp 
Reviewed-by: Amitay Isaacs 

commit bd64af6b8861f892e6ae2840a493f037d1e0a06c
Author: David Disseldorp 
Date:   Mon Jul 9 14:53:00 2018 +0200

ctdb/build: link ctdb_mutex_ceph_rados_helper against ceph-common

ceph-common linkage is needed with new versions of Ceph.
Also respect the --libcephfs_dir= parameter when provided.

Signed-off-by: David Disseldorp 
Reviewed-by: Amitay Isaacs 

---

Summary of changes:
 ctdb/utils/ceph/ctdb_mutex_ceph_rados_helper.c | 200 ++---
 ctdb/utils/ceph/test_ceph_rados_reclock.sh |  57 ++-
 ctdb/wscript   |  14 +-
 3 files changed, 218 insertions(+), 53 deletions(-)


Changeset truncated at 500 lines:

diff --git a/ctdb/utils/ceph/ctdb_mutex_ceph_rados_helper.c 
b/ctdb/utils/ceph/ctdb_mutex_ceph_rados_helper.c
index 326a0b0..7ef76c2 100644
--- a/ctdb/utils/ceph/ctdb_mutex_ceph_rados_helper.c
+++ b/ctdb/utils/ceph/ctdb_mutex_ceph_rados_helper.c
@@ -1,7 +1,7 @@
 /*
CTDB mutex helper using Ceph librados locks
 
-   Copyright (C) David Disseldorp 2016
+   Copyright (C) David Disseldorp 2016-2018
 
Based on ctdb_mutex_fcntl_helper.c, which is:
Copyright (C) Martin Schwenke 2015
@@ -29,6 +29,11 @@
 #define CTDB_MUTEX_CEPH_LOCK_NAME  "ctdb_reclock_mutex"
 #define CTDB_MUTEX_CEPH_LOCK_COOKIECTDB_MUTEX_CEPH_LOCK_NAME
 #define CTDB_MUTEX_CEPH_LOCK_DESC  "CTDB recovery lock"
+/*
+ * During failover it may take up to  seconds before the
+ * newly elected recovery master can obtain the lock.
+ */
+#define CTDB_MUTEX_CEPH_LOCK_DURATION_SECS_DEFAULT 10
 
 #define CTDB_MUTEX_STATUS_HOLDING "0"
 #define CTDB_MUTEX_STATUS_CONTENDED "1"
@@ -88,24 +93,20 @@ static int ctdb_mutex_rados_ctx_create(const char 
*ceph_cluster_name,
return 0;
 }
 
-static void ctdb_mutex_rados_ctx_destroy(rados_t ceph_cluster,
-rados_ioctx_t ioctx)
-{
-   rados_ioctx_destroy(ioctx);
-   rados_

[SCM] Samba Shared Repository - branch master updated

2018-07-13 Thread David Disseldorp
The branch, master has been updated
   via  c9656fd s3: libsmbclient: Fix cli_splice() fallback when reading 
less than a complete file.
   via  1c8d1cc s3: torture: Test SMB1 cli_splice() fallback path when 
doing a non-full file splice.
  from  c406a5b docs: mention that the echo handler is for SMB1 only

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


- Log -
commit c9656fd2977557ab20ec4e3d87c385a9b2f1bf43
Author: Jeremy Allison 
Date:   Thu Jul 12 12:18:50 2018 -0700

s3: libsmbclient: Fix cli_splice() fallback when reading less than a 
complete file.

We were always asking for SPLICE_BLOCK_SIZE even when the
remaining bytes we wanted were smaller than that. This works
when using cli_splice() on a complete file, as the cli_read()
terminated the read at the right place. We always have the
space to read SPLICE_BLOCK_SIZE bytes so this isn't an overflow.

Found by Bailey Berro 

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

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

Autobuild-User(master): David Disseldorp 
Autobuild-Date(master): Fri Jul 13 14:57:14 CEST 2018 on sn-devel-144

commit 1c8d1cceff852acaca4a0ec0da37b053ed03fe4a
Author: Jeremy Allison 
Date:   Thu Jul 12 12:15:12 2018 -0700

s3: torture: Test SMB1 cli_splice() fallback path when doing a non-full 
file splice.

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

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

---

Summary of changes:
 source3/libsmb/clireadwrite.c |   4 +-
 source3/selftest/tests.py |   5 +-
 source3/torture/torture.c | 153 ++
 3 files changed, 160 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/libsmb/clireadwrite.c b/source3/libsmb/clireadwrite.c
index 00ee09e..67870d8 100644
--- a/source3/libsmb/clireadwrite.c
+++ b/source3/libsmb/clireadwrite.c
@@ -1462,8 +1462,10 @@ static NTSTATUS cli_splice_fallback(TALLOC_CTX *frame,
*written = 0;
 
while (remaining) {
+   size_t to_read = MIN(remaining, SPLICE_BLOCK_SIZE);
+
status = cli_read(srccli, src_fnum,
- (char *)buf, src_offset, SPLICE_BLOCK_SIZE,
+ (char *)buf, src_offset, to_read,
  );
if (!NT_STATUS_IS_OK(status)) {
return status;
diff --git a/source3/selftest/tests.py b/source3/selftest/tests.py
index c5356d8..a061483 100755
--- a/source3/selftest/tests.py
+++ b/source3/selftest/tests.py
@@ -73,7 +73,7 @@ tests = ["FDPASS", "LOCK1", "LOCK2", "LOCK3", "LOCK4", 
"LOCK5", "LOCK6", "LOCK7"
 "DIR", "DIR1", "DIR-CREATETIME", "TCON", "TCONDEV", "RW1", "RW2", 
"RW3", "LARGE_READX", "RW-SIGNING",
 "OPEN", "XCOPY", "RENAME", "DELETE", "DELETE-LN", "WILDDELETE", 
"PROPERTIES", "W2K",
 "TCON2", "IOCTL", "CHKPATH", "FDSESS", "CHAIN1", "CHAIN2", 
"OWNER-RIGHTS",
-"CHAIN3", "PIDHIGH",
+"CHAIN3", "PIDHIGH", "CLI_SPLICE",
 "UID-REGRESSION-TEST", "SHORTNAME-TEST",
 "CASE-INSENSITIVE-CREATE", "SMB2-BASIC", "NTTRANS-FSCTL", 
"SMB2-NEGPROT",
 "SMB2-SESSION-REAUTH", "SMB2-SESSION-RECONNECT", "SMB2-FTRUNCATE",
@@ -90,6 +90,9 @@ for t in tests:
 # this is a negative test to verify that the server rejects
 # access without encryption
 plantestsuite("samba3.smbtorture_s3.crypt_server(nt4_dc).%s" % t, 
"nt4_dc", [os.path.join(samba3srcdir, "script/tests/test_smbtorture_s3.sh"), t, 
'//$SERVER_IP/tmpenc', '$USERNAME', '$PASSWORD', smbtorture3, "", "-l 
$LOCAL_PATH"])
+if t == "CLI_SPLICE":
+# We must test this against the SMB1 fallback.
+plantestsuite("samba3.smbtorture_s3.plain(fileserver).%s" % t, 
"fileserver", [os.path.join(samba3srcdir, 
"script/tests/test_smbtorture_s3.sh"), t, '//$SERVER_IP/tmp', '$USERNAME', 
'$PASSWORD', smbtorture3, "", "-l $LOCAL_PATH", "-mNT1"])
 plantestsuite("samba3.smbtorture_s3.plain(ad_dc_ntvfs).%s" % t, 
"ad_dc_ntvfs", [os.path.join(samba3srcdir, 
"script/tests/test_smbtort

[SCM] Samba Shared Repository - branch master updated

2018-07-09 Thread David Disseldorp
The branch, master has been updated
   via  fe25bc7 libsmbclient: Initialize written in cli_splice_fallback()
   via  2e4878a libsmbclient: Initialize written value before use.
  from  e8b7aec winbind_krb5_localauth: Fix a compiler warning

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


- Log -
commit fe25bc793d30a64f06b19f737c652b0c7389ca92
Author: Bailey Berro 
Date:   Tue Jun 26 13:13:39 2018 -0700

libsmbclient: Initialize written in cli_splice_fallback()

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

Signed-off-by: Bailey Berro 
Reviewed-by: David Mulder 
Reviewed-by: Jeremy Allison 
Reviewed-by: David Disseldorp 

Autobuild-User(master): David Disseldorp 
Autobuild-Date(master): Mon Jul  9 21:29:48 CEST 2018 on sn-devel-144

commit 2e4878a69a62fb59d843ee53a1a9469b987e3a59
Author: Jeremy Allison 
Date:   Fri Jul 6 11:46:44 2018 -0700

libsmbclient: Initialize written value before use.

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

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

---

Summary of changes:
 source3/libsmb/clireadwrite.c | 2 ++
 source3/libsmb/libsmb_file.c  | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)


Changeset truncated at 500 lines:

diff --git a/source3/libsmb/clireadwrite.c b/source3/libsmb/clireadwrite.c
index 3987477..00ee09e 100644
--- a/source3/libsmb/clireadwrite.c
+++ b/source3/libsmb/clireadwrite.c
@@ -1459,6 +1459,7 @@ static NTSTATUS cli_splice_fallback(TALLOC_CTX *frame,
uint8_t *buf = talloc_size(frame, SPLICE_BLOCK_SIZE);
size_t nread;
off_t remaining = initial_size;
+   *written = 0;
 
while (remaining) {
status = cli_read(srccli, src_fnum,
@@ -1480,6 +1481,7 @@ static NTSTATUS cli_splice_fallback(TALLOC_CTX *frame,
}
src_offset += nread;
dst_offset += nread;
+   *written += nread;
if (remaining < nread) {
return NT_STATUS_INTERNAL_ERROR;
}
diff --git a/source3/libsmb/libsmb_file.c b/source3/libsmb/libsmb_file.c
index 6b43676..ebd0bfe 100644
--- a/source3/libsmb/libsmb_file.c
+++ b/source3/libsmb/libsmb_file.c
@@ -298,7 +298,7 @@ SMBC_splice_ctx(SMBCCTX *context,
 int (*splice_cb)(off_t n, void *priv),
 void *priv)
 {
-   off_t written;
+   off_t written = 0;
TALLOC_CTX *frame = talloc_stackframe();
NTSTATUS status;
 


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch master updated

2018-04-09 Thread David Disseldorp
The branch, master has been updated
   via  3227b11 s3: smbd: Unix extensions attempts to change wrong field in 
fchown call.
  from  461a117 s3: smbd: Fix memory leak in vfswrap_getwd()

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


- Log -
commit 3227b110d065500ed84fc70063da70ab35823a2e
Author: Jeremy Allison <j...@samba.org>
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 <vrun...@amazon.com>
Signed-off-by: Jeremy Allison <j...@samba.org>
Reviewed-by: David Disseldorp <dd...@samba.org>

Autobuild-User(master): David Disseldorp <dd...@samba.org>
Autobuild-Date(master): Tue Apr 10 00:45:56 CEST 2018 on sn-devel-144

---

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


Changeset truncated at 500 lines:

diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index b49c3ca..af7a0d7 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -7778,10 +7778,10 @@ static NTSTATUS 
smb_set_file_unix_basic(connection_struct *conn,
 
DEBUG(10,("smb_set_file_unix_basic: SMB_SET_FILE_UNIX_BASIC "
  "changing group %u for file %s\n",
- (unsigned int)set_owner,
+ (unsigned int)set_grp,
  smb_fname_str_dbg(smb_fname)));
if (fsp && fsp->fh->fd != -1) {
-   ret = SMB_VFS_FCHOWN(fsp, set_owner, (gid_t)-1);
+   ret = SMB_VFS_FCHOWN(fsp, (uid_t)-1, set_grp);
} else {
/*
 * UNIX extensions calls must always operate


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch master updated

2018-02-06 Thread David Disseldorp
The branch, master has been updated
   via  a222b75 libgpo: Fix the build --without-ads
  from  859698d libads: Fix the build --without-ads

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


- Log -
commit a222b7506b53e689708834237f18877231dca589
Author: Volker Lendecke <v...@samba.org>
Date:   Sat Feb 3 07:07:55 2018 +0100

libgpo: Fix the build --without-ads

Signed-off-by: Volker Lendecke <v...@samba.org>
Reviewed-by: David Disseldorp <dd...@samba.org>

Autobuild-User(master): David Disseldorp <dd...@samba.org>
Autobuild-Date(master): Tue Feb  6 15:36:01 CET 2018 on sn-devel-144

---

Summary of changes:
 libgpo/pygpo.c | 5 +
 1 file changed, 5 insertions(+)


Changeset truncated at 500 lines:

diff --git a/libgpo/pygpo.c b/libgpo/pygpo.c
index 7a02a0d..b6b53b7 100644
--- a/libgpo/pygpo.c
+++ b/libgpo/pygpo.c
@@ -319,6 +319,7 @@ static PyObject *py_gpo_get_sysvol_gpt_version(PyObject * 
self,
return result;
 }
 
+#ifdef HAVE_ADS
 static ADS_STATUS find_samaccount(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx,
  const char *samaccountname,
  uint32_t *uac_ret, const char **dn_ret)
@@ -468,11 +469,15 @@ out:
return ret;
 }
 
+#endif
+
 static PyMethodDef ADS_methods[] = {
{ "connect", (PyCFunction)py_ads_connect, METH_NOARGS,
"Connect to the LDAP server" },
+#ifdef HAVE_ADS
{ "get_gpo_list", (PyCFunction)py_ads_get_gpo_list, METH_KEYWORDS,
NULL },
+#endif
{ NULL }
 };
 


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch master updated

2018-02-05 Thread David Disseldorp
The branch, master has been updated
   via  859698d libads: Fix the build --without-ads
  from  0c3348f dbcheck: skip find_missing_forward_links_from_backlinks() 
if the db has the sortedLinks feature

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


- Log -
commit 859698d29b547217356851094ed8188236e717b6
Author: Volker Lendecke <v...@samba.org>
Date:   Sat Feb 3 07:07:24 2018 +0100

libads: Fix the build --without-ads

Signed-off-by: Volker Lendecke <v...@samba.org>
Reviewed-by: David Disseldorp <dd...@samba.org>

Autobuild-User(master): David Disseldorp <dd...@samba.org>
Autobuild-Date(master): Tue Feb  6 02:47:44 CET 2018 on sn-devel-144

---

Summary of changes:
 source3/libads/kerberos_keytab.c | 4 
 1 file changed, 4 insertions(+)


Changeset truncated at 500 lines:

diff --git a/source3/libads/kerberos_keytab.c b/source3/libads/kerberos_keytab.c
index ffd100c..37ac7ba 100644
--- a/source3/libads/kerberos_keytab.c
+++ b/source3/libads/kerberos_keytab.c
@@ -640,7 +640,11 @@ int ads_keytab_list(const char *keytab_name)
}
 
if (keytab_name == NULL) {
+#ifdef HAVE_ADS
ret = ads_keytab_open(context, );
+#else
+   ret = ENOENT;
+#endif
} else {
ret = smb_krb5_kt_open(context, keytab_name, False, );
}


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch master updated

2018-01-25 Thread David Disseldorp
The branch, master has been updated
   via  849169a Fix wrong condition for error string assignment
   via  89c3a1e libnet: Use talloc_zero instead of ZERO_STRUCTP
   via  e320c4c Samba-VirusFilter: clean up dir check vfs_close and vfs_open
   via  c890011 Samba-VirusFilter: fix virusfilter_vfs_close() crash
  from  d4f7d9e libnmb: Fix CID 1428474 Incorrect expression 
(COPY_PASTE_ERROR)

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


- Log -
commit 849169a7b6ed0beb78bbddf25537521c1ed2f8e1
Author: Swen Schillig <s...@vnet.ibm.com>
Date:   Thu Jan 25 11:02:15 2018 +0100

Fix wrong condition for error string assignment

Signed-off-by: Swen Schillig <s...@vnet.ibm.com>
Reviewed-by: Volker Lendecke <v...@samba.org>
Reviewed-by: David Disseldorp <dd...@samba.org>

Autobuild-User(master): David Disseldorp <dd...@samba.org>
Autobuild-Date(master): Thu Jan 25 17:19:12 CET 2018 on sn-devel-144

commit 89c3a1ebbe0f22c03d8958df07da9983fd6fd3b5
Author: Volker Lendecke <v...@samba.org>
Date:   Thu Jan 4 20:37:16 2018 +0100

libnet: Use talloc_zero instead of ZERO_STRUCTP

Signed-off-by: Volker Lendecke <v...@samba.org>
Reviewed-by: David Disseldorp <dd...@samba.org>

commit e320c4c9b7426be296b3c311861ba2ddeeacdf9f
Author: Trever L. Adams <trever.ad...@gmail.com>
Date:   Wed Jan 24 11:21:11 2018 -0700

Samba-VirusFilter: clean up dir check vfs_close and vfs_open

Signed-off-by: Trever L. Adams <trever.ad...@gmail.com>
Reviewed-by: Jeremy Allison <j...@samba.org>
Reviewed-by: David Disseldorp <dd...@samba.org>

commit c890011a769b497855748e130fa41e998babc305
Author: Trever L. Adams <trever.ad...@gmail.com>
Date:   Wed Jan 24 10:42:11 2018 -0700

Samba-VirusFilter: fix virusfilter_vfs_close() crash

Signed-off-by: Trever L. Adams <trever.ad...@gmail.com>
Reviewed-by: Jeremy Allison <j...@samba.org>
Reviewed-by: David Disseldorp <dd...@samba.org>

---

Summary of changes:
 source3/modules/vfs_virusfilter.c | 10 +++---
 source4/libnet/libnet_join.c  | 10 +-
 2 files changed, 12 insertions(+), 8 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_virusfilter.c 
b/source3/modules/vfs_virusfilter.c
index 9b29923..ef9dc78 100644
--- a/source3/modules/vfs_virusfilter.c
+++ b/source3/modules/vfs_virusfilter.c
@@ -1153,6 +1153,11 @@ static int virusfilter_vfs_open(
SMB_VFS_HANDLE_GET_DATA(handle, config,
struct virusfilter_config, return -1);
 
+   if (fsp->is_directory) {
+   DBG_INFO("Not scanned: Directory: %s/\n", cwd_fname);
+   goto virusfilter_vfs_open_next;
+   }
+
test_prefix = strlen(config->rename_prefix);
test_suffix = strlen(config->rename_suffix);
if (test_prefix > 0) {
@@ -1303,7 +1308,7 @@ static int virusfilter_vfs_close(
const char *cwd_fname = handle->conn->connectpath;
 
struct virusfilter_config *config = NULL;
-   char *fname = fsp->fsp_name->base_name = NULL;
+   char *fname = fsp->fsp_name->base_name;
int close_result = -1;
int close_errno = 0;
virusfilter_result scan_result;
@@ -1338,8 +1343,7 @@ static int virusfilter_vfs_close(
}
 
if (fsp->is_directory) {
-   DBG_INFO("Not scanned: Directory: %s/%s\n", cwd_fname,
-fname);
+   DBG_INFO("Not scanned: Directory: %s/\n", cwd_fname);
return close_result;
}
 
diff --git a/source4/libnet/libnet_join.c b/source4/libnet/libnet_join.c
index 0c20644..6cd18e0 100644
--- a/source4/libnet/libnet_join.c
+++ b/source4/libnet/libnet_join.c
@@ -929,7 +929,7 @@ NTSTATUS libnet_Join_member(struct libnet_context *ctx,
uint32_t acct_type = 0;
const char *account_name;
const char *netbios_name;
-   const char *error_string;
+   const char *error_string = NULL;
 
r->out.error_string = NULL;
 
@@ -982,14 +982,14 @@ NTSTATUS libnet_Join_member(struct libnet_context *ctx,
return status;
}
 
-   set_secrets = talloc(tmp_mem, struct 
provision_store_self_join_settings);
+   set_secrets = talloc_zero(tmp_mem,
+ struct provision_store_self_join_settings);
if (!set_secrets) {
r->out.error_string = NULL;
talloc_free(tmp_mem);
return NT_STATUS_NO_MEMORY;
}
-   
-   ZERO_STRUCTP(set_secrets);
+
set_secrets->domain_name = r2->out.domain_name;
set_secrets->realm = r2->out.realm;
set_secrets->

[SCM] Samba Shared Repository - branch master updated

2017-10-25 Thread David Disseldorp
The branch, master has been updated
   via  2d260b2 s4:scripting: Fix ntstatus_gen.h generation on 32bit
  from  7abe56c s3: smbclient: Test we can rename with a name containing.

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


- Log -
commit 2d260b28f50ea6ee704d9fab2aaf26f760fa110f
Author: Andreas Schneider <a...@samba.org>
Date:   Wed Oct 25 17:37:24 2017 +0200

s4:scripting: Fix ntstatus_gen.h generation on 32bit

The hex() function results in different output on 32bit systems. It adds
a L for long for some numbers. Thus we have a different header file.

This patch makes sure we have a consistent file generation on different
paltforms.

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

Signed-off-by: Andreas Schneider <a...@samba.org>
Reviewed-by: David Disseldorp <dd...@samba.org>

Autobuild-User(master): David Disseldorp <dd...@samba.org>
Autobuild-Date(master): Wed Oct 25 22:28:39 CEST 2017 on sn-devel-144

---

Summary of changes:
 source4/scripting/bin/gen_ntstatus.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


Changeset truncated at 500 lines:

diff --git a/source4/scripting/bin/gen_ntstatus.py 
b/source4/scripting/bin/gen_ntstatus.py
index 9e92f49..cace4c0 100755
--- a/source4/scripting/bin/gen_ntstatus.py
+++ b/source4/scripting/bin/gen_ntstatus.py
@@ -32,7 +32,7 @@ def generateHeaderFile(out_file, errors):
 out_file.write("#ifndef _NTSTATUS_GEN_H\n")
 out_file.write("#define _NTSTATUS_GEN_H\n")
 for err in errors:
-line = "#define %s NT_STATUS(%s)\n" % (err.err_define, 
hex(err.err_code))
+line = "#define %s NT_STATUS(%#x)\n" % (err.err_define, err.err_code)
 out_file.write(line)
 out_file.write("\n#endif /* _NTSTATUS_GEN_H */\n")
 


-- 
Samba Shared Repository



[SCM] Samba Website Repository - branch master updated

2017-10-17 Thread David Disseldorp
The branch, master has been updated
   via  a0fdc08 NEWS[sdc_ms_trip]: embed SDC presentation videos
  from  daa2165 NEWS[sdc_ms_trip]: 2017 SNIA Conference and Microsoft Trip 
Report

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


- Log -
commit a0fdc08ba0a7230ea36697974db6ba20c89be607
Author: David Disseldorp <dd...@samba.org>
Date:   Tue Oct 17 19:22:15 2017 +0200

NEWS[sdc_ms_trip]: embed SDC presentation videos

Signed-off-by: David Disseldorp <dd...@samba.org>

---

Summary of changes:
 posted_news/20171017-162838.sdc_ms_trip.body.html | 12 
 1 file changed, 4 insertions(+), 8 deletions(-)


Changeset truncated at 500 lines:

diff --git a/posted_news/20171017-162838.sdc_ms_trip.body.html 
b/posted_news/20171017-162838.sdc_ms_trip.body.html
index 6a4a8a3..dfcd1bd 100644
--- a/posted_news/20171017-162838.sdc_ms_trip.body.html
+++ b/posted_news/20171017-162838.sdc_ms_trip.body.html
@@ -23,27 +23,23 @@ MM's, Metze, really ?).
 SDC 2017 - SMB3 and Beyond for Linux: State of Unix Extensions, as We
 Drive Toward Optimal POSIX Compatibility and Performance - Steven
 French
-
-https://www.youtube.com/watch?v=AelkHAH8bZE=41=PLH_ag5Km-YUbzCb_E3kAwtcbxhhdnrALL;>Video
 
+https://www.youtube-nocookie.com/embed/AelkHAH8bZE?rel=0showinfo=0; 
frameborder="0" allowfullscreen>
 
 SDC 2017 - Windows Authentication With Multiple Domains and Forests -
 Stefan Metzmacher
-
-https://www.youtube.com/watch?v=ErHr4TWmI38=54=PLH_ag5Km-YUbzCb_E3kAwtcbxhhdnrALL;>Video
 
+https://www.youtube-nocookie.com/embed/ErHr4TWmI38?rel=0showinfo=0; 
frameborder="0" allowfullscreen>
 
 SDC 2017 - Understanding and Improving Samba Fileserver Performance -
 Ralph Bhme
-
-https://www.youtube.com/watch?v=-0DreZ8ZNfI=55=PLH_ag5Km-YUbzCb_E3kAwtcbxhhdnrALL;>Video
 
+https://www.youtube-nocookie.com/embed/-0DreZ8ZNfI?rel=0showinfo=0; 
frameborder="0" allowfullscreen>
 
 SDC 2017-SMB3 POSIX Extensions: Client Perspective and Server
 Perspective - Steve French and Jeremy Allison
-
-https://www.youtube.com/watch?v=AAQbgRvrGHI=56=PLH_ag5Km-YUbzCb_E3kAwtcbxhhdnrALL;>Video
 
+https://www.youtube-nocookie.com/embed/AAQbgRvrGHI?rel=0showinfo=0; 
frameborder="0" allowfullscreen>
 
 Some of the exciting things that we worked on were:
 


-- 
Samba Website Repository



[SCM] Samba Website Repository - branch master updated

2017-10-17 Thread David Disseldorp
The branch, master has been updated
   via  daa2165 NEWS[sdc_ms_trip]: 2017 SNIA Conference and Microsoft Trip 
Report
  from  ad584e2 prepare_news.sh: requires bash

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


- Log -
commit daa21653e4f4a42e6cdd6a7528c12fd1843a38f5
Author: David Disseldorp <dd...@suse.de>
Date:   Tue Oct 17 18:30:48 2017 +0200

NEWS[sdc_ms_trip]: 2017 SNIA Conference and Microsoft Trip Report

A HTML rendering of Jeremy Allison's blog post content.

Signed-off-by: David Disseldorp <dd...@suse.de>

---

Summary of changes:
 posted_news/20171017-162838.sdc_ms_trip.body.html  | 110 +
 .../20171017-162838.sdc_ms_trip.headline.html  |   3 +
 posted_news/20171017-162838.sdc_ms_trip.snip.html  |  21 
 3 files changed, 134 insertions(+)
 create mode 100644 posted_news/20171017-162838.sdc_ms_trip.body.html
 create mode 100644 posted_news/20171017-162838.sdc_ms_trip.headline.html
 create mode 100644 posted_news/20171017-162838.sdc_ms_trip.snip.html


Changeset truncated at 500 lines:

diff --git a/posted_news/20171017-162838.sdc_ms_trip.body.html 
b/posted_news/20171017-162838.sdc_ms_trip.body.html
new file mode 100644
index 000..6a4a8a3
--- /dev/null
+++ b/posted_news/20171017-162838.sdc_ms_trip.body.html
@@ -0,0 +1,110 @@
+
+17 October 2017
+2017 SNIA Conference and Microsoft Trip Report
+
+Last month was a very productive one for the Samba project.  The
+yearly Storage Networking Industry Association Storage Developers
+Conference (SNIA-SDC) was held in Santa Clara, California. As usual it
+was an excuse for as many Team members as possible to get together and
+hack on interoperability between Samba and other vendor SMB1/2/3 and
+Active Directory software, as well as go out for spectacularly bad
+Mexican food and drink margaritas.
+
+
+After the conference many Team members went up to Redmond, Washington
+- Microsoft HQ, to an event generously hosted by Microsoft to improve
+Samba / Windows interoperability. Thanks a LOT to Microsoft for
+hosting us and putting up with our strange requirements (No blue
+MM's, Metze, really ?).
+
+
+Samba related videos from SNIA-SDC
+
+SDC 2017 - SMB3 and Beyond for Linux: State of Unix Extensions, as We
+Drive Toward Optimal POSIX Compatibility and Performance - Steven
+French
+
+https://www.youtube.com/watch?v=AelkHAH8bZE=41=PLH_ag5Km-YUbzCb_E3kAwtcbxhhdnrALL;>Video
+
+
+SDC 2017 - Windows Authentication With Multiple Domains and Forests -
+Stefan Metzmacher
+
+https://www.youtube.com/watch?v=ErHr4TWmI38=54=PLH_ag5Km-YUbzCb_E3kAwtcbxhhdnrALL;>Video
+
+
+SDC 2017 - Understanding and Improving Samba Fileserver Performance -
+Ralph Bhme
+
+https://www.youtube.com/watch?v=-0DreZ8ZNfI=55=PLH_ag5Km-YUbzCb_E3kAwtcbxhhdnrALL;>Video
+
+
+SDC 2017-SMB3 POSIX Extensions: Client Perspective and Server
+Perspective - Steve French and Jeremy Allison
+
+https://www.youtube.com/watch?v=AAQbgRvrGHI=56=PLH_ag5Km-YUbzCb_E3kAwtcbxhhdnrALL;>Video
+
+
+Some of the exciting things that we worked on were:
+
+SMB3 in the cloud !
+
+At SNIA-SDC we did a demonstration in conjunction with Visuality
+Systems, Apple, and Microsoft, of six different SMB client
+implementations accessing the same data simultaneously in Microsoft's
+Azure Cloud file store over encrypted SMB3. Amazingly, everything
+worked as planned.
+
+Persistent handles and leases, how DO they work 
?
+
+Ralph Bhme of SerNet did lots of research on how persistent handles
+interact with leases and Gnther Deschner of Red Hat worked on adding
+lease break retransmission tests. This work goes a long way towards
+creating the kind of tests we need to ensure our implementation will
+be completely compatible with Windows clients.
+
+SMB and RDMA (Remote Direct Memory Access) in the Linux 
kernel.
+
+Stefan Metzmacher of SerNet prototyped an smbdirect.ko module for the
+Linux kernel, which will make SMB-Direct with RDMA reads and writes
+available for user space applications like Samba's 'smbd' and
+'smbclient' as well as in kernel uses. The Linux kernel cifs.ko client
+might also use it in future. It makes use of native socket system
+calls, and simulates the traffic of SMB over TCP/NBT with the 4 byte
+length header. This makes it transparent to the application except for
+the special RDMA read/write fast path operations.
+
+
+Aurlien Aptel of SUSE worked on updating the cifs.ko kernel
+documentation which is really old. The most interesting change is in
+the TODO file which serves as a roadmap of where cifs.ko is
+going. Aurlien, who also collaborated with Pavel Shilovsky of
+Microsoft on adding compound requests for SMB2+ to the Linux kernel
+client.
+
+SMB3 UNIX Extensions
+
+Jeremy Allison of Google and Steve French of Primary Data worked on
+design and prototyping of the UNIX extensions for

[SCM] Samba Shared Repository - branch master updated

2017-07-21 Thread David Disseldorp
The branch, master has been updated
   via  1dcacff vfs_ceph: fix cephwrap_chdir()
  from  4e04f02 selftest: Add test for password change when NTLM is disabled

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


- Log -
commit 1dcacff083019810e207a3d123a81fe32d9dde1a
Author: David Disseldorp <dd...@samba.org>
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 <dd...@samba.org>
Reviewed-by: Jeremy Allison <j...@samba.org>

Autobuild-User(master): David Disseldorp <dd...@samba.org>
Autobuild-Date(master): Fri Jul 21 19:10:46 CEST 2017 on sn-devel-144

---

Summary of changes:
 source3/modules/vfs_ceph.c | 8 
 1 file changed, 8 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_ceph.c b/source3/modules/vfs_ceph.c
index 73106c4..9abd321 100644
--- a/source3/modules/vfs_ceph.c
+++ b/source3/modules/vfs_ceph.c
@@ -936,14 +936,6 @@ static int cephwrap_chdir(struct vfs_handle_struct *handle,
 {
int result = -1;
DBG_DEBUG("[CEPH] chdir(%p, %s)\n", handle, smb_fname->base_name);
-   /*
-* If the path is just / use chdir because Ceph is below / and
-* cannot deal with changing directory above its mount point
-*/
-   if (!strcmp(smb_fname->base_name, "/")) {
-   return chdir(smb_fname->base_name);
-   }
-
result = ceph_chdir(handle->data, smb_fname->base_name);
DBG_DEBUG("[CEPH] chdir(...) = %d\n", result);
WRAP_RETURN(result);


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch master updated

2017-07-20 Thread David Disseldorp
The branch, master has been updated
   via  ff7df3d build: fix ceph_statx check when configured with 
libcephfs_dir
   via  c57dcaf s3/utils: smbcacls failed to detect DIRECTORIES using SMB2 
(windows only)
  from  7313e7c s4-torture: point out why we cannot validate MSZIP 
compressed files

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


- Log -
commit ff7df3d3f5259362a6bb6780d6b532e57e89681d
Author: David Disseldorp <dd...@suse.de>
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

Signed-off-by: David Disseldorp <dd...@suse.de>
Reviewed-by: Jeff Layton <jlay...@samba.org>

Autobuild-User(master): David Disseldorp <dd...@samba.org>
Autobuild-Date(master): Thu Jul 20 23:02:27 CEST 2017 on sn-devel-144

commit c57dcafb150823b00fd873046e65a966a8488fa8
Author: Noel Power <noel.po...@suse.com>
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

Signed-off-by: Noel Power <noel.po...@suse.com>
Reviewed-by: Jeremy Allison <j...@samba.org>
Reviewed-by: David Disseldorp <dd...@samba.org>

---

Summary of changes:
 source3/utils/smbcacls.c | 14 +++---
 source3/wscript  |  9 +++--
 2 files changed, 10 insertions(+), 13 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/utils/smbcacls.c b/source3/utils/smbcacls.c
index 86b4591..6bf32e5 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,
-NULL, NULL, NULL);
-   if (!NT_STATUS_IS_OK(status)) {
-   printf("Failed to file info %s: %s\n", filename,
-  nt_errstr(status));
-}
-
cli_close(cli, fnum);
-
-return mode;
+   return cr.file_attributes;
 }
 
 /*
diff --git a/source3/wscript b/source3/wscript
index 8fa51fb..534ff44 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -1575,11 +1575,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(

[SCM] Samba Shared Repository - branch master updated

2017-07-14 Thread David Disseldorp
The branch, master has been updated
   via  85b10a6 s3: drop build_env
  from  0ed918e Build py3 versions of other rpc modules

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


- Log -
commit 85b10a636e0eeeca0948c6b1d59d2df7b4507d45
Author: Bernhard M. Wiedemann <bwiedem...@suse.de>
Date:   Mon Jul 10 18:29:41 2017 +0200

s3: drop build_env

As a follow up to eedebe2ef1b ("docs-xml: Sort input file list"), this
change enables reproducible builds, without the added complexity of
https://lists.samba.org/archive/samba-technical/2017-June/121302.html

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

Signed-off-by: Bernhard M. Wiedemann <bwiedem...@suse.de>
    Reviewed-by: David Disseldorp <dd...@samba.org>
Reviewed-by: Andrew Bartlett <abart...@samba.org>

Autobuild-User(master): David Disseldorp <dd...@samba.org>
Autobuild-Date(master): Fri Jul 14 18:48:08 CEST 2017 on sn-devel-144

---

Summary of changes:
 buildtools/wafsamba/samba_patterns.py | 14 
 source3/script/build_env.sh   | 41 ---
 source3/wscript_build |  8 ---
 3 files changed, 63 deletions(-)
 delete mode 100755 source3/script/build_env.sh


Changeset truncated at 500 lines:

diff --git a/buildtools/wafsamba/samba_patterns.py 
b/buildtools/wafsamba/samba_patterns.py
index 1baa601..e809f26 100644
--- a/buildtools/wafsamba/samba_patterns.py
+++ b/buildtools/wafsamba/samba_patterns.py
@@ -51,7 +51,6 @@ def write_build_options_header(fp):
 fp.write("*/\n")
 fp.write("\n")
 fp.write("#include \"includes.h\"\n")
-fp.write("#include \"build_env.h\"\n")
 fp.write("#include \"dynconfig/dynconfig.h\"\n")
 fp.write("#include \"lib/cluster_support.h\"\n")
 
@@ -92,19 +91,6 @@ def write_build_options_header(fp):
 fp.write("  return;\n")
 fp.write("   }\n")
 fp.write("\n")
-fp.write("#ifdef _BUILD_ENV_H\n")
-fp.write("   /* Output information about the build environment */\n")
-fp.write("   output(screen,\"Build environment:\\n\");\n")
-fp.write("   output(screen,\"   Built by:
%s@%s\\n\",BUILD_ENV_USER,BUILD_ENV_HOST);\n")
-fp.write("   output(screen,\"   Built on:
%s\\n\",BUILD_ENV_DATE);\n")
-fp.write("\n")
-fp.write("   output(screen,\"   Built using: 
%s\\n\",BUILD_ENV_COMPILER);\n")
-fp.write("   output(screen,\"   Build host:  
%s\\n\",BUILD_ENV_UNAME);\n")
-fp.write("   output(screen,\"   SRCDIR:  
%s\\n\",BUILD_ENV_SRCDIR);\n")
-fp.write("   output(screen,\"   BUILDDIR:
%s\\n\",BUILD_ENV_BUILDDIR);\n")
-fp.write("\n")
-fp.write("\n")
-fp.write("#endif\n")
 fp.write("\n")
 fp.write("   /* Output various paths to files and directories */\n")
 fp.write("   output(screen,\"\\nPaths:\\n\");\n")
diff --git a/source3/script/build_env.sh b/source3/script/build_env.sh
deleted file mode 100755
index eb54f37..000
--- a/source3/script/build_env.sh
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/bin/sh
-
-if [ $# -lt 3 ]
-then
-echo "Usage: $0 srcdir builddir compiler"
-exit 1
-fi
-
-uname=`uname -a`
-date=`date`
-srcdir=$1
-builddir=$2
-compiler=$3
-
-if [ ! "x$USER" = "x" ]; then
-whoami=$USER
-else 
-if [ ! "x$LOGNAME" = "x" ]; then
-   whoami=$LOGNAME
-else
-   whoami=`whoami || id -un`
-fi
-fi
-
-host=`hostname`
-
-cat <

[SCM] Samba Shared Repository - branch master updated

2017-06-27 Thread David Disseldorp
The branch, master has been updated
   via  eedebe2 docs-xml: Sort input file list
  from  37db3d2 WHATSNEW: Fix typo...

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


- Log -
commit eedebe2ef1b6ff92975289b6076f236650744621
Author: Bernhard M. Wiedemann via samba-technical 
<samba-techni...@lists.samba.org>
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 <bwiedem...@suse.de>
Reviewed-by: Andrew Bartlett <abart...@samba.org>
Reviewed-by: David Disseldorp <dd...@samba.org>

Autobuild-User(master): David Disseldorp <dd...@samba.org>
Autobuild-Date(master): Tue Jun 27 16:56:06 CEST 2017 on sn-devel-144

---

Summary of changes:
 docs-xml/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


Changeset truncated at 500 lines:

diff --git a/docs-xml/Makefile b/docs-xml/Makefile
index d9ae92b..6a33b17 100644
--- a/docs-xml/Makefile
+++ b/docs-xml/Makefile
@@ -8,7 +8,7 @@ include Makefile.settings
 
 # Docs to build
 MAIN_DOCS = $(patsubst %/index.xml,%,$(wildcard */index.xml))
-MANPAGES = $(wildcard $(MANPAGEDIR)/*.?.xml)
+MANPAGES = $(sort $(wildcard $(MANPAGEDIR)/*.?.xml))
 
 # Lists of files to process
 MANPAGES_PLUCKER = $(patsubst 
$(MANPAGEDIR)/%.xml,$(PLUCKERDIR)/%.pdb,$(MANPAGES))


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch master updated

2017-06-08 Thread David Disseldorp
The branch, master has been updated
   via  08a21f3 messaging: fix net command failure due to unhandled return 
code
  from  45e84dd WHATSNEW: Add Dynamic RPC port range

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


- Log -
commit 08a21f3539fef76a22189b1751fd2a081937a057
Author: David Mulder via samba-technical <samba-techni...@lists.samba.org>
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 <dmul...@suse.com>
Reviewed-by: Jeremy Allison <j...@samba.org>
Reviewed-by: David Disseldorp <dd...@samba.org>

Autobuild-User(master): David Disseldorp <dd...@samba.org>
Autobuild-Date(master): Thu Jun  8 08:04:05 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 d7ad49d..e0ef1f8 100644
--- a/source3/lib/messages.c
+++ b/source3/lib/messages.c
@@ -303,7 +303,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);
@@ -314,7 +314,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;
}
}
@@ -327,7 +327,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 master updated

2017-04-06 Thread David Disseldorp
The branch, master has been updated
   via  415d61e idmap_ldap: Fix CID 1404836 Dereference before null check
   via  7f714a4 ctdb-docs: Fix documentation of -n option to ctdb tool
  from  e69aa55 winbindd: let WBFLAG_PAM_GET_PWD_POLICY only fake the 
password policy

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


- Log -
commit 415d61eebbfe22a243bc14c089b01054373cdf7e
Author: Volker Lendecke <v...@samba.org>
Date:   Thu Apr 6 11:35:23 2017 +0200

idmap_ldap: Fix CID 1404836 Dereference before null check

Signed-off-by: Volker Lendecke <v...@samba.org>
Reviewed-by: David Disseldorp <dd...@samba.org>

Autobuild-User(master): David Disseldorp <dd...@samba.org>
Autobuild-Date(master): Thu Apr  6 19:31:25 CEST 2017 on sn-devel-144

commit 7f714a436250dfeaa1970f78090ef066482711f0
Author: Amitay Isaacs <ami...@gmail.com>
Date:   Thu Apr 6 12:20:21 2017 +1000

ctdb-docs: Fix documentation of -n option to ctdb tool

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

Signed-off-by: Amitay Isaacs <ami...@gmail.com>
Reviewed-by: David Disseldorp <dd...@samba.org>

---

Summary of changes:
 ctdb/doc/ctdb.1.xml   |  4 ++--
 source3/winbindd/idmap_ldap.c | 11 +--
 2 files changed, 3 insertions(+), 12 deletions(-)


Changeset truncated at 500 lines:

diff --git a/ctdb/doc/ctdb.1.xml b/ctdb/doc/ctdb.1.xml
index 6a0e6ea..ceab2d3 100644
--- a/ctdb/doc/ctdb.1.xml
+++ b/ctdb/doc/ctdb.1.xml
@@ -123,10 +123,10 @@
 OPTIONS
 
 
-  -n PNN-LIST
+  -n PNN
   

- The nodes specified by PNN-LIST should be queried for the
+ The node specified by PNN should be queried for the
  requested information.  Default is to query the daemon
  running on the local host.

diff --git a/source3/winbindd/idmap_ldap.c b/source3/winbindd/idmap_ldap.c
index 041152c..7545061 100644
--- a/source3/winbindd/idmap_ldap.c
+++ b/source3/winbindd/idmap_ldap.c
@@ -78,16 +78,7 @@ static NTSTATUS get_credentials( TALLOC_CTX *mem_ctx,
tmp = idmap_config_const_string(dom->name, "ldap_user_dn", NULL);
 
if ( tmp ) {
-   if (!dom) {
-   DEBUG(0, ("get_credentials: Invalid domain 'NULL' "
- "encountered for user DN %s\n",
- tmp));
-   ret = NT_STATUS_UNSUCCESSFUL;
-   goto done;
-   } else {
-   secret = idmap_fetch_secret("ldap", dom->name, tmp);
-   }
-
+   secret = idmap_fetch_secret("ldap", dom->name, tmp);
if (!secret) {
DEBUG(0, ("get_credentials: Unable to fetch "
  "auth credentials for %s in %s\n",


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch master updated

2017-02-15 Thread David Disseldorp
The branch, master has been updated
   via  07bbd7f docs/vfs_ceph: document user_id parameter
   via  ec788be vfs_ceph: add user_id smb.conf parameter
   via  eb39aa4 vfs_ceph: replace deprecated ceph_shutdown() call
   via  667fb18 vfs_ceph: cleanup mount handle on failure
  from  129015d lib: Fix "is_case_sensitive" in "ms_fnmatch_protocol"' 
callers

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


- Log -
commit 07bbd7fb449fbe64a682c4e6b0cf93fe91006a2e
Author: David Disseldorp <dd...@samba.org>
Date:   Wed Feb 8 17:49:43 2017 +0100

docs/vfs_ceph: document user_id parameter
    
Signed-off-by: David Disseldorp <dd...@samba.org>
Reviewed-by: Ralph Böhme <s...@samba.org>
    
Autobuild-User(master): David Disseldorp <dd...@samba.org>
Autobuild-Date(master): Wed Feb 15 21:00:53 CET 2017 on sn-devel-144

commit ec788bead3118a8b9c6069c702357ea5509db868
Author: David Disseldorp <dd...@samba.org>
Date:   Wed Feb 8 17:26:14 2017 +0100

vfs_ceph: add user_id smb.conf parameter

The "ceph: user_id" parameter can be specified in smb.conf to explicitly
set the Ceph client ID used when creating the mount handle.

Signed-off-by: David Disseldorp <dd...@samba.org>
Reviewed-by: Ralph Böhme <s...@samba.org>

commit eb39aa4695dbda4ed32aa0b907b501fcf1a7ef01
Author: David Disseldorp <dd...@samba.org>
Date:   Wed Feb 8 17:51:32 2017 +0100

vfs_ceph: replace deprecated ceph_shutdown() call

ceph_shutdown() is the equivalent to ceph_unmount() + ceph_release()
without error handling.

Signed-off-by: David Disseldorp <dd...@samba.org>
Reviewed-by: Ralph Böhme <s...@samba.org>

commit 667fb18f1ecc97832832a1f9cedc044d004f1929
Author: David Disseldorp <dd...@samba.org>
Date:   Wed Feb 8 17:11:30 2017 +0100

vfs_ceph: cleanup mount handle on failure

Signed-off-by: David Disseldorp <dd...@samba.org>
Reviewed-by: Ralph Böhme <s...@samba.org>

---

Summary of changes:
 docs-xml/manpages/vfs_ceph.8.xml | 14 ++
 source3/modules/vfs_ceph.c   | 60 
 2 files changed, 50 insertions(+), 24 deletions(-)


Changeset truncated at 500 lines:

diff --git a/docs-xml/manpages/vfs_ceph.8.xml b/docs-xml/manpages/vfs_ceph.8.xml
index 37d50b9..c492d31 100644
--- a/docs-xml/manpages/vfs_ceph.8.xml
+++ b/docs-xml/manpages/vfs_ceph.8.xml
@@ -83,6 +83,20 @@


 
+   
+   ceph:user_id = name
+   
+   
+   Allows one to explicitly set the client ID used for the
+   CephFS mount handle. Empty by default (CephFS uses the
+   process id).
+   
+   
+   Example: ceph:user_id = samba
+   
+   
+   
+

 
 
diff --git a/source3/modules/vfs_ceph.c b/source3/modules/vfs_ceph.c
index 75233ef..b74c214 100644
--- a/source3/modules/vfs_ceph.c
+++ b/source3/modules/vfs_ceph.c
@@ -85,8 +85,9 @@ static int cephwrap_connect(struct vfs_handle_struct *handle, 
 const char *servi
 {
int ret;
char buf[256];
-
-   const char * conf_file;
+   int snum = SNUM(handle->conn);
+   const char *conf_file;
+   const char *user_id;
 
if (cmount) {
handle->data = cmount; /* We have been here before */
@@ -94,36 +95,34 @@ static int cephwrap_connect(struct vfs_handle_struct 
*handle,  const char *servi
return 0;
}
 
-   conf_file = lp_parm_const_string(SNUM(handle->conn), "ceph", 
"config_file", NULL);
+   /* if config_file and/or user_id are NULL, ceph will use defaults */
+   conf_file = lp_parm_const_string(snum, "ceph", "config_file", NULL);
+   user_id = lp_parm_const_string(snum, "ceph", "user_id", NULL);
 
-   DBG_DEBUG( "[CEPH] calling: ceph_create\n" );
-   ret = ceph_create(, NULL);
-   if (ret)
+   DBG_DEBUG("[CEPH] calling: ceph_create\n");
+   ret = ceph_create(, user_id);
+   if (ret) {
goto err_out;
-
-   if (conf_file) {
-   /* Override the config file */
-   DBG_DEBUG( "[CEPH] calling: ceph_conf_read_file\n" );
-   ret = ceph_conf_read_file(cmount, conf_file);
-   } else {
-
-   DBG_DEBUG( "[CEPH] calling: ceph_conf_read_file with %s\n", 
conf_file);
-   ret = ceph_conf_read_file(cmount, NULL);
}
 
-   if (ret)
-   goto err_out;
+   DBG_DEBUG("[CEPH] calling: ceph_conf_read_file with %s\n"

[SCM] Samba Shared Repository - branch master updated

2017-01-30 Thread David Disseldorp
The branch, master has been updated
   via  26ffc20 build: vfs_posix_eadb is only built with the AD DC enabled
  from  73deaec s3:winbindd: document "winbind:ignore domains"

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


- Log -
commit 26ffc20cef841b33d3b7a55743e03d6ce9f58a05
Author: Andrew Bartlett <abart...@samba.org>
Date:   Mon Jan 30 23:18:12 2017 +1300

build: vfs_posix_eadb is only built with the AD DC enabled

This was found building a static smbd without the AD DC

Signed-off-by: Andrew Bartlett <abart...@samba.org>
    Reviewed-by: David Disseldorp <dd...@samba.org>

Autobuild-User(master): David Disseldorp <dd...@samba.org>
Autobuild-Date(master): Mon Jan 30 17:24:26 CET 2017 on sn-devel-144

---

Summary of changes:
 source3/wscript | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)


Changeset truncated at 500 lines:

diff --git a/source3/wscript b/source3/wscript
index 01d5274..443affd 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -1683,7 +1683,7 @@ main() {
   vfs_recycle vfs_audit vfs_extd_audit 
vfs_full_audit vfs_netatalk
   vfs_fake_perms vfs_default_quota 
vfs_readonly vfs_cap
   vfs_expand_msdfs vfs_shadow_copy 
vfs_shadow_copy2
-  vfs_readahead vfs_xattr_tdb 
vfs_posix_eadb
+  vfs_readahead vfs_xattr_tdb
   vfs_streams_xattr vfs_streams_depot 
vfs_acl_xattr vfs_acl_tdb
   vfs_preopen vfs_catia
   vfs_media_harmony vfs_unityed_media 
vfs_fruit vfs_shell_snap
@@ -1706,6 +1706,7 @@ main() {
 
 if conf.CONFIG_SET('AD_DC_BUILD_IS_ENABLED'):
 default_static_modules.extend(TO_LIST('pdb_samba_dsdb auth_samba4 
vfs_dfs_samba4'))
+default_shared_modules.extend('vfs_posix_eadb')
 
 if conf.CONFIG_SET('HAVE_FREEBSD_SUNACL_H'):
 default_shared_modules.extend(TO_LIST('vfs_zfsacl'))


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch master updated

2017-01-11 Thread David Disseldorp
The branch, master has been updated
   via  b4f40e4 s4:tests/sec_descriptor: use more unique oid values
  from  4b295b1 wscript: remove executable bits for all wscript* files

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


- Log -
commit b4f40e4d6db4d5a8e889ea778ebbce8eaf6b10f5
Author: Stefan Metzmacher <me...@samba.org>
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 <me...@samba.org>
Reviewed-by: David Disseldorp <dd...@samba.org>

Autobuild-User(master): David Disseldorp <dd...@samba.org>
Autobuild-Date(master): Thu Jan 12 04:02:21 CET 2017 on sn-devel-144

---

Summary of changes:
 source4/dsdb/tests/python/sec_descriptor.py | 82 +
 1 file changed, 25 insertions(+), 57 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/tests/python/sec_descriptor.py 
b/source4/dsdb/tests/python/sec_descriptor.py
index ac80469..2f02418 100755
--- a/source4/dsdb/tests/python/sec_descriptor.py
+++ b/source4/dsdb/tests/python/sec_descriptor.py
@@ -64,24 +64,23 @@ class DescriptorTests(samba.tests.TestCase):
 def get_users_domain_dn(self, name):
 return "CN=%s,CN=Users,%s" % (name, self.base_dn)
 
-def get_unique_schema_class_name(self):
+def create_schema_class(self, _ldb, desc=None):
 while True:
-class_name = "test-class%s" % random.randint(1,10)
+class_id = random.randint(0,65535)
+class_name = "descriptor-test-class%s" % class_id
 class_dn = "CN=%s,%s" % (class_name, self.schema_dn)
 try:
-self.ldb_admin.search(base=class_dn, attrs=["*"])
+self.ldb_admin.search(base=class_dn, attrs=["name"])
 except LdbError, (num, _):
 self.assertEquals(num, ERR_NO_SUCH_OBJECT)
-return class_name
+break
 
-def create_schema_class(self, _ldb, object_dn, desc=None):
 ldif = """
-dn: """ + object_dn + """
+dn: """ + class_dn + """
 objectClass: classSchema
 objectCategory: CN=Class-Schema,""" + self.schema_dn + """
-defaultObjectCategory: """ + object_dn + """
-distinguishedName: """ + object_dn + """
-governsId: 1.3.6.1.4.1.7165.4.6.3.""" + str(random.randint(1,10)) + """
+defaultObjectCategory: """ + class_dn + """
+governsId: 1.3.6.1.4.1.7165.4.6.2.3.""" + str(class_id) + """
 instanceType: 4
 objectClassCategory: 1
 subClassOf: organizationalPerson
@@ -97,6 +96,7 @@ systemOnly: FALSE
 elif isinstance(desc, security.descriptor):
 ldif += "nTSecurityDescriptor:: %s" % 
base64.b64encode(ndr_pack(desc))
 _ldb.add_ldif(ldif)
+return class_dn
 
 def create_configuration_container(self, _ldb, object_dn, desc=None):
 ldif = """
@@ -688,9 +688,7 @@ class OwnerGroupDescriptorTests(DescriptorTests):
 mod = "(A;;WDCC;;;AU)"
 self.sd_utils.dacl_add_ace(self.schema_dn, mod)
 # Create example Schema class
-class_name = self.get_unique_schema_class_name()
-class_dn = "CN=%s,%s" % (class_name, self.schema_dn)
-self.create_schema_class(_ldb, class_dn)
+class_dn = self.create_schema_class(_ldb)
 desc_sddl = self.sd_utils.get_sd_as_sddl(class_dn)
 res = re.search("(O:.*G:.*?)D:", desc_sddl).group(1)
 
self.assertEqual(self.results[self.DS_BEHAVIOR][self._testMethodName[5:]], res)
@@ -705,9 +703,7 @@ class OwnerGroupDescriptorTests(DescriptorTests):
 mod = "(A;CI;WDCC;;;AU)"
 self.sd_utils.dacl_add_ace(self.schema_dn, mod)
 # Create example Schema class
-class_name = self.get_unique_schema_class_name()
-class_dn = "CN=%s,%s" % (class_name, self.schema_dn)
-self.create_schema_class(_ldb, class_dn)
+class_dn = self.create_schema_class(_ldb)
 desc_sddl = self.sd_utils.get_sd_as_sddl(class_dn)
 res = re.search("(O:.*G:.*?)D:", desc_sddl).group(1)
 
self.assertEqual(self.results[self.DS_BEHAVIOR][self._testMethodName[5:]], res)
@@ -722,9 +718,7 @@ class OwnerGroupDescriptorTests(DescriptorTests):
 mod = "(A;CI;WDCC;;;AU)"
 self.sd_utils.dacl_add_ace(self.schema_dn, mod)
 # Create example Schema class
-class_name = se

[SCM] Samba Shared Repository - branch master updated

2016-12-27 Thread David Disseldorp
The branch, master has been updated
   via  3660c76 ctdb-takeover: Clean up when exiting on error
   via  3b0b29b ctdb-takeover: Fix CID 1398169 Unchecked return value
   via  bdaa2bc ctdbd_conn: remove unused fde from struct ctdbd_connection
   via  dd3868a ctdbd_conn: fix a resource leak
  from  91d0275 winbindd: Use idmap cache in xids2sids

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


- Log -
commit 3660c76dce8bfb8b20832cd10151f832d367d9bb
Author: Martin Schwenke <mar...@meltin.net>
Date:   Wed Dec 28 06:18:26 2016 +1100

ctdb-takeover: Clean up when exiting on error

Signed-off-by: Martin Schwenke <mar...@meltin.net>
Reviewed-by: David Disseldorp <dd...@samba.org>

Autobuild-User(master): David Disseldorp <dd...@samba.org>
Autobuild-Date(master): Wed Dec 28 05:18:08 CET 2016 on sn-devel-144

commit 3b0b29bcb6fe5fa3555b234cb30f64e1473b2472
Author: Martin Schwenke <mar...@meltin.net>
Date:   Wed Dec 28 06:14:56 2016 +1100

ctdb-takeover: Fix CID 1398169 Unchecked return value

Signed-off-by: Martin Schwenke <mar...@meltin.net>
Reviewed-by: David Disseldorp <dd...@samba.org>

commit bdaa2bcc1dd768d27d3696de23c1e9c6084d58d3
Author: Ralph Boehme <s...@samba.org>
Date:   Tue Dec 27 15:41:51 2016 +0100

ctdbd_conn: remove unused fde from struct ctdbd_connection

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

Signed-off-by: Ralph Boehme <s...@samba.org>
Reviewed-by: David Disseldorp <dd...@samba.org>

commit dd3868a5c76cc6d177c393215c6755d1b42d74a6
Author: Ralph Boehme <s...@samba.org>
Date:   Tue Dec 27 09:19:16 2016 +0100

ctdbd_conn: fix a resource leak

When reinitializing the ctdb messaging subsystem we must free the ctdb
connection fde.

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

Signed-off-by: Ralph Boehme <s...@samba.org>
Reviewed-by: David Disseldorp <dd...@samba.org>

---

Summary of changes:
 ctdb/server/ctdb_takeover_helper.c | 10 --
 source3/lib/ctdbd_conn.c   |  2 --
 source3/lib/messages_ctdbd.c   |  2 ++
 3 files changed, 10 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/ctdb/server/ctdb_takeover_helper.c 
b/ctdb/server/ctdb_takeover_helper.c
index 3057528..f83b914 100644
--- a/ctdb/server/ctdb_takeover_helper.c
+++ b/ctdb/server/ctdb_takeover_helper.c
@@ -1160,11 +1160,17 @@ int main(int argc, const char *argv[])
force_rebalance_nodes = parse_node_list(mem_ctx, argv[3]);
if (force_rebalance_nodes == NULL) {
usage(argv[0]);
-   exit(1);
+   ret = EINVAL;
+   goto done;
}
}
 
-   logging_init(mem_ctx, NULL, NULL, "ctdb-takeover");
+   ret = logging_init(mem_ctx, NULL, NULL, "ctdb-takeover");
+   if (ret != 0) {
+   fprintf(stderr,
+   "ctdb-takeover: Unable to initialize logging\n");
+   goto done;
+   }
 
ev = tevent_context_init(mem_ctx);
if (ev == NULL) {
diff --git a/source3/lib/ctdbd_conn.c b/source3/lib/ctdbd_conn.c
index 118f3a0..d16796f 100644
--- a/source3/lib/ctdbd_conn.c
+++ b/source3/lib/ctdbd_conn.c
@@ -50,7 +50,6 @@ struct ctdbd_connection {
uint64_t rand_srvid;
struct ctdbd_srvid_cb *callbacks;
int fd;
-   struct tevent_fd *fde;
int timeout;
 };
 
@@ -394,7 +393,6 @@ static int ctdb_read_req(struct ctdbd_connection *conn, 
uint32_t reqid,
 
 static int ctdbd_connection_destructor(struct ctdbd_connection *c)
 {
-   TALLOC_FREE(c->fde);
if (c->fd != -1) {
close(c->fd);
c->fd = -1;
diff --git a/source3/lib/messages_ctdbd.c b/source3/lib/messages_ctdbd.c
index 5964894..bee2685 100644
--- a/source3/lib/messages_ctdbd.c
+++ b/source3/lib/messages_ctdbd.c
@@ -183,6 +183,8 @@ static int messaging_ctdbd_init_internal(struct 
messaging_context *msg_ctx,
int ret, ctdb_fd;
 
if (reinit) {
+   TALLOC_FREE(ctx->fde);
+
ret = ctdbd_reinit_connection(ctx,
  lp_ctdbd_socket(),
  lp_ctdb_timeout(),


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch master updated

2016-12-27 Thread David Disseldorp
The branch, master has been updated
   via  a25fb5c idmap_rid: Add the error string in a debug
   via  3d875e7 idmap_autorid: Add the error string in a debug
   via  462e8ce ctdb: Fix CID 1398175 Dereference after null check
   via  96924f7 ctdb: Fix CID 1398178 Argument cannot be negative
   via  93e8876 ctdb: Fix CID 1398179 Argument cannot be negative
   via  055650e lib: Fix a comment in idmap_cache.c
   via  92daaa9 lib: Fix whitespace in lmhosts.c
   via  b26d441 idl: Fix a comment typo
  from  1e52bb9 krb5_wrap: fix smb_krb5_cc_copy_creds() for MIT krb5

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


- Log -
commit a25fb5cae26a26aa3b994824b57e34624727b2a5
Author: Volker Lendecke <v...@samba.org>
Date:   Sun Dec 11 19:57:20 2016 +0100

idmap_rid: Add the error string in a debug

Signed-off-by: Volker Lendecke <v...@samba.org>
Reviewed-by: David Disseldorp <dd...@samba.org>

Autobuild-User(master): David Disseldorp <dd...@samba.org>
Autobuild-Date(master): Tue Dec 27 18:05:13 CET 2016 on sn-devel-144

commit 3d875e7e9ee1df368532b7962dd5de12faf1c87a
Author: Volker Lendecke <v...@samba.org>
Date:   Sun Dec 11 19:57:12 2016 +0100

idmap_autorid: Add the error string in a debug

Signed-off-by: Volker Lendecke <v...@samba.org>
Reviewed-by: David Disseldorp <dd...@samba.org>

commit 462e8cea04856eb5c82260a817f7d70770724d2e
Author: Volker Lendecke <v...@samba.org>
Date:   Tue Dec 27 10:50:29 2016 +

ctdb: Fix CID 1398175 Dereference after null check

Signed-off-by: Volker Lendecke <v...@samba.org>
Reviewed-by: David Disseldorp <dd...@samba.org>

commit 96924f75535f12ad4eb971a2b713b3ba3590ee1e
Author: Volker Lendecke <v...@samba.org>
Date:   Tue Dec 27 10:48:21 2016 +

ctdb: Fix CID 1398178 Argument cannot be negative

    Signed-off-by: Volker Lendecke <v...@samba.org>
Reviewed-by: David Disseldorp <dd...@samba.org>

commit 93e8876635f56da419ae050223503cec524bfd9e
Author: Volker Lendecke <v...@samba.org>
Date:   Tue Dec 27 10:47:10 2016 +

ctdb: Fix CID 1398179 Argument cannot be negative

    Signed-off-by: Volker Lendecke <v...@samba.org>
Reviewed-by: David Disseldorp <dd...@samba.org>

commit 055650ecb65f1d1d98ca97f9b938d33fe84bd28e
Author: Volker Lendecke <v...@samba.org>
Date:   Wed Dec 21 09:48:15 2016 +

lib: Fix a comment in idmap_cache.c

Signed-off-by: Volker Lendecke <v...@samba.org>
Reviewed-by: David Disseldorp <dd...@samba.org>

commit 92daaa97904a713236ebe3fb5cd53601fbe1c5b7
Author: Volker Lendecke <v...@samba.org>
Date:   Mon Dec 19 19:32:46 2016 +0100

lib: Fix whitespace in lmhosts.c

Signed-off-by: Volker Lendecke <v...@samba.org>
Reviewed-by: David Disseldorp <dd...@samba.org>

commit b26d441deab0fc79e0a5bae984a296ec2263b353
Author: Volker Lendecke <v...@samba.org>
Date:   Tue Dec 6 12:23:33 2016 +

idl: Fix a comment typo

Signed-off-by: Volker Lendecke <v...@samba.org>
Reviewed-by: David Disseldorp <dd...@samba.org>

---

Summary of changes:
 ctdb/common/sock_daemon.c  | 2 +-
 ctdb/common/sock_io.c  | 1 -
 ctdb/server/ctdb_takeover_helper.c | 2 +-
 libcli/nbt/lmhosts.c   | 8 
 librpc/idl/dnsserver.idl   | 2 +-
 source3/lib/idmap_cache.c  | 8 
 source3/winbindd/idmap_autorid.c   | 5 +++--
 source3/winbindd/idmap_rid.c   | 4 +++-
 8 files changed, 17 insertions(+), 15 deletions(-)


Changeset truncated at 500 lines:

diff --git a/ctdb/common/sock_daemon.c b/ctdb/common/sock_daemon.c
index 0a6573c..dc5dba0 100644
--- a/ctdb/common/sock_daemon.c
+++ b/ctdb/common/sock_daemon.c
@@ -282,7 +282,7 @@ static int sock_socket_init(TALLOC_CTX *mem_ctx, const char 
*sockpath,
 
 static int sock_socket_destructor(struct sock_socket *sock)
 {
-   if (sock->fd == -1) {
+   if (sock->fd != -1) {
close(sock->fd);
sock->fd = -1;
}
diff --git a/ctdb/common/sock_io.c b/ctdb/common/sock_io.c
index 7245d4e..b3581fc 100644
--- a/ctdb/common/sock_io.c
+++ b/ctdb/common/sock_io.c
@@ -53,7 +53,6 @@ int sock_connect(const char *sockpath)
fd = socket(AF_UNIX, SOCK_STREAM, 0);
if (fd == -1) {
D_ERR("socket() failed, errno=%d\n", errno);
-   close(fd);
return -1;
}
 
diff --git a/ctdb/server/ctdb_takeover_helper.c 
b/ctdb/server/ctdb_takeover_helper.c
index 847a49d..3057528 100644
--- a/ctdb/server/ctdb_takeover_helper.c
+++ b/ctdb/server/ctdb_takeover_helper.c
@@ -111,7 +111,7 @@ static struct tevent_req *get_public_ips_send(
 

[SCM] Samba Shared Repository - branch master updated

2016-11-21 Thread David Disseldorp
The branch, master has been updated
   via  79bbd81 python/provision: Remove unused parameter schema
   via  4d918d5 s4-torture: test valid environment in spoolss_EnumMonitors 
level 2.
   via  941173d s3-spoolss: use architecture in spoolss_MonitorInfo calls 
consistently
  from  54e392b ctdb-recovery: Avoid NULL dereference in failure case

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


- Log -
commit 79bbd81963b383e471860bd7e0fbec96672414cd
Author: Andrew Bartlett <abart...@samba.org>
Date:   Mon Nov 21 12:31:24 2016 +1300

python/provision: Remove unused parameter schema

Signed-off-by: Andrew Bartlett <abart...@samba.org>
Reviewed-by: David Disseldorp <dd...@samba.org>

Autobuild-User(master): David Disseldorp <dd...@samba.org>
Autobuild-Date(master): Mon Nov 21 18:49:12 CET 2016 on sn-devel-144

commit 4d918d510070ce6b2aaa971588795f91187a2950
Author: Günther Deschner <g...@samba.org>
Date:   Mon Nov 21 12:44:54 2016 +0100

s4-torture: test valid environment in spoolss_EnumMonitors level 2.

Signed-off-by: Guenther Deschner <g...@samba.org>
Reviewed-by: David Disseldorp <dd...@samba.org>

commit 941173d14ce509af297a63cc897e0f614b72daff
Author: Günther Deschner <g...@samba.org>
Date:   Mon Nov 21 11:27:31 2016 +0100

s3-spoolss: use architecture in spoolss_MonitorInfo calls consistently

Signed-off-by: Guenther Deschner <g...@samba.org>
Reviewed-by: David Disseldorp <dd...@samba.org>

---

Summary of changes:
 python/samba/provision/__init__.py  |  4 ++--
 source3/rpc_server/spoolss/srv_spoolss_nt.c | 10 --
 source4/torture/rpc/spoolss.c   |  1 +
 3 files changed, 11 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/python/samba/provision/__init__.py 
b/python/samba/provision/__init__.py
index e68db74..faa4b0c 100644
--- a/python/samba/provision/__init__.py
+++ b/python/samba/provision/__init__.py
@@ -787,7 +787,7 @@ def setup_name_mappings(idmap, sid, root_uid, nobody_uid,
 
 
 def setup_samdb_partitions(samdb_path, logger, lp, session_info,
-   provision_backend, names, schema, serverrole,
+   provision_backend, names, serverrole,
erase=False):
 """Setup the partitions for the SAM database.
 
@@ -1191,7 +1191,7 @@ def setup_samdb(path, session_info, provision_backend, 
lp, names,
 # Also wipes the database
 setup_samdb_partitions(path, logger=logger, lp=lp,
 provision_backend=provision_backend, session_info=session_info,
-names=names, serverrole=serverrole, schema=schema)
+names=names, serverrole=serverrole)
 
 # Load the database, but don's load the global schema and don't connect
 # quite yet
diff --git a/source3/rpc_server/spoolss/srv_spoolss_nt.c 
b/source3/rpc_server/spoolss/srv_spoolss_nt.c
index 45061b6..06f704d 100644
--- a/source3/rpc_server/spoolss/srv_spoolss_nt.c
+++ b/source3/rpc_server/spoolss/srv_spoolss_nt.c
@@ -9533,15 +9533,21 @@ static WERROR enumprintmonitors_level_2(TALLOC_CTX 
*mem_ctx,
 {
union spoolss_MonitorInfo *info;
WERROR result = WERR_OK;
+   const char *architecture;
 
info = talloc_array(mem_ctx, union spoolss_MonitorInfo, 2);
W_ERROR_HAVE_NO_MEMORY(info);
 
*count = 2;
 
+   architecture = lp_parm_const_string(GLOBAL_SECTION_SNUM,
+   "spoolss",
+   "architecture",
+   SPOOLSS_ARCHITECTURE_NT_X86);
+
result = fill_monitor_2(info, [0].info2,
SPL_LOCAL_PORT,
-   "Windows NT X86", /* FIXME */
+   architecture,
"localmon.dll");
if (!W_ERROR_IS_OK(result)) {
goto out;
@@ -9549,7 +9555,7 @@ static WERROR enumprintmonitors_level_2(TALLOC_CTX 
*mem_ctx,
 
result = fill_monitor_2(info, [1].info2,
SPL_TCPIP_PORT,
-   "Windows NT X86", /* FIXME */
+   architecture,
"tcpmon.dll");
if (!W_ERROR_IS_OK(result)) {
goto out;
diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c
index 751a3b2..81efff8 100644
--- a/source4/torture/rpc/spoolss.c
+++ b/source4/torture/rpc/spoolss.c
@@ -863,6 +863,7 @@ static bool test_EnumMonitors(struct torture_context *tctx,
COMPARE_STRING(tctx, cur->info1, ref->info2, 
monitor_name);
 

[SCM] Samba Shared Repository - branch master updated

2016-10-17 Thread David Disseldorp
The branch, master has been updated
   via  c89fa0d s3/vfs: gpfs: adapt vfs_gpfs_is_offline() to changes from 
3031815f982e365be50148564d47d7d5afab46e0
   via  2651971 s3/vfs: tsmsm: add missing ;
  from  1f0dd8f talloc: Fix CID 1373619 Unchecked return value

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


- Log -
commit c89fa0d41cfbaf4d4d7438ebdf2d8db16fbc6e62
Author: Ralph Boehme <s...@samba.org>
Date:   Mon Oct 17 14:16:20 2016 +0200

s3/vfs: gpfs: adapt vfs_gpfs_is_offline() to changes from 
3031815f982e365be50148564d47d7d5afab46e0

The patchset `git log -2 3031815f982e365be50148564d47d7d5afab46e0`
missed a change to vfs_gpfs_is_offline() which is now merely a helper
function that returns true or false and mustn't call into the VFS.

Signed-off-by: Ralph Boehme <s...@samba.org>
Reviewed-by: David Disseldorp <dd...@samba.org>

Autobuild-User(master): David Disseldorp <dd...@samba.org>
Autobuild-Date(master): Mon Oct 17 21:28:12 CEST 2016 on sn-devel-144

commit 2651971fb32aa59c88dac37feaa8fe6a1343276f
Author: Ralph Boehme <s...@samba.org>
Date:   Mon Oct 17 14:15:41 2016 +0200

s3/vfs: tsmsm: add missing ;

Signed-off-by: Ralph Boehme <s...@samba.org>
Reviewed-by: David Disseldorp <dd...@samba.org>

---

Summary of changes:
 source3/modules/vfs_gpfs.c  | 7 +++
 source3/modules/vfs_tsmsm.c | 2 +-
 2 files changed, 4 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c
index 28da8e2..89ce3b7 100644
--- a/source3/modules/vfs_gpfs.c
+++ b/source3/modules/vfs_gpfs.c
@@ -2007,13 +2007,12 @@ static bool vfs_gpfs_is_offline(struct 
vfs_handle_struct *handle,
return -1);
 
if (!config->winattr) {
-   return SMB_VFS_NEXT_IS_OFFLINE(handle, fname, sbuf);
+   return false;
}
 
status = get_full_smb_filename(talloc_tos(), fname, );
if (!NT_STATUS_IS_OK(status)) {
-   errno = map_errno_from_nt_status(status);
-   return -1;
+   return false;
}
 
ret = gpfswrap_get_winattrs_path(path, );
@@ -2029,7 +2028,7 @@ static bool vfs_gpfs_is_offline(struct vfs_handle_struct 
*handle,
}
DEBUG(10, ("%s is online\n", path));
TALLOC_FREE(path);
-   return SMB_VFS_NEXT_IS_OFFLINE(handle, fname, sbuf);
+   return false;
 }
 
 static bool vfs_gpfs_fsp_is_offline(struct vfs_handle_struct *handle,
diff --git a/source3/modules/vfs_tsmsm.c b/source3/modules/vfs_tsmsm.c
index aa0ae96..eba19ff 100644
--- a/source3/modules/vfs_tsmsm.c
+++ b/source3/modules/vfs_tsmsm.c
@@ -521,7 +521,7 @@ static NTSTATUS tsmsm_set_offline(struct vfs_handle_struct 
*handle,
return NT_STATUS_NO_MEMORY;
}
DEBUG(10, ("tsmsm_set_offline: Running [%s]\n", command));
-   result = smbrun(command, NULL, NULL)
+   result = smbrun(command, NULL, NULL);
if(result != 0) {
DEBUG(1,("tsmsm_set_offline: Running [%s] returned %d\n", 
command, result));
TALLOC_FREE(command);


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch master updated

2016-10-13 Thread David Disseldorp
The branch, master has been updated
   via  22c9229 strv.c: add strv_to_env for use with execle, etc.
  from  001e23f ntlmssp.idl: don't generate python bindings for 
ntlmssp_NTLM_RESPONSE and ntlmssp_LM_RESPONSE

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


- Log -
commit 22c92294ad06a1e3421cc66a11c6530675121ccf
Author: Trever L. Adams <trever.ad...@gmail.com>
Date:   Thu Oct 13 03:25:08 2016 -0600

strv.c: add strv_to_env for use with execle, etc.

Reviewed-by: Volker Lendecke <v...@samba.org>
Reviewed-by: David Disseldorp <dd...@samba.org>
Signed-off-by: Trever L. Adams <trever.ad...@gmail.com>

Autobuild-User(master): David Disseldorp <dd...@samba.org>
Autobuild-Date(master): Fri Oct 14 01:44:02 CEST 2016 on sn-devel-144

---

Summary of changes:
 lib/util/strv.c | 26 ++
 lib/util/strv.h |  1 +
 2 files changed, 27 insertions(+)


Changeset truncated at 500 lines:

diff --git a/lib/util/strv.c b/lib/util/strv.c
index 577cd4d..99ce76f 100644
--- a/lib/util/strv.c
+++ b/lib/util/strv.c
@@ -155,3 +155,29 @@ void strv_delete(char **strv, char *entry)
 
*strv = talloc_realloc(NULL, *strv, char, len - entry_len);
 }
+
+char * const *strv_to_env(TALLOC_CTX *mem_ctx, char *strv)
+{
+   char **data;
+   char *next = NULL;
+   size_t i;
+   size_t count = strv_count(strv);
+
+   if (strv == NULL) {
+   return NULL;
+   }
+
+   data = talloc_array(mem_ctx, char *, count + 1);
+
+   if (data == NULL) {
+   return NULL;
+   }
+
+   for(i = 0; i < count; i++) {
+   next = strv_next(strv, next);
+   data[i] = next;
+   }
+   data[count] = NULL;
+
+   return data;
+}
diff --git a/lib/util/strv.h b/lib/util/strv.h
index a3fe7ab..398e8ea 100644
--- a/lib/util/strv.h
+++ b/lib/util/strv.h
@@ -29,5 +29,6 @@ char *strv_next(char *strv, const char *entry);
 char *strv_find(char *strv, const char *entry);
 size_t strv_count(char *strv);
 void strv_delete(char **strv, char *entry);
+char * const *strv_to_env(TALLOC_CTX *mem_ctx, char *strv);
 
 #endif


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch master updated

2016-08-18 Thread David Disseldorp
The branch, master has been updated
   via  a6073e6 smbd: allow reading files based on FILE_EXECUTE access right
  from  626dcc9 ctdb-ipalloc: Fix cumulative takeover timeout

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


- Log -
commit a6073e6130d39dac58f1e6ea9f41ec4ab34c3e29
Author: Uri Simchoni <u...@samba.org>
Date:   Thu Aug 4 14:59:23 2016 +0300

smbd: allow reading files based on FILE_EXECUTE access right

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

Signed-off-by: Uri Simchoni <u...@samba.org>
Reviewed-by: David Disseldorp <dd...@samba.org>

Autobuild-User(master): David Disseldorp <dd...@samba.org>
Autobuild-Date(master): Thu Aug 18 18:58:22 CEST 2016 on sn-devel-144

---

Summary of changes:
 selftest/knownfail   |  7 ++-
 source3/smbd/smb2_glue.c | 16 
 2 files changed, 18 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/selftest/knownfail b/selftest/knownfail
index 41cad44..ffcaf06 100644
--- a/selftest/knownfail
+++ b/selftest/knownfail
@@ -286,10 +286,7 @@
 ^samba4.krb5.kdc.*as-req-aes.*fl2000dc
 # nt4_member and ad_member don't support ntlmv1
 
^samba3.blackbox.smbclient_auth.plain.*_member.*option=clientntlmv2auth=no.member.creds.*as.user
-#new read tests fail
+#nt-vfs server blocks read with execute access
 ^samba4.smb2.read.access
-^samba3.smb2.read.access
-#new copychunk tests fail
+#ntvfs server blocks copychunk with execute access on read handle
 ^samba4.smb2.ioctl.copy_chunk_bad_access
-^samba3.smb2.ioctl.copy_chunk_bad_access
-^samba3.smb2.ioctl fs_specific.copy_chunk_bad_access
diff --git a/source3/smbd/smb2_glue.c b/source3/smbd/smb2_glue.c
index b41775d..0bb34be 100644
--- a/source3/smbd/smb2_glue.c
+++ b/source3/smbd/smb2_glue.c
@@ -48,6 +48,22 @@ struct smb_request *smbd_smb2_fake_smb_request(struct 
smbd_smb2_request *req)
 FLAGS2_32_BIT_ERROR_CODES |
 FLAGS2_LONG_PATH_COMPONENTS |
 FLAGS2_IS_LONG_NAME;
+
+   /* This is not documented in revision 49 of [MS-SMB2] but should be
+* added in a later revision (and torture test smb2.read.access
+* as well as smb2.ioctl_copy_chunk_bad_access against
+* Server 2012R2 confirms this)
+*
+* If FILE_EXECUTE is granted to a handle then the SMB2 server
+* acts as if FILE_READ_DATA has also been granted. We must still
+* keep the original granted mask, because with ioctl requests,
+* access checks are made on the file handle, "below" the SMB2
+* server, and the object store below the SMB layer is not aware
+* of this arrangement (see smb2.ioctl.copy_chunk_bad_access
+* torture test).
+*/
+   smbreq->flags2 |= FLAGS2_READ_PERMIT_EXECUTE;
+
if (IVAL(inhdr, SMB2_HDR_FLAGS) & SMB2_HDR_FLAG_DFS) {
smbreq->flags2 |= FLAGS2_DFS_PATHNAMES;
}


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch master updated

2016-08-17 Thread David Disseldorp
The branch, master has been updated
   via  b213082 s3: vfs: snapper: Fix snapper_gmt_strip_snapshot() function 
to strip @GMT token identically to shadow_copy2.c:shadow_copy2_strip_snapshot()
   via  3e3b9be s3: vfs: snapper: Add and use len_before_gmt, calculated as 
(p-name).
   via  abf18f4 s3: vfs: shadow_copy2: Replace all uses of (p-name) with 
len_before_gmt.
  from  2fd20cf ctdb-tests: Validate that TAKE_IP works with IP already on 
an interface

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


- Log -
commit b21308252eb409bad6089cc0f09fada0229d33e8
Author: Jeremy Allison <j...@samba.org>
Date:   Wed Aug 17 10:57:10 2016 -0700

s3: vfs: snapper: Fix snapper_gmt_strip_snapshot() function to strip @GMT 
token identically to shadow_copy2.c:shadow_copy2_strip_snapshot()

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

Signed-off-by: Jeremy Allison <j...@samba.org>
Reviewed-by: Christof Schmitt <c...@samba.org>
Reviewed-by: David Disseldorp <dd...@samba.org>

Autobuild-User(master): David Disseldorp <dd...@samba.org>
Autobuild-Date(master): Thu Aug 18 06:43:02 CEST 2016 on sn-devel-144

commit 3e3b9be948d873696a1ab9c0cb859bd8911165f0
Author: Jeremy Allison <j...@samba.org>
Date:   Wed Aug 17 10:53:08 2016 -0700

s3: vfs: snapper: Add and use len_before_gmt, calculated as (p-name).

Make the code closer to the same functionality in 
shadow_copy2.c:shadow_copy2_strip_snapshot().

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

Signed-off-by: Jeremy Allison <j...@samba.org>
Reviewed-by: Christof Schmitt <c...@samba.org>
Reviewed-by: David Disseldorp <dd...@samba.org>

commit abf18f42dc398f5f17088de87fd0e681fd44ebeb
Author: Jeremy Allison <j...@samba.org>
Date:   Wed Aug 17 10:49:50 2016 -0700

s3: vfs: shadow_copy2: Replace all uses of (p-name) with len_before_gmt.

p and name don't change, and we've already calculated this length.
Part of the effort to make the code inside vfs_snapper.c that does
the same thing more similar (we can't make these functions identical
due to the 'snapdir' use case).

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

Signed-off-by: Jeremy Allison <j...@samba.org>
    Reviewed-by: Christof Schmitt <c...@samba.org>
Reviewed-by: David Disseldorp <dd...@samba.org>

---

Summary of changes:
 source3/modules/vfs_shadow_copy2.c |  6 +++---
 source3/modules/vfs_snapper.c  | 30 +-
 2 files changed, 28 insertions(+), 8 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_shadow_copy2.c 
b/source3/modules/vfs_shadow_copy2.c
index 4ac16d3..2a72740 100644
--- a/source3/modules/vfs_shadow_copy2.c
+++ b/source3/modules/vfs_shadow_copy2.c
@@ -514,7 +514,7 @@ static bool shadow_copy2_strip_snapshot(TALLOC_CTX *mem_ctx,
q += 1;
 
rest_len = strlen(q);
-   dst_len = (p-name) + rest_len;
+   dst_len = len_before_gmt + rest_len;
 
if (priv->config->snapdirseverywhere) {
char *insert;
@@ -580,10 +580,10 @@ static bool shadow_copy2_strip_snapshot(TALLOC_CTX 
*mem_ctx,
return false;
}
if (p > name) {
-   memcpy(stripped, name, p-name);
+   memcpy(stripped, name, len_before_gmt);
}
if (rest_len > 0) {
-   memcpy(stripped + (p-name), q, rest_len);
+   memcpy(stripped + len_before_gmt, q, rest_len);
}
stripped[dst_len] = '\0';
*pstripped = stripped;
diff --git a/source3/modules/vfs_snapper.c b/source3/modules/vfs_snapper.c
index 8f3c647..5c1821d 100644
--- a/source3/modules/vfs_snapper.c
+++ b/source3/modules/vfs_snapper.c
@@ -1729,6 +1729,7 @@ static bool snapper_gmt_strip_snapshot(TALLOC_CTX 
*mem_ctx,
char *q;
char *stripped;
size_t rest_len, dst_len;
+   ptrdiff_t len_before_gmt;
 
p = strstr_m(name, "@GMT-");
if (p == NULL) {
@@ -1737,6 +1738,7 @@ static bool snapper_gmt_strip_snapshot(TALLOC_CTX 
*mem_ctx,
if ((p > name) && (p[-1] != '/')) {
goto no_snapshot;
}
+   len_before_gmt = p - name;
q = strptime(p, GMT_FORMAT, );
if (q == NULL) {
goto no_snapshot;
@@ -1746,9 +1748,23 @@ static bool snapper_gmt_strip_snapshot(TALLOC_CTX 
*mem_ctx,
if (timestamp == (time_t)-1) {
goto no_snapshot;
}
-   if ((p == name) && (q[0] == '\0')) {
+   if (q[0] == '\0') {
+   /*
+* The name consists of onl

[SCM] Samba Shared Repository - branch master updated

2016-08-16 Thread David Disseldorp
The branch, master has been updated
   via  3e42b69 smbd: look only at handle readability for COPYCHUNK dest
   via  5bf11f6 s4-smbtorture: pin copychunk exec right behavior
   via  6ce0304 seltest: allow opening files with arbitrary rights in 
smb2.ioctl tests
   via  7dc9f58 seltest: implicit FILE_READ_DATA non-reporting
   via  55a9d35 s4-selftest: add test for read access check
   via  1b06aca s4-selftest: add functions which create with desired access
   via  20b9a5b s4-smbtorture: use standard macros in smb2.read test
  from  f1b42ec smbd: Fix snapshot query on shares with DFS enabled

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


- Log -
commit 3e42b69d5e1216b6af570a09d58040d281bbbf17
Author: Uri Simchoni <u...@samba.org>
Date:   Sat Aug 13 00:19:33 2016 +0300

smbd: look only at handle readability for COPYCHUNK dest

This commits sets the stage for a change of behavior
in a later commit.

When checking FILE_READ_DATA on the COPYCHUNK dest handle,
only check the handle readability and not the extra right
that may have been added due to the FILE_EXECUTE right.

The check for FILE_READ_DATA always seemed strange for the
dest handle, which is not read. It turns out that in Windows,
this check is not done at the SMB layer, but at a lower layer
that processes the IOCTL request - the IOCTL code has bits
that specify what type of access check needs to be done.

Therefore, this lower layer is unaware of the SMB layer's
practice of granting READ access based on the FILE_EXECUTE
right, and it only checks the handle's readability.

This subtle difference has observable behavior - the
COPYCHUNK source handle can have FILE_EXECUTE right instead
of FILE_READ_DATA, but the dest handle cannot.

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

Signed-off-by: Uri Simchoni <u...@samba.org>
Reviewed-by: David Disseldorp <dd...@samba.org>

Autobuild-User(master): David Disseldorp <dd...@samba.org>
Autobuild-Date(master): Tue Aug 16 15:21:03 CEST 2016 on sn-devel-144

commit 5bf11f6f5b4dab4cba4b00674bcb76138fb55974
Author: Uri Simchoni <u...@samba.org>
Date:   Thu Aug 4 13:12:58 2016 +0300

s4-smbtorture: pin copychunk exec right behavior

Add tests that show copychunk behavior when the
source and dest handles have execute right instead
of read-data right.

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

Signed-off-by: Uri Simchoni <u...@samba.org>
Reviewed-by: David Disseldorp <dd...@samba.org>

commit 6ce0304eda4b464972defcecd591fab03428bd03
Author: Uri Simchoni <u...@samba.org>
Date:   Mon Aug 15 23:39:50 2016 +0300

seltest: allow opening files with arbitrary rights in smb2.ioctl tests

Separate file creation (which requires write access) from the
opening of the file for the test (which might be without write
access).

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

Signed-off-by: Uri Simchoni <u...@samba.org>
Reviewed-by: David Disseldorp <dd...@samba.org>

commit 7dc9f582066d500bf57000891560610e8d2e208c
Author: Uri Simchoni <u...@samba.org>
Date:   Sat Aug 13 21:23:34 2016 +0300

seltest: implicit FILE_READ_DATA non-reporting

This test (passes against Windows Server 2012R2) shows
that the implicit FILE_READ_DATA that is added whenever
FILE_EXECUTE is granted, is not reported back when querying
the handle.

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

Signed-off-by: Uri Simchoni <u...@samba.org>
Reviewed-by: David Disseldorp <dd...@samba.org>

commit 55a9d35cabaea6e98211fc058b788cedf9b7b22a
Author: Uri Simchoni <u...@samba.org>
Date:   Sun Jul 31 14:29:37 2016 +0300

s4-selftest: add test for read access check

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12149
    
Signed-off-by: Uri Simchoni <u...@samba.org>
Reviewed-by: David Disseldorp <dd...@samba.org>

commit 1b06acafa4e9ea91a50e5ed85da881187057da6e
Author: Uri Simchoni <u...@samba.org>
Date:   Sun Jul 31 14:26:24 2016 +0300

s4-selftest: add functions which create with desired access

Add functions which create a file or a directory with
specific desired access.

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

Signed-off-by: Uri Simchoni <u...@samba.org>
Reviewed-by: David Disseldorp <dd...@samba.org>

commit 20b9a5bd74fafbca4b7cc7952c27033edcf0eeb8
Author: Uri Simchoni <u...@samba.org>
Date:   Thu Aug 4 12:59:38 2016 +0300

s4-smbtorture: use standard macros in smb2.read test

BUG: https://bugzilla.samba.org/show_b

[SCM] Samba Shared Repository - branch master updated

2015-06-09 Thread David Disseldorp
The branch, master has been updated
   via  728cfa5 s3: libsmbclient: Use cache targetcli in SMBC_splice_ctx 
calls also.
  from  0615b72 smbd/trans2: add a useful diagnostic for files with bad 
encoding

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


- Log -
commit 728cfa5d3983c545f2a09947c8aabc90da3b5bc5
Author: Jeremy Allison j...@samba.org
Date:   Mon Jun 8 10:07:49 2015 -0700

s3: libsmbclient: Use cache targetcli in SMBC_splice_ctx calls also.

Bug 11295 - Excessive cli_resolve_path() usage can slow down transmission.

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

Signed-off-by: Jeremy Allison j...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

Autobuild-User(master): David Disseldorp dd...@samba.org
Autobuild-Date(master): Wed Jun 10 04:09:36 CEST 2015 on sn-devel-104

---

Summary of changes:
 source3/libsmb/libsmb_file.c | 62 ++--
 1 file changed, 2 insertions(+), 60 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/libsmb/libsmb_file.c b/source3/libsmb/libsmb_file.c
index 29a6a0f..6b43676 100644
--- a/source3/libsmb/libsmb_file.c
+++ b/source3/libsmb/libsmb_file.c
@@ -299,12 +299,6 @@ SMBC_splice_ctx(SMBCCTX *context,
 void *priv)
 {
off_t written;
-   char *server = NULL, *share = NULL, *user = NULL, *password = NULL;
-   char *path = NULL;
-   char *targetpath = NULL;
-   struct cli_state *srccli = NULL;
-   struct cli_state *dstcli = NULL;
-   uint16_t port = 0;
TALLOC_CTX *frame = talloc_stackframe();
NTSTATUS status;
 
@@ -330,64 +324,12 @@ SMBC_splice_ctx(SMBCCTX *context,
return -1;
}
 
-   if (SMBC_parse_path(frame,
-context,
-srcfile-fname,
-NULL,
-server,
-port,
-share,
-path,
-user,
-password,
-NULL)) {
-errno = EINVAL;
-   TALLOC_FREE(frame);
-return -1;
-}
-
-   status = cli_resolve_path(frame, , context-internal-auth_info,
- srcfile-srv-cli, path,
- srccli, targetpath);
-   if (!NT_STATUS_IS_OK(status)) {
-   d_printf(Could not resolve %s\n, path);
-errno = ENOENT;
-   TALLOC_FREE(frame);
-   return -1;
-   }
-
-   if (SMBC_parse_path(frame,
-context,
-dstfile-fname,
-NULL,
-server,
-port,
-share,
-path,
-user,
-password,
-NULL)) {
-errno = EINVAL;
-   TALLOC_FREE(frame);
-return -1;
-}
-
-   status = cli_resolve_path(frame, , context-internal-auth_info,
- dstfile-srv-cli, path,
- dstcli, targetpath);
-   if (!NT_STATUS_IS_OK(status)) {
-   d_printf(Could not resolve %s\n, path);
-errno = ENOENT;
-   TALLOC_FREE(frame);
-   return -1;
-   }
-
-   status = cli_splice(srccli, dstcli,
+   status = cli_splice(srcfile-targetcli, dstfile-targetcli,
srcfile-cli_fd, dstfile-cli_fd,
count, srcfile-offset, dstfile-offset, written,
splice_cb, priv);
if (!NT_STATUS_IS_OK(status)) {
-   errno = SMBC_errno(context, srccli);
+   errno = SMBC_errno(context, srcfile-targetcli);
TALLOC_FREE(frame);
return -1;
}


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2015-04-13 Thread David Disseldorp
The branch, master has been updated
   via  2d4db4a s3: libsmbclient: After getting attribute server, ensure 
main srv pointer is still valid.
  from  2a6e170 witness: add WITNESS_UNSPECIFIED_VERSION to IDL.

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


- Log -
commit 2d4db4a65e1e8924470741378fe249f22196eceb
Author: Jeremy Allison j...@samba.org
Date:   Tue Mar 31 14:40:23 2015 -0700

s3: libsmbclient: After getting attribute server, ensure main srv pointer 
is still valid.

Bug #11186: Crash seen in libsmbclient due to free of server structure 
during SMBC_getxattr() call

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

Signed-off-by: Jeremy Allison j...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

Autobuild-User(master): David Disseldorp dd...@samba.org
Autobuild-Date(master): Tue Apr 14 02:58:43 CEST 2015 on sn-devel-104

---

Summary of changes:
 source3/libsmb/libsmb_xattr.c | 41 +
 1 file changed, 41 insertions(+)


Changeset truncated at 500 lines:

diff --git a/source3/libsmb/libsmb_xattr.c b/source3/libsmb/libsmb_xattr.c
index 8493776..9f7bea8 100644
--- a/source3/libsmb/libsmb_xattr.c
+++ b/source3/libsmb/libsmb_xattr.c
@@ -2073,6 +2073,25 @@ SMBC_getxattr_ctx(SMBCCTX *context,
 if (! srv-no_nt_session) {
 ipc_srv = SMBC_attr_server(frame, context, server, port, share,
workgroup, user, password);
+   /*
+* SMBC_attr_server() can cause the original
+* server to be removed from the cache.
+* If so we must error out here as the srv
+* pointer has been freed.
+*/
+   if (smbc_getFunctionGetCachedServer(context)(context,
+   server,
+   share,
+   workgroup,
+   user) != srv) {
+#if defined(ECONNRESET)
+   errno = ECONNRESET;
+#else
+   errno = ETIMEDOUT;
+#endif
+   TALLOC_FREE(frame);
+   return -1;
+   }
 if (! ipc_srv) {
 srv-no_nt_session = True;
 }
@@ -2208,9 +2227,31 @@ SMBC_removexattr_ctx(SMBCCTX *context,
 }
 
 if (! srv-no_nt_session) {
+   int saved_errno;
 ipc_srv = SMBC_attr_server(frame, context, server, port, share,
workgroup, user, password);
+   saved_errno = errno;
+   /*
+* SMBC_attr_server() can cause the original
+* server to be removed from the cache.
+* If so we must error out here as the srv
+* pointer has been freed.
+*/
+   if (smbc_getFunctionGetCachedServer(context)(context,
+   server,
+   share,
+   workgroup,
+   user) != srv) {
+#if defined(ECONNRESET)
+   errno = ECONNRESET;
+#else
+   errno = ETIMEDOUT;
+#endif
+   TALLOC_FREE(frame);
+   return -1;
+   }
 if (! ipc_srv) {
+   errno = saved_errno;
 srv-no_nt_session = True;
 }
 } else {


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2015-04-08 Thread David Disseldorp
The branch, master has been updated
   via  e66e06b fss: Fix CID 1293354 Wrong operator used
  from  5ee27b4 waf: Fix systemd detection

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


- Log -
commit e66e06b60270239577fbf79c5f7b098dafc2458d
Author: Volker Lendecke v...@samba.org
Date:   Wed Apr 8 16:46:44 2015 +0200

fss: Fix CID 1293354 Wrong operator used

Not used right now, but prevent future confusion.

Signed-off-by: Volker Lendecke v...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

Autobuild-User(master): David Disseldorp dd...@samba.org
Autobuild-Date(master): Wed Apr  8 19:36:36 CEST 2015 on sn-devel-104

---

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


Changeset truncated at 500 lines:

diff --git a/source3/rpc_server/fss/srv_fss_agent.c 
b/source3/rpc_server/fss/srv_fss_agent.c
index 46d9a01..19578cc 100644
--- a/source3/rpc_server/fss/srv_fss_agent.c
+++ b/source3/rpc_server/fss/srv_fss_agent.c
@@ -1287,7 +1287,7 @@ uint32_t _fss_RecoveryCompleteShadowCopySet(struct 
pipes_struct *p,
/* stop msg sequence timer */
TALLOC_FREE(fss_global.seq_tmr);
 
-   if (sc_set-context | ATTR_NO_AUTO_RECOVERY) {
+   if (sc_set-context  ATTR_NO_AUTO_RECOVERY) {
/* TODO set read-only */
}
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2015-03-30 Thread David Disseldorp
The branch, master has been updated
   via  c3747f9 Check for third party Python modules during configure.
   via  e50342f Move configure part of third party to third_party/wscript.
   via  d16c0e3 Pass --recursive to 'git clone' in autobuild.
   via  b2d2fd2 groupdb: Fix a typo
   via  6169ab7 heimdal: Fix a warning
   via  578f2c7 heimdal: Fix a warning
   via  868f83e vfs_gpfs: Remove warning after failure of get_gpfs_fset_id
  from  079575d ctdb-tests: Switch to tcp check in rpcinfo stub

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


- Log -
commit c3747f9658fe1365a140622d3e12823dad7cb39e
Author: Jelmer Vernooij jel...@samba.org
Date:   Sat Mar 28 16:11:51 2015 +

Check for third party Python modules during configure.

Inform the user whether the module was found on the system, or if the
bundled copy is being used. If the module is not found, suggest what
they can do to make it available to Samba.

Change-Id: I89ec57a2acf87768ca3714add59575578d2ee399
Signed-Off-By: Jelmer Vernooij jel...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

Autobuild-User(master): David Disseldorp dd...@samba.org
Autobuild-Date(master): Mon Mar 30 13:40:33 CEST 2015 on sn-devel-104

commit e50342f33d5969f34e5b83f1ed3e7644470fb2ce
Author: Jelmer Vernooij jel...@samba.org
Date:   Sat Mar 28 15:43:29 2015 +

Move configure part of third party to third_party/wscript.

Change-Id: I34875a8bde99df2e0a2659677e88640bb0ec1816
Signed-off-by: Jelmer Vernooij jel...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

commit d16c0e369ef58a4051c9c917f9448acebf21d010
Author: Jelmer Vernooij jel...@samba.org
Date:   Sat Mar 28 16:15:03 2015 +

Pass --recursive to 'git clone' in autobuild.

This makes it possible to use submodules in Samba.

Change-Id: Iccb1876b1daf82864b18486f2dca9036d7d3c75c
Signed-Off-By: Jelmer Vernooij jel...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

commit b2d2fd2c6785b7d459a9dd0dcbe4a0cc1a922030
Author: Volker Lendecke v...@samba.org
Date:   Sun Mar 29 18:17:46 2015 +0200

groupdb: Fix a typo

Signed-off-by: Volker Lendecke v...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

commit 6169ab798df7c1f765bc6ac537a9b398b039507e
Author: Volker Lendecke v...@samba.org
Date:   Sun Mar 29 15:59:41 2015 +0200

heimdal: Fix a warning

99% this is what was meant

Signed-off-by: Volker Lendecke v...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

commit 578f2c7c7d7a38efd98e3aeb8de2c22a8ce5cfdb
Author: Volker Lendecke v...@samba.org
Date:   Sun Mar 29 15:59:41 2015 +0200

heimdal: Fix a warning

99% this is what was meant

Signed-off-by: Volker Lendecke v...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

commit 868f83e5c6c1c904609be8d15e7c569b05c78ea3
Author: Christof Schmitt c...@samba.org
Date:   Fri Mar 27 13:16:41 2015 -0700

vfs_gpfs: Remove warning after failure of get_gpfs_fset_id

get_gpfs_fset_id already emits more detailed warnings, there is no need
to print an additional warning in the calling function.

Signed-off-by: Christof Schmitt c...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

---

Summary of changes:
 script/autobuild.py  |  4 +-
 source3/groupdb/mapping_tdb.c|  2 +-
 source3/modules/vfs_gpfs.c   |  2 -
 source4/heimdal/lib/hcrypto/engine.c |  2 +-
 source4/heimdal/lib/hcrypto/md2.c|  2 +-
 third_party/wscript  | 73 
 third_party/wscript_build| 29 --
 wscript  |  3 +-
 8 files changed, 79 insertions(+), 38 deletions(-)
 create mode 100644 third_party/wscript
 delete mode 100644 third_party/wscript_build


Changeset truncated at 500 lines:

diff --git a/script/autobuild.py b/script/autobuild.py
index 3175ff0..6e1e3e0 100755
--- a/script/autobuild.py
+++ b/script/autobuild.py
@@ -197,7 +197,7 @@ class builder(object):
 cleanup_list.append(self.prefix)
 os.makedirs(self.sdir)
 run_cmd(rm -rf %s % self.sdir)
-run_cmd(git clone --shared %s %s % (test_master, self.sdir), 
dir=test_master, show=True)
+run_cmd(git clone --recursive --shared %s %s % (test_master, 
self.sdir), dir=test_master, show=True)
 self.start_next()
 
 def start_next(self):
@@ -575,7 +575,7 @@ while True:
 try:
 run_cmd(rm -rf %s % test_master)
 cleanup_list.append(test_master)
-run_cmd(git clone --shared %s %s % (gitroot, test_master), 
show=True, dir=gitroot)
+run_cmd(git clone --recursive --shared %s %s % (gitroot, 
test_master), show=True, dir=gitroot)
 except Exception

[SCM] Samba Shared Repository - branch master updated

2015-03-30 Thread David Disseldorp
The branch, master has been updated
   via  bdf0a81 waf: Remove 'linkflags.remove(x)' line added in error.
  from  48e90ba tdb: Do not build test binaries if it's not a standalone 
build

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


- Log -
commit bdf0a81006534348996a27207e0f712646bf39b5
Author: Jeremy Allison j...@samba.org
Date:   Mon Mar 30 11:41:09 2015 -0700

waf: Remove 'linkflags.remove(x)' line added in error.

Fixes bug #11165 - Bug in configure scripts when system-mitkrb5 is used

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

Signed-off-by: Jeremy Allison j...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

Autobuild-User(master): David Disseldorp dd...@samba.org
Autobuild-Date(master): Tue Mar 31 04:32:52 CEST 2015 on sn-devel-104

---

Summary of changes:
 buildtools/wafsamba/samba_conftests.py | 1 -
 1 file changed, 1 deletion(-)


Changeset truncated at 500 lines:

diff --git a/buildtools/wafsamba/samba_conftests.py 
b/buildtools/wafsamba/samba_conftests.py
index 1afc6c9..96fead5 100644
--- a/buildtools/wafsamba/samba_conftests.py
+++ b/buildtools/wafsamba/samba_conftests.py
@@ -565,7 +565,6 @@ def samba_config_c_parse_flags(line1, uselib, env):
 # bugs in the real parse_flags() function.
 #
 if x == '-Wl,-rpath' or x == '-Wl,-R':
-linkflags.remove(x)
 x = lst1.pop(0)
 if x.startswith('-Wl,'):
 rpath = x[4:]


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2015-03-20 Thread David Disseldorp
The branch, master has been updated
   via  4f4151e s3: lib: libsmbclient: If reusing a server struct, check 
every cli-timout miliseconds if it's still valid before use.
  from  00d92f5 s3: libcli: smb1: Ensure we correctly finish a tevent req 
if the writev fails in the SMB1 case.

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


- Log -
commit 4f4151ea050a5f34e42d73a4bf9448c673a35787
Author: Jeremy Allison j...@samba.org
Date:   Wed Mar 18 14:15:16 2015 -0700

s3: lib: libsmbclient: If reusing a server struct, check every cli-timout 
miliseconds if it's still valid before use.

Uses an cli_echo() call to do so.

Based on code from sharga...@novell.com

Bug 11079 - libsmbclient not checking the cached connection alive status 
before re-using it from connection cache

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

Signed-off-by: Jeremy Allison j...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

Autobuild-User(master): David Disseldorp dd...@samba.org
Autobuild-Date(master): Fri Mar 20 13:48:26 CET 2015 on sn-devel-104

---

Summary of changes:
 source3/include/libsmb_internal.h |  1 +
 source3/libsmb/libsmb_server.c| 16 
 2 files changed, 17 insertions(+)


Changeset truncated at 500 lines:

diff --git a/source3/include/libsmb_internal.h 
b/source3/include/libsmb_internal.h
index ce73181..65fad99 100644
--- a/source3/include/libsmb_internal.h
+++ b/source3/include/libsmb_internal.h
@@ -81,6 +81,7 @@ struct _SMBCSRV {
bool no_pathinfo3;
 bool no_nt_session;
 struct policy_handle pol;
+   time_t last_echo_time;
 
SMBCSRV *next, *prev;
 };
diff --git a/source3/libsmb/libsmb_server.c b/source3/libsmb/libsmb_server.c
index 8f68a40..d6c2588 100644
--- a/source3/libsmb/libsmb_server.c
+++ b/source3/libsmb/libsmb_server.c
@@ -45,10 +45,26 @@ int
 SMBC_check_server(SMBCCTX * context,
   SMBCSRV * server)
 {
+   time_t now;
+
if (!cli_state_is_connected(server-cli)) {
return 1;
}
 
+   now = time_mono(NULL);
+
+   if (server-last_echo_time == (time_t)0 ||
+   now  server-last_echo_time +
+   (server-cli-timeout/1000)) {
+   unsigned char data[16] = {0};
+   NTSTATUS status = cli_echo(server-cli,
+   1,
+   data_blob_const(data, sizeof(data)));
+   if (!NT_STATUS_IS_OK(status)) {
+   return 1;
+   }
+   server-last_echo_time = now;
+   }
return 0;
 }
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2015-03-06 Thread David Disseldorp
The branch, master has been updated
   via  90d03a6 heimdal: Fix CID 1273430 Double free
  from  87b7a7d script/autobuild.py: build the samba target with 
--with-profiling-data

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


- Log -
commit 90d03a65bcb2aae262ad113da420ae63bdf5b4b1
Author: Volker Lendecke v...@samba.org
Date:   Thu Mar 5 21:17:31 2015 +0100

heimdal: Fix CID 1273430 Double free

I think Coverity is right here: Before the preceding call to
krb5_make_principal we already krb5_free_principal(ctx, tmp_creds.server)
without wiping out tmp_creds.server. The call to krb5_make_principal only
stores something fresh when it also returns 0 a.k.a. success.

Signed-off-by: Volker Lendecke v...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

Autobuild-User(master): David Disseldorp dd...@samba.org
Autobuild-Date(master): Fri Mar  6 17:38:09 CET 2015 on sn-devel-104

---

Summary of changes:
 source4/heimdal/lib/krb5/get_cred.c | 1 -
 1 file changed, 1 deletion(-)


Changeset truncated at 500 lines:

diff --git a/source4/heimdal/lib/krb5/get_cred.c 
b/source4/heimdal/lib/krb5/get_cred.c
index 51550da..29ab6ea 100644
--- a/source4/heimdal/lib/krb5/get_cred.c
+++ b/source4/heimdal/lib/krb5/get_cred.c
@@ -839,7 +839,6 @@ get_cred_kdc_capath_worker(krb5_context context,
ret = krb5_make_principal(context, tmp_creds.server,
  tgt_inst, KRB5_TGS_NAME, server_realm, NULL);
if(ret) {
-   krb5_free_principal(context, tmp_creds.server);
krb5_free_principal(context, tmp_creds.client);
return ret;
}


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2015-03-04 Thread David Disseldorp
The branch, master has been updated
   via  40a317f rpc_server: Fix CID 1035535 Uninitialized scalar variable
   via  8f7bdc8 rpc_server: Fix CID 1035534 Uninitialized scalar variable
   via  4891a98 backupkey: Remove an unused variable
   via  969519b backupkey: Fix CID 1273293 Uninitialized scalar variable
   via  7e4daaa backupkey: Fix a memleak
   via  00e751d backupkey: Simplify get_lsa_secret
   via  5ea5d87 backupkey: Slightly simplify 
bkrp_do_retrieve_server_wrap_key
   via  8e195fb winbind: Fix CID 1273294 Uninitialized scalar variable
   via  25928b1 winbind: Fix CID 1273295 Uninitialized scalar variable
   via  706770d libads: Fix CID 1273305 Uninitialized scalar variable
   via  4a686c5 libads: Fix CID 1273306 Uninitialized scalar variable
   via  11a71d5 lib: Fix CID 1273292 Uninitialized pointer read
   via  f5c8e48 lib: Fix CID 1273056 Negative array index read
   via  6fdbf8d lib: Fix CID 1128561 Pointer to local outside scope
   via  569c870 Fix whitespace
   via  4dd7c84 lib: Fix CID 1128552 Buffer not null terminated
   via  1826f06 build:wafadmin: fix use of spaces instead of tabs.
  from  7a10e07 ctdb-build: Specify absolute path to libsocket-wrapper.so

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


- Log -
commit 40a317f092829aa78a35cc0421f524a4b0233f10
Author: Volker Lendecke v...@samba.org
Date:   Wed Mar 4 10:47:03 2015 +0100

rpc_server: Fix CID 1035535 Uninitialized scalar variable

I believe this can't happen, but better be safe than sorry

Signed-off-by: Volker Lendecke v...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

Autobuild-User(master): David Disseldorp dd...@samba.org
Autobuild-Date(master): Wed Mar  4 17:14:53 CET 2015 on sn-devel-104

commit 8f7bdc8194a6e666c795da0d27feb316b0a8dd37
Author: Volker Lendecke v...@samba.org
Date:   Wed Mar 4 10:47:03 2015 +0100

rpc_server: Fix CID 1035534 Uninitialized scalar variable

I believe this can't happen, but better be safe than sorry

Signed-off-by: Volker Lendecke v...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

commit 4891a98e20d0719274f6685dfbc39413c9ab39d0
Author: Volker Lendecke v...@samba.org
Date:   Wed Mar 4 10:36:40 2015 +0100

backupkey: Remove an unused variable

Signed-off-by: Volker Lendecke v...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

commit 969519b3b53e1ba12a261764fc4d5785524a245f
Author: Volker Lendecke v...@samba.org
Date:   Wed Mar 4 10:35:47 2015 +0100

backupkey: Fix CID 1273293 Uninitialized scalar variable

Signed-off-by: Volker Lendecke v...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

commit 7e4daaacb6b256e08ac7491aa9e98d0dc56d137b
Author: Volker Lendecke v...@samba.org
Date:   Wed Mar 4 10:33:57 2015 +0100

backupkey: Fix a memleak

Signed-off-by: Volker Lendecke v...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

commit 00e751d2be80c555aca71724cfb6fdb4602c1131
Author: Volker Lendecke v...@samba.org
Date:   Wed Mar 4 10:33:38 2015 +0100

backupkey: Simplify get_lsa_secret

Signed-off-by: Volker Lendecke v...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

commit 5ea5d876bf9c33b1805109af79005e3437a656a1
Author: Volker Lendecke v...@samba.org
Date:   Wed Mar 4 10:29:53 2015 +0100

backupkey: Slightly simplify bkrp_do_retrieve_server_wrap_key

Signed-off-by: Volker Lendecke v...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

commit 8e195fb52ecfa3c263f68b74f989fb48a3c9116f
Author: Volker Lendecke v...@samba.org
Date:   Wed Mar 4 10:28:20 2015 +0100

winbind: Fix CID 1273294 Uninitialized scalar variable

Signed-off-by: Volker Lendecke v...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

commit 25928b1bcc031469c5321ab283a8d0c32dde2f4f
Author: Volker Lendecke v...@samba.org
Date:   Wed Mar 4 10:22:48 2015 +0100

winbind: Fix CID 1273295 Uninitialized scalar variable

Signed-off-by: Volker Lendecke v...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

commit 706770d7a8c4625ecb555db40c146126d2c160f0
Author: Volker Lendecke v...@samba.org
Date:   Wed Mar 4 10:09:51 2015 +0100

libads: Fix CID 1273305 Uninitialized scalar variable

Signed-off-by: Volker Lendecke v...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

commit 4a686c5b0bbcf0bdb089348403a3c35b8aff67e4
Author: Volker Lendecke v...@samba.org
Date:   Wed Mar 4 10:09:18 2015 +0100

libads: Fix CID 1273306 Uninitialized scalar variable

Signed-off-by: Volker Lendecke v...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

commit 11a71d562129e3b99482d329cf640fdb4a4cf9bf
Author: Volker Lendecke v...@samba.org
Date:   Wed Mar 4 10:00:29 2015 +0100

lib: Fix CID 1273292 Uninitialized pointer read

[SCM] Samba Shared Repository - branch master updated

2015-03-03 Thread David Disseldorp
The branch, master has been updated
   via  7be3a5f tevent: Ignore unexpected signal events in the same way the 
epoll backend does.
  from  38628b1 Fix the O3 developer build

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


- Log -
commit 7be3a5f92ddbb378a3c80e455cb7403f7861efa1
Author: Jeremy Allison j...@samba.org
Date:   Mon Mar 2 16:17:54 2015 -0800

tevent: Ignore unexpected signal events in the same way the epoll backend 
does.

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

Signed-off-by: Jeremy Allison j...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

Autobuild-User(master): David Disseldorp dd...@samba.org
Autobuild-Date(master): Tue Mar  3 17:33:06 CET 2015 on sn-devel-104

---

Summary of changes:
 lib/tevent/tevent_port.c | 12 +---
 1 file changed, 9 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/tevent/tevent_port.c b/lib/tevent/tevent_port.c
index 93e94b2..dd4958e 100644
--- a/lib/tevent/tevent_port.c
+++ b/lib/tevent/tevent_port.c
@@ -483,10 +483,16 @@ static int port_event_loop(struct port_event_context 
*port_ev, struct timeval *t
port_errno = errno;
tevent_trace_point_callback(ev, TEVENT_TRACE_AFTER_WAIT);
 
-   if (ret == -1  port_errno == EINTR  ev-signal_events) {
-   if (tevent_common_check_signal(ev)) {
-   return 0;
+   if (ret == -1  port_errno == EINTR) {
+   if (ev-signal_events) {
+   tevent_common_check_signal(ev);
}
+   /*
+* If no signal handlers we got an unsolicited
+* signal wakeup. This can happen with epoll
+* too. Just return and ignore.
+*/
+   return 0;
}
 
if (ret == -1  port_errno == ETIME  tvalp) {


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2015-02-26 Thread David Disseldorp
The branch, master has been updated
   via  079c301 ntdb: always return int from tdb_store_flag_to_ntdb()
  from  3e9e5e6 registry: Fix an aligment increase warning

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


- Log -
commit 079c301c013478597852491882ab27ef6870900a
Author: David Disseldorp dd...@samba.org
Date:   Wed Feb 25 11:33:25 2015 +0100

ntdb: always return int from tdb_store_flag_to_ntdb()

Signed-off-by: David Disseldorp dd...@samba.org
Reviewed-by: Volker Lendecke v...@samba.org

Autobuild-User(master): David Disseldorp dd...@samba.org
Autobuild-Date(master): Thu Feb 26 13:49:05 CET 2015 on sn-devel-104

---

Summary of changes:
 lib/dbwrap/dbwrap_ntdb.c | 1 +
 1 file changed, 1 insertion(+)


Changeset truncated at 500 lines:

diff --git a/lib/dbwrap/dbwrap_ntdb.c b/lib/dbwrap/dbwrap_ntdb.c
index 5a8ce4b..1f34ef8 100644
--- a/lib/dbwrap/dbwrap_ntdb.c
+++ b/lib/dbwrap/dbwrap_ntdb.c
@@ -49,6 +49,7 @@ static int tdb_store_flag_to_ntdb(int tdb_flag)
default:
smb_panic(unknown tdb_flag);
}
+   return -1;  /* NOTREACHED */
 }
 
 static NTSTATUS db_ntdb_store(struct db_record *rec, NTDB_DATA data, int flag)


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2015-02-15 Thread David Disseldorp
The branch, master has been updated
   via  88c1eb4 Add Solaris ports as a tevent backend.
  from  6f41a78 messaging4: Enable POOL_USAGE

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


- Log -
commit 88c1eb4ae10a9f69d2e828b4e5543915c1d990c6
Author: Jeremy Allison j...@samba.org
Date:   Mon Jul 22 14:23:33 2013 -0700

Add Solaris ports as a tevent backend.

Signed-off-by: Jeremy Allison j...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

Autobuild-User(master): David Disseldorp dd...@samba.org
Autobuild-Date(master): Sun Feb 15 23:25:07 CET 2015 on sn-devel-104

---

Summary of changes:
 lib/replace/system/select.h  |   4 +
 lib/replace/wscript  |   5 +
 lib/tevent/tevent.c  |   5 +-
 lib/tevent/tevent_internal.h |   3 +
 lib/tevent/tevent_port.c | 779 +++
 lib/tevent/wscript   |   3 +
 6 files changed, 798 insertions(+), 1 deletion(-)
 create mode 100644 lib/tevent/tevent_port.c


Changeset truncated at 500 lines:

diff --git a/lib/replace/system/select.h b/lib/replace/system/select.h
index 11c5390..9e945c3 100644
--- a/lib/replace/system/select.h
+++ b/lib/replace/system/select.h
@@ -34,6 +34,10 @@
 #include sys/epoll.h
 #endif
 
+#ifdef HAVE_SOLARIS_PORTS
+#include port.h
+#endif
+
 #ifndef SELECT_CAST
 #define SELECT_CAST
 #endif
diff --git a/lib/replace/wscript b/lib/replace/wscript
index 4d4d182..f8a0179 100644
--- a/lib/replace/wscript
+++ b/lib/replace/wscript
@@ -38,6 +38,7 @@ def configure(conf):
 conf.CHECK_HEADERS('libaio.h locale.h ndir.h pwd.h')
 conf.CHECK_HEADERS('shadow.h sys/acl.h')
 conf.CHECK_HEADERS('sys/attributes.h attr/attributes.h sys/capability.h 
sys/dir.h sys/epoll.h')
+conf.CHECK_HEADERS('port.h')
 conf.CHECK_HEADERS('sys/fcntl.h sys/filio.h sys/filsys.h sys/fs/s5param.h 
sys/fs/vx/quota.h')
 conf.CHECK_HEADERS('sys/id.h sys/ioctl.h sys/ipc.h sys/mman.h sys/mode.h 
sys/ndir.h sys/priv.h')
 conf.CHECK_HEADERS('sys/resource.h sys/security.h sys/shm.h sys/statfs.h 
sys/statvfs.h sys/termio.h')
@@ -283,6 +284,7 @@ def configure(conf):
 conf.CHECK_FUNCS('timegm getifaddrs freeifaddrs mmap setgroups syscall 
setsid')
 conf.CHECK_FUNCS('getgrent_r getgrgid_r getgrnam_r getgrouplist 
getpagesize')
 conf.CHECK_FUNCS('getpwent_r getpwnam_r getpwuid_r epoll_create')
+conf.CHECK_FUNCS('port_create')
 
 conf.SET_TARGET_TYPE('attr', 'EMPTY')
 
@@ -487,6 +489,9 @@ removeea setea
 if conf.CONFIG_SET('HAVE_EPOLL_CREATE') and 
conf.CONFIG_SET('HAVE_SYS_EPOLL_H'):
 conf.DEFINE('HAVE_EPOLL', 1)
 
+if conf.CONFIG_SET('HAVE_PORT_CREATE') and conf.CONFIG_SET('HAVE_PORT_H'):
+conf.DEFINE('HAVE_SOLARIS_PORTS', 1)
+
 conf.CHECK_HEADERS('poll.h')
 conf.CHECK_FUNCS('poll')
 
diff --git a/lib/tevent/tevent.c b/lib/tevent/tevent.c
index be0afd4..843cf05 100644
--- a/lib/tevent/tevent.c
+++ b/lib/tevent/tevent.c
@@ -123,9 +123,12 @@ static void tevent_backend_init(void)
tevent_select_init();
tevent_poll_init();
tevent_poll_mt_init();
-#ifdef HAVE_EPOLL
+#if defined(HAVE_EPOLL)
tevent_epoll_init();
+#elif defined(HAVE_SOLARIS_PORTS)
+   tevent_port_init();
 #endif
+
tevent_standard_init();
 }
 
diff --git a/lib/tevent/tevent_internal.h b/lib/tevent/tevent_internal.h
index d25dc05..10cc4a4 100644
--- a/lib/tevent/tevent_internal.h
+++ b/lib/tevent/tevent_internal.h
@@ -351,6 +351,9 @@ void tevent_epoll_set_panic_fallback(struct tevent_context 
*ev,
bool (*panic_fallback)(struct tevent_context *ev,
   bool replay));
 #endif
+#ifdef HAVE_SOLARIS_PORTS
+bool tevent_port_init(void);
+#endif
 
 
 void tevent_trace_point_callback(struct tevent_context *ev,
diff --git a/lib/tevent/tevent_port.c b/lib/tevent/tevent_port.c
new file mode 100644
index 000..93e94b2
--- /dev/null
+++ b/lib/tevent/tevent_port.c
@@ -0,0 +1,779 @@
+/*
+   Unix SMB/CIFS implementation.
+
+   Main select loop and event handling - Solaris port implementation.
+   Losely based on the Linux epoll backend.
+
+   Copyright (C) Jeremy Allison2013
+
+ ** NOTE! The following LGPL license applies to the tevent
+ ** library. This does NOT imply that all of Samba is released
+ ** under the LGPL
+
+   This library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 3 of the License, or (at your option) any later version.
+
+   This library 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
+   Lesser General Public

[SCM] Samba Shared Repository - branch master updated

2015-02-13 Thread David Disseldorp
The branch, master has been updated
   via  8ca918f docs: Fix vfs_shadow_copy(8)
  from  37f7a17 s3-passdb: lift annoying debug message level.

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


- Log -
commit 8ca918f63a453378ef9c9da8e73f1a3554759260
Author: Volker Lendecke v...@samba.org
Date:   Fri Feb 13 14:06:29 2015 +0100

docs: Fix vfs_shadow_copy(8)

Found by Miguel Medalha miguelmeda...@sapo.pt

Signed-off-by: Volker Lendecke v...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

Autobuild-User(master): David Disseldorp dd...@samba.org
Autobuild-Date(master): Fri Feb 13 18:24:38 CET 2015 on sn-devel-104

---

Summary of changes:
 docs-xml/manpages/vfs_shadow_copy.8.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


Changeset truncated at 500 lines:

diff --git a/docs-xml/manpages/vfs_shadow_copy.8.xml 
b/docs-xml/manpages/vfs_shadow_copy.8.xml
index 6d85fd2..10a71ae 100644
--- a/docs-xml/manpages/vfs_shadow_copy.8.xml
+++ b/docs-xml/manpages/vfs_shadow_copy.8.xml
@@ -13,7 +13,7 @@
 
 refnamediv
refnamevfs_shadow_copy/refname
-   refpurposeMake a Samba share read only for a specified time 
period/refpurpose
+   refpurposeExpose snapshots to Windows clients as shadow 
copies./refpurpose
 /refnamediv
 
 refsynopsisdiv


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2015-02-10 Thread David Disseldorp
The branch, master has been updated
   via  b3d5d03 smbd: Fix a typo
   via  72f3630 smbd: Fix a typo
   via  7121466 smbd: Make check_veto_path static
  from  c8c2c85 Update mailing list references to point at lists.samba.org

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


- Log -
commit b3d5d0319d844038e62119755dbbedd701931ccc
Author: Volker Lendecke v...@samba.org
Date:   Tue Feb 10 17:26:47 2015 +0100

smbd: Fix a typo

Signed-off-by: Volker Lendecke v...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

Autobuild-User(master): David Disseldorp dd...@samba.org
Autobuild-Date(master): Tue Feb 10 20:27:32 CET 2015 on sn-devel-104

commit 72f3630e3f8eb76ffe0cf0db396bb945f2a760ef
Author: Volker Lendecke v...@samba.org
Date:   Mon Feb 9 14:42:23 2015 +

smbd: Fix a typo

http://www.oxfordlearnersdictionaries.com/definition/english/veto_2 says 
it's
vetoed, not vetod

Signed-off-by: Volker Lendecke v...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

commit 71214665df13610fe29c96a20927dc931ec4f8d2
Author: Volker Lendecke v...@samba.org
Date:   Mon Feb 9 14:42:08 2015 +

smbd: Make check_veto_path static

Signed-off-by: Volker Lendecke v...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

---

Summary of changes:
 source3/smbd/filename.c | 4 ++--
 source3/smbd/msdfs.c| 2 +-
 source3/smbd/proto.h| 1 -
 3 files changed, 3 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c
index e632796..0fdc09d 100644
--- a/source3/smbd/filename.c
+++ b/source3/smbd/filename.c
@@ -1012,10 +1012,10 @@ NTSTATUS unix_convert(TALLOC_CTX *ctx,
 }
 
 /
- Ensure a path is not vetod.
+ Ensure a path is not vetoed.
 /
 
-NTSTATUS check_veto_path(connection_struct *conn, const char *name)
+static NTSTATUS check_veto_path(connection_struct *conn, const char *name)
 {
if (IS_VETO_PATH(conn, name))  {
/* Is it not dot or dot dot. */
diff --git a/source3/smbd/msdfs.c b/source3/smbd/msdfs.c
index bbf353d..3bd8a09 100644
--- a/source3/smbd/msdfs.c
+++ b/source3/smbd/msdfs.c
@@ -296,7 +296,7 @@ static NTSTATUS create_conn_struct_as_root(TALLOC_CTX *ctx,
set_conn_connectpath(conn, connpath);
 
/*
-* New code to check if there's a share security descripter
+* New code to check if there's a share security descriptor
 * added from NT server manager. This is done after the
 * smb.conf checks are done as we need a uid and token. JRA.
 *
diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h
index 121682c..26a199c 100644
--- a/source3/smbd/proto.h
+++ b/source3/smbd/proto.h
@@ -327,7 +327,6 @@ NTSTATUS unix_convert(TALLOC_CTX *ctx,
  const char *orig_path,
  struct smb_filename **smb_fname,
  uint32_t ucf_flags);
-NTSTATUS check_veto_path(connection_struct *conn, const char *name);
 NTSTATUS check_name(connection_struct *conn, const char *name);
 int get_real_filename(connection_struct *conn, const char *path,
  const char *name, TALLOC_CTX *mem_ctx,


-- 
Samba Shared Repository


[SCM] Samba Website Repository - branch master updated

2015-01-15 Thread David Disseldorp
The branch, master has been updated
   via  0026695 Fix Theseiare-These are typo
  from  8840a9d Yet another typo... ;-)

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


- Log -
commit 00266950fcc9e199272eca79a67ed5a2f2c559e4
Author: David Disseldorp dd...@suse.de
Date:   Thu Jan 15 16:55:19 2015 +0100

Fix Theseiare-These are typo

Signed-off-by: David Disseldorp dd...@suse.de

---

Summary of changes:
 generated_news/latest_10_bodies.html | 2 +-
 generated_news/latest_2_bodies.html  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/generated_news/latest_10_bodies.html 
b/generated_news/latest_10_bodies.html
index 0b54c44..be2f01e 100644
--- a/generated_news/latest_10_bodies.html
+++ b/generated_news/latest_10_bodies.html
@@ -1,7 +1,7 @@
h5a name=4.1.1615 January 2015/a/h5
p class=headlineSamba 4.1.16 and 4.0.24 bSecurity
Releases/b Available for Download/p
-   pTheseiare security releases in order to address
+   pThese are security releases in order to address
a 
href=http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-8143;CVE-2014-8143/a
(bElevation of privilege to Active Directory Domain Controller/b).
/p
diff --git a/generated_news/latest_2_bodies.html 
b/generated_news/latest_2_bodies.html
index 1b97b49..f5ae4c0 100644
--- a/generated_news/latest_2_bodies.html
+++ b/generated_news/latest_2_bodies.html
@@ -1,7 +1,7 @@
h5a name=4.1.1615 January 2015/a/h5
p class=headlineSamba 4.1.16 and 4.0.24 bSecurity
Releases/b Available for Download/p
-   pTheseiare security releases in order to address
+   pThese are security releases in order to address
a 
href=http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-8143;CVE-2014-8143/a
(bElevation of privilege to Active Directory Domain Controller/b).
/p


-- 
Samba Website Repository


[SCM] Samba Shared Repository - branch master updated

2014-12-04 Thread David Disseldorp
The branch, master has been updated
   via  46431e3 unix_msg: Fix unix_msg_test_drain
  from  c261072 docs-xml: document the interaction between write cache 
size and aio read/write size

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


- Log -
commit 46431e390f8184c4207f48704e0a0bb5dcb38366
Author: Volker Lendecke v...@samba.org
Date:   Thu Dec 4 14:50:27 2014 +

unix_msg: Fix unix_msg_test_drain

poll_funcs_init_tevent does not register a tevent context by default. This
used to be the case in an early development stage, but apparently I
haven't tested this for a while :-)

Signed-off-by: Volker Lendecke v...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

Autobuild-User(master): David Disseldorp dd...@samba.org
Autobuild-Date(master): Thu Dec  4 18:55:08 CET 2014 on sn-devel-104

---

Summary of changes:
 source3/lib/unix_msg/test_drain.c | 7 +++
 1 file changed, 7 insertions(+)


Changeset truncated at 500 lines:

diff --git a/source3/lib/unix_msg/test_drain.c 
b/source3/lib/unix_msg/test_drain.c
index 5b6a930..9d74042 100644
--- a/source3/lib/unix_msg/test_drain.c
+++ b/source3/lib/unix_msg/test_drain.c
@@ -18,6 +18,7 @@ static void recv_cb(struct unix_msg_ctx *ctx,
 int main(int argc, const char *argv[])
 {
struct poll_funcs *funcs;
+   void *handle;
struct sockaddr_un addr;
struct unix_msg_ctx *ctx;
struct tevent_context *ev;
@@ -45,6 +46,12 @@ int main(int argc, const char *argv[])
return 1;
}
 
+   handle = poll_funcs_tevent_register(ev, funcs, ev);
+   if (handle == NULL) {
+   fprintf(stderr, poll_funcs_tevent_register failed\n);
+   exit(1);
+   }
+
ret = unix_msg_init(addr, funcs, 256, 1, recv_cb, state, ctx);
if (ret != 0) {
fprintf(stderr, unix_msg_init failed: %s\n,


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2014-11-11 Thread David Disseldorp
The branch, master has been updated
   via  c2bda5b pdb_tdb: Avoid a nasty error message with ctdb
   via  05f8e03 pdb_tdb: Fix a TALLOC/SAFE_FREE mixup
  from  ad35141 selftest: ignore flapping addprinter[ex].print_job_enum test

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


- Log -
commit c2bda5bfae2cac4e473f2ae42775d2e35995c790
Author: Volker Lendecke v...@samba.org
Date:   Tue Nov 11 10:36:23 2014 +

pdb_tdb: Avoid a nasty error message with ctdb

ctdb gives us 0-sized records for deleted passdb entries

Signed-off-by: Volker Lendecke v...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

Autobuild-User(master): David Disseldorp dd...@samba.org
Autobuild-Date(master): Tue Nov 11 16:19:37 CET 2014 on sn-devel-104

commit 05f8e0371320b9031d665b0b5a30872213ee66cd
Author: Volker Lendecke v...@samba.org
Date:   Tue Nov 11 10:35:50 2014 +

pdb_tdb: Fix a TALLOC/SAFE_FREE mixup

Signed-off-by: Volker Lendecke v...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

---

Summary of changes:
 source3/passdb/pdb_tdb.c | 8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)


Changeset truncated at 500 lines:

diff --git a/source3/passdb/pdb_tdb.c b/source3/passdb/pdb_tdb.c
index 0d31c47..d1ff006f 100644
--- a/source3/passdb/pdb_tdb.c
+++ b/source3/passdb/pdb_tdb.c
@@ -602,11 +602,17 @@ static NTSTATUS tdbsam_getsampwnam (struct pdb_methods 
*my_methods,
return NT_STATUS_NO_SUCH_USER;
}
 
+   if (data.dsize == 0) {
+   DEBUG(5, (%s: Got 0-sized record for key %s\n, __func__,
+ keystr));
+   return NT_STATUS_NO_SUCH_USER;
+   }
+
/* unpack the buffer */
 
if (!init_samu_from_buffer(user, SAMU_BUFFER_LATEST, data.dptr, 
data.dsize)) {
DEBUG(0,(pdb_getsampwent: Bad struct samu entry returned from 
TDB!\n));
-   SAFE_FREE(data.dptr);
+   TALLOC_FREE(data.dptr);
return NT_STATUS_NO_MEMORY;
}
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2014-11-05 Thread David Disseldorp
The branch, master has been updated
   via  6faef4d btrfs: don't leak opened directory handle
  from  7467f6e s3: nmbd: Ensure NetBIOS names are only 15 characters 
stored.

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


- Log -
commit 6faef4d213e76077bdbaf83cf07f0261c11dc757
Author: Noel Power noel.po...@suse.com
Date:   Tue Nov 4 16:52:49 2014 +0100

btrfs: don't leak opened directory handle

Closing a directory handle file descriptor via close() is undefined,
according to:
http://pubs.opengroup.org/onlinepubs/9699919799/functions/dirfd.html

Signed-off-by: Noel Power noel.po...@suse.com
Reviewed-by: David Disseldorp dd...@samba.org
Reviewed-by: Jeremy Allison j...@samba.org

Autobuild-User(master): David Disseldorp dd...@samba.org
Autobuild-Date(master): Tue Nov  4 20:51:02 CET 2014 on sn-devel-104

---

Summary of changes:
 source3/modules/vfs_btrfs.c | 22 --
 1 file changed, 16 insertions(+), 6 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_btrfs.c b/source3/modules/vfs_btrfs.c
index c1e17b3..5144239 100644
--- a/source3/modules/vfs_btrfs.c
+++ b/source3/modules/vfs_btrfs.c
@@ -245,23 +245,29 @@ static NTSTATUS btrfs_get_compression(struct 
vfs_handle_struct *handle,
int fd;
bool opened = false;
NTSTATUS status;
+   DIR *dir = NULL;
 
if ((fsp != NULL)  (fsp-fh-fd != -1)) {
fd = fsp-fh-fd;
} else if (smb_fname != NULL) {
if (S_ISDIR(smb_fname-st.st_ex_mode)) {
-   DIR *dir = opendir(smb_fname-base_name);
+   dir = opendir(smb_fname-base_name);
if (dir == NULL) {
return NT_STATUS_UNSUCCESSFUL;
}
+   opened = true;
fd = dirfd(dir);
+   if (fd  0) {
+   status = NT_STATUS_UNSUCCESSFUL;
+   goto err_close;
+   }
} else {
fd = open(smb_fname-base_name, O_RDONLY);
+   if (fd  0) {
+   return NT_STATUS_UNSUCCESSFUL;
+   }
+   opened = true;
}
-   if (fd  0) {
-   return NT_STATUS_UNSUCCESSFUL;
-   }
-   opened = true;
} else {
return NT_STATUS_INVALID_PARAMETER;
}
@@ -281,7 +287,11 @@ static NTSTATUS btrfs_get_compression(struct 
vfs_handle_struct *handle,
status = NT_STATUS_OK;
 err_close:
if (opened) {
-   close(fd);
+   if (dir != NULL) {
+   closedir(dir);
+   } else {
+   close(fd);
+   }
}
 
return status;


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2014-10-07 Thread David Disseldorp
The branch, master has been updated
   via  bdebf96 idl: Fix a typo
   via  cfc1e72 smbd: Simplify remove_child_pid
   via  1044497 status: 80 chars per line
   via  0fa1689 smbd: Fix nonempty line endings
  from  8cc41b0 lanman: don't leak cache_path onto talloc tos

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


- Log -
commit bdebf96cab66be3743ba82463ca852ed57c1ed7e
Author: Volker Lendecke v...@samba.org
Date:   Mon Oct 6 15:17:54 2014 +

idl: Fix a typo

Signed-off-by: Volker Lendecke v...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

Autobuild-User(master): David Disseldorp dd...@samba.org
Autobuild-Date(master): Tue Oct  7 17:03:42 CEST 2014 on sn-devel-104

commit cfc1e727da856259b6229cdb46e982c6539824f4
Author: Volker Lendecke v...@samba.org
Date:   Mon Oct 6 14:12:52 2014 +

smbd: Simplify remove_child_pid

In this if-branch ret is always != 0.

Signed-off-by: Volker Lendecke v...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

commit 10444972d27dbf0627696d959688181c9fdf6d62
Author: Volker Lendecke v...@samba.org
Date:   Tue Sep 30 12:51:37 2014 +

status: 80 chars per line

Signed-off-by: Volker Lendecke v...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

commit 0fa16895f12050987c086a9ee27d6cf1b5be7251
Author: Volker Lendecke v...@samba.org
Date:   Thu Sep 11 16:46:39 2014 +0200

smbd: Fix nonempty line endings

Signed-off-by: Volker Lendecke v...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

---

Summary of changes:
 source3/librpc/idl/perfcount.idl |2 +-
 source3/profile/profile.c|   29 +-
 source3/smbd/server.c|2 +-
 source3/utils/status_profile.c   | 1101 +-
 4 files changed, 750 insertions(+), 384 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/librpc/idl/perfcount.idl b/source3/librpc/idl/perfcount.idl
index e9a4383..e797e01 100644
--- a/source3/librpc/idl/perfcount.idl
+++ b/source3/librpc/idl/perfcount.idl
@@ -156,7 +156,7 @@
   PerfTime, and having it there will make my offset math much 
easier. */
uint32 Padding;
/* Now when I'm marshalling this, I'll need to call 
prs_align_uint64()
-  before I start encodint the uint64 structs */
+  before I start encoding the uint64 structs */
/* clock rate * seconds uptime */
hyper PerfTime;
/* The clock rate of the CPU */
diff --git a/source3/profile/profile.c b/source3/profile/profile.c
index 9367ff4..7aeee85 100644
--- a/source3/profile/profile.c
+++ b/source3/profile/profile.c
@@ -1,4 +1,4 @@
-/* 
+/*
Unix SMB/CIFS implementation.
store smbd profiling information in shared memory
Copyright (C) Andrew Tridgell 1999
@@ -8,12 +8,12 @@
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 http://www.gnu.org/licenses/.
 
@@ -102,8 +102,8 @@ static void profile_message(struct messaging_context 
*msg_ctx,
 receive a request profile level message
 /
 static void reqprofile_message(struct messaging_context *msg_ctx,
-  void *private_data, 
-  uint32_t msg_type, 
+  void *private_data,
+  uint32_t msg_type,
   struct server_id src,
   DATA_BLOB *data)
 {
@@ -129,33 +129,32 @@ bool profile_setup(struct messaging_context *msg_ctx, 
bool rdonly)
  again:
/* try to use an existing key */
shm_id = shmget(PROF_SHMEM_KEY, 0, 0);
-   
+
/* if that failed then create one. There is a race condition here
   if we are running from inetd. Bad luck. */
if (shm_id == -1) {
if (read_only) return False;
-   shm_id = shmget(PROF_SHMEM_KEY, sizeof(*profile_h), 
+   shm_id = shmget(PROF_SHMEM_KEY, sizeof(*profile_h),
IPC_CREAT | IPC_EXCL | IPC_PERMS);
}
-   
+
if (shm_id == -1) {
-   DEBUG(0,(Can't create or use IPC area. Error was %s\n, 
+   DEBUG(0,(Can't create

[SCM] Samba Shared Repository - branch master updated

2014-09-19 Thread David Disseldorp
The branch, master has been updated
   via  7f59711 nsswitch: Skip groups we were not able to map.
  from  fe670be s3:torture: use cli_state_client_guid in 
run_smb2_multi_channel()

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


- Log -
commit 7f59711f076e98ece099f6b38ff6da8c80fa6d5e
Author: Andreas Schneider a...@samba.org
Date:   Fri Sep 19 13:33:10 2014 +0200

nsswitch: Skip groups we were not able to map.

If we have configured the idmap_ad backend it is possible that the user
is in a group without a gid set. This will result in (uid_t)-1 as the
gid. We return this invalid gid to NSS which is wrong.

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

Signed-off-by: Andreas Schneider a...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

Autobuild-User(master): David Disseldorp dd...@samba.org
Autobuild-Date(master): Fri Sep 19 17:57:14 CEST 2014 on sn-devel-104

---

Summary of changes:
 nsswitch/winbind_nss_linux.c |5 +
 1 files changed, 5 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/nsswitch/winbind_nss_linux.c b/nsswitch/winbind_nss_linux.c
index 8d66a74..70ede3e 100644
--- a/nsswitch/winbind_nss_linux.c
+++ b/nsswitch/winbind_nss_linux.c
@@ -1101,6 +1101,11 @@ _nss_winbind_initgroups_dyn(char *user, gid_t group, 
long int *start,
continue;
}
 
+   /* Skip groups without a mapping */
+   if (gid_list[i] == (uid_t)-1) {
+   continue;
+   }
+
/* Filled buffer ? If so, resize. */
 
if (*start == *size) {


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2014-09-15 Thread David Disseldorp
The branch, master has been updated
   via  df800ea Add test suite for iconv conversion fail of bad names over 
SMB1/SMB3.
   via  6d03aed s3: smbd: Fix a couple of tricky slow-path cases - don't 
return a mangled name for a name that cannot be converted.
   via  2fc8d0e s3: smbd: Change get_lanman2_dir_entry() to return the full 
NTSTATUS.
   via  c9877ea s3: smbd: Remove unneeded 'out_of_space' parameter from 
smbd_dirptr_lanman2_entry().
   via  5293dd2 s3: smbd: SMB2 - change smbd_dirptr_lanman2_entry() to 
return an NTSTATUS.
   via  d17fc79 s3: smbd: smbd_marshall_dir_entry() no longer needs 
explicit 'out_of_space' parameter.
   via  2bddcee s3: smbd: Change smbd_marshall_dir_entry() to return an 
NTSTATUS. Returns STATUS_MORE_ENTRIES on out of space.
   via  0519088 s3: smbd: Change the function signature of srvstr_push() 
from returning a length to returning an NTSTATUS with a length param.
   via  c7b89bb s3: smbd: Ensure types for all variables called 'len' used 
in srvstr_push() are correct.
   via  5c7e272 s3: smbd: srvstr_push() was changed to never return -1, so 
don't check for that as an error.
   via  6bce3d8 s3: utils: Don't directly manipulate errno inside 
strupper_m().
  from  c56a88d vfs_gpfs: Fix the build with profiling-data

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


- Log -
commit df800ea6fb307abae785d3a5da60f4db70e9bc68
Author: Jeremy Allison j...@samba.org
Date:   Wed Aug 27 13:15:29 2014 -0700

Add test suite for iconv conversion fail of bad names over SMB1/SMB3.

Bug 10775 - smbd crashes when accessing garbage filenames

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

Signed-off-by: Jeremy Allison j...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

Autobuild-User(master): David Disseldorp dd...@samba.org
Autobuild-Date(master): Tue Sep 16 04:21:49 CEST 2014 on sn-devel-104

commit 6d03aed15e1be4c126c2de4708d0b1cd112ba901
Author: Jeremy Allison j...@samba.org
Date:   Tue Aug 26 16:39:56 2014 -0700

s3: smbd: Fix a couple of tricky slow-path cases - don't return a mangled 
name for a name that cannot be converted.

For a name that contains an illegal Windows character, the
directory listing code returns the mangled 8.3 name as the
primary name for the file.

If the original (non-mangled) filename cannot be converted
to UCS2 on the wire via iconv due to conversion error, we
should skip that name when returning a directory listing,
as we can't map back from a returned 8.3 name to a usable
non-mangled filename if the client sends it back to us.

As this is only done in a very slow path (name must be mangled)
or in the old DOS protocol listing code I don't feel too bad
about using a talloc/free pair here.

Bug 10775 - smbd crashes when accessing garbage filenames

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

Signed-off-by: Jeremy Allison j...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

commit 2fc8d0e0e85cd118f114f234a7eac3902d01c32e
Author: Jeremy Allison j...@samba.org
Date:   Tue Aug 26 15:05:24 2014 -0700

s3: smbd: Change get_lanman2_dir_entry() to return the full NTSTATUS.

Handle the errors correctly at the level above inside the SMB1 server.

Bug 10775 - smbd crashes when accessing garbage filenames

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

Signed-off-by: Jeremy Allison j...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

commit c9877eaf1b0ee83e4227483cb6891f94712bd32f
Author: Jeremy Allison j...@samba.org
Date:   Tue Aug 26 14:54:56 2014 -0700

s3: smbd: Remove unneeded 'out_of_space' parameter from 
smbd_dirptr_lanman2_entry().

This can now be handled by checking for the STATUS_MORE_ENTRIES error 
return.

Bug 10775 - smbd crashes when accessing garbage filenames

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

Signed-off-by: Jeremy Allison j...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

commit 5293dd2f635f049cd0632b071307df6a6c52d9b0
Author: Jeremy Allison j...@samba.org
Date:   Tue Aug 26 14:49:37 2014 -0700

s3: smbd: SMB2 - change smbd_dirptr_lanman2_entry() to return an NTSTATUS.

Handle the errors correctly at the top level inside the SMB2 server.

Bug 10775 - smbd crashes when accessing garbage filenames

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

Signed-off-by: Jeremy Allison j...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

commit d17fc79ee6c80702fe5ce007bdbc68b3d21bc8a0
Author: Jeremy Allison j...@samba.org
Date:   Tue Aug 26 11:40:19 2014 -0700

s3: smbd: smbd_marshall_dir_entry() no longer needs explicit 'out_of_space' 
parameter.

Handle this in the caller when it returns STATUS_MORE_ENTRIES

[SCM] Samba Shared Repository - branch master updated

2014-09-09 Thread David Disseldorp
The branch, master has been updated
   via  210c647 docs-xml: Bump version up to 4.2.
   via  b3b1bb0 WHATSNEW: Start release notes for Samba 4.2.0rc1.
   via  e8f76e1 s3:smbd: fix a comment typo
   via  af23d5e smbd: Move make_dir_struct() to reply.c
  from  dec0243 s3:smbd: close the connection if the client doesn't start 
with a SMB1 Negprot or old messaging call.

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


- Log -
commit 210c647b65203a173a86f362d4a1044874e1ac52
Author: Karolin Seeger ksee...@samba.org
Date:   Mon Sep 8 21:34:35 2014 +0200

docs-xml: Bump version up to 4.2.

Signed-off-by: Karolin Seeger ksee...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

Autobuild-User(master): David Disseldorp dd...@samba.org
Autobuild-Date(master): Tue Sep  9 15:33:54 CEST 2014 on sn-devel-104

commit b3b1bb092fcd96415e17faab3486b9aa7f990da0
Author: Karolin Seeger ksee...@samba.org
Date:   Mon Sep 8 21:27:13 2014 +0200

WHATSNEW: Start release notes for Samba 4.2.0rc1.

Signed-off-by: Karolin Seeger ksee...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

commit e8f76e162cb3ec93273a79495941d7482ececa7b
Author: Ralph Boehme r...@sernet.de
Date:   Mon Sep 8 12:54:32 2014 +0200

s3:smbd: fix a comment typo

Signed-off-by: Ralph Boehme r...@sernet.de
Reviewed-by: Volker Lendecke v...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

commit af23d5efc0a95bfac4f0d1d38f3f9bfdd33efa2e
Author: Volker Lendecke v...@samba.org
Date:   Mon Sep 8 12:41:19 2014 +0200

smbd: Move make_dir_struct() to reply.c

This routine has nothing to do with dptr handling, it is SMB1 marshalling
called only from reply_search().

Signed-off-by: Volker Lendecke v...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

---

Summary of changes:
 WHATSNEW.txt |  270 ++
 docs-xml/manpages/dbwrap_tool.1.xml  |2 +-
 docs-xml/manpages/eventlogadm.8.xml  |2 +-
 docs-xml/manpages/findsmb.1.xml  |2 +-
 docs-xml/manpages/idmap_ad.8.xml |2 +-
 docs-xml/manpages/idmap_autorid.8.xml|2 +-
 docs-xml/manpages/idmap_hash.8.xml   |2 +-
 docs-xml/manpages/idmap_ldap.8.xml   |2 +-
 docs-xml/manpages/idmap_nss.8.xml|2 +-
 docs-xml/manpages/idmap_rfc2307.8.xml|2 +-
 docs-xml/manpages/idmap_rid.8.xml|2 +-
 docs-xml/manpages/idmap_tdb.8.xml|2 +-
 docs-xml/manpages/idmap_tdb2.8.xml   |2 +-
 docs-xml/manpages/libsmbclient.7.xml |2 +-
 docs-xml/manpages/lmhosts.5.xml  |2 +-
 docs-xml/manpages/log2pcap.1.xml |2 +-
 docs-xml/manpages/net.8.xml  |2 +-
 docs-xml/manpages/nmbd.8.xml |2 +-
 docs-xml/manpages/nmblookup.1.xml|2 +-
 docs-xml/manpages/ntlm_auth.1.xml|2 +-
 docs-xml/manpages/pam_winbind.8.xml  |2 +-
 docs-xml/manpages/pam_winbind.conf.5.xml |2 +-
 docs-xml/manpages/pdbedit.8.xml  |2 +-
 docs-xml/manpages/profiles.1.xml |2 +-
 docs-xml/manpages/rpcclient.1.xml|2 +-
 docs-xml/manpages/samba-regedit.8.xml|2 +-
 docs-xml/manpages/samba-tool.8.xml   |2 +-
 docs-xml/manpages/samba.7.xml|2 +-
 docs-xml/manpages/samba.8.xml|2 +-
 docs-xml/manpages/sharesec.1.xml |2 +-
 docs-xml/manpages/smb.conf.5.xml |2 +-
 docs-xml/manpages/smbcacls.1.xml |2 +-
 docs-xml/manpages/smbclient.1.xml|2 +-
 docs-xml/manpages/smbcontrol.1.xml   |2 +-
 docs-xml/manpages/smbcquotas.1.xml   |2 +-
 docs-xml/manpages/smbd.8.xml |2 +-
 docs-xml/manpages/smbget.1.xml   |2 +-
 docs-xml/manpages/smbgetrc.5.xml |2 +-
 docs-xml/manpages/smbpasswd.5.xml|2 +-
 docs-xml/manpages/smbpasswd.8.xml|2 +-
 docs-xml/manpages/smbspool.8.xml |2 +-
 docs-xml/manpages/smbstatus.1.xml|2 +-
 docs-xml/manpages/smbta-util.8.xml   |2 +-
 docs-xml/manpages/smbtar.1.xml   |2 +-
 docs-xml/manpages/smbtree.1.xml  |2 +-
 docs-xml/manpages/testparm.1.xml |2 +-
 docs-xml/manpages/vfs_acl_tdb.8.xml  |2 +-
 docs-xml/manpages/vfs_acl_xattr.8.xml|2 +-
 docs-xml/manpages/vfs_aio_fork.8.xml |2 +-
 docs-xml

[SCM] Samba Shared Repository - branch master updated

2014-08-31 Thread David Disseldorp
The branch, master has been updated
   via  bfdc874 Various updates to the pidl README file.
   via  6824f1a Remove trailing whitespace.
   via  b122971 samba.netcmd.domain: desactivating - deactivating.
   via  daaddc4 samba.netcmd.domain: Fix incorrect variable names, causing 
NameErrors.
   via  3b04d16 samba.netcmd.domain: Remove unused import.
   via  fdbd6ef samba.netcmd.domain: Just catch ImportError, not any 
parsing errors in cmd_domain_export_keytab.
   via  2440845 Look for system setproctitle before trying -lbsd.
   via  3c28ccc replace: remove tabs.
   via  2c3203f replace: remove unused and duplicate imports.
   via  3f04ec3 Remove mention of compatibility with Python 2.4.
   via  d86f38b find_unused_macros: Remove obsolete script that finds 
unused macros.
   via  b972482 source4: Remove script to find unused makefile variables.
  from  f8ec0f9 s3-winbindd: Document parameters in 
ads_cached_connection_reuse

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


- Log -
commit bfdc874e8b98c8ea147dbcc986f96ad4f73d800f
Author: Jelmer Vernooij jel...@samba.org
Date:   Sat Aug 30 01:59:26 2014 +0200

Various updates to the pidl README file.

Remove samba3/samba4-specific comments, add comments about backends and 
files.

Change-Id: Id2253ce85eab7a684b2c50d25f6f2604dc146a8e
Signed-Off-By: Jelmer Vernooij jel...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

Autobuild-User(master): David Disseldorp dd...@samba.org
Autobuild-Date(master): Sun Aug 31 23:47:49 CEST 2014 on sn-devel-104

commit 6824f1aa67f0a75df5c94921e334c2b7c7771611
Author: Jelmer Vernooij jel...@samba.org
Date:   Sat Aug 30 01:59:25 2014 +0200

Remove trailing whitespace.

Change-Id: I1e0948da34bac278edc62cd63dedd08112426e7a
Signed-Off-By: Jelmer Vernooij jel...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

commit b1229715eec2c846edd828fa734f9becc5212367
Author: Jelmer Vernooij jel...@samba.org
Date:   Sat Aug 30 01:57:29 2014 +0200

samba.netcmd.domain: desactivating - deactivating.

Change-Id: I463823589049e81bcd4032f3e7bc6b5f2fb0d28d
Signed-Off-By: Jelmer Vernooij jel...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

commit daaddc4c1d6c70dedad042be08e03fbd11db105c
Author: Jelmer Vernooij jel...@samba.org
Date:   Sat Aug 30 01:57:28 2014 +0200

samba.netcmd.domain: Fix incorrect variable names, causing NameErrors.

Change-Id: I1c78f07f942a8b03ac88de98b18ac636b7124e22
Signed-Off-By: Jelmer Vernooij jel...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

commit 3b04d16d6b521a0ef266c72b0e7a346a75de0059
Author: Jelmer Vernooij jel...@samba.org
Date:   Sat Aug 30 01:57:27 2014 +0200

samba.netcmd.domain: Remove unused import.

Change-Id: I33f3ba55540be01fd15bfc3d75ebb73cbf5ead9e
Signed-Off-By: Jelmer Vernooij jel...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

commit fdbd6efa13ee058487c5062b59176e48190889ef
Author: Jelmer Vernooij jel...@samba.org
Date:   Sat Aug 30 01:57:26 2014 +0200

samba.netcmd.domain: Just catch ImportError, not any parsing errors in 
cmd_domain_export_keytab.

Change-Id: If5710565c74e87fe218a83f31cddcf64605e522e
Signed-Off-By: Jelmer Vernooij jel...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

commit 2440845acebff3a59ebb54d0ef8cdab39bf71962
Author: Jelmer Vernooij jel...@samba.org
Date:   Sat Aug 30 01:54:44 2014 +0200

Look for system setproctitle before trying -lbsd.

Change-Id: I390c186d7c1400287c6a18909a5d6587f2052243
Signed-Off-By: Jelmer Vernooij jel...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

commit 3c28ccc5f1a6f1a33e0cd562fe6a869367149d72
Author: Jelmer Vernooij jel...@samba.org
Date:   Sat Aug 30 01:54:43 2014 +0200

replace: remove tabs.

Change-Id: Ie87f3c8a60f6292b7d2302425c946f5befaf5fcc
Signed-Off-By: Jelmer Vernooij jel...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

commit 2c3203f1708e2f1c1ff9042bc7c4f52e8fefbd37
Author: Jelmer Vernooij jel...@samba.org
Date:   Sat Aug 30 01:54:42 2014 +0200

replace: remove unused and duplicate imports.

Change-Id: I6cfd2cf80efe19fa31bcd6b3881a1eb01f05d1b4
Signed-Off-By: Jelmer Vernooij jel...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

commit 3f04ec3f1cb86fc964c0ab88b2fad400e71dbe5f
Author: Jelmer Vernooij jel...@samba.org
Date:   Sat Aug 30 01:50:37 2014 +0200

Remove mention of compatibility with Python 2.4.

Change-Id: I1f900e550f4fbed9d7b3ffdbf30aa5b54e799331
Signed-Off-By: Jelmer Vernooij jel...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

commit d86f38bef32f7446fcaab1268e7e590a836d44bb
Author: Jelmer Vernooij jel...@samba.org
Date:   Sat Aug 30 01:50:36 2014 +0200

find_unused_macros: Remove obsolete

[SCM] Samba Shared Repository - branch master updated

2014-08-29 Thread David Disseldorp
The branch, master has been updated
   via  b43a581 ntvfs/posix: don't advertise FS_ATTR_SPARSE_FILES
   via  5e3b5b5 torture: trivial test_ioctl_network_interface_info cleanup
   via  a3aee061 torture: test FSCTL_SET_SPARSE without SetSparse buffer
   via  9a3e88b torture: test FSCTL_SET_SPARSE against a directory
   via  9dc7aaf torture: test FSCTL_SET_SPARSE
   via  de2164b idl: define sparse file fsctl structures
  from  0751495 dosmode: fix FSCTL_SET_SPARSE request validation

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


- Log -
commit b43a5810f839df823af2eb74fa2290c64e5dfaf6
Author: David Disseldorp dd...@samba.org
Date:   Fri Aug 29 12:22:56 2014 +0200

ntvfs/posix: don't advertise FS_ATTR_SPARSE_FILES

Handling of the FSCTL_SET_SPARSE ioctl in ntvfs is broken. Removing
FS_ATTR_SPARSE_FILES from the filesystem attributes ensures that
clients, including the smbtorture ioctl tests, don't attempt to use this
functionality.

Signed-off-by: David Disseldorp dd...@samba.org
Reviewed-by: Jeremy Allson j...@samba.org

Autobuild-User(master): David Disseldorp dd...@samba.org
Autobuild-Date(master): Fri Aug 29 22:06:21 CEST 2014 on sn-devel-104

commit 5e3b5b53b28edfc4d343b3162d9656e6952fac07
Author: David Disseldorp dd...@samba.org
Date:   Wed Aug 27 15:20:08 2014 +0200

torture: trivial test_ioctl_network_interface_info cleanup

Signed-off-by: David Disseldorp dd...@samba.org
Reviewed-by: Jeremy Allson j...@samba.org

commit a3aee061b4be5d4813940a102f042f18d744e82e
Author: David Disseldorp dd...@samba.org
Date:   Wed Aug 27 15:17:04 2014 +0200

torture: test FSCTL_SET_SPARSE without SetSparse buffer

This test checks for the following MS-FSCC 2.3.63 behaviour:

If there is no data element, the sparse flag for the file is set,
exactly as if the FILE_SET_SPARSE_BUFFER element was supplied and had a
SetSparse value of TRUE.

Signed-off-by: David Disseldorp dd...@samba.org
Reviewed-by: Jeremy Allson j...@samba.org

commit 9a3e88bc0a60ba672c5f72c0e9e60622e0818960
Author: David Disseldorp dd...@samba.org
Date:   Wed Aug 27 14:45:58 2014 +0200

torture: test FSCTL_SET_SPARSE against a directory

Expect STATUS_INVALID_PARAMETER, as is returned by Windows Server 2012
and 2008. Samba is currently broken, in that it currently processes the
request and sets the sparse DOS attribute on the directory - fix to
follow.

Signed-off-by: David Disseldorp dd...@samba.org
Reviewed-by: Jeremy Allson j...@samba.org

commit 9dc7aaf952e3dd9930cb04b9282883065e01c0e0
Author: David Disseldorp dd...@samba.org
Date:   Tue Aug 26 19:30:39 2014 +0200

torture: test FSCTL_SET_SPARSE

Check that the FILE_ATTRIBUTE_SPARSE is set following FSCTL_SET_SPARSE.
Also confirm that adding the attribute on create doesn't carry through
to subsequent SMB2_GETINFO_FILE requests.

Signed-off-by: David Disseldorp dd...@samba.org
Reviewed-by: Jeremy Allson j...@samba.org

commit de2164bb3d1923cb0271c20f1594c8eb6b7864d4
Author: David Disseldorp dd...@samba.org
Date:   Tue Aug 26 19:28:55 2014 +0200

idl: define sparse file fsctl structures

As documented in MS-FSCC 2.3.

Signed-off-by: David Disseldorp dd...@samba.org
Reviewed-by: Jeremy Allson j...@samba.org

---

Summary of changes:
 librpc/idl/ioctl.idl|   35 +
 source4/ntvfs/posix/vfs_posix.c |3 +-
 source4/torture/smb2/ioctl.c|  279 ++-
 3 files changed, 310 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/librpc/idl/ioctl.idl b/librpc/idl/ioctl.idl
index a0a9950..8248092 100644
--- a/librpc/idl/ioctl.idl
+++ b/librpc/idl/ioctl.idl
@@ -144,3 +144,38 @@ interface netinterface
fsctl_sockaddr_storage sockaddr;
} fsctl_net_iface_info;
 }
+
+interface sparse
+{
+   /* MS-FSCC 2.3.33 FSCTL_QUERY_ALLOCATED_RANGES Request */
+   typedef [public] struct {
+   hyper file_off;
+   hyper len;
+   } file_alloced_range_buf;
+
+   typedef [public] struct {
+   file_alloced_range_buf buf;
+   } fsctl_query_alloced_ranges_req;
+
+   /*
+* 2.3.34 FSCTL_QUERY_ALLOCATED_RANGES Reply
+* ...
+* The number of FILE_ALLOCATED_RANGE_BUFFER elements returned is
+* computed by dividing the size of the returned output buffer (from
+* either SMB or SMB2, the lower-layer protocol that carries the FSCTL)
+* by the size of the FILE_ALLOCATED_RANGE_BUFFER element.
+*/
+   typedef [public] struct {
+   file_alloced_range_buf *array;
+   } fsctl_query_alloced_ranges_rsp;
+
+   /* 2.3.65 FSCTL_SET_ZERO_DATA Request

[SCM] Samba Shared Repository - branch master updated

2014-08-18 Thread David Disseldorp
The branch, master has been updated
   via  4f58041 tdbtorture: print details when run with -n 1
  from  3dfca72 dsdb: Also redact the clearTextPassword input-only attribute

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


- Log -
commit 4f58041639168caee379f8f5b936a30f1a71f0a6
Author: David Disseldorp dd...@samba.org
Date:   Fri Aug 15 14:47:49 2014 +0200

tdbtorture: print details when run with -n 1

Currently tdbtorture prints the test details (processes, loops, etc.)
from the first forked child process.
When run with -n 1 (one process), the test is run from within the
parent and no details are printed. This change ensures that they are.

Signed-off-by: David Disseldorp dd...@samba.org
Reviewed-by: Volker Lendecke v...@samba.org

Autobuild-User(master): David Disseldorp dd...@samba.org
Autobuild-Date(master): Mon Aug 18 13:26:32 CEST 2014 on sn-devel-104

---

Summary of changes:
 lib/tdb/tools/tdbtorture.c |8 
 1 files changed, 4 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/tdb/tools/tdbtorture.c b/lib/tdb/tools/tdbtorture.c
index 3e26f65..9278688 100644
--- a/lib/tdb/tools/tdbtorture.c
+++ b/lib/tdb/tools/tdbtorture.c
@@ -350,6 +350,10 @@ int main(int argc, char * const *argv)
seed = (getpid() + time(NULL))  0x7FFF;
}
 
+   printf(Testing with %d processes, %d loops, %d hash_size, seed=%d%s\n,
+  num_procs, num_loops, hash_size, seed,
+  (always_transaction ?  (all within transactions) : ));
+
if (num_procs == 1  !kill_random) {
/* Don't fork for this case, makes debugging easier. */
error_count = run_child(test_tdb, 0, seed, num_loops, 0);
@@ -376,10 +380,6 @@ int main(int argc, char * const *argv)
for (i=0;inum_procs;i++) {
if ((pids[i]=fork()) == 0) {
close(pfds[0]);
-   if (i == 0) {
-   printf(Testing with %d processes, %d loops, %d 
hash_size, seed=%d%s\n,
-  num_procs, num_loops, hash_size, seed, 
always_transaction ?  (all within transactions) : );
-   }
exit(run_child(test_tdb, i, seed, num_loops, 0));
}
}


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2014-08-11 Thread David Disseldorp
The branch, master has been updated
   via  b19283c param: avoid dereferencing null lp_ctx
   via  9d5fba1 param: remove unimplemented find_service() check
  from  21974a9 ctdb-build: popt has moved from lib/ to third_party/

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


- Log -
commit b19283c0f4cd8e54ff1eef9522fdb420136f5291
Author: David Disseldorp dd...@samba.org
Date:   Mon Aug 11 17:51:58 2014 +0200

param: avoid dereferencing null lp_ctx

process_smbconf_service() calls lp_do_section() with a NULL userdata
(struct loadparm_context *) argument. Since 0864d4945, lp_do_section()
unconditionally attempts to set the lp_ctx-bInGlobalSection variable,
resulting in a segfault.

Signed-off-by: David Disseldorp dd...@samba.org
Reviewed-by: Michael Adam ob...@samba.org

Autobuild-User(master): David Disseldorp dd...@samba.org
Autobuild-Date(master): Mon Aug 11 21:00:15 CEST 2014 on sn-devel-104

commit 9d5fba18ab77c589013e399810bccdc465b6f708
Author: David Disseldorp dd...@samba.org
Date:   Mon Aug 11 17:29:27 2014 +0200

param: remove unimplemented find_service() check

Check for default VFS service is empty, and we don't currently provide
such a feature.

Signed-off-by: David Disseldorp dd...@samba.org
Reviewed-by: Michael Adam ob...@samba.org

---

Summary of changes:
 source3/param/loadparm.c |4 +++-
 source3/param/service.c  |4 
 2 files changed, 3 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index c428c23..94d3b8d 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -2584,7 +2584,9 @@ bool lp_do_section(const char *pszSectionName, void 
*userdata)
 
/* if we've just struck a global section, note the fact. */
bInGlobalSection = isglobal;
-   lp_ctx-bInGlobalSection = isglobal;
+   if (lp_ctx != NULL) {
+   lp_ctx-bInGlobalSection = isglobal;
+   }
 
/* check for multiple global sections */
if (bInGlobalSection) {
diff --git a/source3/param/service.c b/source3/param/service.c
index 85047a8..473fc82 100644
--- a/source3/param/service.c
+++ b/source3/param/service.c
@@ -180,10 +180,6 @@ int find_service(TALLOC_CTX *ctx, const char *service_in, 
char **p_service_out)
}
}
 
-   /* Check for default vfs service?  Unsure whether to implement this */
-   if (iService  0) {
-   }
-
if (iService  0) {
iService = load_registry_service(*p_service_out);
}


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2014-08-06 Thread David Disseldorp
The branch, master has been updated
   via  4639f6d docs: Fix typos in smb.conf (inherit acls)
   via  679d77a Redescribe --userou usage
  from  332eeb8 ctdbd_conn: Only poll if there's a timeout

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


- Log -
commit 4639f6d7bab9d8d6ee46bf5c65ff73a17a56cb17
Author: Marc Muehlfeld mmuehlf...@samba.org
Date:   Wed Aug 6 21:36:26 2014 +0200

docs: Fix typos in smb.conf (inherit acls)

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

Signed-off-by: Marc Muehlfeld mmuehlf...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

Autobuild-User(master): David Disseldorp dd...@samba.org
Autobuild-Date(master): Thu Aug  7 00:52:42 CEST 2014 on sn-devel-104

commit 679d77a2267bfdee99c57665b530580807f83f80
Author: Marc Muehlfeld mmuehlf...@samba.org
Date:   Wed Aug 6 19:52:21 2014 +0200

Redescribe --userou usage

Signed-off-by: Marc Muehlfeld mmuehlf...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

---

Summary of changes:
 docs-xml/smbdotconf/security/inheritowner.xml |6 +++---
 python/samba/netcmd/user.py   |4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/docs-xml/smbdotconf/security/inheritowner.xml 
b/docs-xml/smbdotconf/security/inheritowner.xml
index ba4fc61..0ed8285 100644
--- a/docs-xml/smbdotconf/security/inheritowner.xml
+++ b/docs-xml/smbdotconf/security/inheritowner.xml
@@ -10,9 +10,9 @@
by the ownership of the parent directory./para

paraCommon scenarios where this behavior is useful is in 
-   implementing drop-boxes where users can create and edit files but not 
-   delete them and to ensure that newly create files in a user's
-   roaming profile directory are actually owner by the user./para
+   implementing drop-boxes, where users can create and edit files but
+   not delete them and ensuring that newly created files in a user's
+   roaming profile directory are actually owned by the user./para
 /description
 
 relatedinherit permissions/related
diff --git a/python/samba/netcmd/user.py b/python/samba/netcmd/user.py
index b98ec34..24dd77d 100644
--- a/python/samba/netcmd/user.py
+++ b/python/samba/netcmd/user.py
@@ -62,7 +62,7 @@ sudo samba-tool user add User2 passw2rd --given-name=Jane 
--surname=Doe --must-c
 Example2 shows how to create a new user in the domain against the local 
server.   sudo is used so a user may run the command as root.  In this example, 
after User2 is created, he/she will be forced to change their password when 
they logon.
 
 Example3:
-samba-tool user add User3 passw3rd --userou=OrgUnit
+samba-tool user add User3 passw3rd --userou='OU=OrgUnit'
 
 Example3 shows how to create a new user in the OrgUnit organizational unit.
 
@@ -87,7 +87,7 @@ Example4 shows how to create a new user with Unix UID, GID 
and login-shell set f
 help=Force use of username as user's CN,
 action=store_true),
 Option(--userou,
-help=Alternative location (without domainDN counterpart) to 
default CN=Users in which new user object will be created,
+help=DN of alternative location (without domainDN 
counterpart) to default CN=Users in which new user object will be created. E. 
g. 'OU=OU name',
 type=str),
 Option(--surname, help=User's surname, type=str),
 Option(--given-name, help=User's given name, type=str),


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2014-08-01 Thread David Disseldorp
The branch, master has been updated
   via  a058397 samba: Retain case sensitivity of cifs client
  from  c01ee46 winbindd-irpc: Ensure not to call irpc_send_reply twice on 
error

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


- Log -
commit a0583976da2ba09da0fd94f739ed4f5851e2a858
Author: Shirish Pargaonkar spargaon...@suse.com
Date:   Sat Jul 26 10:41:25 2014 -0500

samba: Retain case sensitivity of cifs client

When a client supports extended security but server does not,
and that client, in Flags2 field of smb header indicates that

- it supports extended security negotiation
- it does not support security signatures
- it does not require security signatures

Samba server treats a client as a Vista client.

That turns off case sensitivity and that is a problem for cifs vfs client.

So include remote cifs client along with remote samba client
to not do so otherwise.

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

Signed-off-by: Shirish Pargaonkar spargaon...@suse.com
Reviewed-by: Jeremy Allison j...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

Autobuild-User(master): David Disseldorp dd...@samba.org
Autobuild-Date(master): Fri Aug  1 16:11:43 CEST 2014 on sn-devel-104

---

Summary of changes:
 source3/smbd/negprot.c |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/negprot.c b/source3/smbd/negprot.c
index 4cd12d8..225fe39 100644
--- a/source3/smbd/negprot.c
+++ b/source3/smbd/negprot.c
@@ -262,7 +262,8 @@ static void reply_nt1(struct smb_request *req, uint16 
choice)
if ( (req-flags2  FLAGS2_EXTENDED_SECURITY) 
((req-flags2  FLAGS2_SMB_SECURITY_SIGNATURES_REQUIRED) == 0) )
{
-   if (get_remote_arch() != RA_SAMBA) {
+   if ((get_remote_arch() != RA_SAMBA) 
+   (get_remote_arch() != RA_CIFSFS)) {
set_remote_arch( RA_VISTA );
}
}


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2014-07-30 Thread David Disseldorp
The branch, master has been updated
   via  6abeff5 s3: net time - fix usage and core dump.
   via  9919c90 s3: xml-docs. Ensure users of 'net time' know the remote 
server must be specified with -S.
  from  ff13e28 tests: dnsserver: Remove duplicate empty test function

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


- Log -
commit 6abeff5f46d2d46332a36018370b69ebb547799f
Author: Jeremy Allison j...@samba.org
Date:   Tue Jul 29 14:12:31 2014 -0700

s3: net time - fix usage and core dump.

Bug 10728 - 'net time system' segfaults

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

Signed-off-by: Jeremy Allison j...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

Autobuild-User(master): David Disseldorp dd...@samba.org
Autobuild-Date(master): Wed Jul 30 13:32:47 CEST 2014 on sn-devel-104

commit 9919c90ca8622ef4c9bb3753518a9bffd0c4f3b9
Author: Jeremy Allison j...@samba.org
Date:   Tue Jul 29 12:29:37 2014 -0700

s3: xml-docs. Ensure users of 'net time' know the remote server must be 
specified with -S.

Bug 10728 - 'net time system' segfaults

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

Signed-off-by: Jeremy Allison j...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

---

Summary of changes:
 docs-xml/manpages/net.8.xml |   15 +++
 source3/utils/net_time.c|   30 --
 2 files changed, 31 insertions(+), 14 deletions(-)


Changeset truncated at 500 lines:

diff --git a/docs-xml/manpages/net.8.xml b/docs-xml/manpages/net.8.xml
index 8524d1f..d497e66 100644
--- a/docs-xml/manpages/net.8.xml
+++ b/docs-xml/manpages/net.8.xml
@@ -404,7 +404,8 @@ YOU HAVE BEEN WARNED.
 titleTIME/title
 
 paraWithout any options, the commandNET TIME/command command 
-displays the time on the remote server.
+displays the time on the remote server. The remote server must be
+specified with the -S option.
 /para
 
 /refsect3
@@ -412,21 +413,27 @@ displays the time on the remote server.
 refsect3
 titleTIME SYSTEM/title
 
-paraDisplays the time on the remote server in a format ready for 
command/bin/date/command./para
+paraDisplays the time on the remote server in a format ready for 
command/bin/date/command.
+The remote server must be specified with the -S option.
+/para
 
 /refsect3
 
 refsect3
 titleTIME SET/title
 paraTries to set the date and time of the local server to that on 
-the remote server using command/bin/date/command. /para
+the remote server using command/bin/date/command.
+The remote server must be specified with the -S option.
+/para
 
 /refsect3
 
 refsect3
 titleTIME ZONE/title
 
-paraDisplays the timezone in hours from GMT on the remote computer./para
+paraDisplays the timezone in hours from GMT on the remote server.
+The remote server must be specified with the -S option.
+/para
 
 /refsect3
 /refsect2
diff --git a/source3/utils/net_time.c b/source3/utils/net_time.c
index 847b4fe..56ce8f7 100644
--- a/source3/utils/net_time.c
+++ b/source3/utils/net_time.c
@@ -84,10 +84,10 @@ static const char *systime(time_t t)
 int net_time_usage(struct net_context *c, int argc, const char **argv)
 {
d_printf(_(
-net time\n\tdisplays time on a server\n\n
-net time system\n\tdisplays time on a server in a format ready for 
/bin/date\n\n
-net time set\n\truns /bin/date with the time from the server\n\n
-net time zone\n\tdisplays the timezone in hours from GMT on the remote 
computer\n\n
+net time\n\tdisplays time on a server (-S server)\n\n
+net time system\n\tdisplays time on a server (-S server) in a format ready 
for /bin/date\n\n
+net time set\n\truns /bin/date with the time from the server (-S server)\n\n
+net time zone\n\tdisplays the timezone in hours from GMT on the remote server 
(-S server)\n\n
 \n));
net_common_flags_usage(c, argc, argv);
return -1;
@@ -99,6 +99,16 @@ static int net_time_set(struct net_context *c, int argc, 
const char **argv)
struct timeval tv;
int result;
 
+   if (c-display_usage || c-opt_host == NULL) {
+   d_printf(  %s\n
+  net time set\n
+  %s\n,
+_(Usage:),
+_(Set local time to that of remote time 
+   server (-S server) ));
+   return 0;
+   }
+
tv.tv_sec = nettime(c, NULL);
tv.tv_usec=0;
 
@@ -118,13 +128,13 @@ static int net_time_system(struct net_context *c, int 
argc, const char **argv)
 {
time_t t;
 
-   if (c-display_usage) {
+   if (c-display_usage || c-opt_host == NULL) {
d_printf(  %s\n
   net time system\n
   %s\n,
 _(Usage:),
-_(Output remote time

[SCM] Samba Shared Repository - branch master updated

2014-07-08 Thread David Disseldorp
The branch, master has been updated
   via  d3417b2 smbd: Avoid double-free in get_print_db_byname
  from  5f3a765 smbd: Factor out smbd_smb2_send_break

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


- Log -
commit d3417b253e67aa476694d9c763fc3d8ee8f4fd90
Author: Volker Lendecke v...@samba.org
Date:   Tue Jul 8 14:30:54 2014 +0200

smbd: Avoid double-free in get_print_db_byname

Signed-off-by: Volker Lendecke v...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

Autobuild-User(master): David Disseldorp dd...@samba.org
Autobuild-Date(master): Tue Jul  8 22:27:03 CEST 2014 on sn-devel-104

---

Summary of changes:
 source3/printing/printing_db.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/printing/printing_db.c b/source3/printing/printing_db.c
index ecb8ff6..b721317 100644
--- a/source3/printing/printing_db.c
+++ b/source3/printing/printing_db.c
@@ -65,9 +65,9 @@ struct tdb_print_db *get_print_db_byname(const char 
*printername)
if (p-ref_count)
continue;
if (p-tdb) {
-   if (tdb_close(print_db_head-tdb)) {
+   if (tdb_close(p-tdb)) {
DEBUG(0,(get_print_db: Failed to close 
tdb for printer %s\n,
-   
print_db_head-printer_name ));
+   p-printer_name 
));
return NULL;
}
}


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2014-06-25 Thread David Disseldorp
The branch, master has been updated
   via  8fa0cde torture4: Add a little test that truncate actually works :-)
   via  1dc5c20 smbd: Remove 2 indentation levels
   via  c4f7c02 s4: torture: Add regression test case for #10671 - Samba 
file corruption as a result of failed lock check.
   via  31b3427 s3: smbd - Prevent file truncation on an open that fails 
with share mode violation.
  from  457d79f s3: smbd - fix processing of packets with invalid DOS 
charset conversions.

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


- Log -
commit 8fa0cde05f41ba9a37ed9d1fdb7b515d661426d8
Author: Volker Lendecke v...@samba.org
Date:   Wed Jun 25 08:49:45 2014 +

torture4: Add a little test that truncate actually works :-)

Signed-off-by: Volker Lendecke v...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

Autobuild-User(master): David Disseldorp dd...@samba.org
Autobuild-Date(master): Wed Jun 25 13:37:24 CEST 2014 on sn-devel-104

commit 1dc5c20c8f7d8aa96fa0601bf5bf6dc69fb79d9f
Author: Volker Lendecke v...@samba.org
Date:   Wed Jun 25 08:36:47 2014 +

smbd: Remove 2 indentation levels

Signed-off-by: Volker Lendecke v...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

commit c4f7c02137cb2aa1d58251362e7e04ad32ede5d8
Author: Jeremy Allison j...@samba.org
Date:   Tue Jun 24 14:22:24 2014 -0700

s4: torture: Add regression test case for #10671 - Samba file corruption as 
a result of failed lock check.

Adds a new test to raw.open.

Opens a file with SHARE_NONE, writes 1 byte at offset 1023,
attempts a second open with r/w access+truncate disposition,
then checks that open fails with SHARING_VIOLATION, and
the file is not truncated (is still size 1024). Correctly
detects the bug and fixed smbd for me.

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

Signed-off-by: Jeremy Allison j...@samba.org
Reviewed-by: Volker Lendecke v...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

commit 31b3427a417217e5e869baafdf63e633efc39d12
Author: Jeremy Allison j...@samba.org
Date:   Tue Jun 24 14:19:30 2014 -0700

s3: smbd - Prevent file truncation on an open that fails with share mode 
violation.

Fix from Volker, really - just tidied up a little.
The S_ISFIFO check may not be strictly neccessary,
but doesn't hurt (might make the code a bit more complex
than it needs to be).

Fixes bug #10671 - Samba file corruption as a result of failed lock check.

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

Signed-off-by: Jeremy Allison j...@samba.org
Reviewed-by: Volker Lendecke v...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

---

Summary of changes:
 source3/smbd/open.c|   22 ++-
 source4/torture/raw/open.c |   86 
 2 files changed, 106 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index b913c9c..a8bd974 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -840,8 +840,11 @@ static NTSTATUS open_file(files_struct *fsp,
}
}
 
-   /* Actually do the open */
-   status = fd_open_atomic(conn, fsp, local_flags,
+   /*
+* Actually do the open - if O_TRUNC is needed handle it
+* below under the share mode lock.
+*/
+   status = fd_open_atomic(conn, fsp, local_flags  ~O_TRUNC,
unx_mode, p_file_created);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(3,(Error opening file %s (%s) (local_flags=%d) 
@@ -2676,6 +2679,21 @@ static NTSTATUS open_file_ntcreate(connection_struct 
*conn,
return status;
}
 
+   /* Should we atomically (to the client at least) truncate ? */
+   if ((!new_file_created) 
+   (flags2  O_TRUNC) 
+   (!S_ISFIFO(fsp-fsp_name-st.st_ex_mode))) {
+   int ret;
+
+   ret = vfs_set_filelen(fsp, 0);
+   if (ret != 0) {
+   status = map_nt_error_from_unix(errno);
+   TALLOC_FREE(lck);
+   fd_close(fsp);
+   return status;
+   }
+   }
+
grant_fsp_oplock_type(fsp, lck, oplock_request);
 
/*
diff --git a/source4/torture/raw/open.c b/source4/torture/raw/open.c
index 0ec28c3..763c718 100644
--- a/source4/torture/raw/open.c
+++ b/source4/torture/raw/open.c
@@ -2034,6 +2034,91 @@ static bool test_ntcreatexdir(struct torture_context 
*tctx,
return true;
 }
 
+/*
+  test opening with truncate on an already open file
+  returns share violation

[SCM] Samba Shared Repository - branch master updated

2014-06-12 Thread David Disseldorp
The branch, master has been updated
   via  0057388 leases: Fix uint32-hyper
   via  2f15208 Remove .clang_complete.
  from  0b4af49 waf: fix the name of the WINBIND nss module on AIX

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


- Log -
commit 00573880e5f0362c3c442e82501bb0efe731ce7b
Author: Volker Lendecke v...@samba.org
Date:   Thu Jun 12 08:53:36 2014 +

leases: Fix uint32-hyper

Thanks to Noel Power noel.po...@suse.com for finding this!

Signed-off-by: Volker Lendecke v...@samba.org
Reviewed-by: Noel Power noel.po...@suse.com
[dd...@samba.org: changed Noel's address, as requested]
Reviewed-by: David Disseldorp dd...@samba.org

Autobuild-User(master): David Disseldorp dd...@samba.org
Autobuild-Date(master): Thu Jun 12 16:01:10 CEST 2014 on sn-devel-104

commit 2f15208126ee83ca21553b307c577cad7f3d7141
Author: Andreas Schneider a...@samba.org
Date:   Thu Jun 5 19:06:10 2014 +0200

Remove .clang_complete.

Signed-off-by: Andreas Schneider a...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

---

Summary of changes:
 .clang_complete  |  104 --
 librpc/idl/smb2_lease_struct.idl |2 +-
 2 files changed, 1 insertions(+), 105 deletions(-)
 delete mode 100644 .clang_complete


Changeset truncated at 500 lines:

diff --git a/.clang_complete b/.clang_complete
deleted file mode 100644
index b4e397d..000
--- a/.clang_complete
+++ /dev/null
@@ -1,104 +0,0 @@
--DHAVE_CONFIG_H=1
--D_GNU_SOURCE=1
--D_XOPEN_SOURCE_EXTENDED=1
--Ibin/default/auth -Iauth
--Ibin/default/auth/credentials -Iauth/credentials
--Ibin/default/auth/gensec -Iauth/gensec
--Ibin/default/auth/kerberos -I/auth/kerberos
--Ibin/default/auth/ntlmssp -Iauth/ntlmssp
--Ibin/default/bin/default/source4/heimdal/lib/asn1
--Ibin/default/dfs_server -Idfs_server
--Ibin/default/dynconfig -Idynconfig
--Ibin/default/include -Iinclude
--Ibin/default/include/public
--Ibin/default/include/public/core
--Ibin/default/include/public/gen_ndr
--Ibin/default/include/public/ndr
--Ibin/default/include/public/samba
--Ibin/default/include/public/util
--Ibin/default/lib
--Ibin/default/lib/addns -Ilib/addns
--Ibin/default/lib/async_req -Ilib/async_req
--Ibin/default/lib/ccan -Ilib/ccan
--Ibin/default/lib/compression -Ilib/compression
--Ibin/default/lib/crypto -Ilib/crypto
--Ibin/default/lib/dbwrap -Ilib/dbwrap
--Ibin/default/lib/krb5_wrap -Ilib/krb5_wrap
--Ibin/default/lib/ldb -Ilib/ldb
--Ibin/default/lib/ldb-samba -Ilib/ldb-samba
--Ibin/default/lib/ldb/include -Ilib/ldb/include
--Ibin/default/lib/nss_wrapper -Ilib/nss_wrapper
--Ibin/default/lib/param -Ilib/param
--Ibin/default/lib/replace -Ilib/replace
--Ibin/default/lib/smbconf -Ilib/smbconf
--Ibin/default/lib/socket -Ilib/socket
--Ibin/default/lib/socket_wrapper -Ilib/socket_wrapper
--Ibin/default/lib/talloc -Ilib/talloc
--Ibin/default/lib/tdb -Ilib/tdb
--Ibin/default/lib/tdb/include -Ilib/tdb/include
--Ibin/default/lib/tdb_compat -Ilib/tdb_compat
--Ibin/default/lib/tevent -Ilib/tevent
--Ibin/default/lib/tsocket -Ilib/tsocket
--Ibin/default/lib/uid_wrapper -Ilib/uid_wrapper
--Ibin/default/lib/util/charset -Ilib/util/charset
--Ibin/default/libcli/auth -Ilibcli/auth
--Ibin/default/libcli/cldap -Ilibcli/cldap
--Ibin/default/libcli/dns -Ilibcli/dns
--Ibin/default/libcli/drsuapi -Ilibcli/drsuapi
--Ibin/default/libcli/ldap -Ilibcli/ldap
--Ibin/default/libcli/lsarpc -Ilibcli/lsarpc
--Ibin/default/libcli/named_pipe_auth -Ilibcli/named_pipe_auth
--Ibin/default/libcli/nbt -Ilibcli/nbt
--Ibin/default/libcli/netlogon -Ilibcli/netlogon
--Ibin/default/libcli/registry -Ilibcli/registry
--Ibin/default/libcli/security -Ilibcli/security
--Ibin/default/libcli/smb -Ilibcli/smb
--Ibin/default/libcli/util -Ilibcli/util
--Ibin/default/libds/common -Ilibds/common
--Ibin/default/librpc -Ilibrpc
--Ibin/default/nsswitch -Insswitch
--Ibin/default/nsswitch/libwbclient -Insswitch/libwbclient
--Ibin/default/source3 -Isource3
--Ibin/default/source3/auth -Isource3/auth
--Ibin/default/source3/include -Isource3/include
--Ibin/default/source3/lib -Isource3/lib
--Ibin/default/source3/lib/asys -Isource3/lib/asys
--Ibin/default/source3/lib/pthreadpool -Isource3/lib/pthreadpool
--Ibin/default/source3/librpc -Isource3/librpc
--Ibin/default/source3/modules -Isource3/modules
--Ibin/default/source3/passdb -Isource3/passdb
--Ibin/default/source3/rpc_server -Isource3/rpc_server
--Ibin/default/source4 -Isource4
--Ibin/default/source4/auth -Isource4/auth
--Ibin/default/source4/auth/gensec -Isource4/auth/gensec
--Ibin/default/source4/auth/kerberos -Isource4/auth/kerberos
--Ibin/default/source4/dsdb -Isource4/dsdb
--Ibin/default/source4/heimdal/base -Isource4/heimdal/base
--Ibin/default/source4/heimdal/include -Isource4/heimdal/include
--Ibin/default/source4/heimdal/lib -Isource4/heimdal/lib

Re: [SCM] Samba Shared Repository - branch master updated

2014-06-05 Thread David Disseldorp
Hi Andreas,

On Thu,  5 Jun 2014 13:19:04 +0200 (CEST), Andreas Schneider wrote:

 Author: Andreas Schneider a...@samba.org
 Date:   Wed Apr 2 09:01:41 2014 +0200
 
 Add YouCompleteMe config.

Would have been good to see this go by the list beforehand...

I'm not a fan of seeing developer environment tools, editor modelines,
add-ons and other accessories go into the source repo. IMO this kind of
cruft should remain on the developers' system - people have differing
setups.

Cheers, David


[SCM] Samba Shared Repository - branch master updated

2014-06-04 Thread David Disseldorp
The branch, master has been updated
   via  ed89624 docs: Update Roadmap
  from  23848f3 s3-rpc_server: Use C99 types in rpc_pipes.h

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


- Log -
commit ed89624896b782525bf75dba5d4b75fa3067e80f
Author: Andrew Bartlett abart...@samba.org
Date:   Tue Jun 3 20:10:47 2014 +1200

docs: Update Roadmap

Change-Id: I336f0c23759ea48fdb2bc3349d8fe19849645fb5
Signed-off-by: Andrew Bartlett abart...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

Autobuild-User(master): David Disseldorp dd...@samba.org
Autobuild-Date(master): Wed Jun  4 13:33:05 CEST 2014 on sn-devel-104

---

Summary of changes:
 Roadmap |   15 +++
 1 files changed, 7 insertions(+), 8 deletions(-)


Changeset truncated at 500 lines:

diff --git a/Roadmap b/Roadmap
index 8f664ec..12b9e8f 100644
--- a/Roadmap
+++ b/Roadmap
@@ -1,24 +1,23 @@
-Copyright (C) 1997-2008 Samba-Team
+Copyright (C) 1997-2014 Samba-Team
 
 The Samba-Team are committed to an aggressive program to deliver quality
 controlled software to a well defined roadmap.
 
-Please also look at the Samba3 and Samba4 pages of wiki.samba.org for more
+Please also look at the Release planning pages of wiki.samba.org for more
 information.
 
 The following development objectives for future releases
 are in progress:
 
-Samba-3.5.xThis release turned into maintenance mode since we
-   released 3.6.
+Samba-3.6.xThis release turned into security maintenance mode 
since we
+   released 4.1.
 
-Samba-3.6.xThis is the current stable Samba 3 release intended
-   for all Samba production server.
-
-Samba-4.0  Our next release including the AD domain controller
+Samba-4.0.xOur previous release including the AD domain controller
 feature, the file server and other functionality
 from Samba 3.6 as well as the new SMB3 protocol.
 
+Samba-4.1.xOur current release.
+
 
 Note that it is a given that the Samba-Team will continue to track
 Windows releases, ensuring that Samba will work


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2014-05-27 Thread David Disseldorp
The branch, master has been updated
   via  f1d4b27 Remove obsolete README.packaging4.
   via  e72d8b7 libcli: Simplify desc_ace_has_generic()
   via  6218e5c libcli: Simplify desc_expand_generic()
   via  8bb5107 libcli: Avoid an explicit memset call
   via  af83a15 libcli: Avoid a talloc/free
   via  80ef004 libcli: Avoid a talloc/free
  from  9487785 s3-build: Support building with in-tree CTDB

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


- Log -
commit f1d4b274eee4e36731c37dc218b3c4aec8842c87
Author: Michael Adam ob...@samba.org
Date:   Tue May 27 14:30:10 2014 +0200

Remove obsolete README.packaging4.

Signed-off-by: Michael Adam ob...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

Autobuild-User(master): David Disseldorp dd...@samba.org
Autobuild-Date(master): Tue May 27 19:55:07 CEST 2014 on sn-devel-104

commit e72d8b7acc8d20fe09dcb24298e0839ee1b257f9
Author: Volker Lendecke v...@samba.org
Date:   Tue May 27 07:04:38 2014 +

libcli: Simplify desc_ace_has_generic()

Signed-off-by: Volker Lendecke v...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

commit 6218e5cbfe9233935060adb54a6c0e3f47e9dc65
Author: Volker Lendecke v...@samba.org
Date:   Tue May 27 07:03:18 2014 +

libcli: Simplify desc_expand_generic()

Signed-off-by: Volker Lendecke v...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

commit 8bb5107d41b400ceebd260874f37c661248b3d49
Author: Volker Lendecke v...@samba.org
Date:   Mon May 26 21:01:38 2014 +

libcli: Avoid an explicit memset call

On x86 with -O3, this saves surprising 160 bytes .text

Signed-off-by: Volker Lendecke v...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

commit af83a158878b92c933d06c19d5672592f542097b
Author: Volker Lendecke v...@samba.org
Date:   Mon May 26 20:57:31 2014 +

libcli: Avoid a talloc/free

Signed-off-by: Volker Lendecke v...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

commit 80ef004721e6d88bc87e4d1a1e100cb87e81cc93
Author: Volker Lendecke v...@samba.org
Date:   Mon May 26 20:57:31 2014 +

libcli: Avoid a talloc/free

Signed-off-by: Volker Lendecke v...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

---

Summary of changes:
 README.packaging4   |   13 -
 libcli/security/create_descriptor.c |   34 --
 libcli/security/security_token.c|   20 
 libcli/security/util_sid.c  |8 
 4 files changed, 28 insertions(+), 47 deletions(-)
 delete mode 100644 README.packaging4


Changeset truncated at 500 lines:

diff --git a/README.packaging4 b/README.packaging4
deleted file mode 100644
index 0a9bb58..000
--- a/README.packaging4
+++ /dev/null
@@ -1,13 +0,0 @@
-Debian
-==
-
-Packages of Samba 4 are regularly uploaded to the Debian and Ubuntu archives.
-
-http://packages.debian.org/samba4
-
-Please see http://wiki.samba.org/index.php/Samba4/Debian for instructions
-on building the Samba 4 Debian packages.
-
-Fedora
-==
-A package of Samba 4 is maintained in Fedora.
diff --git a/libcli/security/create_descriptor.c 
b/libcli/security/create_descriptor.c
index 23e7e9b..03c0658 100644
--- a/libcli/security/create_descriptor.c
+++ b/libcli/security/create_descriptor.c
@@ -107,17 +107,14 @@ static bool object_in_list(struct GUID *object_list, 
struct GUID *object)
 /* returns true if the ACE gontains generic information
  * that needs to be processed additionally */
  
-static bool desc_ace_has_generic(TALLOC_CTX *mem_ctx,
-struct security_ace *ace)
+static bool desc_ace_has_generic(struct security_ace *ace)
 {
-   struct dom_sid *co, *cg;
-   co = dom_sid_parse_talloc(mem_ctx,  SID_CREATOR_OWNER);
-   cg = dom_sid_parse_talloc(mem_ctx,  SID_CREATOR_GROUP);
if (ace-access_mask  SEC_GENERIC_ALL || ace-access_mask  
SEC_GENERIC_READ ||
ace-access_mask  SEC_GENERIC_WRITE || ace-access_mask  
SEC_GENERIC_EXECUTE) {
return true;
}
-   if (dom_sid_equal(ace-trustee, co) || dom_sid_equal(ace-trustee, 
cg)) {
+   if (dom_sid_equal(ace-trustee, global_sid_Creator_Owner) ||
+   dom_sid_equal(ace-trustee, global_sid_Creator_Group)) {
return true;
}
return false;
@@ -125,19 +122,15 @@ static bool desc_ace_has_generic(TALLOC_CTX *mem_ctx,
 
 /* creates an ace in which the generic information is expanded */
 
-static void desc_expand_generic(TALLOC_CTX *mem_ctx,
-   struct security_ace *new_ace,
+static void desc_expand_generic(struct security_ace *new_ace,
struct dom_sid *owner,
struct

[SCM] Samba Shared Repository - branch master updated

2014-05-06 Thread David Disseldorp
The branch, master has been updated
   via  9d4adbc6 build: find blkcnt_t size via array
   via  db86180 build: tweak SIZEOF utmp-ut_line
   via  6619055 build: make wafsamba CHECK_SIZEOF cross-compile friendly
   via  5ac317e build: unify and fix endian tests
   via  5bf6ed5 byteorder: do not assume PowerPC is big-endian
  from  401f555 dsdb: Do not permit nested event loops when in a 
transaction, use a nested event context

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


- Log -
commit 9d4adbc65a5832d0300543cc58bce1620bb50ed0
Author: Gustavo Zacarias gust...@zacarias.com.ar
Date:   Mon Apr 21 10:18:18 2014 -0300

build: find blkcnt_t size via array

Using the same trick as commit 0d9bb86293c9d39298786df095c73a6251b08b7e
find blkcnt_t size via an array so that it can be determined via build
rather than running it.

Signed-off-by: Gustavo Zacarias gust...@zacarias.com.ar
Reviewed-by: Andrew Bartlett abart...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

Autobuild-User(master): David Disseldorp dd...@samba.org
Autobuild-Date(master): Tue May  6 20:37:16 CEST 2014 on sn-devel-104

commit db8618050d40612666c279cb2d3a486473278b6b
Author: Gustavo Zacarias gust...@zacarias.com.ar
Date:   Mon Apr 21 10:18:17 2014 -0300

build: tweak SIZEOF utmp-ut_line

Set the critical parameter of CHECK_SIZEOF utmp-ut_line to False since
it's used to find out if utmp support should be enabled.
This is necessary with the introduction of the cross-compile aware
CHECK_SIZEOF.

Signed-off-by: Gustavo Zacarias gust...@zacarias.com.ar
Reviewed-by: Andrew Bartlett abart...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

commit 6619055f6034c1f7194c821ac230d53bf735adbc
Author: Gustavo Zacarias gust...@zacarias.com.ar
Date:   Mon Apr 21 10:18:16 2014 -0300

build: make wafsamba CHECK_SIZEOF cross-compile friendly

Use the same trick as commit 0d9bb86293c9d39298786df095c73a6251b08b7e
We do the same array trick iteratively starting from 1 (byte) by powers
of 2 up to 32.

The new 'critical' option is used to make the invocation die or not
according to each test.
The default is True since normally it's expected to find a proper
result and should error out if not.

Signed-off-by: Gustavo Zacarias gust...@zacarias.com.ar
Reviewed-by: Andrew Bartlett abart...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

commit 5ac317e2b6a7a45c024490e3e1e2bd00debf150f
Author: Gustavo Zacarias gust...@zacarias.com.ar
Date:   Mon Apr 21 10:18:15 2014 -0300

build: unify and fix endian tests

Unify the endian tests out of lib/ccan/wscript into wafsamba since
they're almost cross-compile friendly.
While at it fix them to be so by moving the preprocessor directives out
of main scope since that will fail.
And keep the WORDS_BIGENDIAN, HAVE_LITTLE_ENDIAN and HAVE_BIG_ENDIAN
defines separate because of different codebases.

Signed-off-by: Gustavo Zacarias gust...@zacarias.com.ar
Reviewed-by: Andrew Bartlett abart...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

commit 5bf6ed5ebd0dc5ecdc5bcfb1d4720e9251849adc
Author: David Disseldorp dd...@samba.org
Date:   Mon May 5 13:42:36 2014 +0200

byteorder: do not assume PowerPC is big-endian

byteorder.h currently uses reverse-indexing ASM instructions for little
endian multi-byte storage/retrieval on PowerPC. With Power8 this is an
incorrect assumption, as it can be big or little endian.

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

Signed-off-by: David Disseldorp dd...@samba.org
Reviewed-by: Christof Schmitt c...@samba.org

---

Summary of changes:
 buildtools/wafsamba/samba_autoconf.py |   28 --
 buildtools/wafsamba/wscript   |   65 +++--
 lib/ccan/wscript  |   55 
 lib/util/byteorder.h  |   10 +++--
 source3/wscript   |   24 +++--
 5 files changed, 97 insertions(+), 85 deletions(-)


Changeset truncated at 500 lines:

diff --git a/buildtools/wafsamba/samba_autoconf.py 
b/buildtools/wafsamba/samba_autoconf.py
index 59d9e79..f60ce9d 100644
--- a/buildtools/wafsamba/samba_autoconf.py
+++ b/buildtools/wafsamba/samba_autoconf.py
@@ -304,23 +304,27 @@ def CHECK_FUNCS(conf, list, link=True, lib=None, 
headers=None):
 
 
 @conf
-def CHECK_SIZEOF(conf, vars, headers=None, define=None):
+def CHECK_SIZEOF(conf, vars, headers=None, define=None, critical=True):
 '''check the size of a type'''
-ret = True
 for v in TO_LIST(vars):
 v_define = define
+ret = False
 if v_define is None:
 v_define = 'SIZEOF_%s

[SCM] Samba Shared Repository - branch master updated

2014-05-04 Thread David Disseldorp
The branch, master has been updated
   via  2995b93 poll_funcs: Fix a comment typo
  from  d7c22d5 ldb: make the successful ldb_transaction_start() message 
clearer

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


- Log -
commit 2995b934409700061a729f5d50dca18f19260d37
Author: Volker Lendecke v...@samba.org
Date:   Sun May 4 18:44:33 2014 +0200

poll_funcs: Fix a comment typo

Signed-off-by: Volker Lendecke v...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

Autobuild-User(master): David Disseldorp dd...@samba.org
Autobuild-Date(master): Sun May  4 22:19:53 CEST 2014 on sn-devel-104

---

Summary of changes:
 source3/lib/poll_funcs/poll_funcs.h |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/lib/poll_funcs/poll_funcs.h 
b/source3/lib/poll_funcs/poll_funcs.h
index b23e7d9..6072eb5 100644
--- a/source3/lib/poll_funcs/poll_funcs.h
+++ b/source3/lib/poll_funcs/poll_funcs.h
@@ -122,7 +122,7 @@ struct poll_funcs {
void (*timeout_free)(struct poll_timeout *t);
 
/**
-* @brief private data for use by the implmentation
+* @brief private data for use by the implementation
 */
 
void *private_data;


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2014-04-07 Thread David Disseldorp
The branch, master has been updated
   via  01de781 ctdb-daemon: Always update database priority cluster wide
  from  5963519 s3: smbd/nmbd/winbindd - fix append on trailing slash on 
system paths.

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


- Log -
commit 01de7818def1367fd55d8fbd80432c5a02c3e1f6
Author: Amitay Isaacs ami...@gmail.com
Date:   Wed Apr 2 17:17:47 2014 +1100

ctdb-daemon: Always update database priority cluster wide

Database priority is a global property and all the nodes should have the
priority set for the databases.  Just setting priority on one node can
lead to problems in the recovery as a database can be frozen at wrong
priority and then freezing database would not succeed.

Signed-off-by: Amitay Isaacs ami...@gmail.com
Reviewed-by: David Disseldorp dd...@samba.org

Autobuild-User(master): David Disseldorp dd...@samba.org
Autobuild-Date(master): Mon Apr  7 14:06:26 CEST 2014 on sn-devel-104

---

Summary of changes:
 ctdb/include/ctdb_private.h|3 ++-
 ctdb/server/ctdb_control.c |2 +-
 ctdb/server/ctdb_ltdb_server.c |   10 +-
 ctdb/server/ctdb_recoverd.c|   19 +--
 4 files changed, 17 insertions(+), 17 deletions(-)


Changeset truncated at 500 lines:

diff --git a/ctdb/include/ctdb_private.h b/ctdb/include/ctdb_private.h
index 8ed867d..2206f4e 100644
--- a/ctdb/include/ctdb_private.h
+++ b/ctdb/include/ctdb_private.h
@@ -1440,7 +1440,8 @@ int32_t ctdb_control_disable_script(struct ctdb_context 
*ctdb, TDB_DATA indata);
 void ctdb_local_node_got_banned(struct ctdb_context *ctdb);
 int32_t ctdb_control_set_ban_state(struct ctdb_context *ctdb, TDB_DATA indata);
 int32_t ctdb_control_get_ban_state(struct ctdb_context *ctdb, TDB_DATA 
*outdata);
-int32_t ctdb_control_set_db_priority(struct ctdb_context *ctdb, TDB_DATA 
indata);
+int32_t ctdb_control_set_db_priority(struct ctdb_context *ctdb, TDB_DATA 
indata,
+uint32_t client_id);
 void ctdb_ban_self(struct ctdb_context *ctdb);
 
 int32_t ctdb_control_register_notify(struct ctdb_context *ctdb, uint32_t 
client_id, TDB_DATA indata);
diff --git a/ctdb/server/ctdb_control.c b/ctdb/server/ctdb_control.c
index b407a1f..b56b624 100644
--- a/ctdb/server/ctdb_control.c
+++ b/ctdb/server/ctdb_control.c
@@ -603,7 +603,7 @@ static int32_t ctdb_control_dispatch(struct ctdb_context 
*ctdb,
 
case CTDB_CONTROL_SET_DB_PRIORITY:
CHECK_CONTROL_DATA_SIZE(sizeof(struct ctdb_db_priority));
-   return ctdb_control_set_db_priority(ctdb, indata);
+   return ctdb_control_set_db_priority(ctdb, indata, client_id);
 
case CTDB_CONTROL_GET_DB_PRIORITY: {
uint32_t db_id;
diff --git a/ctdb/server/ctdb_ltdb_server.c b/ctdb/server/ctdb_ltdb_server.c
index 234ecac..aafba42 100644
--- a/ctdb/server/ctdb_ltdb_server.c
+++ b/ctdb/server/ctdb_ltdb_server.c
@@ -1425,7 +1425,8 @@ int32_t ctdb_ltdb_enable_seqnum(struct ctdb_context 
*ctdb, uint32_t db_id)
return 0;
 }
 
-int32_t ctdb_control_set_db_priority(struct ctdb_context *ctdb, TDB_DATA 
indata)
+int32_t ctdb_control_set_db_priority(struct ctdb_context *ctdb, TDB_DATA 
indata,
+uint32_t client_id)
 {
struct ctdb_db_priority *db_prio = (struct ctdb_db_priority 
*)indata.dptr;
struct ctdb_db_context *ctdb_db;
@@ -1444,6 +1445,13 @@ int32_t ctdb_control_set_db_priority(struct ctdb_context 
*ctdb, TDB_DATA indata)
ctdb_db-priority = db_prio-priority;
DEBUG(DEBUG_INFO,(Setting DB priority to %u for db 0x%08x\n, 
db_prio-priority, db_prio-db_id));
 
+   if (client_id != 0) {
+   /* Broadcast the update to the rest of the cluster */
+   ctdb_daemon_send_control(ctdb, CTDB_BROADCAST_ALL, 0,
+CTDB_CONTROL_SET_DB_PRIORITY, 0,
+CTDB_CTRL_FLAG_NOREPLY, indata,
+NULL, NULL);
+   }
return 0;
 }
 
diff --git a/ctdb/server/ctdb_recoverd.c b/ctdb/server/ctdb_recoverd.c
index 179eb7d..ac692ec 100644
--- a/ctdb/server/ctdb_recoverd.c
+++ b/ctdb/server/ctdb_recoverd.c
@@ -458,13 +458,9 @@ static int update_db_priority_on_remote_nodes(struct 
ctdb_context *ctdb,
uint32_t pnn, struct ctdb_dbid_map *dbmap, TALLOC_CTX *mem_ctx)
 {
int db;
-   uint32_t *nodes;
-
-   nodes = list_of_active_nodes(ctdb, nodemap, mem_ctx, true);
 
/* step through all local databases */
for (db=0; dbdbmap-num;db++) {
-   TDB_DATA data;
struct ctdb_db_priority db_prio;
int ret;
 
@@ -477,16 +473,11 @@ static int update_db_priority_on_remote_nodes(struct 
ctdb_context *ctdb,
 
DEBUG(DEBUG_INFO

[SCM] Samba Shared Repository - branch master updated

2014-04-02 Thread David Disseldorp
The branch, master has been updated
   via  8175e98 selftest: Rename wbinfo_s3 to wbinfo_simple and reorder 
code for clarity
   via  95e0d75 winbindd: Ensure we do not look at rid_array before 
checking if it was returned
   via  8d28437 s3-auth: Add prototype for plugin function to reduce 
warnings in auth_samba4
   via  d13b38d s3-auth: Remember to always free the talloc_stackframe() in 
auth_samba4
   via  dd49939 auth_samba4: Fix auth_samba4 to correctly provide a 
messaging context for itself
   via  4d50c75 s3-auth: Finally change make_user_info_*() use a parent 
talloc context
  from  e1ec1f5 wafsamba: explicitly use allow_warnings=True for 
SAMBA_PYTHON()

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


- Log -
commit 8175e980298cf21595732070bc6f59cba26afe33
Author: Andrew Bartlett abart...@samba.org
Date:   Mon Mar 31 14:02:18 2014 +1300

selftest: Rename wbinfo_s3 to wbinfo_simple and reorder code for clarity

Change-Id: Ic2e06e448fce1d91422b711abf663b9253009a53
Signed-off-by: Andrew Bartlett abart...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

Autobuild-User(master): David Disseldorp dd...@samba.org
Autobuild-Date(master): Wed Apr  2 13:07:24 CEST 2014 on sn-devel-104

commit 95e0d759ac7584d8e27240f11a4b51077b61929c
Author: Andrew Bartlett abart...@samba.org
Date:   Fri Mar 28 16:30:28 2014 +1300

winbindd: Ensure we do not look at rid_array before checking if it was 
returned

We no longer return early if there are no members, we just return an empty 
array.

Change-Id: I7b0949e0c0b9277426a8007514a8658615f6c709
Signed-off-by: Andrew Bartlett abart...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

commit 8d2843731862a3faed94dc92e9c5a0541d51f4ff
Author: Andrew Bartlett abart...@samba.org
Date:   Wed Apr 2 12:12:39 2014 +1300

s3-auth: Add prototype for plugin function to reduce warnings in auth_samba4

Change-Id: I0aa703bb2766f1353a176a0c3f25424bbc4953f5
Signed-off-by: Andrew Bartlett abart...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

commit d13b38dc9681997d35ba8085b1f944f2b31f50bf
Author: Andrew Bartlett abart...@samba.org
Date:   Wed Apr 2 12:12:14 2014 +1300

s3-auth: Remember to always free the talloc_stackframe() in auth_samba4

Change-Id: I94469de9d463ee90365bae43094231efaf0a7d8c
Signed-off-by: Andrew Bartlett abart...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

commit dd499395a5eafeb469a17d31da63cc963b067752
Author: Andrew Bartlett abart...@samba.org
Date:   Thu Mar 27 09:18:04 2014 +1300

auth_samba4: Fix auth_samba4 to correctly provide a messaging context for 
itself

This is done by calling make_auth4_context_s4(), avoiding code duplication.

Change-Id: I3a3bf4e4273f27078c308d55102e4a1f4b052d17
Signed-off-by: Andrew Bartlett abart...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

commit 4d50c751595511936c3d9a44ebb26a925c50a8bc
Author: Andrew Bartlett abart...@samba.org
Date:   Thu Mar 27 09:17:15 2014 +1300

s3-auth: Finally change make_user_info_*() use a parent talloc context

Change-Id: Iedf516e8c24e0d18064aeedd8e287ed692d3c5b4
Signed-off-by: Andrew Bartlett abart...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

---

Summary of changes:
 .../tests/test_wbinfo_simple.sh|4 +-
 source3/auth/auth_ntlmssp.c|5 +-
 source3/auth/auth_samba4.c |   28 +--
 source3/auth/auth_util.c   |   31 
 source3/auth/proto.h   |   21 ++---
 source3/auth/user_info.c   |   17 +--
 source3/rpc_server/netlogon/srv_netlog_nt.c|8 ++-
 source3/selftest/tests.py  |   50 ++--
 source3/smbd/sesssetup.c   |   18 ---
 source3/torture/pdbtest.c  |3 +-
 source3/winbindd/winbindd_pam.c|9 ++-
 source3/winbindd/winbindd_rpc.c|6 +-
 12 files changed, 105 insertions(+), 95 deletions(-)
 rename source3/script/tests/test_wbinfo_s3.sh = 
nsswitch/tests/test_wbinfo_simple.sh (68%)


Changeset truncated at 500 lines:

diff --git a/source3/script/tests/test_wbinfo_s3.sh 
b/nsswitch/tests/test_wbinfo_simple.sh
similarity index 68%
rename from source3/script/tests/test_wbinfo_s3.sh
rename to nsswitch/tests/test_wbinfo_simple.sh
index 91a9f45..dc90ddc 100755
--- a/source3/script/tests/test_wbinfo_s3.sh
+++ b/nsswitch/tests/test_wbinfo_simple.sh
@@ -2,14 +2,14 @@
 
 if [ $# -lt 1 ]; then
 cat EOF
-Usage: test_wbinfo_s3.sh wbinfo args
+Usage: test_wbinfo_simple.sh wbinfo args
 EOF
 exit 1;
 fi
 
 ADDARGS=$*
 
-incdir

[SCM] Samba Shared Repository - branch master updated

2014-03-05 Thread David Disseldorp
The branch, master has been updated
   via  7a53bb9 rpc_server: change unsupported pipe error
  from  5bd47bb dns: Extend tests for records with another type

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


- Log -
commit 7a53bb964166a3091d8013041a1cb3389b999863
Author: David Disseldorp dd...@samba.org
Date:   Wed Mar 5 13:37:26 2014 +0100

rpc_server: change unsupported pipe error

smbd currently prints the following level 0 error when a client attempts
to connect to an unsupported named pipe (e.g. browser):
  ERROR! 'browser' is not a registred pipe

This change reduces the severity of the error (0-2) and fixes a couple
of typos.

Signed-off-by: David Disseldorp dd...@samba.org
Reviewed-by: Andreas Schneider a...@samba.org

Autobuild-User(master): David Disseldorp dd...@samba.org
Autobuild-Date(master): Wed Mar  5 16:31:42 CET 2014 on sn-devel-104

---

Summary of changes:
 source3/rpc_server/srv_pipe_hnd.c |5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/rpc_server/srv_pipe_hnd.c 
b/source3/rpc_server/srv_pipe_hnd.c
index a05fafd..63a5fcd 100644
--- a/source3/rpc_server/srv_pipe_hnd.c
+++ b/source3/rpc_server/srv_pipe_hnd.c
@@ -98,11 +98,10 @@ NTSTATUS np_open(TALLOC_CTX *mem_ctx, const char *name,
 
break;
case RPC_SERVICE_MODE_EMBEDDED:
-   /* Check if we this daemon handles this pipe */
+   /* Check if we handle this pipe internally */
ok = is_known_pipename(name, syntax);
if (!ok) {
-   DEBUG(0, (ERROR! '%s' is not a registred pipe!\n,
- name));
+   DEBUG(2, ('%s' is not a registered pipe!\n, name));
talloc_free(handle);
return NT_STATUS_OBJECT_NAME_NOT_FOUND;
}


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2014-02-28 Thread David Disseldorp
The branch, master has been updated
   via  7e53506 torture: Fix a torture crash with -O3
   via  1dd2351 torture: Fix a buffer overrun
  from  ca3998d vfs: propagate snapshot enumeration errors

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


- Log -
commit 7e5350602e3b6f443855d5ac21a08dc8f6585aeb
Author: Volker Lendecke v...@samba.org
Date:   Fri Feb 28 16:30:52 2014 +

torture: Fix a torture crash with -O3

When compiled with -O3, smbtorture can crash after the following valgrind
trace:

==16944== Conditional jump or move depends on uninitialised value(s)
==16944==at 0x57FFAC3: ndr_push_unique_ptr (ndr_basic.c:730)
==16944==by 0x58CB855: ndr_push_spoolss_SetPrinterInfo 
(ndr_spoolss.c:7939)
==16944==by 0x58E2F95: ndr_push_spoolss_SetPrinter (ndr_spoolss.c:24724)
==16944==by 0x417C78C: dcerpc_binding_handle_call_send 
(binding_handle.c:410)
==16944==by 0x417C986: dcerpc_binding_handle_call (binding_handle.c:547)
==16944==by 0x522059C: dcerpc_spoolss_SetPrinter_r 
(ndr_spoolss_c.c:1722)
==16944==by 0x2853BD: test_sd_set_level (spoolss.c:1248)
==16944==by 0x28F146: test_PrinterInfo_SD (spoolss.c:1962)
==16944==by 0x2A3C31: test_EnumPrinters_old (spoolss.c:6589)
==16944==by 0x41F6D66: internal_torture_run_test.part.0 (torture.c:442)
==16944==by 0x41F711F: torture_run_tcase_restricted (torture.c:758)
==16944==by 0x2018E8: run_matching.isra.1 (smbtorture.c:103)
==16944==by 0x20176B: run_matching.isra.1 (smbtorture.c:95)
==16944==by 0x20176B: run_matching.isra.1 (smbtorture.c:95)
==16944==by 0x201C12: torture_run_named_tests (smbtorture.c:143)
==16944==by 0x202F5B: main (smbtorture.c:661)

My assumption is that with optimization gcc makes use of the fact that the
structures that this patch moves go out of scope.

Signed-off-by: Volker Lendecke v...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

Autobuild-User(master): David Disseldorp dd...@samba.org
Autobuild-Date(master): Fri Feb 28 21:27:11 CET 2014 on sn-devel-104

commit 1dd2351840c41232d8aea912be6304b256ea0329
Author: Volker Lendecke v...@samba.org
Date:   Fri Feb 28 15:50:21 2014 +

torture: Fix a buffer overrun

In test_EnumPrinterDrivers we go up to driver level 8. In C, this means
we are accessing the 9th entry in the following lines:

ctx-driver_count[level]= count;
ctx-drivers[level] = info;

Signed-off-by: Volker Lendecke v...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

---

Summary of changes:
 source4/torture/rpc/spoolss.c |8 
 1 files changed, 4 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c
index 135eb3c..3d99470 100644
--- a/source4/torture/rpc/spoolss.c
+++ b/source4/torture/rpc/spoolss.c
@@ -77,8 +77,8 @@ struct test_spoolss_context {
union spoolss_PortInfo *ports[3];
 
/* for EnumPrinterDrivers */
-   uint32_t driver_count[8];
-   union spoolss_DriverInfo *drivers[8];
+   uint32_t driver_count[9];
+   union spoolss_DriverInfo *drivers[9];
 
/* for EnumMonitors */
uint32_t monitor_count[3];
@@ -1874,13 +1874,14 @@ static bool test_sd_set_level(struct torture_context 
*tctx,
struct spoolss_DevmodeContainer devmode_ctr;
struct sec_desc_buf secdesc_ctr;
union spoolss_SetPrinterInfo sinfo;
+   union spoolss_PrinterInfo info;
+   struct spoolss_SetPrinterInfo3 info3;
 
ZERO_STRUCT(devmode_ctr);
ZERO_STRUCT(secdesc_ctr);
 
switch (level) {
case 2: {
-   union spoolss_PrinterInfo info;
torture_assert(tctx, test_GetPrinter_level(tctx, b, handle, 2, 
info), );
torture_assert(tctx, PrinterInfo_to_SetPrinterInfo(tctx, info, 
2, sinfo), );
 
@@ -1890,7 +1891,6 @@ static bool test_sd_set_level(struct torture_context 
*tctx,
break;
}
case 3: {
-   struct spoolss_SetPrinterInfo3 info3;
 
info3.sec_desc_ptr = NULL;
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2014-02-06 Thread David Disseldorp
The branch, master has been updated
   via  98c961e s4:samdb: respect SEARCH_FLAG_PRESERVEONDELETE
  from  be8cd92 docs-xml: Add parameter CSC policy to the change share 
command.

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


- Log -
commit 98c961eb82194cd0738dbc58e4ae9f81771b409e
Author: Arvid Requate requ...@univention.de
Date:   Thu Feb 6 17:50:57 2014 +0100

s4:samdb: respect SEARCH_FLAG_PRESERVEONDELETE

According to MS-ADTS section 3.1.1.5.5.1.1 the searchFlags must be
checked.

Signed-off-by: Arvid Requate requ...@univention.de
Reviewed-by: Andrew Bartlett abart...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

Autobuild-User(master): David Disseldorp dd...@samba.org
Autobuild-Date(master): Thu Feb  6 21:42:22 CET 2014 on sn-devel-104

---

Summary of changes:
 source4/dsdb/samdb/ldb_modules/repl_meta_data.c |9 +++--
 1 files changed, 7 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c 
b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
index 91a5d92..c5dcf21 100644
--- a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
+++ b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
@@ -3214,8 +3214,13 @@ static int replmd_delete_internals(struct ldb_module 
*module, struct ldb_request
*/
continue;
}
-   if (!sa-linkID  ldb_attr_in_list(preserved_attrs, 
el-name)) {
-   continue;
+   if (!sa-linkID) {
+   if (ldb_attr_in_list(preserved_attrs, 
el-name)) {
+   continue;
+   }
+   if (sa-searchFlags  
SEARCH_FLAG_PRESERVEONDELETE) {
+   continue;
+   }
}
ret = ldb_msg_add_empty(msg, el-name, 
LDB_FLAG_MOD_DELETE, el);
if (ret != LDB_SUCCESS) {


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2014-01-28 Thread David Disseldorp
The branch, master has been updated
   via  58865d9 pthreadpool: Fix a comment, quit-shutdown
  from  28346a6e param: assign default ports in s3 loadparm to match docs 
and s4

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


- Log -
commit 58865d96f187b843acea6d80f595ae9023f13708
Author: Volker Lendecke v...@samba.org
Date:   Mon Jan 27 11:08:03 2014 +0100

pthreadpool: Fix a comment, quit-shutdown

Signed-off-by: Volker Lendecke v...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

Autobuild-User(master): David Disseldorp dd...@samba.org
Autobuild-Date(master): Tue Jan 28 19:06:40 CET 2014 on sn-devel-104

---

Summary of changes:
 source3/lib/pthreadpool/pthreadpool.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/lib/pthreadpool/pthreadpool.c 
b/source3/lib/pthreadpool/pthreadpool.c
index c5c9367..bd58d62 100644
--- a/source3/lib/pthreadpool/pthreadpool.c
+++ b/source3/lib/pthreadpool/pthreadpool.c
@@ -335,8 +335,8 @@ int pthreadpool_destroy(struct pthreadpool *pool)
 
if (pool-num_idle  0) {
/*
-* Wake the idle threads. They will find pool-quit to
-* be set and exit themselves
+* Wake the idle threads. They will find
+* pool-shutdown to be set and exit themselves
 */
ret = pthread_cond_broadcast(pool-condvar);
if (ret != 0) {


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2014-01-22 Thread David Disseldorp
The branch, master has been updated
   via  0f347e4 log winbind version (when requested) in winbindd log
  from  38f8788 s4:torture/rpc: add invalidAuthenticate2

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


- Log -
commit 0f347e44e2447e9c03a694198adad6be1fa9dd6c
Author: Noel Power noel.po...@suse.com
Date:   Wed Jan 22 12:49:44 2014 +

log winbind version (when requested) in winbindd log

winbindd currently only logs the INTERFACE version request,
it would be useful to additionally have the version returned
in the log also.

Signed-off-by: Noel Power noel.po...@suse.com
Reviewed-by: Jim McDonough j...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

Autobuild-User(master): David Disseldorp dd...@samba.org
Autobuild-Date(master): Wed Jan 22 21:57:04 CET 2014 on sn-devel-104

---

Summary of changes:
 source3/winbindd/winbindd_misc.c |4 ++--
 source4/winbind/wb_samba3_cmd.c  |2 ++
 2 files changed, 4 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/winbindd/winbindd_misc.c b/source3/winbindd/winbindd_misc.c
index 29d6a26..fa4907c 100644
--- a/source3/winbindd/winbindd_misc.c
+++ b/source3/winbindd/winbindd_misc.c
@@ -391,8 +391,8 @@ void winbindd_info(struct winbindd_cli_state *state)
 
 void winbindd_interface_version(struct winbindd_cli_state *state)
 {
-   DEBUG(3, ([%5lu]: request interface version\n,
- (unsigned long)state-pid));
+   DEBUG(3, ([%5lu]: request interface version (version = %d)\n,
+ (unsigned long)state-pid, WINBIND_INTERFACE_VERSION));
 
state-response-data.interface_version = WINBIND_INTERFACE_VERSION;
request_ok(state);
diff --git a/source4/winbind/wb_samba3_cmd.c b/source4/winbind/wb_samba3_cmd.c
index 091e93e..9ec3c4b 100644
--- a/source4/winbind/wb_samba3_cmd.c
+++ b/source4/winbind/wb_samba3_cmd.c
@@ -182,6 +182,8 @@ static void wbsrv_samba3_async_epilogue(NTSTATUS status,
 
 NTSTATUS wbsrv_samba3_interface_version(struct wbsrv_samba3_call *s3call)
 {
+   DEBUG(3, (request interface version (version = %d)\n, 
WINBIND_INTERFACE_VERSION));
+
s3call-response-result= WINBINDD_OK;
s3call-response-data.interface_version= 
WINBIND_INTERFACE_VERSION;
return NT_STATUS_OK;


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2013-12-10 Thread David Disseldorp
The branch, master has been updated
   via  c16afdd docs: Fix typos in vfs_shadow_copy2.8.xml.
  from  8eef4ab s3-lib: Fix %G substitution for domain users in smbd

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


- Log -
commit c16afddeef2938e218df63b1c669caa5fb65d39c
Author: Karolin Seeger ksee...@samba.org
Date:   Tue Dec 10 15:24:31 2013 +0100

docs: Fix typos in vfs_shadow_copy2.8.xml.

Signed-off-by: Karolin Seeger ksee...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

Autobuild-User(master): David Disseldorp dd...@samba.org
Autobuild-Date(master): Tue Dec 10 18:49:21 CET 2013 on sn-devel-104

---

Summary of changes:
 docs-xml/manpages/vfs_shadow_copy2.8.xml |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/docs-xml/manpages/vfs_shadow_copy2.8.xml 
b/docs-xml/manpages/vfs_shadow_copy2.8.xml
index 823c1f8..c307aff 100644
--- a/docs-xml/manpages/vfs_shadow_copy2.8.xml
+++ b/docs-xml/manpages/vfs_shadow_copy2.8.xml
@@ -57,12 +57,12 @@
listitempara
Snapshot directories need not be in one fixed central place but
can be located anywhere in the directory tree. This mode helps to
-   support file systems that offer snapshotting of particutlar
+   support file systems that offer snapshotting of particular
subtrees, for example the GPFS independent file sets.
/para/listitem
listitempara
Vanity naming for snapshots: snapshots can be named in any format
-   compatible with with str[fp]time conversions.
+   compatible with str[fp]time conversions.
/para/listitem
listitempara
Timestamps can be represented in localtime rather than UTC.


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2013-12-06 Thread David Disseldorp
The branch, master has been updated
   via  5173322 s4:torture:smb2: add new durable-v2-open.reopen1a test
   via  a46059d s4:torture:smb2: add new durable-open.reopen1a test
  from  df9df74 cldap: quieten error when abandon packet is sent

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


- Log -
commit 51733220077a6acb60cc10f8e161efb9a5d01c29
Author: Michael Adam ob...@samba.org
Date:   Fri Nov 29 18:45:35 2013 +0100

s4:torture:smb2: add new durable-v2-open.reopen1a test

- open session1 on tcp connection conn1
- open a durable handle on a session1
- do a session reconnect on a new tcp connection conn2
- doing a durable reconnect on session1 gives
  USER_SESSION_DELETED
- doing a durable reconnect on session2 succeeds

Signed-off-by: Michael Adam ob...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

Autobuild-User(master): David Disseldorp dd...@samba.org
Autobuild-Date(master): Fri Dec  6 15:59:15 CET 2013 on sn-devel-104

commit a46059d53444eb62824d83d53108ac96f2fed4ea
Author: Michael Adam ob...@samba.org
Date:   Fri Nov 29 18:20:01 2013 +0100

s4:torture:smb2: add new durable-open.reopen1a test

- open session1 on tcp connection conn1
- open a durable handle on a session1
- do a session reconnect on a new tcp connection conn2
- doing a durable reconnect on session1 gives
  USER_SESSION_DELETED
- doing a durable reconnect on session2 succeeds

Signed-off-by: Michael Adam ob...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

---

Summary of changes:
 source4/torture/smb2/durable_open.c|  100 +
 source4/torture/smb2/durable_v2_open.c |  110 
 2 files changed, 210 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/torture/smb2/durable_open.c 
b/source4/torture/smb2/durable_open.c
index a931f6f..23425c8 100644
--- a/source4/torture/smb2/durable_open.c
+++ b/source4/torture/smb2/durable_open.c
@@ -409,6 +409,105 @@ done:
 }
 
 /**
+ * Basic test for doing a durable open
+ * and do a session reconnect while the first
+ * session is still active and the handle is
+ * still open in the client.
+ * This closes the original session and  a
+ * durable reconnect on the new session succeeds.
+ */
+static bool test_durable_open_reopen1a(struct torture_context *tctx,
+  struct smb2_tree *tree)
+{
+   NTSTATUS status;
+   TALLOC_CTX *mem_ctx = talloc_new(tctx);
+   char fname[256];
+   struct smb2_handle _h;
+   struct smb2_handle *h = NULL;
+   struct smb2_create io1, io2;
+   bool ret = true;
+   struct smb2_tree *tree2 = NULL;
+   uint64_t previous_session_id;
+   struct smbcli_options options;
+
+   options = tree-session-transport-options;
+
+   /* Choose a random name in case the state is left a little funky. */
+   snprintf(fname, 256, durable_open_reopen1a_%s.dat,
+generate_random_str(tctx, 8));
+
+   smb2_util_unlink(tree, fname);
+
+   smb2_oplock_create_share(io1, fname,
+smb2_util_share_access(),
+smb2_util_oplock_level(b));
+   io1.in.durable_open = true;
+
+   status = smb2_create(tree, mem_ctx, io1);
+   CHECK_STATUS(status, NT_STATUS_OK);
+   _h = io1.out.file.handle;
+   h = _h;
+   CHECK_CREATED(io1, CREATED, FILE_ATTRIBUTE_ARCHIVE);
+   CHECK_VAL(io1.out.durable_open, true);
+   CHECK_VAL(io1.out.oplock_level, smb2_util_oplock_level(b));
+
+   /*
+* a session reconnect on a second tcp connection
+*/
+
+   previous_session_id = 
smb2cli_session_current_id(tree-session-smbXcli);
+
+   if (!torture_smb2_connection_ext(tctx, previous_session_id,
+options, tree2))
+   {
+   torture_warning(tctx, couldn't reconnect, bailing\n);
+   ret = false;
+   goto done;
+   }
+
+   /*
+* check that this has deleted the old session
+*/
+
+   ZERO_STRUCT(io2);
+   io2.in.fname = fname;
+   io2.in.durable_handle = h;
+
+   status = smb2_create(tree, mem_ctx, io2);
+   CHECK_STATUS(status, NT_STATUS_USER_SESSION_DELETED);
+
+   /*
+* but a durable reconnect on the new session succeeds:
+*/
+
+   ZERO_STRUCT(io2);
+   io2.in.fname = fname;
+   io2.in.durable_handle = h;
+
+   status = smb2_create(tree2, mem_ctx, io2);
+   CHECK_STATUS(status, NT_STATUS_OK);
+   CHECK_CREATED(io2, EXISTED, FILE_ATTRIBUTE_ARCHIVE);
+   CHECK_VAL(io2.out.oplock_level, smb2_util_oplock_level(b));
+   _h = io2.out.file.handle;
+   h = _h;
+
+done:
+   if (h

[SCM] Samba Shared Repository - branch master updated

2013-11-29 Thread David Disseldorp
The branch, master has been updated
   via  f626839 fail authentication for single group name which cannot be 
converted to sid
  from  fb042b3 replace: fix typo in variable name

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


- Log -
commit f62683956a3b182f6a61cc7a2b4ada2e74cde243
Author: Noel Power noel.po...@suse.com
Date:   Wed Oct 16 16:30:55 2013 +0100

fail authentication for single group name which cannot be converted to sid

furthermore if more than one name is supplied and no sid is converted
then also fail.

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

Signed-off-by: Noel Power noel.po...@suse.com
Reviewed-by: Andreas Schneider a...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

Autobuild-User(master): David Disseldorp dd...@samba.org
Autobuild-Date(master): Fri Nov 29 15:45:11 CET 2013 on sn-devel-104

---

Summary of changes:
 nsswitch/pam_winbind.c |6 ++
 1 files changed, 6 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/nsswitch/pam_winbind.c b/nsswitch/pam_winbind.c
index 9322971..cd5e7ba 100644
--- a/nsswitch/pam_winbind.c
+++ b/nsswitch/pam_winbind.c
@@ -1172,6 +1172,12 @@ static bool winbind_name_list_to_sid_string_list(struct 
pwb_context *ctx,
_make_remark_format(ctx, PAM_TEXT_INFO, _(Cannot convert group 
%s 
to sid, please contact your administrator to 
see 
if group %s is valid.), search_location, 
search_location);
+
+   /* If no valid groups were converted we should fail outright */
+   if (name_list != NULL  strlen(sid_list_buffer) == 0) {
+   result = false;
+   goto out;
+   }
/*
 * The lookup of the last name failed..
 * It results in require_member_of_sid ends with ','


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2013-11-28 Thread David Disseldorp
The branch, master has been updated
   via  ffae8a1 pam_winbind: Use strlcat in safe_append_string
   via  13550a2 replace: Don't run over dst in strlcat
  from  e2db9c5 ctdb:tests: in the stub ip link show command use echo 
instead of cat

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


- Log -
commit ffae8a13b62433e5b74f1bc317db6c9979718cbb
Author: Volker Lendecke v...@samba.org
Date:   Thu Nov 28 09:37:47 2013 +0100

pam_winbind: Use strlcat in safe_append_string

We have that available via libreplace, so use it.

Signed-off-by: Volker Lendecke v...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

Autobuild-User(master): David Disseldorp dd...@samba.org
Autobuild-Date(master): Thu Nov 28 14:33:32 CET 2013 on sn-devel-104

commit 13550a2b5eed57084a5d9671d9493a9a2e08d7e3
Author: Volker Lendecke v...@samba.org
Date:   Thu Nov 28 09:33:59 2013 +0100

replace: Don't run over dst in strlcat

If d is not 0-terminated, the pure strlen will read beyond the end
of the given bufsize. strlcat in libbsd deliberately avoids this, so we
should do the same.

Signed-off-by: Volker Lendecke v...@samba.org
Reviewed-by: David Disseldorp dd...@samba.org

---

Summary of changes:
 lib/replace/replace.c  |2 +-
 nsswitch/pam_winbind.c |   12 +++-
 2 files changed, 4 insertions(+), 10 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/replace/replace.c b/lib/replace/replace.c
index 37edb31..effe5de 100644
--- a/lib/replace/replace.c
+++ b/lib/replace/replace.c
@@ -84,7 +84,7 @@ size_t rep_strlcpy(char *d, const char *s, size_t bufsize)
be one more than the maximum resulting string length */
 size_t rep_strlcat(char *d, const char *s, size_t bufsize)
 {
-   size_t len1 = strlen(d);
+   size_t len1 = strnlen(d, bufsiz);
size_t len2 = strlen(s);
size_t ret = len1 + len2;
 
diff --git a/nsswitch/pam_winbind.c b/nsswitch/pam_winbind.c
index 2e37662..9322971 100644
--- a/nsswitch/pam_winbind.c
+++ b/nsswitch/pam_winbind.c
@@ -1043,15 +1043,9 @@ static bool safe_append_string(char *dest,
   const char *src,
   int dest_buffer_size)
 {
-   int dest_length = strlen(dest);
-   int src_length = strlen(src);
-
-   if (dest_length + src_length + 1  dest_buffer_size) {
-   return false;
-   }
-
-   memcpy(dest + dest_length, src, src_length + 1);
-   return true;
+   size_t len;
+   len = strlcat(dest, src, dest_buffer_size);
+   return (len  dest_buffer_size);
 }
 
 /**


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2013-11-28 Thread David Disseldorp
The branch, master has been updated
   via  fb042b3 replace: fix typo in variable name
  from  ffae8a1 pam_winbind: Use strlcat in safe_append_string

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


- Log -
commit fb042b35edc2333ec81b36359caac82673a457b5
Author: David Disseldorp dd...@samba.org
Date:   Thu Nov 28 15:56:58 2013 +0100

replace: fix typo in variable name

13550a2b5eed57084a5d9671d9493a9a2e08d7e3 added a typo causing
compilation failure.

Signed-off-by: David Disseldorp dd...@samba.org
Reviewed-by: Volker Lendecke v...@samba.org

Autobuild-User(master): David Disseldorp dd...@samba.org
Autobuild-Date(master): Thu Nov 28 18:16:27 CET 2013 on sn-devel-104

---

Summary of changes:
 lib/replace/replace.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/replace/replace.c b/lib/replace/replace.c
index effe5de..2a9ca3e 100644
--- a/lib/replace/replace.c
+++ b/lib/replace/replace.c
@@ -84,7 +84,7 @@ size_t rep_strlcpy(char *d, const char *s, size_t bufsize)
be one more than the maximum resulting string length */
 size_t rep_strlcat(char *d, const char *s, size_t bufsize)
 {
-   size_t len1 = strnlen(d, bufsiz);
+   size_t len1 = strnlen(d, bufsize);
size_t len2 = strlen(s);
size_t ret = len1 + len2;
 


-- 
Samba Shared Repository


  1   2   >