[SCM] CTDB repository - branch 1.2.40 updated - ctdb-1.2.48-3-g7c4998c

2012-09-06 Thread Amitay Isaacs
The branch, 1.2.40 has been updated
   via  7c4998cad4d3debb06f62108fb099b6427310419 (commit)
   via  a21150bbd567ab6bfc844561ddeb6438d9710760 (commit)
   via  450bedccbee3f89aba3b33777a4ae8841c456a65 (commit)
  from  201c092dbb38746847fb9e6bfef8ea068133e47c (commit)

http://gitweb.samba.org/?p=ctdb.git;a=shortlog;h=1.2.40


- Log -
commit 7c4998cad4d3debb06f62108fb099b6427310419
Author: Martin Schwenke mar...@meltin.net
Date:   Tue Aug 21 14:35:35 2012 +1000

New version 1.2.49

Signed-off-by: Martin Schwenke mar...@meltin.net

commit a21150bbd567ab6bfc844561ddeb6438d9710760
Author: Martin Schwenke mar...@meltin.net
Date:   Tue Aug 21 14:28:37 2012 +1000

Initscript: Kill any existing ctdbd processes if the ping succeeds

Initialising a new ctdbd will destroy the Unix domain socket so
existing processes will be useless anyway.

Signed-off-by: Martin Schwenke mar...@meltin.net

commit 450bedccbee3f89aba3b33777a4ae8841c456a65
Author: Amitay Isaacs ami...@gmail.com
Date:   Tue Aug 14 15:42:12 2012 +1000

logging: Close unix socket /tmp/ctdb.socket in syslogd process

Since the unix socket is opened before syslogd process is forked, syslogd
process also keeps listening to it.  If main ctdbd process dies and has any
child processes that are blocked waiting for locks, these child processes
keep connecting to unix socket and thus syslogd cannot exit.

Signed-off-by: Amitay Isaacs ami...@gmail.com

---

Summary of changes:
 config/ctdb.init   |6 ++
 packaging/RPM/ctdb.spec.in |6 +-
 server/ctdb_logging.c  |5 +
 3 files changed, 16 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/config/ctdb.init b/config/ctdb.init
index d6493bd..68850c0 100755
--- a/config/ctdb.init
+++ b/config/ctdb.init
@@ -237,6 +237,12 @@ start() {
return 0
 }
 
+# About to start new $ctdbd.  The ping above has failed and any
+# new $ctdbd will destroy the Unix domain socket, so any processes
+# that aren't yet completely useless soon will be...  so kill
+# them.
+pkill -9 -f $ctdbd
+
 build_ctdb_options
 
 # make sure we drop any ips that might still be held if previous
diff --git a/packaging/RPM/ctdb.spec.in b/packaging/RPM/ctdb.spec.in
index a7d95ad..2d744b2 100644
--- a/packaging/RPM/ctdb.spec.in
+++ b/packaging/RPM/ctdb.spec.in
@@ -3,7 +3,7 @@ Name: ctdb
 Summary: Clustered TDB
 Vendor: Samba Team
 Packager: Samba Team sa...@samba.org
-Version: 1.2.48
+Version: 1.2.49
 Release: 1GITHASH
 Epoch: 0
 License: GNU GPL version 3
@@ -144,6 +144,10 @@ development libraries for ctdb
 %{_libdir}/libctdb.a
 
 %changelog
+
+* Tue Aug 21 2012 : Version 1.2.49
+ - logging: Close unix socket /tmp/ctdb.socket in syslogd process
+ - Initscript: Kill any existing ctdbd processes if the ping succeeds
 * Thu Aug 08 2012 : Version 1.2.48
  - Fix missing set_proc() in policy routing
 * Thu Aug 08 2012 : Version 1.2.47
diff --git a/server/ctdb_logging.c b/server/ctdb_logging.c
index 27b990e..2637ad7 100644
--- a/server/ctdb_logging.c
+++ b/server/ctdb_logging.c
@@ -117,6 +117,11 @@ int start_syslog_daemon(struct ctdb_context *ctdb)
}
 
debug_extra = talloc_asprintf(NULL, syslogd:);
+
+   /* Close unix socket since syslogd does not need it */
+   close(ctdb-daemon.sd);
+   ctdb-daemon.sd = -1;
+
talloc_free(ctdb-ev);
ctdb-ev = event_context_init(NULL);
tevent_loop_allow_nesting(ctdb-ev);


-- 
CTDB repository


[SCM] CTDB repository - annotated tag ctdb-1.2.49 created - ctdb-1.2.49

2012-09-06 Thread Amitay Isaacs
The annotated tag, ctdb-1.2.49 has been created
at  7516d0c1d6574a823f93064b924e157fdf323d5c (tag)
   tagging  7c4998cad4d3debb06f62108fb099b6427310419 (commit)
  replaces  ctdb-1.2.48
 tagged by  Martin Schwenke
on  Tue Aug 21 15:36:51 2012 +1000

- Log -
version 1.2.49

Amitay Isaacs (1):
  logging: Close unix socket /tmp/ctdb.socket in syslogd process

Martin Schwenke (2):
  Initscript: Kill any existing ctdbd processes if the ping succeeds
  New version 1.2.49

---


-- 
CTDB repository


[SCM] CTDB repository - annotated tag ctdb-1.2.27-204.1 created - ctdb-1.2.27-204.1

2012-09-06 Thread Amitay Isaacs
The annotated tag, ctdb-1.2.27-204.1 has been created
at  895a0ddae46597a2bb369739a6e453bdb08ce3cf (tag)
   tagging  66a469daa2552f93219c2fc34aa8659f4b0c76d8 (commit)
  replaces  ctdb-1.9.1
 tagged by  Martin Schwenke
on  Thu Aug 16 12:32:52 2012 +1000

- Log -
Version 1.2.27-204.1

Andrew Tridgell (1):
  tdb: added TDB_NO_FSYNC env variable

Chandra Seetharaman (1):
  make changes to ctdb event scripts to support NFS-Ganesha.

Christian Ambach (1):
  improve timing issue detections

Evan Kinney (1):
  ctdb: Fixed use of reserved word private in typedefs

Günther Deschner (1):
  lib/tdb: fix c++ build warning in tdb_header_hash().

Harald Klatte (1):
  AIX bind wants the correct addrsize

Jelmer Vernooij (3):
  pytdb: Make filename argument optional.
  pytdb: Include Python.h first to prevent warning.
  pytdb: Add __version__ attribute.

Kirill Smelkov (9):
  pytdb: Add support for tdb_add_flags()  tdb_remove_flags()
  pytdb: Fix repr segfault for internal db
  pytdb: Update open flags to match those for tdb_open() in tdb.h
  pytdb: Add support for tdb_enable_seqnum, tdb_get_seqnum and 
tdb_increment_seqnum_nonblock
  pytdb: Add support for tdb_transaction_prepare_commit()
  pytdb: Add support for tdb_freelist_size()
  pytdb: Add TDB_INCOMPATIBLE_HASH open flag
  pytdb: Add support for tdb_repack()
  pytdb: Check errors after PyObject_New() calls

Martin Schwenke (69):
  Test suite: handle change to disconnected node error message.
  Test suite: handle extra lines in statistics output.
  Optimise 61.nfstickle to write the tickles more efficiently.
  Testing: Add Python IP allocation simulation.
  Test suite: handle change to disconnected node error message.
  Test suite: handle extra lines in statistics output.
  Optimise 61.nfstickle to write the tickles more efficiently.
  Testing: Add Python IP allocation simulation.
  Merge branch 'master' of git://git.samba.org/sahlberg/ctdb
  Testing: Add imbalance information to IP allocation simulation.
  Testing: In IP allocation simulation count total number of events.
  Testing: IP allocation simulation prints final imbalance in statistics.
  Testing: IP allocation simulation - save some warnings for verbose mode.
  Testing: IP allocation simulation - add command line option for random 
seed.
  Testing: IP allocation simulation - update copyright message.
  Testing: IP allocation simulation - Tweak options handling and 
Cluster.diff().
  Testing: IP allocation simulation - fix nondeterminism in 
do_something_random().
  Testing: IP allocation simulation - Update README.
  Testing: IP allocation simulation - update options processing in examples.
  Testing: IP allocation simulation - add general node group example.
  Testing: IP allocation simulation - rename an example to 
node_group_simple.py.
  Testing: IP allocation simulation - rename an example to 
node_group_extra.py.
  Testing: IP allocation simulation - make usage/failure more obvious.
  Testing: IP allocation simulation - improve help for options.
  Testing: IP allocation simulation - print maximum number of unhealthy 
nodes.
  Testing: IP allocation simulation - clean up usage message.
  Testing: IP allocation simulation - add option to change odds of a 
failure.
  Test suite - try to make addip test more reliable and add some debugging.
  Merge remote branch 'martins/master'
  Test suite - fix addip test.
  Test suite: remove thaw/freeze tests.
  Test suite - make the ctdb_fetch test cope with Reqid wrap! messages.
  initscript: wait until we can ping ctdbd before setting tunables.
  Test suite: weaken ctdb continue/enable tests for non-deterministic IPs.
  Test suite: Fix typo in continue test.
  Test suite: remove unnecessary verbosity from enable/continue tests.
  Add some command-line options to ctdb_diagnostics.
  Test suite: make addip test use $CTDB rather than ctdb in debug code.
  Test suite: improve wait_until_node_has_status()
  Test suite: use $CTDB rather than ctdb everywhere in 
ctdb_test_functions.sh.
  Test suite: strengthen function _cluster_is_healthy().
  Test suite: print date/time at test completion.
  Test suite: Add more timestamping of debugging information.
  Test suite: loosen the getmonmode test.
  Move NAT gateway firewall rules to recovered|updatenatgw events.
  Merge branch 'master' of git://git.samba.org/sahlberg/ctdb
  Merge branch 'master' of git://git.samba.org/sahlberg/ctdb
  Test suite: in the test eventscript, run ctdb not $CTDB.
  NFS tickles: use addtickle/deltickle instead of shared tickle directory.
  Test suite: NFS tickle test uses gettickles if events.d/61.nfstickle 
missing.
  Test suite: Fix typos in NFS 

[SCM] Samba Shared Repository - branch master updated

2012-09-06 Thread Andrew Bartlett
The branch, master has been updated
   via  baf2db6 selftest: Test configure stage of dlz_bind9
   via  52f0ded selftest: Add tests for the dlz_bind9 module
  from  0d99175 join.py: Only replicate DNS zones if the source DC had DNS 
zones

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


- Log -
commit baf2db685f1d2bff712d45288abf116f903039ed
Author: Andrew Bartlett abart...@samba.org
Date:   Thu Sep 6 15:22:17 2012 +1000

selftest: Test configure stage of dlz_bind9

Autobuild-User(master): Andrew Bartlett abart...@samba.org
Autobuild-Date(master): Thu Sep  6 09:07:11 CEST 2012 on sn-devel-104

commit 52f0dedc1a63c75f87adc0f70f10aae2b2bfaf72
Author: Andrew Bartlett abart...@samba.org
Date:   Thu Sep 6 14:26:57 2012 +1000

selftest: Add tests for the dlz_bind9 module

This will help ensure that we do not break the fundemental loading etc.

From here, it should be easy to extend this to more comprehensive tests.

Andrew Bartlett

---

Summary of changes:
 source4/dns_server/wscript_build  |7 ++
 source4/selftest/tests.py |4 +
 source4/torture/dns/dlz_bind9.c   |  152 +
 source4/torture/dns/wscript_build |   10 +++
 source4/torture/wscript_build |1 +
 5 files changed, 174 insertions(+), 0 deletions(-)
 create mode 100644 source4/torture/dns/dlz_bind9.c
 create mode 100644 source4/torture/dns/wscript_build


Changeset truncated at 500 lines:

diff --git a/source4/dns_server/wscript_build b/source4/dns_server/wscript_build
index b8e2708..280f8de 100644
--- a/source4/dns_server/wscript_build
+++ b/source4/dns_server/wscript_build
@@ -30,3 +30,10 @@ bld.SAMBA_LIBRARY('dlz_bind9_9',
   install_path='${MODULESDIR}/bind9',
   deps='samba-hostconfig samdb-common gensec popt',
   enabled=bld.AD_DC_BUILD_IS_ENABLED())
+
+bld.SAMBA_LIBRARY('dlz_bind9_for_torture',
+  source='dlz_bind9.c',
+  cflags='-DBIND_VERSION_9_8',
+  private_library=True,
+  deps='samba-hostconfig samdb-common gensec popt',
+  enabled=bld.AD_DC_BUILD_IS_ENABLED())
diff --git a/source4/selftest/tests.py b/source4/selftest/tests.py
index b9944cb..fd4b669 100755
--- a/source4/selftest/tests.py
+++ b/source4/selftest/tests.py
@@ -296,6 +296,10 @@ for f in sorted(os.listdir(os.path.join(samba4srcdir, 
../pidl/tests))):
 
 # DNS tests
 planpythontestsuite(dc, samba.tests.dns)
+# Local tests
+for t in smb4torture_testsuites(dlz_bind9.):
+#The dlz_bind9 tests needs to look at the DNS database
+plansmbtorturetestsuite(t, dc:local, ncalrpc:localhost)
 
 planpythontestsuite(s3dc, samba.tests.libsmb_samba_internal);
 
diff --git a/source4/torture/dns/dlz_bind9.c b/source4/torture/dns/dlz_bind9.c
new file mode 100644
index 000..d01e506
--- /dev/null
+++ b/source4/torture/dns/dlz_bind9.c
@@ -0,0 +1,152 @@
+/*
+   Unix SMB/CIFS implementation.
+   SMB torture tester
+   Copyright (C) Andrew Bartlett 2012
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see http://www.gnu.org/licenses/.
+*/
+
+#include includes.h
+#include torture/smbtorture.h
+#include dlz_minimal.h
+#include talloc.h
+#include ldb.h
+#include lib/param/param.h
+#include dsdb/samdb/samdb.h
+#include dsdb/common/util.h
+#include auth/session.h
+
+struct torture_context *tctx_static;
+
+static void dlz_bind9_log_wrapper(int level, const char *fmt, ...)
+{
+   va_list ap;
+   char *msg;
+   va_start(ap, fmt);
+   msg = talloc_vasprintf(NULL, fmt, ap);
+   torture_comment(tctx_static, %s\n, msg);
+   TALLOC_FREE(msg);
+   va_end(ap);
+}
+
+static bool test_dlz_bind9_version(struct torture_context *tctx)
+{
+   unsigned int flags = 0;
+   torture_assert_int_equal(tctx, dlz_version(flags),
+DLZ_DLOPEN_VERSION, got wrong DLZ version);
+   return true;
+}
+
+static bool test_dlz_bind9_create(struct torture_context *tctx)
+{
+   void *dbdata;
+   const char *argv[] = {
+   samba_dlz,
+   -H,
+   lpcfg_private_path(tctx, tctx-lp_ctx, dns/sam.ldb),
+   NULL
+   };
+   tctx_static = tctx;
+   

[SCM] Samba Shared Repository - branch master updated

2012-09-06 Thread Björn Jacke
The branch, master has been updated
   via  146ad30 s3-smbd: Remove remaining references to removed OS support 
in old-style quota code
   via  9bfab7e s3-smbd: Remove IRIX support from old (pre-sysquotas) code
   via  79bc9e5 s3-smbd: Remove HPUX support from old (pre-sysquotas) code
   via  8b90f6a s3-smbd: Remove BSD support from old (pre-sysquotas) code
   via  28ccb67 s3-smbd: Remove Linux support from old (pre-sysquotas) code
   via  040a458 s3-configure: Only use sysquotas by default
   via  24013bd build: Remove Unicos support (quota in particular)
   via  b7b0d7d build: Do not compile lib/sysquotas*.c files as part of 
configure
   via  82cffc2 s3: Fix 64-bit warnings in vfs_media_harmony
   via  a6df44b sysquota: we need to list nfs4 as a separate fs name for 
the sys_get_nfs_quota backend
  from  baf2db6 selftest: Test configure stage of dlz_bind9

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


- Log -
commit 146ad30387ebfeaa0269a26b1c5ee32ed13e095e
Author: Andrew Bartlett abart...@samba.org
Date:   Mon Sep 3 13:16:38 2012 +1000

s3-smbd: Remove remaining references to removed OS support in old-style 
quota code

Signed-off-by: Björn Jacke b...@sernet.de

Autobuild-User(master): Björn Jacke b...@sernet.de
Autobuild-Date(master): Thu Sep  6 10:47:18 CEST 2012 on sn-devel-104

commit 9bfab7ec8cfb01f102e8e22b7f94cd772a8b5a00
Author: Andrew Bartlett abart...@samba.org
Date:   Mon Sep 3 12:20:53 2012 +1000

s3-smbd: Remove IRIX support from old (pre-sysquotas) code

This should be essentially dead code, as while it is possible to disable 
sysquotas, the sysquotas has since 2003 supported the 4A varient used on IRIX.

Andrew Bartlett

Signed-off-by: Björn Jacke b...@sernet.de

commit 79bc9e5ace576e67ec14132b9b0c892c642cc98f
Author: Andrew Bartlett abart...@samba.org
Date:   Mon Sep 3 02:20:05 2012 +1000

s3-smbd: Remove HPUX support from old (pre-sysquotas) code

This should be essentially dead code, as while it is possible to disable 
sysquotas, the sysquotas has since 2003 supported the 4A varient used on HPUX.

Andrew Bartlett

Signed-off-by: Björn Jacke b...@sernet.de

commit 8b90f6ace30609b320cc306282488b8ee8397d7b
Author: Andrew Bartlett abart...@samba.org
Date:   Mon Sep 3 01:51:59 2012 +1000

s3-smbd: Remove BSD support from old (pre-sysquotas) code

This is essentially dead code, as while it is possible to disable
sysquotas, the default for BSD is now to use sysquotas with the
addition of 4B support via the recent Darwin patch by James Peach.

NFS support has been in sysquotas for quite some time now.

Andrew Bartlett

Signed-off-by: Björn Jacke b...@sernet.de

commit 28ccb67170828d2fb739cdda1491434c8a2f5d65
Author: Andrew Bartlett abart...@samba.org
Date:   Mon Sep 3 01:41:27 2012 +1000

s3-smbd: Remove Linux support from old (pre-sysquotas) code

This is essentially dead code, as while it is possible to disable 
sysquotas, the default
for Linux has been to use sysquotas for quite some time now.

Andrew Bartlett

Signed-off-by: Björn Jacke b...@sernet.de

commit 040a45805f6796858cc916970db7dec2c7f81cf5
Author: Andrew Bartlett abart...@samba.org
Date:   Mon Sep 3 03:08:54 2012 +1000

s3-configure: Only use sysquotas by default

We now only use old quota code if --with-quotas=yes and there is no
sysquotas support for this platform.

This also removes --with-sys-quotas as an option, instead being the
first choice if --with-quotas=yes or --with-quotas=auto

sysquotas have been our preferred quota mechanism since 2003.

Andrew Bartlett

Signed-off-by: Björn Jacke b...@sernet.de

commit 24013bda4526b1f1cb1c245da83f290210f6e6bc
Author: Andrew Bartlett abart...@samba.org
Date:   Wed Jun 13 12:20:07 2012 +1000

build: Remove Unicos support (quota in particular)

Unicos machines are long gone now (Cray now make Linux compute nodes),
so remove the quota support.

Andrew Bartlett

Signed-off-by: Björn Jacke b...@sernet.de

commit b7b0d7d868027e6a9e63639838d811febc946109
Author: Andrew Bartlett abart...@samba.org
Date:   Tue Jun 5 06:39:28 2012 +1000

build: Do not compile lib/sysquotas*.c files as part of configure

Instead, use the tests in tests/sysquotas.c.

It is better that we see any compile failures, and then expand the
tests than 'automatically' disable the support.  Users can always use
--without-quotas if the quotas code does not work on their system.

Andrew Bartlett

Signed-off-by: Björn Jacke b...@sernet.de

commit 82cffc2bdbfec4f5c50514c1e08ed342f8f9d189
Author: Volker Lendecke v...@samba.org
Date:   Wed Sep 5 10:15:48 2012 +0200

s3: Fix 64-bit warnings in vfs_media_harmony

commit 

[SCM] Samba Shared Repository - branch master updated

2012-09-06 Thread Björn Jacke
The branch, master has been updated
   via  44fd8e7 fileserver:sysquotas: remove wrong cast
   via  d6cc08b s3:quota: don't force the block size to 512
  from  146ad30 s3-smbd: Remove remaining references to removed OS support 
in old-style quota code

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


- Log -
commit 44fd8e72081f168c0f75cf9fb8969fe42d1e98c9
Author: Björn Jacke b...@sernet.de
Date:   Thu Sep 6 14:17:25 2012 +0200

fileserver:sysquotas: remove wrong cast

Autobuild-User(master): Björn Jacke b...@sernet.de
Autobuild-Date(master): Thu Sep  6 17:16:30 CEST 2012 on sn-devel-104

commit d6cc08b9eeb9de17bc0e610d6cf6dba13c5c8222
Author: Björn Jacke b...@sernet.de
Date:   Thu Sep 6 10:23:50 2012 +0200

s3:quota: don't force the block size to 512

there is no point in forcing the block size to 512 when curblocks is 1. This
will only lead to false quota reporting. See bug #3272

---

Summary of changes:
 source3/lib/sysquotas.c |2 +-
 source3/smbd/quotas.c   |3 ---
 2 files changed, 1 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/lib/sysquotas.c b/source3/lib/sysquotas.c
index 84679f4..cbacc7b 100644
--- a/source3/lib/sysquotas.c
+++ b/source3/lib/sysquotas.c
@@ -225,7 +225,7 @@ static int command_get_quota(const char *path, enum 
SMB_QUOTA_TYPE qtype, unid_t
 
/* we need to deal with long long unsigned here, if 
supported */
 
-   dp-qflags = (enum SMB_QUOTA_TYPE)strtoul(line, p2, 
10);
+   dp-qflags = strtoul(line, p2, 10);
p = p2;
while (p  *p  isspace(*p)) {
p++;
diff --git a/source3/smbd/quotas.c b/source3/smbd/quotas.c
index 339952e..3d1056d 100644
--- a/source3/smbd/quotas.c
+++ b/source3/smbd/quotas.c
@@ -203,9 +203,6 @@ static bool nfs_quotas(char *nfspath, uid_t euser_id, 
uint64_t *bsize, uint64_t
*bsize = gqr.getquota_rslt_u.gqr_rquota.rq_bsize;
*dsize = D.dqb_bsoftlimit;
 
-   if (D.dqb_curblocks == 1)
-   *bsize = 512;
-
if (D.dqb_curblocks  D.dqb_bsoftlimit) {
*dfree = 0;
*dsize = D.dqb_curblocks;


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2012-09-06 Thread Kai Blin
The branch, master has been updated
   via  8ba8020 s4 dns: Make debug output less noisy
   via  319b239 s4 dns: Check if signing user is allowed to update records
  from  44fd8e7 fileserver:sysquotas: remove wrong cast

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


- Log -
commit 8ba802058644910741dc80940420781450a924b7
Author: Kai Blin k...@samba.org
Date:   Thu Sep 6 22:53:32 2012 +0200

s4 dns: Make debug output less noisy

Autobuild-User(master): Kai Blin k...@samba.org
Autobuild-Date(master): Fri Sep  7 00:31:56 CEST 2012 on sn-devel-104

commit 319b239dc4aeb2c6a928a70fc7a7dbad56d273cd
Author: Kai Blin k...@samba.org
Date:   Thu Sep 6 22:40:56 2012 +0200

s4 dns: Check if signing user is allowed to update records

This should fix bug #9142

---

Summary of changes:
 source4/dns_server/dns_crypto.c |4 +-
 source4/dns_server/dns_query.c  |2 +-
 source4/dns_server/dns_server.c |2 +-
 source4/dns_server/dns_update.c |   86 --
 4 files changed, 67 insertions(+), 27 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dns_server/dns_crypto.c b/source4/dns_server/dns_crypto.c
index 7362adc..7604a05 100644
--- a/source4/dns_server/dns_crypto.c
+++ b/source4/dns_server/dns_crypto.c
@@ -121,7 +121,7 @@ WERROR dns_verify_tsig(struct dns_server *dns,
 
/* The TSIG record needs to be the last additional record */
if (found_tsig  i + 1 != packet-arcount) {
-   DEBUG(0, (TSIG record not the last additional record!\n));
+   DEBUG(1, (TSIG record not the last additional record!\n));
return DNS_ERR(FORMAT_ERROR);
}
 
@@ -218,7 +218,7 @@ WERROR dns_verify_tsig(struct dns_server *dns,
}
 
if (!NT_STATUS_IS_OK(status)) {
-   DEBUG(0, (Verifying tsig failed: %s\n, nt_errstr(status)));
+   DEBUG(1, (Verifying tsig failed: %s\n, nt_errstr(status)));
return ntstatus_to_werror(status);
}
 
diff --git a/source4/dns_server/dns_query.c b/source4/dns_server/dns_query.c
index 98ebc63..54e0c7f 100644
--- a/source4/dns_server/dns_query.c
+++ b/source4/dns_server/dns_query.c
@@ -509,7 +509,7 @@ static WERROR handle_tkey(struct dns_server *dns,
return WERR_NOMEM;
}
} else {
-   DEBUG(0, (GSS key negotiation returned %s\n, 
nt_errstr(status)));
+   DEBUG(1, (GSS key negotiation returned %s\n, 
nt_errstr(status)));
ret_tkey-rdata.tkey_record.error = DNS_RCODE_BADKEY;
}
 
diff --git a/source4/dns_server/dns_server.c b/source4/dns_server/dns_server.c
index d9851b1..be1fecc 100644
--- a/source4/dns_server/dns_server.c
+++ b/source4/dns_server/dns_server.c
@@ -147,7 +147,7 @@ static struct tevent_req *dns_process_send(TALLOC_CTX 
*mem_ctx,
 
ret = dns_verify_tsig(dns, state, state-state, state-in_packet, in);
if (!W_ERROR_IS_OK(ret)) {
-   DEBUG(0, (Bailing out early!\n));
+   DEBUG(1, (Failed to verify TSIG!\n));
state-dns_err = werr_to_dns_err(ret);
tevent_req_done(req);
return tevent_req_post(req, ev);
diff --git a/source4/dns_server/dns_update.c b/source4/dns_server/dns_update.c
index 61850a1..2df0b58 100644
--- a/source4/dns_server/dns_update.c
+++ b/source4/dns_server/dns_update.c
@@ -31,6 +31,7 @@
 #include dsdb/common/util.h
 #include smbd/service_task.h
 #include dns_server/dns_server.h
+#include auth/auth.h
 
 static WERROR dns_rr_to_dnsp(TALLOC_CTX *mem_ctx,
 const struct dns_res_rec *rrec,
@@ -381,7 +382,8 @@ done:
 static WERROR handle_one_update(struct dns_server *dns,
TALLOC_CTX *mem_ctx,
const struct dns_name_question *zone,
-   const struct dns_res_rec *update)
+   const struct dns_res_rec *update,
+   const struct dns_server_tkey *tkey)
 {
struct dnsp_DnssrvRpcRecord *recs = NULL;
uint16_t rcount = 0;
@@ -389,6 +391,7 @@ static WERROR handle_one_update(struct dns_server *dns,
uint16_t i;
WERROR werror;
bool needs_add = false;
+   uint32_t access_mask = 0;
 
DEBUG(2, (Looking at record: \n));
if (DEBUGLVL(2)) {
@@ -421,9 +424,24 @@ static WERROR handle_one_update(struct dns_server *dns,
rcount = 0;
needs_add = true;
werror = WERR_OK;
+   access_mask = SEC_ADS_CREATE_CHILD;
}
W_ERROR_NOT_OK_RETURN(werror);
 
+   access_mask = SEC_STD_REQUIRED | SEC_ADS_SELF_WRITE;
+
+   if (tkey != NULL) {
+ 

[SCM] Samba Shared Repository - branch master updated

2012-09-06 Thread Stefan Metzmacher
The branch, master has been updated
   via  54ae7ca selftest/knownfail: samba3.smb2.durable-v2-open.reopen{1,2} 
fails currently
   via  640752b s4:torture/smb2: add smb2.durable-v2-open.reopen{1,2} tests
   via  1874ebe s4:torture/smb2: check that the server should ignore the 
fname in a DHnC request
   via  afaea04 s4:torture/smb2: don't expect a DHnQ response in a DHnC 
request
  from  8ba8020 s4 dns: Make debug output less noisy

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


- Log -
commit 54ae7ca417628ddae5be275891f3782f245d7c5f
Author: Stefan Metzmacher me...@samba.org
Date:   Thu Sep 6 12:18:05 2012 +0200

selftest/knownfail: samba3.smb2.durable-v2-open.reopen{1,2} fails currently

metze

Autobuild-User(master): Stefan Metzmacher me...@samba.org
Autobuild-Date(master): Fri Sep  7 02:12:22 CEST 2012 on sn-devel-104

commit 640752b969714bd43e328a05804affad63aa6d98
Author: Stefan Metzmacher me...@samba.org
Date:   Thu Sep 6 11:51:12 2012 +0200

s4:torture/smb2: add smb2.durable-v2-open.reopen{1,2} tests

They show that only the content of the DH2C request matches and
all other values in the SMB2 Create request are ignored.

metze

commit 1874ebeb37ea1604823d8cedb76344b292453d74
Author: Stefan Metzmacher me...@samba.org
Date:   Thu Sep 6 12:38:54 2012 +0200

s4:torture/smb2: check that the server should ignore the fname in a DHnC 
request

metze

commit afaea04f1cb5a31ba0bfd0f5c8ad37c1bdc6d79e
Author: Stefan Metzmacher me...@samba.org
Date:   Thu Sep 6 11:49:42 2012 +0200

s4:torture/smb2: don't expect a DHnQ response in a DHnC request

This is fixed in Windows 2012 and matches the [MS-SMB2] documentation
now.

metze

---

Summary of changes:
 selftest/knownfail |2 +
 source4/torture/smb2/durable_open.c|7 +-
 source4/torture/smb2/durable_v2_open.c |  184 
 3 files changed, 188 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/selftest/knownfail b/selftest/knownfail
index 4e6eb43..30c66b8 100644
--- a/selftest/knownfail
+++ b/selftest/knownfail
@@ -189,6 +189,8 @@
 ^samba3.smb2.durable-open.oplock
 ^samba3.smb2.durable-v2-open.open-oplock
 ^samba3.smb2.durable-v2-open.open-lease
+^samba3.smb2.durable-v2-open.reopen1
+^samba3.smb2.durable-v2-open.reopen2
 ^samba3.smb2.durable-v2-open.persistent-open-oplock
 ^samba3.smb2.durable-v2-open.persistent-open-lease
 ^samba3.smb2.ioctl.shadow_copy
diff --git a/source4/torture/smb2/durable_open.c 
b/source4/torture/smb2/durable_open.c
index 659fa9d..8524fd6 100644
--- a/source4/torture/smb2/durable_open.c
+++ b/source4/torture/smb2/durable_open.c
@@ -443,14 +443,14 @@ bool test_durable_open_reopen2(struct torture_context 
*tctx,
}
 
ZERO_STRUCT(io2);
-   io2.in.fname = fname;
+   /* the path name is ignored by the server */
+   io2.in.fname = __non_existing_fname__;
io2.in.durable_handle = h;
h = NULL;
 
status = smb2_create(tree, mem_ctx, io2);
CHECK_STATUS(status, NT_STATUS_OK);
CHECK_CREATED(io2, EXISTED, FILE_ATTRIBUTE_ARCHIVE);
-   CHECK_VAL(io2.out.durable_open, true);
CHECK_VAL(io2.out.oplock_level, smb2_util_oplock_level(b));
_h = io2.out.file.handle;
h = _h;
@@ -524,7 +524,6 @@ bool test_durable_open_reopen2a(struct torture_context 
*tctx,
status = smb2_create(tree, mem_ctx, io2);
CHECK_STATUS(status, NT_STATUS_OK);
CHECK_CREATED(io2, EXISTED, FILE_ATTRIBUTE_ARCHIVE);
-   CHECK_VAL(io2.out.durable_open, true);
CHECK_VAL(io2.out.oplock_level, smb2_util_oplock_level(b));
_h = io2.out.file.handle;
h = _h;
@@ -689,7 +688,6 @@ bool test_durable_open_reopen4(struct torture_context *tctx,
_h = io2.out.file.handle;
h = _h;
CHECK_CREATED(io2, EXISTED, FILE_ATTRIBUTE_ARCHIVE);
-   CHECK_VAL(io2.out.durable_open, true);
CHECK_VAL(io2.out.oplock_level, smb2_util_oplock_level(b));
 
 done:
@@ -895,7 +893,6 @@ bool test_durable_open_file_position(struct torture_context 
*tctx,
 
status = smb2_create(tree2, mem_ctx, io2);
CHECK_STATUS(status, NT_STATUS_OK);
-   CHECK_VAL(io2.out.durable_open, true);
CHECK_VAL(io2.out.oplock_level, SMB2_OPLOCK_LEVEL_BATCH);
CHECK_VAL(io2.out.reserved, 0x00);
CHECK_VAL(io2.out.create_action, NTCREATEX_ACTION_EXISTED);
diff --git a/source4/torture/smb2/durable_v2_open.c 
b/source4/torture/smb2/durable_v2_open.c
index 700179e..3b5f7b6 100644
--- a/source4/torture/smb2/durable_v2_open.c
+++ b/source4/torture/smb2/durable_v2_open.c
@@ -369,6 +369,188 @@ bool test_durable_v2_open_lease(struct torture_context 
*tctx,
return ret;
 }
 
+/**
+ * basic test for doing a durable 

[SCM] Samba Shared Repository - branch master updated

2012-09-06 Thread Jeremy Allison
The branch, master has been updated
   via  d0159f6 Free protect_ids in secret_store_domain_guid() as the 
caller of fetch_secrets() must free the result in order to not leak memory.
  from  54ae7ca selftest/knownfail: samba3.smb2.durable-v2-open.reopen{1,2} 
fails currently

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


- Log -
commit d0159f6673e0fdf50f096548ea1a134c0e864ceb
Author: Michele Baldessari mich...@acksyn.org
Date:   Thu Sep 6 17:32:11 2012 -0700

Free protect_ids in secret_store_domain_guid() as the caller of 
fetch_secrets() must free the result in order to not leak memory.

Signed-off-by: Jeremy Allison j...@samba.org

Autobuild-User(master): Jeremy Allison j...@samba.org
Autobuild-Date(master): Fri Sep  7 04:11:43 CEST 2012 on sn-devel-104

---

Summary of changes:
 source3/passdb/machine_account_secrets.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/passdb/machine_account_secrets.c 
b/source3/passdb/machine_account_secrets.c
index 70d7106..6320f4e 100644
--- a/source3/passdb/machine_account_secrets.c
+++ b/source3/passdb/machine_account_secrets.c
@@ -149,9 +149,11 @@ bool secrets_store_domain_guid(const char *domain, struct 
GUID *guid)
if (strncmp(protect_ids, TRUE, 4)) {
DEBUG(0, (Refusing to store a Domain SID, 
  it has been marked as protected!\n));
+   SAFE_FREE(protect_ids);
return false;
}
}
+   SAFE_FREE(protect_ids);
 #endif
 
slprintf(key, sizeof(key)-1, %s/%s, SECRETS_DOMAIN_GUID, domain);


-- 
Samba Shared Repository