aboutsummaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-connectivity/samba/samba
diff options
context:
space:
mode:
Diffstat (limited to 'meta-networking/recipes-connectivity/samba/samba')
-rw-r--r--meta-networking/recipes-connectivity/samba/samba/0001-Don-t-check-xsltproc-manpages.patch (renamed from meta-networking/recipes-connectivity/samba/samba/16-do-not-check-xsltproc-manpages.patch)24
-rw-r--r--meta-networking/recipes-connectivity/samba/samba/0001-packaging-Avoid-timeout-for-nmbd-if-started-offline-.patch32
-rw-r--r--meta-networking/recipes-connectivity/samba/samba/0002-do-not-import-target-module-while-cross-compile.patch69
-rw-r--r--meta-networking/recipes-connectivity/samba/samba/0003-Add-config-option-without-valgrind.patch50
-rw-r--r--meta-networking/recipes-connectivity/samba/samba/0004-Add-options-to-configure-the-use-of-libbsd.patch96
-rw-r--r--meta-networking/recipes-connectivity/samba/samba/0005-Fix-pyext_PATTERN-for-cross-compilation.patch63
-rw-r--r--meta-networking/recipes-connectivity/samba/samba/0006-avoid-using-colon-in-the-checking-msg.patch32
-rw-r--r--meta-networking/recipes-connectivity/samba/samba/0006-smbtorture-skip-test-case-tfork_cmd_send.patch38
-rw-r--r--meta-networking/recipes-connectivity/samba/samba/0007-Deleted-settiong-of-python-to-fix-the-install-confli.patch123
-rw-r--r--meta-networking/recipes-connectivity/samba/samba/20-do-not-import-target-module-while-cross-compile.patch58
-rw-r--r--meta-networking/recipes-connectivity/samba/samba/21-add-config-option-without-valgrind.patch64
-rw-r--r--meta-networking/recipes-connectivity/samba/samba/cmocka-uintptr_t.patch51
-rw-r--r--meta-networking/recipes-connectivity/samba/samba/dnsserver-4.7.0.patch19
-rw-r--r--meta-networking/recipes-connectivity/samba/samba/glibc_only.patch15
-rw-r--r--meta-networking/recipes-connectivity/samba/samba/iconv-4.7.0.patch25
-rw-r--r--meta-networking/recipes-connectivity/samba/samba/netdb_defines.patch19
-rw-r--r--meta-networking/recipes-connectivity/samba/samba/samba-4.3.9-remove-getpwent_r.patch40
-rw-r--r--meta-networking/recipes-connectivity/samba/samba/samba-pam.patch25
-rw-r--r--meta-networking/recipes-connectivity/samba/samba/smb.conf240
-rw-r--r--meta-networking/recipes-connectivity/samba/samba/smb_conf-4.7.0.patch19
20 files changed, 787 insertions, 315 deletions
diff --git a/meta-networking/recipes-connectivity/samba/samba/16-do-not-check-xsltproc-manpages.patch b/meta-networking/recipes-connectivity/samba/samba/0001-Don-t-check-xsltproc-manpages.patch
index 8ca7a52ed8..9f597bee2d 100644
--- a/meta-networking/recipes-connectivity/samba/samba/16-do-not-check-xsltproc-manpages.patch
+++ b/meta-networking/recipes-connectivity/samba/samba/0001-Don-t-check-xsltproc-manpages.patch
@@ -1,12 +1,14 @@
-From 2214c2d1e455a38c891d17e421b438e3f7c495d8 Mon Sep 17 00:00:00 2001
+From f6fa33bfc2e1272198db6ea08910b4162b364b18 Mon Sep 17 00:00:00 2001
From: Bian Naimeng <biannm@cn.fujitsu.com>
Date: Mon, 18 Apr 2016 17:00:53 -0400
Subject: [PATCH] Don't check xsltproc manpages
Upstream-Status: Pending
-
+
Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com>
+Rebase to 4.14.4
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
---
lib/ldb/wscript | 2 +-
lib/talloc/wscript | 2 +-
@@ -14,10 +16,10 @@ Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com>
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/ldb/wscript b/lib/ldb/wscript
-index 5ea5231..d94086b 100644
+index 60bb7cf..b7b0152 100644
--- a/lib/ldb/wscript
+++ b/lib/ldb/wscript
-@@ -98,7 +98,7 @@ def configure(conf):
+@@ -144,7 +144,7 @@ def configure(conf):
conf.DEFINE('EXPECTED_SYSTEM_LDB_VERSION_RELEASE', int(v[2]))
if conf.env.standalone_ldb:
@@ -27,10 +29,10 @@ index 5ea5231..d94086b 100644
# we need this for the ldap backend
if conf.CHECK_FUNCS_IN('ber_flush ldap_open ldap_initialize', 'lber ldap', headers='lber.h ldap.h'):
diff --git a/lib/talloc/wscript b/lib/talloc/wscript
-index df7e6be..b3305cf 100644
+index 3089663..76cd65e 100644
--- a/lib/talloc/wscript
+++ b/lib/talloc/wscript
-@@ -49,7 +49,7 @@ def configure(conf):
+@@ -48,7 +48,7 @@ def configure(conf):
conf.env.PKGCONFIGDIR = '${LIBDIR}/pkgconfig'
conf.env.TALLOC_VERSION = VERSION
@@ -40,18 +42,18 @@ index df7e6be..b3305cf 100644
conf.CHECK_HEADERS('sys/auxv.h')
conf.CHECK_FUNCS('getauxval')
diff --git a/lib/tdb/wscript b/lib/tdb/wscript
-index 4782550..6bb3fa1 100644
+index 71ada31..accd474 100644
--- a/lib/tdb/wscript
+++ b/lib/tdb/wscript
-@@ -89,7 +89,7 @@ def configure(conf):
+@@ -95,7 +95,7 @@ def configure(conf):
not conf.env.disable_tdb_mutex_locking):
conf.define('USE_TDB_MUTEX_LOCKING', 1)
- conf.CHECK_XSLTPROC_MANPAGES()
+ #conf.CHECK_XSLTPROC_MANPAGES()
- if not conf.env.disable_python:
- # also disable if we don't have the python libs installed
+ conf.SAMBA_CHECK_PYTHON()
+ conf.SAMBA_CHECK_PYTHON_HEADERS()
--
-2.14.3
+2.25.1
diff --git a/meta-networking/recipes-connectivity/samba/samba/0001-packaging-Avoid-timeout-for-nmbd-if-started-offline-.patch b/meta-networking/recipes-connectivity/samba/samba/0001-packaging-Avoid-timeout-for-nmbd-if-started-offline-.patch
deleted file mode 100644
index 0e89a9be01..0000000000
--- a/meta-networking/recipes-connectivity/samba/samba/0001-packaging-Avoid-timeout-for-nmbd-if-started-offline-.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-Upstream-Status: Submitted [https://github.com/samba-team/samba/pull/70]
-
-Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
-
-From 50eac4fd30944e5e1d83060757633fe0ed572723 Mon Sep 17 00:00:00 2001
-From: Andreas Oberritter <obi@opendreambox.org>
-Date: Wed, 30 Nov 2016 16:25:06 +0100
-Subject: [PATCH] packaging: Avoid timeout for nmbd if started offline with
- systemd
-
-If no network connection appears within DefaultTimeoutStartSec
-(~ 90s) after startup, nmbd fails to notify systemd and will
-therefore get killed.
-
-Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
-
----
- packaging/systemd/nmb.service | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/packaging/systemd/nmb.service b/packaging/systemd/nmb.service
-index 71c93d6..f3d2fc2 100644
---- a/packaging/systemd/nmb.service
-+++ b/packaging/systemd/nmb.service
-@@ -10,6 +10,7 @@ EnvironmentFile=-/etc/sysconfig/samba
- ExecStart=/usr/sbin/nmbd --foreground --no-process-group $NMBDOPTIONS
- ExecReload=/usr/bin/kill -HUP $MAINPID
- LimitCORE=infinity
-+TimeoutStartSec=0
-
- [Install]
- WantedBy=multi-user.target
diff --git a/meta-networking/recipes-connectivity/samba/samba/0002-do-not-import-target-module-while-cross-compile.patch b/meta-networking/recipes-connectivity/samba/samba/0002-do-not-import-target-module-while-cross-compile.patch
new file mode 100644
index 0000000000..3b02690926
--- /dev/null
+++ b/meta-networking/recipes-connectivity/samba/samba/0002-do-not-import-target-module-while-cross-compile.patch
@@ -0,0 +1,69 @@
+From f7b8e2e149b06a8033e31f4242c392573fa9ab52 Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+Date: Tue, 25 Jun 2019 14:25:08 +0800
+Subject: [PATCH] do not import target module while cross compile
+
+Some modules such as dynamic library maybe cann't be imported
+while cross compile, we just check whether does the module exist.
+
+Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com>
+
+update to version 4.10.5, and switch to python3
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+Upstream-Status: Pending
+
+ buildtools/wafsamba/samba_bundled.py | 27 +++++++++++++++++++--------
+ 1 file changed, 19 insertions(+), 8 deletions(-)
+
+diff --git a/buildtools/wafsamba/samba_bundled.py b/buildtools/wafsamba/samba_bundled.py
+index 7d2d855..01dcb56 100644
+--- a/buildtools/wafsamba/samba_bundled.py
++++ b/buildtools/wafsamba/samba_bundled.py
+@@ -4,6 +4,7 @@ import sys
+ from waflib import Build, Options, Logs
+ from waflib.Configure import conf
+ from wafsamba import samba_utils
++import importlib.util, os
+
+ def PRIVATE_NAME(bld, name):
+ '''possibly rename a library to include a bundled extension'''
+@@ -241,17 +242,27 @@ def CHECK_BUNDLED_SYSTEM_PYTHON(conf, libname, modulename, minversion='0.0.0'):
+ # versions
+ minversion = minimum_library_version(conf, libname, minversion)
+
+- try:
+- m = __import__(modulename)
+- except ImportError:
+- found = False
+- else:
++ # Find module in PYTHONPATH
++ spec = importlib.util._find_spec_from_path(modulename, [os.environ["PYTHONPATH"]])
++ if spec:
+ try:
+- version = m.__version__
+- except AttributeError:
++ module = importlib.util.module_from_spec(spec)
++ spec.loader.load_module(module)
++ except ImportError:
+ found = False
++
++ if conf.env.CROSS_COMPILE:
++ # Some modules such as dynamic library maybe cann't be imported
++ # while cross compile, we just check whether the module exist
++ Logs.warn('Cross module[%s] has been found, but can not be loaded.' % (spec.name))
++ found = True
+ else:
+- found = tuplize_version(version) >= tuplize_version(minversion)
++ try:
++ version = module.__version__
++ except AttributeError:
++ found = False
++ else:
++ found = tuplize_version(version) >= tuplize_version(minversion)
+ if not found and not conf.LIB_MAY_BE_BUNDLED(libname):
+ Logs.error('ERROR: Python module %s of version %s not found, and bundling disabled' % (libname, minversion))
+ sys.exit(1)
+--
+2.25.1
+
diff --git a/meta-networking/recipes-connectivity/samba/samba/0003-Add-config-option-without-valgrind.patch b/meta-networking/recipes-connectivity/samba/samba/0003-Add-config-option-without-valgrind.patch
new file mode 100644
index 0000000000..f2e25eb105
--- /dev/null
+++ b/meta-networking/recipes-connectivity/samba/samba/0003-Add-config-option-without-valgrind.patch
@@ -0,0 +1,50 @@
+From 556bb3cf17ccdf0b0ee0d82801c4b20cf0990ae4 Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+Date: Thu, 20 Jun 2019 14:11:16 +0800
+Subject: [PATCH] Add config option without-valgrind
+
+Upstream-Status: Pending
+
+Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
+
+Update patch to version 4.10.5
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ lib/replace/wscript | 5 +++--
+ wscript | 4 ++++
+ 2 files changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/lib/replace/wscript b/lib/replace/wscript
+index 2f17999..9ef9bd9 100644
+--- a/lib/replace/wscript
++++ b/lib/replace/wscript
+@@ -114,8 +114,9 @@ def configure(conf):
+ conf.CHECK_HEADERS('sys/fileio.h sys/filesys.h sys/dustat.h sys/sysmacros.h')
+ conf.CHECK_HEADERS('xfs/libxfs.h netgroup.h')
+
+- conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h')
+- conf.CHECK_HEADERS('valgrind/memcheck.h valgrind/helgrind.h')
++ if not Options.options.disable_valgrind:
++ conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h')
++ conf.CHECK_HEADERS('valgrind/memcheck.h valgrind/helgrind.h')
+ conf.CHECK_HEADERS('nss_common.h nsswitch.h ns_api.h')
+ conf.CHECK_HEADERS('sys/extattr.h sys/ea.h sys/proplist.h sys/cdefs.h')
+ conf.CHECK_HEADERS('utmp.h utmpx.h lastlog.h')
+diff --git a/wscript b/wscript
+index 3af4207..54d7e9e 100644
+--- a/wscript
++++ b/wscript
+@@ -116,6 +116,10 @@ def options(opt):
+ help=("Disable RELRO builds"),
+ action="store_false", dest='enable_relro')
+
++ opt.add_option('--without-valgrind',
++ help=("Disable use of the valgrind headers"),
++ action="store_true", dest='disable_valgrind', default=False)
++
+ gr = opt.option_group('developer options')
+
+ opt.load('python') # options for disabling pyc or pyo compilation
+--
+2.25.1
+
diff --git a/meta-networking/recipes-connectivity/samba/samba/0004-Add-options-to-configure-the-use-of-libbsd.patch b/meta-networking/recipes-connectivity/samba/samba/0004-Add-options-to-configure-the-use-of-libbsd.patch
new file mode 100644
index 0000000000..2b0fbff8e7
--- /dev/null
+++ b/meta-networking/recipes-connectivity/samba/samba/0004-Add-options-to-configure-the-use-of-libbsd.patch
@@ -0,0 +1,96 @@
+From 515f2455b4b69f5fcd2c61a532663280785db737 Mon Sep 17 00:00:00 2001
+From: Peter Kjellerstedt <pkj@axis.com>
+Date: Tue, 28 Apr 2020 02:05:33 +0200
+Subject: [PATCH] Add options to configure the use of libbsd
+
+Upstream-Status: Inappropriate [oe deterministic build specific]
+Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
+
+Rebase to 4.14.4
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ buildtools/wafsamba/wscript | 7 +++++++
+ lib/replace/wscript | 29 +++++++++++++++--------------
+ lib/texpect/wscript | 8 +++++++-
+ 3 files changed, 29 insertions(+), 15 deletions(-)
+
+diff --git a/buildtools/wafsamba/wscript b/buildtools/wafsamba/wscript
+index 8729b08..1c55428 100644
+--- a/buildtools/wafsamba/wscript
++++ b/buildtools/wafsamba/wscript
+@@ -145,6 +145,13 @@ Currently the only tested value is 'smbtorture,smbd/smbd' for Samba'''),
+ help=("Disable use of gettext"),
+ action="store_true", dest='disable_gettext', default=False)
+
++ opt.add_option('--with-libbsd',
++ help=("Enable use of libbsd"),
++ action="store_true", dest='enable_libbsd')
++ opt.add_option('--without-libbsd',
++ help=("Disable use of libbsd"),
++ action="store_false", dest='enable_libbsd', default=False)
++
+ gr = opt.option_group('developer options')
+
+ gr.add_option('-C',
+diff --git a/lib/replace/wscript b/lib/replace/wscript
+index 9ef9bd9..d47de4f 100644
+--- a/lib/replace/wscript
++++ b/lib/replace/wscript
+@@ -439,20 +439,21 @@ def configure(conf):
+
+ strlcpy_in_bsd = False
+
+- # libbsd on some platforms provides strlcpy and strlcat
+- if not conf.CHECK_FUNCS('strlcpy strlcat'):
+- if conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h',
+- checklibc=True):
+- strlcpy_in_bsd = True
+- if not conf.CHECK_FUNCS('getpeereid'):
+- conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h')
+- if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'):
+- conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h')
+- if not conf.CHECK_FUNCS('setproctitle_init'):
+- conf.CHECK_FUNCS_IN('setproctitle_init', 'bsd', headers='sys/types.h bsd/unistd.h')
+-
+- if not conf.CHECK_FUNCS('closefrom'):
+- conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h')
++ if Options.options.enable_libbsd:
++ # libbsd on some platforms provides strlcpy and strlcat
++ if not conf.CHECK_FUNCS('strlcpy strlcat'):
++ if conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h',
++ checklibc=True):
++ strlcpy_in_bsd = True
++ if not conf.CHECK_FUNCS('getpeereid'):
++ conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h')
++ if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'):
++ conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h')
++ if not conf.CHECK_FUNCS('setproctitle_init'):
++ conf.CHECK_FUNCS_IN('setproctitle_init', 'bsd', headers='sys/types.h bsd/unistd.h')
++
++ if not conf.CHECK_FUNCS('closefrom'):
++ conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h')
+
+ conf.CHECK_CODE('''
+ struct ucred cred;
+diff --git a/lib/texpect/wscript b/lib/texpect/wscript
+index 44f92a8..79e8d09 100644
+--- a/lib/texpect/wscript
++++ b/lib/texpect/wscript
+@@ -1,7 +1,13 @@
+ #!/usr/bin/env python
+
++from waflib import Options
++
+ def configure(conf):
+- conf.CHECK_FUNCS_IN('openpty', 'util', checklibc=True, headers='pty.h util.h bsd/libutil.h libutil.h')
++ hdrs = 'pty.h util.h'
++ if Options.options.enable_libbsd:
++ hdrs += ' bsd/libutil.h'
++ hdrs += ' libutil.h'
++ conf.CHECK_FUNCS_IN('openpty', 'util', checklibc=True, headers=hdrs)
+
+ def build(bld):
+ bld.SAMBA_BINARY('texpect',
+--
+2.25.1
+
diff --git a/meta-networking/recipes-connectivity/samba/samba/0005-Fix-pyext_PATTERN-for-cross-compilation.patch b/meta-networking/recipes-connectivity/samba/samba/0005-Fix-pyext_PATTERN-for-cross-compilation.patch
new file mode 100644
index 0000000000..e1b5fac0d0
--- /dev/null
+++ b/meta-networking/recipes-connectivity/samba/samba/0005-Fix-pyext_PATTERN-for-cross-compilation.patch
@@ -0,0 +1,63 @@
+From a8b4a40b535a2c69eb408f649e7169bcc1975fc1 Mon Sep 17 00:00:00 2001
+From: Yi Zhao <yi.zhao@windriver.com>
+Date: Wed, 24 Nov 2021 13:33:35 +0800
+Subject: [PATCH] Fix pyext_PATTERN for cross compilation
+
+The pyext_PATTERN will add native arch as suffix when cross compiling.
+For example, on qemuarm64, it is expanded to:
+pyext_PATTERN ='%s.cpython-310-x86_64-linux-gnu.so'
+which will result in the incorrect library name.
+
+root@qemuarm64:~# find /usr/lib -name \*cpython\*
+/usr/lib/pkgconfig/samba-policy.cpython-310-x86_64-linux-gnu.pc
+/usr/lib/libsamba-policy.cpython-310-x86-64-linux-gnu.so
+/usr/lib/samba/libsamba-python.cpython-310-x86-64-linux-gnu-samba4.so
+/usr/lib/samba/libsamba-net.cpython-310-x86-64-linux-gnu-samba4.so
+/usr/lib/libsamba-policy.cpython-310-x86-64-linux-gnu.so.0
+/usr/lib/libsamba-policy.cpython-310-x86-64-linux-gnu.so.0.0.1
+/usr/lib/python3.10/site-packages/samba/dsdb_dns.cpython-310-x86_64-linux-gnu.so
+/usr/lib/python3.10/site-packages/samba/dsdb.cpython-310-x86_64-linux-gnu.so
+/usr/lib/python3.10/site-packages/samba/xattr_tdb.cpython-310-x86_64-linux-gnu.so
+/usr/lib/python3.10/site-packages/samba/_ldb.cpython-310-x86_64-linux-gnu.so
+/usr/lib/python3.10/site-packages/samba/gensec.cpython-310-x86_64-linux-gnu.so
+[snip]
+
+Set pyext_PATTERN to '%s.so' to remove the suffix.
+After the patch:
+root@qemuarm64:~# find /usr/lib/
+/usr/lib/pkgconfig/samba-policy.pc
+/usr/lib/libsamba-policy.so
+/usr/lib/samba/libsamba-python-samba4.so
+/usr/lib/samba/libsamba-net-samba4.so
+/usr/lib/libsamba-policy.so.0
+/usr/lib/libsamba-policy.so.0.0.1
+/usr/lib/python3.10/site-packages/samba/dsdb_dns.so
+/usr/lib/python3.10/site-packages/samba/dsdb.so
+/usr/lib/python3.10/site-packages/samba/xattr_tdb.so
+/usr/lib/python3.10/site-packages/samba/_ldb.so
+/usr/lib/python3.10/site-packages/samba/gensec.so
+[snip]
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ third_party/waf/waflib/Tools/python.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/third_party/waf/waflib/Tools/python.py b/third_party/waf/waflib/Tools/python.py
+index a23bd01..af202e0 100644
+--- a/third_party/waf/waflib/Tools/python.py
++++ b/third_party/waf/waflib/Tools/python.py
+@@ -328,7 +328,7 @@ def check_python_headers(conf, features='pyembed pyext'):
+ x = 'MACOSX_DEPLOYMENT_TARGET'
+ if dct[x]:
+ env[x] = conf.environ[x] = str(dct[x])
+- env.pyext_PATTERN = '%s' + (dct['EXT_SUFFIX'] or dct['SO']) # SO is deprecated in 3.5 and removed in 3.11
++ env.pyext_PATTERN = '%s.so'
+
+
+ # Try to get pythonX.Y-config
+--
+2.25.1
+
diff --git a/meta-networking/recipes-connectivity/samba/samba/0006-avoid-using-colon-in-the-checking-msg.patch b/meta-networking/recipes-connectivity/samba/samba/0006-avoid-using-colon-in-the-checking-msg.patch
deleted file mode 100644
index cdf7a38c18..0000000000
--- a/meta-networking/recipes-connectivity/samba/samba/0006-avoid-using-colon-in-the-checking-msg.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 5413f97290d3126262eb309ecbcf7769509f2a11 Mon Sep 17 00:00:00 2001
-From: Jackie Huang <jackie.huang@windriver.com>
-Date: Tue, 10 Nov 2015 00:48:35 -0500
-Subject: [PATCH 6/7] avoid using colon in the checking msg
-
-Upstream-Status: Pending
-
-colon is used as the separator when parse from
-a answers file, the colon here makes it never
-get the right answer.
-
-Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
----
- wscript_configure_system_mitkrb5 | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/wscript_configure_system_mitkrb5 b/wscript_configure_system_mitkrb5
-index a62d00b..a2d89f0 100644
---- a/wscript_configure_system_mitkrb5
-+++ b/wscript_configure_system_mitkrb5
-@@ -240,7 +240,7 @@ conf.CHECK_CODE('''
- ''',
- 'HAVE_WRFILE_KEYTAB',
- headers='krb5.h', lib='krb5', execute=True,
-- msg="Checking whether the WRFILE:-keytab is supported");
-+ msg="Checking whether the WRFILE -keytab is supported");
- # Check for KRB5_DEPRECATED handling
- conf.CHECK_CODE('''#define KRB5_DEPRECATED 1
- #include <krb5.h>''',
---
-1.9.1
-
diff --git a/meta-networking/recipes-connectivity/samba/samba/0006-smbtorture-skip-test-case-tfork_cmd_send.patch b/meta-networking/recipes-connectivity/samba/samba/0006-smbtorture-skip-test-case-tfork_cmd_send.patch
new file mode 100644
index 0000000000..cc4c15e099
--- /dev/null
+++ b/meta-networking/recipes-connectivity/samba/samba/0006-smbtorture-skip-test-case-tfork_cmd_send.patch
@@ -0,0 +1,38 @@
+From 950b5977ea7e72343067d0070cc35fb0dc5163d4 Mon Sep 17 00:00:00 2001
+From: Yi Zhao <yi.zhao@windriver.com>
+Date: Thu, 25 Aug 2022 16:46:04 +0800
+Subject: [PATCH] smbtorture: skip test case tfork_cmd_send
+
+The test case tfork_cmd_send fails on target as it requires a script
+located in the source directory:
+
+$ smbtorture ncalrpc:localhost local.tfork.tfork_cmd_send
+test: tfork_cmd_send
+/buildarea/build/tmp/work/core2-64-poky-linux/samba/4.14.14-r0/samba-4.14.14/testprogs/blackbox/tfork.sh:
+Failed to exec child - No such file or directory
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ lib/util/tests/tfork.c | 4 ----
+ 1 file changed, 4 deletions(-)
+
+diff --git a/lib/util/tests/tfork.c b/lib/util/tests/tfork.c
+index 70ae975..4826ce6 100644
+--- a/lib/util/tests/tfork.c
++++ b/lib/util/tests/tfork.c
+@@ -839,10 +839,6 @@ struct torture_suite *torture_local_tfork(TALLOC_CTX *mem_ctx)
+ "tfork_threads",
+ test_tfork_threads);
+
+- torture_suite_add_simple_test(suite,
+- "tfork_cmd_send",
+- test_tfork_cmd_send);
+-
+ torture_suite_add_simple_test(suite,
+ "tfork_event_file_handle",
+ test_tfork_event_file_handle);
+--
+2.25.1
+
diff --git a/meta-networking/recipes-connectivity/samba/samba/0007-Deleted-settiong-of-python-to-fix-the-install-confli.patch b/meta-networking/recipes-connectivity/samba/samba/0007-Deleted-settiong-of-python-to-fix-the-install-confli.patch
new file mode 100644
index 0000000000..45a7c82d80
--- /dev/null
+++ b/meta-networking/recipes-connectivity/samba/samba/0007-Deleted-settiong-of-python-to-fix-the-install-confli.patch
@@ -0,0 +1,123 @@
+From f783bb9c87ce11e824dfefca473d0dcf6edad238 Mon Sep 17 00:00:00 2001
+From: Lei Maohui <leimaohui@fujitsu.com>
+Date: Sun, 30 Oct 2022 11:59:31 +0900
+Subject: [PATCH] Deleted settiong of python to fix the install conflict error
+ when enable multilib.
+
+ file /usr/bin/samba-tool conflicts between attempted installs of samba-4.14.14-r0.core2_64 and lib32-samba-4.14.14-r0.i686
+ file /usr/sbin/samba-gpupdate conflicts between attempted installs of samba-4.14.14-r0.core2_64 and lib32-samba-4.14.14-r0.i686
+ file /usr/sbin/samba_dnsupdate conflicts between attempted installs of samba-4.14.14-r0.core2_64 and lib32-samba-4.14.14-r0.i686
+ file /usr/sbin/samba_downgrade_db conflicts between attempted installs of samba-4.14.14-r0.core2_64 and lib32-samba-4.14.14-r0.i686
+ file /usr/sbin/samba_kcc conflicts between attempted installs of samba-4.14.14-r0.core2_64 and lib32-samba-4.14.14-r0.i686
+ file /usr/sbin/samba_spnupdate conflicts between attempted installs of samba-4.14.14-r0.core2_64 and lib32-samba-4.14.14-r0.i686
+ file /usr/sbin/samba_upgradedns conflicts between attempted installs of samba-4.14.14-r0.core2_64 and lib32-samba-4.14.14-r0.i686
+
+The conflict is because there is a difference between of lib32-samba-* and samba-* as the following:
+64bit:
+sys.path.insert(0, "/usr/lib64/python3.10/site-packages")
+
+32bit:
+sys.path.insert(0, "/usr/lib/python3.10/site-packages")
+
+But this setting is for environment when running from source tree. There
+is no necessary on target.
+
+Upstream-Status: Inappropriate
+Signed-off-by: Lei Maohui <leimaohui@fujitsu.com>
+---
+ source4/scripting/bin/samba-gpupdate | 1 -
+ source4/scripting/bin/samba-tool | 1 -
+ source4/scripting/bin/samba_dnsupdate | 1 -
+ source4/scripting/bin/samba_downgrade_db | 1 -
+ source4/scripting/bin/samba_kcc | 1 -
+ source4/scripting/bin/samba_spnupdate | 1 -
+ source4/scripting/bin/samba_upgradedns | 1 -
+ 7 files changed, 7 deletions(-)
+
+diff --git a/source4/scripting/bin/samba-gpupdate b/source4/scripting/bin/samba-gpupdate
+index 4b3f057..08fec2d 100755
+--- a/source4/scripting/bin/samba-gpupdate
++++ b/source4/scripting/bin/samba-gpupdate
+@@ -25,7 +25,6 @@ applied, have changed, or is in the right container'''
+ import os
+ import sys
+
+-sys.path.insert(0, "bin/python")
+
+ import optparse
+ from samba import getopt as options
+diff --git a/source4/scripting/bin/samba-tool b/source4/scripting/bin/samba-tool
+index f8a70a6..3c818de 100755
+--- a/source4/scripting/bin/samba-tool
++++ b/source4/scripting/bin/samba-tool
+@@ -22,7 +22,6 @@
+ import sys
+
+ # Find right direction when running from source tree
+-sys.path.insert(0, "bin/python")
+
+ # make sure the script dies immediately when hitting control-C,
+ # rather than raising KeyboardInterrupt. As we do all database
+diff --git a/source4/scripting/bin/samba_dnsupdate b/source4/scripting/bin/samba_dnsupdate
+index 1ce53f5..2cdfbf8 100755
+--- a/source4/scripting/bin/samba_dnsupdate
++++ b/source4/scripting/bin/samba_dnsupdate
+@@ -36,7 +36,6 @@ os.environ['PYTHONUNBUFFERED'] = '1'
+ os.environ["TZ"] = "GMT"
+
+ # Find right directory when running from source tree
+-sys.path.insert(0, "bin/python")
+
+ import samba
+ import optparse
+diff --git a/source4/scripting/bin/samba_downgrade_db b/source4/scripting/bin/samba_downgrade_db
+index b9a0909..80f581e 100755
+--- a/source4/scripting/bin/samba_downgrade_db
++++ b/source4/scripting/bin/samba_downgrade_db
+@@ -23,7 +23,6 @@ import optparse
+ import sys
+
+ # Find right directory when running from source tree
+-sys.path.insert(0, "bin/python")
+
+
+ import samba
+diff --git a/source4/scripting/bin/samba_kcc b/source4/scripting/bin/samba_kcc
+index 67d801e..2fc0d6a 100755
+--- a/source4/scripting/bin/samba_kcc
++++ b/source4/scripting/bin/samba_kcc
+@@ -36,7 +36,6 @@ os.environ['PYTHONUNBUFFERED'] = '1'
+ os.environ["TZ"] = "GMT"
+
+ # Find right directory when running from source tree
+-sys.path.insert(0, "bin/python")
+
+ import optparse
+ import time
+diff --git a/source4/scripting/bin/samba_spnupdate b/source4/scripting/bin/samba_spnupdate
+index 84ff771..b6fe041 100755
+--- a/source4/scripting/bin/samba_spnupdate
++++ b/source4/scripting/bin/samba_spnupdate
+@@ -32,7 +32,6 @@ os.environ['PYTHONUNBUFFERED'] = '1'
+ os.environ["TZ"] = "GMT"
+
+ # Find right directory when running from source tree
+-sys.path.insert(0, "bin/python")
+
+ import samba, ldb
+ import optparse
+diff --git a/source4/scripting/bin/samba_upgradedns b/source4/scripting/bin/samba_upgradedns
+index afc5807..727a3cc 100755
+--- a/source4/scripting/bin/samba_upgradedns
++++ b/source4/scripting/bin/samba_upgradedns
+@@ -27,7 +27,6 @@ import grp
+ from base64 import b64encode
+ import shlex
+
+-sys.path.insert(0, "bin/python")
+
+ import ldb
+ import samba
+--
+2.25.1
+
diff --git a/meta-networking/recipes-connectivity/samba/samba/20-do-not-import-target-module-while-cross-compile.patch b/meta-networking/recipes-connectivity/samba/samba/20-do-not-import-target-module-while-cross-compile.patch
deleted file mode 100644
index e112b3b40b..0000000000
--- a/meta-networking/recipes-connectivity/samba/samba/20-do-not-import-target-module-while-cross-compile.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-Some modules such as dynamic library maybe cann't be imported while cross compile,
-we just check whether does the module exist.
-
-Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com>
-
-Index: samba-4.4.2/buildtools/wafsamba/samba_bundled.py
-===================================================================
---- samba-4.4.2.orig/buildtools/wafsamba/samba_bundled.py
-+++ samba-4.4.2/buildtools/wafsamba/samba_bundled.py
-@@ -2,6 +2,7 @@
-
- import sys
- import Build, Options, Logs
-+import imp, os
- from Configure import conf
- from samba_utils import TO_LIST
-
-@@ -230,17 +231,32 @@ def CHECK_BUNDLED_SYSTEM_PYTHON(conf, li
- # versions
- minversion = minimum_library_version(conf, libname, minversion)
-
-- try:
-- m = __import__(modulename)
-- except ImportError:
-- found = False
-- else:
-+ # Find module in PYTHONPATH
-+ stuff = imp.find_module(modulename, [os.environ["PYTHONPATH"]])
-+ if stuff:
- try:
-- version = m.__version__
-- except AttributeError:
-+ m = imp.load_module(modulename, stuff[0], stuff[1], stuff[2])
-+ except ImportError:
- found = False
-+
-+ if conf.env.CROSS_COMPILE:
-+ # Some modules such as dynamic library maybe cann't be imported
-+ # while cross compile, we just check whether the module exist
-+ Logs.warn('Cross module[%s] has been found, but can not be loaded.' % (stuff[1]))
-+ found = True
- else:
-- found = tuplize_version(version) >= tuplize_version(minversion)
-+ try:
-+ version = m.__version__
-+ except AttributeError:
-+ found = False
-+ else:
-+ found = tuplize_version(version) >= tuplize_version(minversion)
-+ finally:
-+ if stuff[0]:
-+ stuff[0].close()
-+ else:
-+ found = False
-+
- if not found and not conf.LIB_MAY_BE_BUNDLED(libname):
- Logs.error('ERROR: Python module %s of version %s not found, and bundling disabled' % (libname, minversion))
- sys.exit(1)
diff --git a/meta-networking/recipes-connectivity/samba/samba/21-add-config-option-without-valgrind.patch b/meta-networking/recipes-connectivity/samba/samba/21-add-config-option-without-valgrind.patch
deleted file mode 100644
index 6a7f8facc5..0000000000
--- a/meta-networking/recipes-connectivity/samba/samba/21-add-config-option-without-valgrind.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From 9a2d6315ff206b2a47100dfd85afe3af56576995 Mon Sep 17 00:00:00 2001
-From: Wenzong Fan <wenzong.fan@windriver.com>
-Date: Thu, 10 Dec 2015 04:20:51 -0500
-Subject: [PATCH] Add config option without-valgrind
-
-Upstream-Status: Pending
-
-Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
-
----
- lib/replace/wscript | 4 +++-
- source3/wscript | 5 ++++-
- wscript | 4 ++++
- 3 files changed, 11 insertions(+), 2 deletions(-)
-
-diff --git a/lib/replace/wscript b/lib/replace/wscript
-index f0040b1..aca73af 100644
---- a/lib/replace/wscript
-+++ b/lib/replace/wscript
-@@ -101,7 +101,9 @@ def configure(conf):
- conf.CHECK_HEADERS('sys/fileio.h sys/filesys.h sys/dustat.h sys/sysmacros.h')
- conf.CHECK_HEADERS('xfs/libxfs.h netgroup.h')
-
-- conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h valgrind/memcheck.h')
-+ if not Options.options.disable_valgrind:
-+ conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h valgrind/memcheck.h')
-+
- conf.CHECK_HEADERS('nss_common.h nsswitch.h ns_api.h')
- conf.CHECK_HEADERS('sys/extattr.h sys/ea.h sys/proplist.h sys/cdefs.h')
- conf.CHECK_HEADERS('utmp.h utmpx.h lastlog.h')
-diff --git a/source3/wscript b/source3/wscript
-index bac3dd5..a5c51ea 100644
---- a/source3/wscript
-+++ b/source3/wscript
-@@ -1070,7 +1070,10 @@ syscall(SYS_setgroups32, 0, NULL);
- Logs.warn("--with-dnsupdate=yes but gssapi support not sufficient")
- else:
- conf.DEFINE('WITH_DNS_UPDATES', 1)
-- conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h valgrind/memcheck.h')
-+
-+ if not Options.options.disable_valgrind:
-+ conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h valgrind/memcheck.h')
-+
- if Options.options.developer:
- if conf.CONFIG_SET('HAVE_VALGRIND_H') or conf.CONFIG_SET('HAVE_VALGRIND_VALGRIND_H'):
- conf.DEFINE('VALGRIND', '1')
-diff --git a/wscript b/wscript
-index 542a60c..22e6116 100644
---- a/wscript
-+++ b/wscript
-@@ -86,6 +86,10 @@ def set_options(opt):
- help=("Disable RELRO builds"),
- action="store_false", dest='enable_relro')
-
-+ opt.add_option('--without-valgrind',
-+ help=("Disable use of the valgrind headers"),
-+ action="store_true", dest='disable_valgrind', default=False)
-+
- gr = opt.option_group('developer options')
-
- opt.tool_options('python') # options for disabling pyc or pyo compilation
---
-1.9.1
-
diff --git a/meta-networking/recipes-connectivity/samba/samba/cmocka-uintptr_t.patch b/meta-networking/recipes-connectivity/samba/samba/cmocka-uintptr_t.patch
new file mode 100644
index 0000000000..e6e8784338
--- /dev/null
+++ b/meta-networking/recipes-connectivity/samba/samba/cmocka-uintptr_t.patch
@@ -0,0 +1,51 @@
+From 14f8ee7cd1318567b00e52217d57f0a528fd2cf7 Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+Date: Wed, 25 Jul 2018 09:55:25 +0800
+Subject: [PATCH] samba: cmocka.h: fix musl libc conflicting types error
+
+Fix build on qemumips64(el)
+
+taken from:
+[PATCH] libldb: fix musl libc conflicting types error
+
+/third_party/cmocka/cmocka.h:126:28: error: conflicting types for 'uintptr_t'
+ typedef unsigned int uintptr_t;
+ ^~~~~~~~~
+use __DEFINED_uintptr_t in alltypes.h to check if uintptr already defined
+
+Upstream-Status: Pending
+
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
+---
+ third_party/cmocka/cmocka.h | 7 +++----
+ 1 file changed, 3 insertions(+), 4 deletions(-)
+
+diff --git a/third_party/cmocka/cmocka.h b/third_party/cmocka/cmocka.h
+index e6861c8..238201d 100644
+--- a/third_party/cmocka/cmocka.h
++++ b/third_party/cmocka/cmocka.h
+@@ -111,7 +111,7 @@ typedef uintmax_t LargestIntegralType;
+ ((LargestIntegralType)(value))
+
+ /* Smallest integral type capable of holding a pointer. */
+-#if !defined(_UINTPTR_T) && !defined(_UINTPTR_T_DEFINED)
++#if !defined(__DEFINED_uintptr_t)
+ # if defined(_WIN32)
+ /* WIN32 is an ILP32 platform */
+ typedef unsigned int uintptr_t;
+@@ -135,9 +135,8 @@ typedef uintmax_t LargestIntegralType;
+ # endif /* __WORDSIZE */
+ # endif /* _WIN32 */
+
+-# define _UINTPTR_T
+-# define _UINTPTR_T_DEFINED
+-#endif /* !defined(_UINTPTR_T) || !defined(_UINTPTR_T_DEFINED) */
++# define __DEFINED_uintptr_t
++#endif /* !defined(__DEFINED_uintptr_t) */
+
+ /* Perform an unsigned cast to uintptr_t. */
+ #define cast_to_pointer_integral_type(value) \
+--
+2.25.1
+
diff --git a/meta-networking/recipes-connectivity/samba/samba/dnsserver-4.7.0.patch b/meta-networking/recipes-connectivity/samba/samba/dnsserver-4.7.0.patch
deleted file mode 100644
index 0c7592f8e2..0000000000
--- a/meta-networking/recipes-connectivity/samba/samba/dnsserver-4.7.0.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-samba: build dnsserver_common code
-
-Just 'install' does not seem to do it.
-
-Upstream-Status: Pending
-
-Signed-off-by: Joe Slater <joe.slater@windriver.com>
-
---- a/source4/dns_server/wscript_build
-+++ b/source4/dns_server/wscript_build
-@@ -4,7 +4,7 @@ bld.SAMBA_LIBRARY('dnsserver_common',
- source='dnsserver_common.c',
- deps='samba-util samba-errors ldbsamba clidns',
- private_library=True,
-- install=bld.AD_DC_BUILD_IS_ENABLED()
-+ enabled=bld.AD_DC_BUILD_IS_ENABLED()
- )
-
- bld.SAMBA_MODULE('service_dns',
diff --git a/meta-networking/recipes-connectivity/samba/samba/glibc_only.patch b/meta-networking/recipes-connectivity/samba/samba/glibc_only.patch
deleted file mode 100644
index 894bc8bb2c..0000000000
--- a/meta-networking/recipes-connectivity/samba/samba/glibc_only.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Index: samba-4.6.2/ctdb/tests/src/test_mutex_raw.c
-===================================================================
---- samba-4.6.2.orig/ctdb/tests/src/test_mutex_raw.c
-+++ samba-4.6.2/ctdb/tests/src/test_mutex_raw.c
-@@ -166,8 +166,10 @@ int main(int argc, const char **argv)
- if (ret == 0) {
- pthread_mutex_unlock(mutex);
- }
-+#ifdef __GLIBC__
- } else if (ret == EBUSY) {
- printf("pid=%u\n", mutex->__data.__owner);
-+#endif
- } else if (ret == 0) {
- pthread_mutex_unlock(mutex);
- }
diff --git a/meta-networking/recipes-connectivity/samba/samba/iconv-4.7.0.patch b/meta-networking/recipes-connectivity/samba/samba/iconv-4.7.0.patch
deleted file mode 100644
index 5ae8c59783..0000000000
--- a/meta-networking/recipes-connectivity/samba/samba/iconv-4.7.0.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-samba: defeat iconv test
-
-A test was added when configuring samba which requires target code
-to be executed. In general, this will not work, so we eliminate it.
-
-Upstream-Status: Pending
-
-Signed-off-by: Joe Slater <joe.slater@windriver.com>
-
---- a/lib/util/charset/wscript_configure
-+++ b/lib/util/charset/wscript_configure
-@@ -17,6 +17,8 @@ if (conf.CHECK_FUNCS_IN('iconv_open', 'i
-
- conf.DEFINE('HAVE_NATIVE_ICONV', 1)
-
-+"""
-+[added for 4.7.0, but breaks cross-compilation]
- conf.CHECK_CODE('''
- uint8_t inbuf[2] = { 0x30, 0xdf };
- uint8_t outbuf[4] = { 0 };
-@@ -36,3 +38,4 @@ conf.CHECK_CODE('''
- msg='Checking errno of iconv for illegal multibyte sequence',
- lib='iconv',
- headers='errno.h iconv.h')
-+"""
diff --git a/meta-networking/recipes-connectivity/samba/samba/netdb_defines.patch b/meta-networking/recipes-connectivity/samba/samba/netdb_defines.patch
deleted file mode 100644
index eb06866f46..0000000000
--- a/meta-networking/recipes-connectivity/samba/samba/netdb_defines.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Index: samba-4.6.2/nsswitch/wins.c
-===================================================================
---- samba-4.6.2.orig/nsswitch/wins.c
-+++ samba-4.6.2/nsswitch/wins.c
-@@ -39,6 +39,14 @@ static pthread_mutex_t wins_nss_mutex =
- #define INADDRSZ 4
- #endif
-
-+#ifndef NETDB_INTERNAL
-+#define NETDB_INTERNAL (-1)
-+#endif
-+
-+#ifndef NETDB_SUCCESS
-+#define NETDB_SUCCESS 0
-+#endif
-+
- NSS_STATUS _nss_wins_gethostbyname_r(const char *hostname,
- struct hostent *he,
- char *buffer,
diff --git a/meta-networking/recipes-connectivity/samba/samba/samba-4.3.9-remove-getpwent_r.patch b/meta-networking/recipes-connectivity/samba/samba/samba-4.3.9-remove-getpwent_r.patch
index 71db99c5d2..9a83574e66 100644
--- a/meta-networking/recipes-connectivity/samba/samba/samba-4.3.9-remove-getpwent_r.patch
+++ b/meta-networking/recipes-connectivity/samba/samba/samba-4.3.9-remove-getpwent_r.patch
@@ -1,15 +1,24 @@
-Musl does not have _r versions of getent() and getpwent() APIs
+From 08003ea30d86a8b983be89f6a161d3baacdaa038 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 6 Nov 2016 23:40:54 -0800
+Subject: [PATCH] Musl does not have _r versions of getent() and getpwent()
+ APIs
Taken from gentoo
http://data.gpo.zugaina.org/musl/net-fs/samba/files/samba-4.3.9-remove-getpwent_r.patch
Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
-Index: samba-4.4.5/source4/torture/local/nss_tests.c
-===================================================================
---- samba-4.4.5.orig/source4/torture/local/nss_tests.c
-+++ samba-4.4.5/source4/torture/local/nss_tests.c
-@@ -247,7 +247,6 @@ static bool test_getgrnam_r(struct tortu
+ source4/torture/local/nss_tests.c | 13 ++++++++-----
+ 1 file changed, 8 insertions(+), 5 deletions(-)
+
+diff --git a/source4/torture/local/nss_tests.c b/source4/torture/local/nss_tests.c
+index 2943122..bc185ca 100644
+--- a/source4/torture/local/nss_tests.c
++++ b/source4/torture/local/nss_tests.c
+@@ -247,7 +247,6 @@ static bool test_getgrnam_r(struct torture_context *tctx,
return true;
}
@@ -17,7 +26,7 @@ Index: samba-4.4.5/source4/torture/local/nss_tests.c
static bool test_getgrgid(struct torture_context *tctx,
gid_t gid,
struct group *grp_p)
-@@ -333,6 +332,7 @@ static bool test_enum_passwd(struct tort
+@@ -333,6 +332,7 @@ static bool test_enum_passwd(struct torture_context *tctx,
return true;
}
@@ -25,7 +34,7 @@ Index: samba-4.4.5/source4/torture/local/nss_tests.c
static bool test_enum_r_passwd(struct torture_context *tctx,
struct passwd **pwd_array_p,
size_t *num_pwd_p)
-@@ -381,6 +381,7 @@ static bool test_enum_r_passwd(struct to
+@@ -383,6 +383,7 @@ static bool test_enum_r_passwd(struct torture_context *tctx,
return true;
}
@@ -33,7 +42,7 @@ Index: samba-4.4.5/source4/torture/local/nss_tests.c
static bool torture_assert_passwd_equal(struct torture_context *tctx,
const struct passwd *p1,
-@@ -432,7 +433,7 @@ static bool test_passwd_r(struct torture
+@@ -434,7 +435,7 @@ static bool test_passwd_r(struct torture_context *tctx)
struct passwd *pwd, pwd1, pwd2;
size_t num_pwd;
@@ -42,7 +51,7 @@ Index: samba-4.4.5/source4/torture/local/nss_tests.c
"failed to enumerate passwd");
for (i=0; i < num_pwd; i++) {
-@@ -460,7 +461,7 @@ static bool test_passwd_r_cross(struct t
+@@ -462,7 +463,7 @@ static bool test_passwd_r_cross(struct torture_context *tctx)
struct passwd *pwd, pwd1, pwd2, pwd3, pwd4;
size_t num_pwd;
@@ -51,7 +60,7 @@ Index: samba-4.4.5/source4/torture/local/nss_tests.c
"failed to enumerate passwd");
for (i=0; i < num_pwd; i++) {
-@@ -531,6 +532,7 @@ static bool test_enum_group(struct tortu
+@@ -533,6 +534,7 @@ static bool test_enum_group(struct torture_context *tctx,
return true;
}
@@ -59,7 +68,7 @@ Index: samba-4.4.5/source4/torture/local/nss_tests.c
static bool test_enum_r_group(struct torture_context *tctx,
struct group **grp_array_p,
size_t *num_grp_p)
-@@ -579,6 +581,7 @@ static bool test_enum_r_group(struct tor
+@@ -583,6 +585,7 @@ static bool test_enum_r_group(struct torture_context *tctx,
return true;
}
@@ -67,7 +76,7 @@ Index: samba-4.4.5/source4/torture/local/nss_tests.c
static bool torture_assert_group_equal(struct torture_context *tctx,
const struct group *g1,
-@@ -635,7 +638,7 @@ static bool test_group_r(struct torture_
+@@ -639,7 +642,7 @@ static bool test_group_r(struct torture_context *tctx)
struct group *grp, grp1, grp2;
size_t num_grp;
@@ -76,7 +85,7 @@ Index: samba-4.4.5/source4/torture/local/nss_tests.c
"failed to enumerate group");
for (i=0; i < num_grp; i++) {
-@@ -663,7 +666,7 @@ static bool test_group_r_cross(struct to
+@@ -667,7 +670,7 @@ static bool test_group_r_cross(struct torture_context *tctx)
struct group *grp, grp1, grp2, grp3, grp4;
size_t num_grp;
@@ -85,3 +94,6 @@ Index: samba-4.4.5/source4/torture/local/nss_tests.c
"failed to enumerate group");
for (i=0; i < num_grp; i++) {
+--
+2.25.1
+
diff --git a/meta-networking/recipes-connectivity/samba/samba/samba-pam.patch b/meta-networking/recipes-connectivity/samba/samba/samba-pam.patch
index 0cbacb6c0e..9bf1f9757c 100644
--- a/meta-networking/recipes-connectivity/samba/samba/samba-pam.patch
+++ b/meta-networking/recipes-connectivity/samba/samba/samba-pam.patch
@@ -1,14 +1,22 @@
-Lifted from gentoo and ported to 4.4.5
+From 6822c61ade5617c9f109e32ad4cdc115fa9e12c8 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 6 Nov 2016 23:40:54 -0800
+Subject: [PATCH] Lifted from gentoo and ported to 4.4.5
http://data.gpo.zugaina.org/musl/net-fs/samba/files/samba-4.2.7-pam.patch
Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
-Index: samba-4.7.0/source3/wscript
-===================================================================
---- samba-4.7.0.orig/source3/wscript
-+++ samba-4.7.0/source3/wscript
-@@ -875,7 +875,7 @@ msg.msg_accrightslen = sizeof(fd);
+ source3/wscript | 13 ++++++++++++-
+ 1 file changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/source3/wscript b/source3/wscript
+index 22be17a..ee9ce52 100644
+--- a/source3/wscript
++++ b/source3/wscript
+@@ -862,7 +862,7 @@ msg.msg_accrightslen = sizeof(fd);
if conf.env.with_iconv:
conf.DEFINE('HAVE_ICONV', 1)
@@ -17,7 +25,7 @@ Index: samba-4.7.0/source3/wscript
use_pam=True
conf.CHECK_HEADERS('security/pam_appl.h pam/pam_appl.h')
if not conf.CONFIG_SET('HAVE_SECURITY_PAM_APPL_H') and not conf.CONFIG_SET('HAVE_PAM_PAM_APPL_H'):
-@@ -952,6 +952,17 @@ int i; i = PAM_RADIO_TYPE;
+@@ -939,6 +939,17 @@ int i; i = PAM_RADIO_TYPE;
"or headers not found. Use --without-pam to disable "
"PAM support.");
@@ -35,3 +43,6 @@ Index: samba-4.7.0/source3/wscript
seteuid = False
#
+--
+2.25.1
+
diff --git a/meta-networking/recipes-connectivity/samba/samba/smb.conf b/meta-networking/recipes-connectivity/samba/samba/smb.conf
new file mode 100644
index 0000000000..588491ee68
--- /dev/null
+++ b/meta-networking/recipes-connectivity/samba/samba/smb.conf
@@ -0,0 +1,240 @@
+#
+# Sample configuration file for the Samba suite for Debian GNU/Linux.
+#
+#
+# This is the main Samba configuration file. You should read the
+# smb.conf(5) manual page in order to understand the options listed
+# here. Samba has a huge number of configurable options most of which
+# are not shown in this example
+#
+# Some options that are often worth tuning have been included as
+# commented-out examples in this file.
+# - When such options are commented with ";", the proposed setting
+# differs from the default Samba behaviour
+# - When commented with "#", the proposed setting is the default
+# behaviour of Samba but the option is considered important
+# enough to be mentioned here
+#
+# NOTE: Whenever you modify this file you should run the command
+# "testparm" to check that you have not made any basic syntactic
+# errors.
+
+#======================= Global Settings =======================
+
+[global]
+
+## Browsing/Identification ###
+
+# Prevent anonymous connections. Overriden if the user sets guest ok = yes
+# on any share
+ restrict anonymous = 1
+
+# Change this to the workgroup/NT-domain name your Samba server will part of
+ workgroup = WORKGROUP
+
+#### Networking ####
+
+# The specific set of interfaces / networks to bind to
+# This can be either the interface name or an IP address/netmask;
+# interface names are normally preferred
+; interfaces = 127.0.0.0/8 eth0
+
+# Only bind to the named interfaces and/or networks; you must use the
+# 'interfaces' option above to use this.
+# It is recommended that you enable this feature if your Samba machine is
+# not protected by a firewall or is a firewall itself. However, this
+# option cannot handle dynamic or non-broadcast interfaces correctly.
+; bind interfaces only = yes
+
+
+
+#### Debugging/Accounting ####
+
+# This tells Samba to use a separate log file for each machine
+# that connects
+ log file = /var/log/samba/log.%m
+
+# Cap the size of the individual log files (in KiB).
+ max log size = 1000
+
+# We want Samba to only log to /var/log/samba/log.{smbd,nmbd}.
+# Append syslog@1 if you want important messages to be sent to syslog too.
+ logging = file
+
+# Do something sensible when Samba crashes: mail the admin a backtrace
+ panic action = /usr/share/samba/panic-action %d
+
+
+####### Authentication #######
+
+# Server role. Defines in which mode Samba will operate. Possible
+# values are "standalone server", "member server", "classic primary
+# domain controller", "classic backup domain controller", "active
+# directory domain controller".
+#
+# Most people will want "standalone server" or "member server".
+# Running as "active directory domain controller" will require first
+# running "samba-tool domain provision" to wipe databases and create a
+# new domain.
+ server role = standalone server
+
+ obey pam restrictions = yes
+
+# This boolean parameter controls whether Samba attempts to sync the Unix
+# password with the SMB password when the encrypted SMB password in the
+# passdb is changed.
+ unix password sync = yes
+
+# For Unix password sync to work on a Debian GNU/Linux system, the following
+# parameters must be set (thanks to Ian Kahan <<kahan@informatik.tu-muenchen.de> for
+# sending the correct chat script for the passwd program in Debian Sarge).
+ passwd program = /usr/bin/passwd %u
+ passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
+
+# This boolean controls whether PAM will be used for password changes
+# when requested by an SMB client instead of the program listed in
+# 'passwd program'. The default is 'no'.
+ pam password change = yes
+
+# This option controls how unsuccessful authentication attempts are mapped
+# to anonymous connections
+ map to guest = never
+
+########## Domains ###########
+
+#
+# The following settings only takes effect if 'server role = classic
+# primary domain controller', 'server role = classic backup domain controller'
+# or 'domain logons' is set
+#
+
+# It specifies the location of the user's
+# profile directory from the client point of view) The following
+# required a [profiles] share to be setup on the samba server (see
+# below)
+; logon path = \\%N\profiles\%U
+# Another common choice is storing the profile in the user's home directory
+# (this is Samba's default)
+# logon path = \\%N\%U\profile
+
+# The following setting only takes effect if 'domain logons' is set
+# It specifies the location of a user's home directory (from the client
+# point of view)
+; logon drive = H:
+# logon home = \\%N\%U
+
+# The following setting only takes effect if 'domain logons' is set
+# It specifies the script to run during logon. The script must be stored
+# in the [netlogon] share
+# NOTE: Must be store in 'DOS' file format convention
+; logon script = logon.cmd
+
+# This allows Unix users to be created on the domain controller via the SAMR
+# RPC pipe. The example command creates a user account with a disabled Unix
+# password; please adapt to your needs
+; add user script = /usr/sbin/adduser --quiet --disabled-password --gecos "" %u
+
+# This allows machine accounts to be created on the domain controller via the
+# SAMR RPC pipe.
+# The following assumes a "machines" group exists on the system
+; add machine script = /usr/sbin/useradd -g machines -c "%u machine account" -d /var/lib/samba -s /bin/false %u
+
+# This allows Unix groups to be created on the domain controller via the SAMR
+# RPC pipe.
+; add group script = /usr/sbin/addgroup --force-badname %g
+
+############ Misc ############
+
+# Using the following line enables you to customise your configuration
+# on a per machine basis. The %m gets replaced with the netbios name
+# of the machine that is connecting
+; include = /home/samba/etc/smb.conf.%m
+
+# Some defaults for winbind (make sure you're not using the ranges
+# for something else.)
+; idmap config * : backend = tdb
+; idmap config * : range = 3000-7999
+; idmap config YOURDOMAINHERE : backend = tdb
+; idmap config YOURDOMAINHERE : range = 100000-999999
+; template shell = /bin/bash
+
+# Setup usershare options to enable non-root users to share folders
+# with the net usershare command.
+
+# Maximum number of usershare. 0 means that usershare is disabled.
+# usershare max shares = 100
+
+# Allow users who've been granted usershare privileges to create
+# public shares, not just authenticated ones
+ usershare allow guests = yes
+
+#======================= Share Definitions =======================
+
+[homes]
+ comment = Home Directories
+ browseable = no
+
+# By default, the home directories are exported read-only. Change the
+# next parameter to 'no' if you want to be able to write to them.
+ read only = yes
+
+# File creation mask is set to 0700 for security reasons. If you want to
+# create files with group=rw permissions, set next parameter to 0775.
+ create mask = 0700
+
+# Directory creation mask is set to 0700 for security reasons. If you want to
+# create dirs. with group=rw permissions, set next parameter to 0775.
+ directory mask = 0700
+
+# By default, \\server\username shares can be connected to by anyone
+# with access to the samba server.
+# The following parameter makes sure that only "username" can connect
+# to \\server\username
+# This might need tweaking when using external authentication schemes
+ valid users = %S
+
+# Un-comment the following and create the netlogon directory for Domain Logons
+# (you need to configure Samba to act as a domain controller too.)
+;[netlogon]
+; comment = Network Logon Service
+; path = /home/samba/netlogon
+; guest ok = yes
+; read only = yes
+
+# Un-comment the following and create the profiles directory to store
+# users profiles (see the "logon path" option above)
+# (you need to configure Samba to act as a domain controller too.)
+# The path below should be writable by all users so that their
+# profile directory may be created the first time they log on
+;[profiles]
+; comment = Users profiles
+; path = /home/samba/profiles
+; guest ok = no
+; browseable = no
+; create mask = 0600
+; directory mask = 0700
+
+[printers]
+ comment = All Printers
+ browseable = no
+ path = /var/spool/samba
+ printable = yes
+ guest ok = no
+ read only = yes
+ create mask = 0700
+
+# Windows clients look for this share name as a source of downloadable
+# printer drivers
+[print$]
+ comment = Printer Drivers
+ path = /var/lib/samba/printers
+ browseable = yes
+ read only = yes
+ guest ok = no
+# Uncomment to allow remote administration of Windows print drivers.
+# You may need to replace 'lpadmin' with the name of the group your
+# admin users are members of.
+# Please note that you also need to set appropriate Unix permissions
+# to the drivers directory for these users to have write rights in it
+; write list = root, @lpadmin
+
diff --git a/meta-networking/recipes-connectivity/samba/samba/smb_conf-4.7.0.patch b/meta-networking/recipes-connectivity/samba/samba/smb_conf-4.7.0.patch
deleted file mode 100644
index 77c8b3626b..0000000000
--- a/meta-networking/recipes-connectivity/samba/samba/smb_conf-4.7.0.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-samba: correct log files location
-
-We use /var/log/samba.
-
-Upstream-Status: Pending
-
-Signed-off-by: Joe Slater <joe.slater@windriver.com>
-
---- a/packaging/RHEL/setup/smb.conf
-+++ b/packaging/RHEL/setup/smb.conf
-@@ -63,7 +63,7 @@
-
- # this tells Samba to use a separate log file for each machine
- # that connects
-- log file = /usr/local/samba/var/log.%m
-+ log file = /var/log/samba/log.%m
-
- # Put a capping on the size of the log files (in Kb).
- max log size = 50