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

Karolin Seeger kseeger at samba.org
Wed Dec 7 09:05:25 UTC 2016


The branch, v4-5-stable has been updated
       via  6ead525 VERSION: Disable git snapshots for the 4.5.2 release.
       via  2109236 WHATSNEW: Add release notes for Samba 4.5.2.
       via  1084656 printing: Fix building with CUPS version older than 1.7
       via  8377d8a s3/smbd: fix the last resort check that sets the file type attribute
       via  cbf54e0 nss_wins: Fix errno values for HOST_NOT_FOUND
       via  ee07db3 samba_tool/fsmo: Allocate RID Set when seizing RID manager
       via  9f9e67e python-libnet: Use new NTSTATUSError, WERRORError and DsExtendedError exceptions
       via  ca5d700 python: Add DsExtendedError Exception
       via  31d24bf pyerrors: Add PyErr_Set{WERROR,HRESULT,NTSTATUS}_and_string()
       via  7396b5e python: create NTSTATUSError, HRESULTError and WERRORError
       via  81f50f0 dsdb: Catch errors in extended operations (like allocating a RID Set)
       via  26ccaf3 dsdb: Rework DSDB code to use WERROR
       via  da60caf dsdb: Create RID Set as SYSTEM
       via  da6d45a dbcheck: Correctly initialise keep_transaction in missing_parent test
       via  527eadd dbcheck: confirm RID Set presence and consistency
       via  b301f03 dsdb: Add python hooks to allocate a RID set and allocate a RID pool
       via  3a1396a tests/ridalloc_exop: Add a new suite of tests for RID allocation
       via  2be2529 objectclass_attrs: Only abort on a missing attribute when an attribute is both MUST and replicated
       via  0802e0a typo: supprise -> surprise
       via  0a62f6e tests/getnc_exop: Finish a comment in getnc_exop.py
       via  e089fb6 tests/getnc_exop: Improve the ridalloc test by performing an alloc against a new master
       via  fbd8e67 objectclass_attrs: correctly indent a comment
       via  7a23c89 selftest: Ensure we catch errors from samba-tool domain tombstones expunge
       via  b370238 dbcheck: Correct message for orphaned backlinks
       via  48d45ef dbcheck: Be more careful with link checks
       via  068f9fd selftest: Add test for link and deleted link behaviour in dbcheck
       via  dd5fb5b upgradeprovision: Remove objectCategory from constructed attrs
       via  6251b79 collect_tombstones: Allow links to recycled objects to be deleted
       via  b5d5d85 tombstones-expunge: Add a test for deleting links to recycled objects
       via  d83c6b3 s4:torture: Fix cleanup of the secrets object in session_key test
       via  3ff0d4a s4:torture: Normalizes names in session_key test
       via  0f1b2b8 s4:torture: Strip trailing whitespaces in session_key.c
       via  309a92b s4:torture: Add tortue test for AddPrinterDriverEx with COPY_FROM_DIRECTORY
       via  74c05505a lib:torture: Make variables const
       via  b07e2c8 s3:spoolss: Add support for COPY_FROM_DIRECTORY in AddPrinterDriverEx
       via  30c400a doc: Add doxygen for functions in srv_keytab.c
       via  b37dcf0 s4-auth: Don't check for NULL saltPrincipal if it doesn't need it
       via  82053bf ctdb-recovery: Avoid NULL dereference in failure case
       via  446ead2 ctdb-locking: Reset real-time priority in lock helper
       via  5d64d86 s4-torture: add spoolss_SetPrinter ndr test to validate secdesc_ptr
       via  077711d spoolss: Use correct values for secdesc and devmode pointers
       via  0d7a65c build: Fix build with perl on debian sid.
       via  e118001 ctdb-tests: Add tests for updated Debian style Samba start/stop
       via  9cc435f ctdb-scripts: Fix Debian init in samba eventscript
       via  71aa6de s3-printing: Allow printer names longer than 16 chars
       via  6958a24 s3-printing: Correctly encode CUPS printer URIs
       via  0d08df6 vfs:glusterfs: preallocate result for glfs_realpath
       via  3cbc061 ctdb-scripts: Fix calculation of CTDB_BASE
       via  0cc06c4 s3-winbind: Do not return NO_MEMORY if we have an empty user list
       via  9f2a816 provision: Add support for BIND 9.11.x
       via  9994b03 dlz-bind: Add support for BIND 9.11.x
       via  bf846e7 dlz-bind: Set DNS_CLIENTINFO_VERSION based on BIND version
       via  f90c569 dlz-bind: Fix initialization of DLZ_DLOPEN_AGE
       via  1ca221e dlz-bind: Fix preprocessor checks for BIND versions
       via  5eb8a18 ctdb-packaging: Move CTDB tests to /usr/local/share/ctdb/tests/
       via  ffa364b s3:smbd: only pass UCF_PREP_CREATEFILE to filename_convert() if we may create a new file
       via  0828385 Revert "ctdb-common: Use SCHED_RESET_ON_FORK when setting SCHED_FIFO"
       via  351c726 s3: vfs: streams_depot. Use conn->connectpath not conn->cwd.
       via  8f8c4b1 s3: selftest: Add test for orphan 'lost-XXX' directories in streams_depot.
       via  bfa537d s3: vfs: Remove files/directories after the streams are deleted.
       via  71d5a11 s3: torture: vfstest. unlink cmd must be stream aware.
       via  bd1aa3b smbd: in ntlm auth, do not map empty domain in case of \user at realm
       via  351cbb6 winbindd: do not modify credentials in NTLM passthrough
       via  e310d4c selftest: test NTLM user at realm authentication
       via  af7f99f ctdb-conn: add missing variable initialization
       via  e70b87b Merge tag 'samba-4.5.1' into v4-5-test
       via  670022c VERSION: Bump version up to 4.5.2...
      from  548e16c Revert "script/release.sh: use 8 byte gpg key ids"

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


- Log -----------------------------------------------------------------
commit 6ead5258a717d56794f25b91254bbe0ad737f45d
Author: Karolin Seeger <kseeger at samba.org>
Date:   Fri Dec 2 10:35:57 2016 +0100

    VERSION: Disable git snapshots for the 4.5.2 release.
    
    Signed-off-by: Karolin Seeger <kseeger at samba.org>

commit 2109236f7f80fb153017a8750432f359a6551ab7
Author: Karolin Seeger <kseeger at samba.org>
Date:   Fri Dec 2 10:34:57 2016 +0100

    WHATSNEW: Add release notes for Samba 4.5.2.
    
    Signed-off-by: Karolin Seeger <kseeger at samba.org>

commit 10846561ba77700dbd8ee0c7083c577912b7b3c6
Author: Andreas Schneider <asn at samba.org>
Date:   Tue Dec 6 09:44:28 2016 +0100

    printing: Fix building with CUPS version older than 1.7
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12183
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Karolin Seeger <kseeger at samba.org>

-----------------------------------------------------------------------

Summary of changes:
 VERSION                                            |   2 +-
 WHATSNEW.txt                                       | 102 ++-
 buildtools/wafsamba/samba_perl.py                  |   3 +-
 ctdb/common/system_util.c                          |   8 +-
 ctdb/config/ctdb-crash-cleanup.sh                  |   2 +-
 ctdb/config/debug-hung-script.sh                   |   2 +-
 ctdb/config/debug_locks.sh                         |   2 +-
 ctdb/config/events.d/50.samba                      |   4 +-
 ctdb/config/statd-callout                          |   2 +-
 ctdb/packaging/RPM/ctdb.spec.in                    |   4 +-
 ctdb/server/ctdb_lock_helper.c                     |   2 +
 ctdb/server/ctdb_recovery_helper.c                 |   1 +
 ctdb/tests/eventscripts/50.samba.shutdown.011.sh   |  15 +
 ctdb/tests/eventscripts/50.samba.startup.011.sh    |  15 +
 ctdb/tests/eventscripts/etc-ctdb/rc.local          |   2 +-
 ctdb/tests/eventscripts/scripts/local.sh           |   4 +-
 ctdb/wscript                                       |   2 +-
 lib/torture/torture.h                              |   8 +-
 librpc/idl/spoolss.idl                             |  20 +-
 nsswitch/wins.c                                    |   3 +-
 python/pyglue.c                                    |  28 +
 python/samba/__init__.py                           |   5 +
 python/samba/dbchecker.py                          | 172 ++++-
 python/samba/netcmd/fsmo.py                        |  29 +-
 python/samba/provision/sambadns.py                 |   6 +-
 python/samba/samdb.py                              |   8 +
 python/samba/tests/samba_tool/timecmd.py           |   2 +-
 script/release.sh                                  |  12 +-
 selftest/knownfail                                 |   4 +
 selftest/tests.py                                  |   5 +
 source3/auth/auth_util.c                           |  10 +-
 source3/include/nt_printing.h                      |   7 +-
 source3/lib/ctdbd_conn.c                           |   2 +-
 source3/modules/vfs_glusterfs.c                    |  15 +-
 source3/modules/vfs_streams_depot.c                |  21 +-
 source3/printing/nt_printing.c                     |  92 ++-
 source3/printing/print_cups.c                      | 134 +++-
 source3/printing/print_standard.c                  |  55 +-
 source3/rpc_client/init_spoolss.c                  |   4 +-
 source3/rpc_server/spoolss/srv_spoolss_nt.c        |  17 +-
 source3/rpcclient/cmd_spoolss.c                    |   4 +-
 source3/script/tests/test_smbclient_s3.sh          |  41 ++
 source3/selftest/tests.py                          |   1 +
 source3/smbd/dosmode.c                             |  10 +-
 source3/smbd/filename.c                            |  23 +
 source3/smbd/nttrans.c                             |   8 +-
 source3/smbd/proto.h                               |   1 +
 source3/smbd/reply.c                               |  38 +-
 source3/smbd/smb2_create.c                         |  10 +-
 source3/torture/cmd_vfs.c                          |   8 +
 source3/winbindd/winbindd_pam_auth_crap.c          |  11 +-
 source3/winbindd/winbindd_rpc.c                    |   4 +
 source4/auth/kerberos/srv_keytab.c                 |  59 +-
 source4/dns_server/dlz_minimal.h                   |  54 +-
 source4/dns_server/wscript_build                   |  10 +
 source4/dsdb/kcc/garbage_collect_tombstones.c      |   5 +-
 source4/dsdb/pydsdb.c                              |  74 +++
 source4/dsdb/samdb/ldb_modules/objectclass_attrs.c |  36 +-
 source4/dsdb/samdb/ldb_modules/ridalloc.c          |  20 +-
 source4/dsdb/samdb/ldb_modules/rootdse.c           |   2 +-
 source4/dsdb/samdb/ldb_modules/samldb.c            |  51 ++
 source4/dsdb/samdb/samdb.h                         |  10 +
 source4/libcli/util/pyerrors.h                     |  30 +-
 source4/libnet/libnet_become_dc.c                  |   8 +-
 source4/libnet/libnet_become_dc.h                  |  16 +-
 source4/libnet/libnet_vampire.c                    | 125 ++--
 source4/libnet/py_net.c                            | 143 ++++-
 source4/scripting/bin/samba_upgradeprovision       |   2 +-
 .../release-4-5-0-pre1/add-dangling-link.ldif      |   5 +
 .../expected-dbcheck-link-output.txt               |  42 ++
 ...expected-deleted-links-after-link-dbcheck.ldif} |   2 +-
 .../release-4-5-0-pre1/expected-expunge-output.txt |   2 +-
 ...ldif => expected-links-after-link-dbcheck.ldif} |   2 +-
 .../expected-match-rule-links.ldif                 |  18 +-
 .../expected-objects-after-link-dbcheck.ldif       |   5 +
 source4/selftest/tests.py                          |  11 +-
 source4/setup/named.conf.dlz                       |   3 +
 source4/setup/schema_samba4.ldif                   |   2 +
 source4/torture/drs/python/getnc_exop.py           |  85 ---
 source4/torture/drs/python/ridalloc_exop.py        | 714 +++++++++++++++++++++
 source4/torture/ndr/spoolss.c                      |  57 ++
 source4/torture/rpc/session_key.c                  | 100 +--
 source4/torture/rpc/spoolss.c                      | 179 +++++-
 source4/torture/rpc/spoolss_notify.c               |   4 +-
 testprogs/blackbox/dbcheck-links.sh                | 188 ++++++
 testprogs/blackbox/tombstones-expunge.sh           |  11 +-
 86 files changed, 2618 insertions(+), 447 deletions(-)
 create mode 100755 ctdb/tests/eventscripts/50.samba.shutdown.011.sh
 create mode 100755 ctdb/tests/eventscripts/50.samba.startup.011.sh
 create mode 100644 source4/selftest/provisions/release-4-5-0-pre1/add-dangling-link.ldif
 create mode 100644 source4/selftest/provisions/release-4-5-0-pre1/expected-dbcheck-link-output.txt
 copy source4/selftest/provisions/release-4-5-0-pre1/{expected-deleted-links-after-expunge.ldif => expected-deleted-links-after-link-dbcheck.ldif} (89%)
 copy source4/selftest/provisions/release-4-5-0-pre1/{expected-links-after-expunge.ldif => expected-links-after-link-dbcheck.ldif} (88%)
 create mode 100644 source4/selftest/provisions/release-4-5-0-pre1/expected-objects-after-link-dbcheck.ldif
 create mode 100644 source4/torture/drs/python/ridalloc_exop.py
 create mode 100755 testprogs/blackbox/dbcheck-links.sh


Changeset truncated at 500 lines:

diff --git a/VERSION b/VERSION
index 5a2d7c1..d93f1ff 100644
--- a/VERSION
+++ b/VERSION
@@ -25,7 +25,7 @@
 ########################################################
 SAMBA_VERSION_MAJOR=4
 SAMBA_VERSION_MINOR=5
-SAMBA_VERSION_RELEASE=1
+SAMBA_VERSION_RELEASE=2
 
 ########################################################
 # If a official release has a serious bug              #
diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index f26834a..6d7d5d9 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -1,4 +1,102 @@
                    =============================
+                   Release Notes for Samba 4.5.2
+                          December 07, 2016
+                   =============================
+
+
+This is the latest stable release of the Samba 4.5 release series.
+
+
+Changes since 4.5.1:
+--------------------
+
+o  Michael Adam <obnox at samba.org>
+   * BUG 12404: vfs:glusterfs: Preallocate result for glfs_realpath.
+
+o  Jeremy Allison <jra at samba.org>
+   * BUG 12384: s3: vfs: Remove files/directories after the streams are deleted.
+   * BUG 12387: s3: vfs_streams_depot: Use conn->connectpath not conn->cwd.
+   * BUG 12436: s3/smbd: Fix the last resort check that sets the file type
+     attribute.
+
+o  Andrew Bartlett <abartlet at samba.org>
+   * BUG 9954: dsdb: Create RID Set as SYSTEM.
+   * BUG 12297: dbcheck: Correct message for orphaned backlinks.
+   * BUG 12395: build: Fix build with perl on debian sid.
+   * BUG 12398: Fix errors in extended operations (like allocating a RID Set).
+
+o  G√ľnther Deschner <gd at samba.org>
+   * BUG 11197: spoolss: Use correct values for secdesc and devmode pointers.
+
+o  Clive Ferreira <cliveferreira at catalyst.net.nz>
+   * BUG 12394: objectclass_attrs: Only abort on a missing attribute when an
+     attribute is both MUST and replicated.
+
+o  Amitay Isaacs <amitay at gmail.com>
+   * BUG 12366: provision,dlz-bind: Add support for BIND 9.11.x.
+   * BUG 12392: ctdb-locking: Reset real-time priority in lock helper.
+   * BUG 12407: ctdb-scripts: Fix calculation of CTDB_BASE.
+   * BUG 12434: ctdb-recovery: Avoid NULL dereference in failure case.
+
+o  Stefan Metzmacher <metze at samba.org>
+   * BUG 10297: s3:smbd: Only pass UCF_PREP_CREATEFILE to filename_convert() if
+     we may create a new file.
+
+o  Mathieu Parent <math.parent at gmail.com>
+   * BUG 12371: ctdb-scripts: Fix Debian init in samba eventscript.
+
+o  Garming Sam <garming at catalyst.net.nz>
+   * BUG 9954: samba_tool/fsmo: Allocate RID Set when seizing RID manager.
+   * BUG 10882: s4-auth: Don't check for NULL saltPrincipal if it doesn't need
+     it.
+   * BUG 12297: upgradeprovision: Remove objectCategory from constructed attrs.
+   * BUG 12385: collect_tombstones: Allow links to recycled objects to be
+     deleted.
+
+o  Andreas Schneider <asn at samba.org>
+   * BUG 12183: s3-printing: Correctly encode CUPS printer URIs.
+   * BUG 12195: s3-printing: Allow printer names longer than 16 chars.
+   * BUG 12269: nss_wins: Fix errno values for HOST_NOT_FOUND.
+   * BUG 12405: s3-winbind: Do not return NO_MEMORY if we have an empty user
+     list.
+   * BUG 12415: s3:spoolss: Add support for COPY_FROM_DIRECTORY in
+     AddPrinterDriverEx.
+
+o  Martin Schwenke <martin at meltin.net>
+   * BUG 12104: ctdb-packaging: Move CTDB tests to /usr/local/share/ctdb/tests/.
+
+o  Uri Simchoni <uri at samba.org>
+   * BUG 12375: smbd: In ntlm auth, do not map empty domain in case of
+     \user at realm.
+
+o  Ralph Wuerthner <ralph.wuerthner at de.ibm.com>
+   * BUG 12372: ctdb-conn: Add missing variable initialization.
+
+
+#######################################
+Reporting bugs & Development Discussion
+#######################################
+
+Please discuss this release on the samba-technical mailing list or by
+joining the #samba-technical IRC channel on irc.freenode.net.
+
+If you do report problems then please try to send high quality
+feedback. If you don't provide vital information to help us track down
+the problem then you will probably be ignored.  All bug reports should
+be filed under the Samba 4.1 and newer product in the project's Bugzilla
+database (https://bugzilla.samba.org/).
+
+
+======================================================================
+== Our Code, Our Bugs, Our Responsibility.
+== The Samba Team
+======================================================================
+
+
+Release notes for older releases follow:
+----------------------------------------
+
+                   =============================
                    Release Notes for Samba 4.5.1
                           October 26, 2016
                    =============================
@@ -122,8 +220,8 @@ database (https://bugzilla.samba.org/).
 ======================================================================
 
 
-Release notes for older releases follow:
-----------------------------------------
+----------------------------------------------------------------------
+
 
                    =============================
                    Release Notes for Samba 4.5.0
diff --git a/buildtools/wafsamba/samba_perl.py b/buildtools/wafsamba/samba_perl.py
index f2f176d..2e9a53a 100644
--- a/buildtools/wafsamba/samba_perl.py
+++ b/buildtools/wafsamba/samba_perl.py
@@ -49,7 +49,8 @@ def SAMBA_CHECK_PERL(conf, mandatory=True, version=(5,0,0)):
     conf.env.PERL_LIB_INSTALL_DIR = perl_lib_install_dir
 
     perl_inc = read_perl_config_var('print "@INC"')
-    perl_inc.remove('.')
+    if '.' in perl_inc:
+        perl_inc.remove('.')
     conf.start_msg("PERL_INC: ")
     conf.end_msg("%s" % (perl_inc), 'GREEN')
     conf.env.PERL_INC = perl_inc
diff --git a/ctdb/common/system_util.c b/ctdb/common/system_util.c
index 9fc6c44..9e897c2 100644
--- a/ctdb/common/system_util.c
+++ b/ctdb/common/system_util.c
@@ -68,14 +68,10 @@ bool set_scheduler(void)
 #else /* no AIX */
 #if HAVE_SCHED_SETSCHEDULER
 	struct sched_param p;
-	int policy = SCHED_FIFO;
 
 	p.sched_priority = 1;
 
-#ifdef SCHED_RESET_ON_FORK
-	policy |= SCHED_RESET_ON_FORK;
-#endif
-	if (sched_setscheduler(0, policy, &p) == -1) {
+	if (sched_setscheduler(0, SCHED_FIFO, &p) == -1) {
 		DEBUG(DEBUG_CRIT,("Unable to set scheduler to SCHED_FIFO (%s)\n",
 			 strerror(errno)));
 		return false;
@@ -108,7 +104,6 @@ void reset_scheduler(void)
 #endif
 #else /* no AIX */
 #if HAVE_SCHED_SETSCHEDULER
-#ifndef SCHED_RESET_ON_FORK
 	struct sched_param p;
 
 	p.sched_priority = 0;
@@ -117,7 +112,6 @@ void reset_scheduler(void)
 	}
 #endif
 #endif
-#endif
 }
 
 bool parse_ipv4(const char *s, unsigned port, struct sockaddr_in *sin)
diff --git a/ctdb/config/ctdb-crash-cleanup.sh b/ctdb/config/ctdb-crash-cleanup.sh
index bcecbfe..22b0ce8 100755
--- a/ctdb/config/ctdb-crash-cleanup.sh
+++ b/ctdb/config/ctdb-crash-cleanup.sh
@@ -5,7 +5,7 @@
 #
 
 [ -n "$CTDB_BASE" ] || \
-    CTDB_BASE=$(d=$(dirname "$0") ; cd -P "$d" ; dirname "$PWD")
+    CTDB_BASE=$(d=$(dirname "$0") ; cd -P "$d" ; echo "$PWD")
 
 . "${CTDB_BASE}/functions"
 
diff --git a/ctdb/config/debug-hung-script.sh b/ctdb/config/debug-hung-script.sh
index cdf1657..da988c2 100755
--- a/ctdb/config/debug-hung-script.sh
+++ b/ctdb/config/debug-hung-script.sh
@@ -4,7 +4,7 @@
 # for other operating systems.
 
 [ -n "$CTDB_BASE" ] || \
-    CTDB_BASE=$(d=$(dirname "$0") ; cd -P "$d" ; dirname "$PWD")
+    CTDB_BASE=$(d=$(dirname "$0") ; cd -P "$d" ; echo "$PWD")
 
 . "${CTDB_BASE}/functions"
 
diff --git a/ctdb/config/debug_locks.sh b/ctdb/config/debug_locks.sh
index 8c9b466..f678724 100755
--- a/ctdb/config/debug_locks.sh
+++ b/ctdb/config/debug_locks.sh
@@ -8,7 +8,7 @@
 # rather than mutex locks.
 
 [ -n "$CTDB_BASE" ] || \
-    CTDB_BASE=$(d=$(dirname "$0") ; cd -P "$d" ; dirname "$PWD")
+    CTDB_BASE=$(d=$(dirname "$0") ; cd -P "$d" ; echo "$PWD")
 
 . "${CTDB_BASE}/functions"
 
diff --git a/ctdb/config/events.d/50.samba b/ctdb/config/events.d/50.samba
index b521d00..4a532a4 100755
--- a/ctdb/config/events.d/50.samba
+++ b/ctdb/config/events.d/50.samba
@@ -14,8 +14,8 @@ case $CTDB_INIT_STYLE in
 		CTDB_SERVICE_NMB=${CTDB_SERVICE_NMB:-nmb}
 		;;
 	debian)
-		CTDB_SERVICE_SMB=${CTDB_SERVICE_SMB:-samba}
-		CTDB_SERVICE_NMB=${CTDB_SERVICE_NMB:-""}
+		CTDB_SERVICE_SMB=${CTDB_SERVICE_SMB:-smbd}
+		CTDB_SERVICE_NMB=${CTDB_SERVICE_NMB:-nmbd}
 		;;
 	*)
 		# Use redhat style as default:
diff --git a/ctdb/config/statd-callout b/ctdb/config/statd-callout
index 4ac354e..3f2dd39 100755
--- a/ctdb/config/statd-callout
+++ b/ctdb/config/statd-callout
@@ -9,7 +9,7 @@
 #   STATD_HOSTNAME="myhostname -H /etc/ctdb/statd-callout"
 
 [ -n "$CTDB_BASE" ] || \
-    CTDB_BASE=$(d=$(dirname "$0") ; cd -P "$d" ; dirname "$PWD")
+    CTDB_BASE=$(d=$(dirname "$0") ; cd -P "$d" ; echo "$PWD")
 
 . "${CTDB_BASE}/functions"
 
diff --git a/ctdb/packaging/RPM/ctdb.spec.in b/ctdb/packaging/RPM/ctdb.spec.in
index ea97d8e..aae2c7e 100644
--- a/ctdb/packaging/RPM/ctdb.spec.in
+++ b/ctdb/packaging/RPM/ctdb.spec.in
@@ -257,8 +257,8 @@ test suite for ctdb
 
 %files tests
 %defattr(-,root,root)
-%dir %{_datadir}/%{name}-tests
-%{_datadir}/%{name}-tests/*
+%dir %{_datadir}/%{name}/tests
+%{_datadir}/%{name}/tests/*
 %dir %{_libexecdir}/%{name}/tests
 %{_libexecdir}/%{name}/tests/*
 %{_bindir}/ctdb_run_tests
diff --git a/ctdb/server/ctdb_lock_helper.c b/ctdb/server/ctdb_lock_helper.c
index e41d230..8aa0870 100644
--- a/ctdb/server/ctdb_lock_helper.c
+++ b/ctdb/server/ctdb_lock_helper.c
@@ -166,6 +166,8 @@ int main(int argc, char *argv[])
 	int ppid;
 	const char *lock_type;
 
+	reset_scheduler();
+
 	progname = argv[0];
 
 	if (argc < 5) {
diff --git a/ctdb/server/ctdb_recovery_helper.c b/ctdb/server/ctdb_recovery_helper.c
index 4e4a986..d54c290 100644
--- a/ctdb/server/ctdb_recovery_helper.c
+++ b/ctdb/server/ctdb_recovery_helper.c
@@ -140,6 +140,7 @@ static struct recdb_context *recdb_create(TALLOC_CTX *mem_ctx, uint32_t db_id,
 	if (recdb->db == NULL) {
 		talloc_free(recdb);
 		LOG("failed to create recovery db %s\n", recdb->db_path);
+		return NULL;
 	}
 
 	recdb->persistent = persistent;
diff --git a/ctdb/tests/eventscripts/50.samba.shutdown.011.sh b/ctdb/tests/eventscripts/50.samba.shutdown.011.sh
new file mode 100755
index 0000000..f225e8f
--- /dev/null
+++ b/ctdb/tests/eventscripts/50.samba.shutdown.011.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+. "${TEST_SCRIPTS_DIR}/unit.sh"
+
+define_test "shutdown, Debian init style"
+
+setup_samba
+
+export EVENTSCRIPT_TESTS_INIT_STYLE="debian"
+
+ok <<EOF
+Stopping smbd: OK
+Stopping nmbd: OK
+EOF
+simple_test
diff --git a/ctdb/tests/eventscripts/50.samba.startup.011.sh b/ctdb/tests/eventscripts/50.samba.startup.011.sh
new file mode 100755
index 0000000..3205497
--- /dev/null
+++ b/ctdb/tests/eventscripts/50.samba.startup.011.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+. "${TEST_SCRIPTS_DIR}/unit.sh"
+
+define_test "shutdown, Debian init style"
+
+setup_samba
+
+export EVENTSCRIPT_TESTS_INIT_STYLE="debian"
+
+ok <<EOF
+Starting nmbd: OK
+Starting smbd: OK
+EOF
+simple_test
diff --git a/ctdb/tests/eventscripts/etc-ctdb/rc.local b/ctdb/tests/eventscripts/etc-ctdb/rc.local
index 3a55e53..541474a 100755
--- a/ctdb/tests/eventscripts/etc-ctdb/rc.local
+++ b/ctdb/tests/eventscripts/etc-ctdb/rc.local
@@ -58,5 +58,5 @@ background_with_logging ()
     "$@" 2>&1 </dev/null | sed -e 's@^@\&@'
 }
 
-CTDB_INIT_STYLE="redhat"
+CTDB_INIT_STYLE="${EVENTSCRIPT_TESTS_INIT_STYLE:-redhat}"
 PATH="${EVENTSCRIPTS_PATH}:$PATH"
diff --git a/ctdb/tests/eventscripts/scripts/local.sh b/ctdb/tests/eventscripts/scripts/local.sh
index 61a033a..f90a500 100644
--- a/ctdb/tests/eventscripts/scripts/local.sh
+++ b/ctdb/tests/eventscripts/scripts/local.sh
@@ -806,7 +806,7 @@ setup_samba ()
 	eventscript_call ctdb_service_managed
 
         # All possible service names for all known distros.
-	for i in "smb" "nmb" "samba" ; do
+	for i in "smb" "nmb" "samba" "smbd" "nmbd" ; do
 	    service "$i" force-started
 	done
 
@@ -826,7 +826,7 @@ setup_samba ()
 	eventscript_call ctdb_service_unmanaged
 
         # All possible service names for all known distros.
-	for i in "smb" "nmb" "samba" ; do
+	for i in "smb" "nmb" "samba" "smbd" "nmbd" ; do
 	    service "$i" force-stopped
 	done
 
diff --git a/ctdb/wscript b/ctdb/wscript
index 5675849..c775cb5 100644
--- a/ctdb/wscript
+++ b/ctdb/wscript
@@ -209,7 +209,7 @@ def configure(conf):
                     conf.env.CTDB_RUNDIR))
 
     conf.env.CTDB_TEST_DATADIR = os.path.join(conf.env.EXEC_PREFIX,
-                                              'share/ctdb-tests')
+                                              'share/ctdb/tests')
     conf.env.CTDB_TEST_LIBEXECDIR = os.path.join(conf.env.LIBEXECDIR, 'ctdb/tests')
 
     # Allow unified compilation and separate compilation of utilities
diff --git a/lib/torture/torture.h b/lib/torture/torture.h
index 5b957fa..45332b2 100644
--- a/lib/torture/torture.h
+++ b/lib/torture/torture.h
@@ -547,7 +547,7 @@ static inline void torture_dump_data_str_cb(const char *buf, void *private_data)
 	} while(0)
 
 #define torture_assert_guid_equal(torture_ctx,got,expected,cmt)\
-	do { struct GUID __got = (got), __expected = (expected); \
+	do {const struct GUID __got = (got), __expected = (expected); \
 	if (!GUID_equal(&__got, &__expected)) { \
 		torture_result(torture_ctx, TORTURE_FAIL, \
 			__location__": "#got" was %s, expected %s: %s", \
@@ -565,7 +565,7 @@ static inline void torture_dump_data_str_cb(const char *buf, void *private_data)
 	} while(0)
 
 #define torture_assert_sid_equal(torture_ctx,got,expected,cmt)\
-	do { struct dom_sid *__got = (got), *__expected = (expected); \
+	do {const struct dom_sid *__got = (got), *__expected = (expected); \
 	if (!dom_sid_equal(__got, __expected)) { \
 		torture_result(torture_ctx, TORTURE_FAIL, \
 					   __location__": "#got" was %s, expected %s: %s", \
@@ -575,7 +575,7 @@ static inline void torture_dump_data_str_cb(const char *buf, void *private_data)
 	} while(0)
 
 #define torture_assert_not_null(torture_ctx,got,cmt)\
-	do { void *__got = (got); \
+	do {const void *__got = (got); \
 	if (__got == NULL) { \
 		torture_result(torture_ctx, TORTURE_FAIL, \
 			__location__": "#got" was NULL, expected != NULL: %s", \
@@ -585,7 +585,7 @@ static inline void torture_dump_data_str_cb(const char *buf, void *private_data)
 	} while(0)
 
 #define torture_assert_not_null_goto(torture_ctx,got,ret,label,cmt)\
-	do { void *__got = (got); \
+	do {const void *__got = (got); \
 	if (__got == NULL) { \
 		torture_result(torture_ctx, TORTURE_FAIL, \
 			__location__": "#got" was NULL, expected != NULL: %s", \
diff --git a/librpc/idl/spoolss.idl b/librpc/idl/spoolss.idl
index 5bbc267..d17fcf4 100644
--- a/librpc/idl/spoolss.idl
+++ b/librpc/idl/spoolss.idl
@@ -1011,9 +1011,9 @@ cpp_quote("#define spoolss_security_descriptor security_descriptor")
 		[string,charset(UTF16)] uint16 *print_processor;
 		[string,charset(UTF16)] uint16 *parameters;
 		[string,charset(UTF16)] uint16 *driver_name;
-		uint32 *_devmode_ptr; /* pointer to truncated devicemode */
+		uint3264 _devmode_ptr; /* ULONG_PTR */
 		[string,charset(UTF16)] uint16 *text_status;
-		uint32 *_secdesc_ptr;
+		uint3264 _secdesc_ptr; /* ULONG_PTR */
 		spoolss_JobStatus status;
 		[range(0,99)] uint32 priority;
 		uint32 position;
@@ -1037,9 +1037,9 @@ cpp_quote("#define spoolss_security_descriptor security_descriptor")
 		[string,charset(UTF16)] uint16 *print_processor;
 		[string,charset(UTF16)] uint16 *parameters;
 		[string,charset(UTF16)] uint16 *driver_name;
-		uint32 *_devmode_ptr; /* pointer to truncated devicemode */
+		uint3264 _devmode_ptr; /* ULONG_PTR */
 		[string,charset(UTF16)] uint16 *text_status;
-		uint32 *_secdesc_ptr;
+		uint3264 _secdesc_ptr; /* ULONG_PTR */
 		spoolss_JobStatus status;
 		[range(0,99)] uint32 priority;
 		uint32 position;
@@ -1201,12 +1201,12 @@ cpp_quote("#define spoolss_security_descriptor security_descriptor")
 		[string,charset(UTF16)] uint16 *drivername;
 		[string,charset(UTF16)] uint16 *comment;
 		[string,charset(UTF16)] uint16 *location;
-		uint32 *devmode_ptr;
+		uint3264 devmode_ptr; /* ULONG_PTR */
 		[string,charset(UTF16)] uint16 *sepfile;
 		[string,charset(UTF16)] uint16 *printprocessor;
 		[string,charset(UTF16)] uint16 *datatype;
 		[string,charset(UTF16)] uint16 *parameters;
-		uint32 *secdesc_ptr;
+		uint3264 secdesc_ptr; /* ULONG_PTR */
 		spoolss_PrinterAttributes attributes;
 		[range(0,99)] uint32 priority;
 		uint32 defaultpriority;
@@ -1218,7 +1218,7 @@ cpp_quote("#define spoolss_security_descriptor security_descriptor")
 	} spoolss_SetPrinterInfo2;
 
 	typedef struct {
-		uint32 *sec_desc_ptr;
+		uint3264 sec_desc_ptr; /* ULONG_PTR */
 	} spoolss_SetPrinterInfo3;
 
 	typedef struct {
@@ -1245,11 +1245,11 @@ cpp_quote("#define spoolss_security_descriptor security_descriptor")
 	} spoolss_SetPrinterInfo7;
 
 	typedef struct {
-		uint32 *devmode_ptr;
+		uint3264 devmode_ptr; /* ULONG_PTR */
 	} spoolss_SetPrinterInfo8;
 
 	typedef struct {
-		uint32 *devmode_ptr;
+		uint3264 devmode_ptr; /* ULONG_PTR */
 	} spoolss_SetPrinterInfo9;
 
 	typedef [ms_union,switch_type(uint32)] union {
@@ -2307,7 +2307,7 @@ cpp_quote("#define spoolss_security_descriptor security_descriptor")
 	/* Function: 0x27 */
 	WERROR spoolss_DeletePort(
 	       [in,unique] [string,charset(UTF16)] uint16 *server_name,
-	       [in] uint32 ptr,
+	       [in] uint3264 ptr, /* ULONG_PTR */
 	       [in,ref] [string,charset(UTF16)] uint16 *port_name
 	);
 
diff --git a/nsswitch/wins.c b/nsswitch/wins.c
index dccb6dd..19d3c5b 100644
--- a/nsswitch/wins.c
+++ b/nsswitch/wins.c
@@ -260,8 +260,7 @@ _nss_wins_gethostbyname_r(const char *hostname,
 
 	ip = lookup_byname_backend(name);
 	if (ip == NULL) {
-		*errnop = EINVAL;


-- 
Samba Shared Repository



More information about the samba-cvs mailing list