[SCM] Samba Shared Repository - branch v4-10-stable updated
Karolin Seeger
kseeger at samba.org
Wed Feb 6 10:29:13 UTC 2019
The branch, v4-10-stable has been updated
via 61e654828c1 VERSION: Diable GIT_SNAPSHOT for the 4.10.0rc2 release.
via d902eec5bae WHATSNEW: Add release notes for Samba 4.10.0rc2.
via 676b549321a s3-vfs: Use ENOATTR in errno comparison for getxattr
via f8773e8a78e s3-vfs: add glusterfs_fuse vfs module.
via a2e889740b3 selftest:Samba4: use 'smbcontrol samba shutdown'
via 902de86daa6 s4:server: add support for 'smbcontrol samba shutdown'
via 45c19f4c253 s4:server: avoid using pid=0 for the parent 'samba' process
via f105c379545 s4:messaging: add support 'smbcontrol <pid> debug/debuglevel'
via 9d2e05b1a6d manpages/samba.7.xml: smbcontrol can also work with 'samba'
via 520c062db5f libcli: dns: Change internal DNS_REQUEST_TIMEOUT from 2 to 10 seconds.
via 6990f5018d9 python: dns_hub: Fix indentation of 'raise' on error.
via 56549fd07d6 join: Throw CommandError instead of Exception for simple errors
via 334f1e6f56a join: Fix TypeError when handling exception
via 9ae7ffa5f05 vfs_glusterfs: Adapt to changes in libgfapi signatures
via 94aff506747 WHATSNEW: fix typo.
via 9859cc5c1b0 WHATSNEW: Add missing parenthesis
via a4466ec4282 ctdb: Print locks latency in machinereadable stats
via 16b1971ea0a WHATSNEW: Update for Bug 13676 changes in Samba 4.10
via 26cd687f14d netcmd: Try to improve domain backup error message
via f088f070b4c tests: Run ntacls_backup tests against testenv with SMBv1 disabled
via 7399fe07fea selftest: Give the backup testenvs a 'test1' share
via 349cfec01df tests: Run GPO commands against testenv with SMBv1 disabled
via e682347bc18 ntacls: Pass correct use_ntvfs through to setntacl()
via 6158ca6e299 tests: Run samba_tool.gpo tests against backup testenvs
via 9d9b00566c1 s4:pysmb: Add error log that the s4 bindings are deprecated
via c4323c00ec5 netcmd: Change GPO commands to use s3 SMB Py bindings
via c9fdea2e361 s3:pylibsmb: Add FILE_READ_ATTRIBUTES access to .loadfile() API
via b47e42e0400 netcmd: Change SMB flags from s4 Py bindings to s3
via 3ed03bd24eb s3:pylibsmb: Add .set_acl API to SMB py bindings
via f43abe39d56 python/gpclass: Convert gpclass to use s3 SMB Python bindings
via 529b29203d4 s3:libsmb: Honor disable_netbios option in smbsock_connect_send
via 248c234e06b VERSION: Bump version up to 4.10.0rc2...
from 1c9e1bcda1c VERSION: Bump version up to 4.10.0rc1...
https://git.samba.org/?p=samba.git;a=shortlog;h=v4-10-stable
- Log -----------------------------------------------------------------
-----------------------------------------------------------------------
Summary of changes:
VERSION | 2 +-
WHATSNEW.txt | 50 +++++++++-
ctdb/tools/ctdb.c | 5 +
docs-xml/manpages/samba.7.xml | 2 +-
docs-xml/manpages/vfs_glusterfs_fuse.8.xml | 103 +++++++++++++++++++++
docs-xml/wscript_build | 1 +
libcli/dns/dns.c | 2 +-
python/samba/gpclass.py | 10 +-
python/samba/join.py | 7 +-
python/samba/netcmd/domain.py | 2 +-
python/samba/netcmd/domain_backup.py | 5 +-
python/samba/netcmd/gpo.py | 20 ++--
python/samba/ntacls.py | 3 +-
.../samba/tests/dns_forwarder_helpers/dns_hub.py | 4 +-
selftest/target/Samba4.pm | 17 ++++
source3/libsmb/pylibsmb.c | 54 ++++++++++-
source3/libsmb/smbsock_connect.c | 7 ++
source3/modules/posixacl_xattr.c | 4 +-
source3/modules/vfs_glusterfs.c | 21 ++++-
source3/modules/vfs_glusterfs_fuse.c | 71 ++++++++++++++
source3/modules/wscript_build | 8 ++
source3/wscript | 4 +
source4/lib/messaging/messaging.c | 72 ++++++++++++++
source4/libcli/pysmb.c | 12 +++
source4/selftest/tests.py | 15 +--
source4/smbd/server.c | 39 +++++++-
26 files changed, 500 insertions(+), 40 deletions(-)
create mode 100644 docs-xml/manpages/vfs_glusterfs_fuse.8.xml
create mode 100644 source3/modules/vfs_glusterfs_fuse.c
Changeset truncated at 500 lines:
diff --git a/VERSION b/VERSION
index fde61a99da4..a251f875c42 100644
--- a/VERSION
+++ b/VERSION
@@ -87,7 +87,7 @@ SAMBA_VERSION_PRE_RELEASE=
# e.g. SAMBA_VERSION_RC_RELEASE=1 #
# -> "3.0.0rc1" #
########################################################
-SAMBA_VERSION_RC_RELEASE=1
+SAMBA_VERSION_RC_RELEASE=2
########################################################
# To mark SVN snapshots this should be set to 'yes' #
diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index 267cc5402a9..8bbb1fd705f 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -1,7 +1,7 @@
Release Announcements
=====================
-This is the first release candidate of Samba 4.10. This is *not*
+This is the second release candidate of Samba 4.10. This is *not*
intended for production environments and is designed for testing
purposes only. Please report any defects via the Samba bug reporting
system at https://bugzilla.samba.org/.
@@ -94,7 +94,7 @@ e.g. '--extra-python=/usr/bin/python2'. It should be noted that support for
this option will be deprecated in a future release.
What if I need to build with python2? To build with python2 you *must* set
-the 'PYTHON' environent variable to override the python3 default for both
+the 'PYTHON' environment variable to override the python3 default for both
'configure' and 'make' steps.
'PYTHON=python2 ./configure.developer'
@@ -103,7 +103,7 @@ the 'PYTHON' environent variable to override the python3 default for both
Note: Support for python2 (with the exception of a build configured with
'PYTHON=python2 ./configure --disable-python' and built with
- 'PYTHON=python2 make' will be deprecated in the next release.
+ 'PYTHON=python2 make') will be deprecated in the next release.
JSON logging
------------
@@ -153,7 +153,13 @@ log entries has been removed to make the parsing of the JSON log messages
easier. JSON log entries now start with 2 spaces followed by an opening brace
i.e. " {"
+SMBv2 samba-tool support
+------------------------
+On previous releases, some samba-tool commands would not work against a remote
+DC that had SMBv1 disabled. SMBv2 support has now been added for samba-tool.
+The affected commands are 'samba-tool domain backup|rename' and the
+'samba-tool gpo' set of commands. Refer also bug #13676.
REMOVED FEATURES
@@ -176,6 +182,14 @@ samba_backup
The samba_backup script has been removed. This has now been replaced by the
'samba-tool domain backup offline' command.
+SMB client Python bindings
+--------------------------
+
+The SMB client python bindings are now deprecated and will be removed in future
+Samba releases. This will only affects users that may have used the Samba
+Python bindings to write their own utilities, i.e. users with a custom Python
+script that includes the line 'from samba import smb'.
+
smb.conf changes
================
@@ -194,6 +208,36 @@ smb.conf changes
smbd getinfo ask sharemode New: similar to "smbd search ask yes
sharemode" but for SMB getinfo
+
+CHANGES SINCE 4.10.0rc1
+=======================
+
+o Jeremy Allison <jra at samba.org>
+ * BUG 13750: libcli: dns: Change internal DNS_REQUEST_TIMEOUT from 2 to 10
+ seconds.
+
+o Tim Beale <timbeale at catalyst.net.nz>
+ * BUG 13676: samba-tool SMB/sysvol connections do not work if SMBv1 is
+ disabled.
+ * BUG 13747: join: Throw CommandError instead of Exception for simple errors.
+
+o Günther Deschner <gd at samba.org>
+ * BUG 13774: s3-vfs: Add glusterfs_fuse vfs module.
+
+o Volker Lendecke <vl at samba.org>
+ * BUG 13742: ctdb: Print locks latency in machinereadable stats.
+
+o Stefan Metzmacher <metze at samba.org>
+ * BUG 13752: s4:server: Add support for 'smbcontrol samba shutdown'.
+
+o Anoop C S <anoopcs at redhat.com>
+ * BUG 13330: vfs_glusterfs: Adapt to changes in libgfapi signatures.
+ * BUG 13774: s3-vfs: Use ENOATTR in errno comparison for getxattr.
+
+o Justin Stephenson <jstephen at redhat.com>
+ * BUG 13727: s3:libsmb: Honor disable_netbios option in smbsock_connect_send.
+
+
KNOWN ISSUES
============
diff --git a/ctdb/tools/ctdb.c b/ctdb/tools/ctdb.c
index eb4c684e8b0..ee64566ba04 100644
--- a/ctdb/tools/ctdb.c
+++ b/ctdb/tools/ctdb.c
@@ -1237,6 +1237,11 @@ static void print_statistics_machine(struct ctdb_statistics *s,
printf("%.6f%s", LATENCY_AVG(s->call_latency), options.sep);
printf("%.6f%s", s->call_latency.max, options.sep);
+ printf("%u%s", s->locks.latency.num, options.sep);
+ printf("%.6f%s", s->locks.latency.min, options.sep);
+ printf("%.6f%s", LATENCY_AVG(s->locks.latency), options.sep);
+ printf("%.6f%s", s->locks.latency.max, options.sep);
+
printf("%d%s", s->childwrite_latency.num, options.sep);
printf("%.6f%s", s->childwrite_latency.min, options.sep);
printf("%.6f%s", LATENCY_AVG(s->childwrite_latency), options.sep);
diff --git a/docs-xml/manpages/samba.7.xml b/docs-xml/manpages/samba.7.xml
index 5b72d659871..836ed23619f 100644
--- a/docs-xml/manpages/samba.7.xml
+++ b/docs-xml/manpages/samba.7.xml
@@ -166,7 +166,7 @@
<manvolnum>1</manvolnum></citerefentry></term>
<listitem><para><command>smbcontrol</command> is a utility
that can change the behaviour of running
- <command>smbd</command>, <command>nmbd</command> and
+ <command>samba</command>, <command>smbd</command>, <command>nmbd</command> and
<command>winbindd</command> daemons.
</para></listitem>
</varlistentry>
diff --git a/docs-xml/manpages/vfs_glusterfs_fuse.8.xml b/docs-xml/manpages/vfs_glusterfs_fuse.8.xml
new file mode 100644
index 00000000000..b9f7f42c6f2
--- /dev/null
+++ b/docs-xml/manpages/vfs_glusterfs_fuse.8.xml
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE refentry PUBLIC "-//Samba-Team//DTD DocBook V4.2-Based Variant V1.0//EN" "http://www.samba.org/samba/DTD/samba-doc">
+<refentry id="vfs_glusterfs_fuse.8">
+
+<refmeta>
+ <refentrytitle>vfs_glusterfs_fuse</refentrytitle>
+ <manvolnum>8</manvolnum>
+ <refmiscinfo class="source">Samba</refmiscinfo>
+ <refmiscinfo class="manual">System Administration tools</refmiscinfo>
+ <refmiscinfo class="version">&doc.version;</refmiscinfo>
+</refmeta>
+
+
+<refnamediv>
+ <refname>vfs_glusterfs_fuse</refname>
+ <refpurpose>
+ Utilize features provided by GlusterFS
+ </refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+ <cmdsynopsis>
+ <command>vfs objects = glusterfs_fuse</command>
+ </cmdsynopsis>
+</refsynopsisdiv>
+
+<refsect1>
+ <title>DESCRIPTION</title>
+
+ <para>This VFS module is part of the
+ <citerefentry><refentrytitle>samba</refentrytitle>
+ <manvolnum>8</manvolnum></citerefentry> suite.</para>
+
+ <para>
+ GlusterFS
+ (<ulink url="http://www.gluster.org/">http://www.gluster.org</ulink>)
+ is an Open Source clustered file system capable of scaling to
+ several peta-bytes. With its FUSE based native client,
+ GlusterFS is available as a POSIX compliant file system and can
+ hence be shared by Samba without additional steps.
+ </para>
+
+ <para>
+ The <command>vfs_glusterfs_fuse</command> VFS module provides an enhanced way
+ to access a Gluster filesystem using a Gluster FUSE mount. It provides support
+ for the <command>get_real_filename</command> VFS call which enhances file access performance
+ by avoiding multiple expensive case folding lookup calls to detect the appropriate
+ case of an exisiting filename.
+ </para>
+
+ <para>
+ This module can be combined with other modules, but it
+ should be the last module in the <command>vfs objects</command>
+ list. Modules added to this list to the right of the glusterfs
+ entry may not have any effect at all.
+ </para>
+</refsect1>
+
+<refsect1>
+ <title>CONFIGURATION</title>
+
+ <para>
+ A basic configuration looks like this.
+ </para>
+
+ <programlisting>
+ <smbconfsection name="[share]"/>
+ <smbconfoption name="vfs objects">glusterfs_fuse</smbconfoption>
+ <smbconfoption name="path">/absolute/path_of_fusemount</smbconfoption>
+ </programlisting>
+
+ <para>
+ Note that <command>vfs_glusterfs_fuse</command> requires a Gluster mount. For accessing glusterfs directly
+ over the GFAPI library please use the <command>vfs_glusterfs</command> module.
+ </para>
+</refsect1>
+
+<refsect1>
+ <title>OPTIONS</title>
+ <para>
+ This module does currently have no further options.
+ </para>
+</refsect1>
+
+<refsect1>
+ <title>VERSION</title>
+
+ <para>
+ This man page is part of version &doc.version; of the Samba suite.
+ </para>
+</refsect1>
+
+<refsect1>
+ <title>AUTHOR</title>
+
+ <para>The original Samba software and related utilities
+ were created by Andrew Tridgell. Samba is now developed
+ by the Samba Team as an Open Source project similar
+ to the way the Linux kernel is developed.</para>
+
+</refsect1>
+
+</refentry>
diff --git a/docs-xml/wscript_build b/docs-xml/wscript_build
index 1b4335cbb5d..86600ae4a82 100644
--- a/docs-xml/wscript_build
+++ b/docs-xml/wscript_build
@@ -82,6 +82,7 @@ vfs_module_manpages = ['vfs_acl_tdb',
'vfs_fruit',
'vfs_full_audit',
'vfs_glusterfs',
+ 'vfs_glusterfs_fuse',
'vfs_gpfs',
'vfs_linux_xfs_sgid',
'vfs_media_harmony',
diff --git a/libcli/dns/dns.c b/libcli/dns/dns.c
index 1321b1d2d38..718bf56b3bd 100644
--- a/libcli/dns/dns.c
+++ b/libcli/dns/dns.c
@@ -39,7 +39,7 @@ struct dns_udp_request_state {
size_t reply_len;
};
-#define DNS_REQUEST_TIMEOUT 2
+#define DNS_REQUEST_TIMEOUT 10
/* Declare callback functions used below. */
static void dns_udp_request_get_reply(struct tevent_req *subreq);
diff --git a/python/samba/gpclass.py b/python/samba/gpclass.py
index fb7c705a47e..0040f235e6e 100644
--- a/python/samba/gpclass.py
+++ b/python/samba/gpclass.py
@@ -29,7 +29,8 @@ import xml.etree.ElementTree as etree
import re
from samba.net import Net
from samba.dcerpc import nbt
-from samba import smb
+from samba.samba3 import libsmb_samba_internal as libsmb
+from samba.samba3 import param as s3param
import samba.gpo as gpo
from samba.param import LoadParm
from uuid import UUID
@@ -386,7 +387,7 @@ def cache_gpo_dir(conn, cache, sub_dir):
if e.errno != errno.EEXIST:
raise
for fdata in conn.list(sub_dir):
- if fdata['attrib'] & smb.FILE_ATTRIBUTE_DIRECTORY:
+ if fdata['attrib'] & libsmb.FILE_ATTRIBUTE_DIRECTORY:
cache_gpo_dir(conn, cache, os.path.join(sub_dir, fdata['name']))
else:
local_name = fdata['name'].upper()
@@ -407,7 +408,10 @@ def check_safe_path(path):
def check_refresh_gpo_list(dc_hostname, lp, creds, gpos):
- conn = smb.SMB(dc_hostname, 'sysvol', lp=lp, creds=creds, sign=True)
+ # the SMB bindings rely on having a s3 loadparm
+ s3_lp = s3param.get_context()
+ s3_lp.load(lp.configfile)
+ conn = libsmb.Conn(dc_hostname, 'sysvol', lp=s3_lp, creds=creds, sign=True)
cache_path = lp.cache_path('gpo_cache')
for gpo in gpos:
if not gpo.file_sys_path:
diff --git a/python/samba/join.py b/python/samba/join.py
index cf5d1b92b66..da8dcb050d3 100644
--- a/python/samba/join.py
+++ b/python/samba/join.py
@@ -50,6 +50,7 @@ import os
import tempfile
from samba.compat import text_type
from samba.compat import get_string
+from samba.netcmd import CommandError
class DCJoinException(Exception):
@@ -345,10 +346,10 @@ class DCJoinContext(object):
try:
ctx.cldap_ret = ctx.net.finddc(domain=domain, flags=nbt.NBT_SERVER_LDAP | nbt.NBT_SERVER_DS | nbt.NBT_SERVER_WRITABLE)
except NTSTATUSError as error:
- raise Exception("Failed to find a writeable DC for domain '%s': %s" %
- (domain, error[1]))
+ raise CommandError("Failed to find a writeable DC for domain '%s': %s" %
+ (domain, error.args[1]))
except Exception:
- raise Exception("Failed to find a writeable DC for domain '%s'" % domain)
+ raise CommandError("Failed to find a writeable DC for domain '%s'" % domain)
if ctx.cldap_ret.client_site is not None and ctx.cldap_ret.client_site != "":
ctx.site = ctx.cldap_ret.client_site
return ctx.cldap_ret.pdc_dns_name
diff --git a/python/samba/netcmd/domain.py b/python/samba/netcmd/domain.py
index 9c5ae21fdd7..b7aedc16a91 100644
--- a/python/samba/netcmd/domain.py
+++ b/python/samba/netcmd/domain.py
@@ -1802,7 +1802,7 @@ class DomainTrustCommand(Command):
remote_info = remote_net.finddc(flags=remote_flags, domain=domain, address=remote_server)
except NTSTATUSError as error:
raise CommandError("Failed to find a writeable DC for domain '%s': %s" %
- (domain, error[1]))
+ (domain, error.args[1]))
except Exception:
raise CommandError("Failed to find a writeable DC for domain '%s'" % domain)
flag_map = {
diff --git a/python/samba/netcmd/domain_backup.py b/python/samba/netcmd/domain_backup.py
index 4cacf571f3d..4e32b4b9b1c 100644
--- a/python/samba/netcmd/domain_backup.py
+++ b/python/samba/netcmd/domain_backup.py
@@ -1009,8 +1009,9 @@ class cmd_domain_backup_offline(samba.netcmd.Command):
paths = samba.provision.provision_paths_from_lp(lp, lp.get('realm'))
if not (paths.samdb and os.path.exists(paths.samdb)):
- raise CommandError('No sam.db found. This backup ' +
- 'tool is only for AD DCs')
+ logger.error("No database found at {0}".format(paths.samdb))
+ raise CommandError('Please check you are root, and ' +
+ 'are running this command on an AD DC')
check_targetdir(logger, targetdir)
diff --git a/python/samba/netcmd/gpo.py b/python/samba/netcmd/gpo.py
index a064f44147a..1b5e927f633 100644
--- a/python/samba/netcmd/gpo.py
+++ b/python/samba/netcmd/gpo.py
@@ -43,7 +43,8 @@ import samba.auth
from samba.auth import AUTH_SESSION_INFO_DEFAULT_GROUPS, AUTH_SESSION_INFO_AUTHENTICATED, AUTH_SESSION_INFO_SIMPLE_PRIVILEGES
from samba.netcmd.common import netcmd_finddc
from samba import policy
-from samba import smb
+from samba.samba3 import param as s3param
+from samba.samba3 import libsmb_samba_internal as libsmb
from samba import NTSTATUSError
import uuid
from samba.ntacls import dsacl2fsacl
@@ -280,7 +281,7 @@ def backup_directory_remote_to_local(conn, remotedir, localdir):
r_name = r_dir + '\\' + e['name']
l_name = os.path.join(l_dir, e['name'])
- if e['attrib'] & smb.FILE_ATTRIBUTE_DIRECTORY:
+ if e['attrib'] & libsmb.FILE_ATTRIBUTE_DIRECTORY:
r_dirs.append(r_name)
l_dirs.append(l_name)
os.mkdir(l_name)
@@ -294,10 +295,10 @@ def backup_directory_remote_to_local(conn, remotedir, localdir):
parser.write_xml(l_name + '.xml')
-attr_flags = smb.FILE_ATTRIBUTE_SYSTEM | \
- smb.FILE_ATTRIBUTE_DIRECTORY | \
- smb.FILE_ATTRIBUTE_ARCHIVE | \
- smb.FILE_ATTRIBUTE_HIDDEN
+attr_flags = libsmb.FILE_ATTRIBUTE_SYSTEM | \
+ libsmb.FILE_ATTRIBUTE_DIRECTORY | \
+ libsmb.FILE_ATTRIBUTE_ARCHIVE | \
+ libsmb.FILE_ATTRIBUTE_HIDDEN
def copy_directory_remote_to_local(conn, remotedir, localdir):
@@ -315,7 +316,7 @@ def copy_directory_remote_to_local(conn, remotedir, localdir):
r_name = r_dir + '\\' + e['name']
l_name = os.path.join(l_dir, e['name'])
- if e['attrib'] & smb.FILE_ATTRIBUTE_DIRECTORY:
+ if e['attrib'] & libsmb.FILE_ATTRIBUTE_DIRECTORY:
r_dirs.append(r_name)
l_dirs.append(l_name)
os.mkdir(l_name)
@@ -364,7 +365,10 @@ def create_directory_hier(conn, remotedir):
def smb_connection(dc_hostname, service, lp, creds, sign=False):
# SMB connect to DC
try:
- conn = smb.SMB(dc_hostname, service, lp=lp, creds=creds, sign=sign)
+ # the SMB bindings rely on having a s3 loadparm
+ s3_lp = s3param.get_context()
+ s3_lp.load(lp.configfile)
+ conn = libsmb.Conn(dc_hostname, service, lp=s3_lp, creds=creds, sign=sign)
except Exception:
raise CommandError("Error connecting to '%s' using SMB" % dc_hostname)
return conn
diff --git a/python/samba/ntacls.py b/python/samba/ntacls.py
index 99245737529..5bf646caf9f 100644
--- a/python/samba/ntacls.py
+++ b/python/samba/ntacls.py
@@ -454,7 +454,8 @@ class NtaclsHelper:
def setntacl(self, path, ntacl_sd):
# ntacl_sd can be obj or str
- return setntacl(self.lp, path, ntacl_sd, self.dom_sid)
+ return setntacl(self.lp, path, ntacl_sd, self.dom_sid,
+ use_ntvfs=self.use_ntvfs)
def _create_ntacl_file(dst, ntacl_sddl_str):
diff --git a/python/samba/tests/dns_forwarder_helpers/dns_hub.py b/python/samba/tests/dns_forwarder_helpers/dns_hub.py
index 81aa478f4ba..cf9beb7fa7a 100755
--- a/python/samba/tests/dns_forwarder_helpers/dns_hub.py
+++ b/python/samba/tests/dns_forwarder_helpers/dns_hub.py
@@ -123,9 +123,7 @@ class DnsHandler(sserver.BaseRequestHandler):
except socket.error as err:
print("Error sending %s to address %s for name %s: %s\n" %
(forwarder, self.client_address, name, err.errno))
- raise
-
- socket.sendto(send_packet, self.client_address)
+ raise
class server_thread(threading.Thread):
def __init__(self, server):
diff --git a/selftest/target/Samba4.pm b/selftest/target/Samba4.pm
index 5346cb172df..b662776a847 100755
--- a/selftest/target/Samba4.pm
+++ b/selftest/target/Samba4.pm
@@ -2221,6 +2221,15 @@ sub teardown_env_terminate($$)
my ($self, $envvars) = @_;
my $pid;
+ # This should cause samba to terminate gracefully
+ my $smbcontrol = Samba::bindir_path($self, "smbcontrol");
+ my $cmd = "";
+ $cmd .= "$smbcontrol samba shutdown $envvars->{CONFIGURATION}";
+ my $ret = system($cmd);
+ if ($ret != 0) {
+ warn "'$cmd' failed with '$ret'\n";
+ }
+
# This should cause samba to terminate gracefully
close($envvars->{STDIN_PIPE});
@@ -3007,12 +3016,14 @@ sub prepare_dc_testenv
# add support for sysvol/netlogon/tmp shares
$ctx->{share} = "$ctx->{prefix_abs}/share";
push(@{$ctx->{directories}}, "$ctx->{share}");
+ push(@{$ctx->{directories}}, "$ctx->{share}/test1");
$ctx->{smb_conf_extra_options} = "
$conf_options
max xmit = 32K
server max protocol = SMB2
samba kcc command = /bin/true
+ xattr_tdb:file = $ctx->{statedir}/xattr.tdb
[sysvol]
path = $ctx->{statedir}/sysvol
@@ -3029,6 +3040,12 @@ sub prepare_dc_testenv
posix:oplocktimeout = 3
posix:writetimeupdatedelay = 50000
+[test1]
+ path = $ctx->{share}/test1
+ read only = no
+ posix:sharedelay = 100000
+ posix:oplocktimeout = 3
+ posix:writetimeupdatedelay = 500000
";
my $env = $self->provision_raw_step1($ctx);
diff --git a/source3/libsmb/pylibsmb.c b/source3/libsmb/pylibsmb.c
--
Samba Shared Repository
More information about the samba-cvs
mailing list