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-lib-replace-wscript-Avoid-generating-nested-main-fun.patch30
-rw-r--r--meta-networking/recipes-connectivity/samba/samba/0001-samba-fix-musl-lib-without-innetgr.patch42
-rw-r--r--meta-networking/recipes-connectivity/samba/samba/0001-waf-add-support-of-cross_compile.patch62
-rw-r--r--meta-networking/recipes-connectivity/samba/samba/0002-do-not-import-target-module-while-cross-compile.patch (renamed from meta-networking/recipes-connectivity/samba/samba/20-do-not-import-target-module-while-cross-compile.patch)14
-rw-r--r--meta-networking/recipes-connectivity/samba/samba/0002-util_sec.c-Move-__thread-variable-to-global-scope.patch58
-rw-r--r--meta-networking/recipes-connectivity/samba/samba/0003-Add-config-option-without-valgrind.patch (renamed from meta-networking/recipes-connectivity/samba/samba/21-add-config-option-without-valgrind.patch)36
-rw-r--r--meta-networking/recipes-connectivity/samba/samba/0004-Add-options-to-configure-the-use-of-libbsd.patch97
-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-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.patch124
-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.patch28
-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.patch24
-rw-r--r--meta-networking/recipes-connectivity/samba/samba/samba-pam.patch14
-rw-r--r--meta-networking/recipes-connectivity/samba/samba/smb.conf46
-rw-r--r--meta-networking/recipes-connectivity/samba/samba/smb_conf-4.7.0.patch28
20 files changed, 403 insertions, 439 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..a498348c20 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 5c5418038e392cc00d3293e00ea0cd20b5e19c9a 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 ed5d45f..de3c648 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 075f1ec..9bd9f73 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 5e6a928..f13cf2a 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-lib-replace-wscript-Avoid-generating-nested-main-fun.patch b/meta-networking/recipes-connectivity/samba/samba/0001-lib-replace-wscript-Avoid-generating-nested-main-fun.patch
deleted file mode 100644
index de7f311834..0000000000
--- a/meta-networking/recipes-connectivity/samba/samba/0001-lib-replace-wscript-Avoid-generating-nested-main-fun.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 3a935c638605bfb392ca7780d22c08c1a0a71e71 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Thu, 5 Sep 2019 21:37:33 -0700
-Subject: [PATCH 1/2] lib/replace/wscript: Avoid generating nested main
- function
-
-clang is not happy when it sees another main nested inside the main
-function and fails the test for prctl syscall, therefore avoid adding
-implicit main() here
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- lib/replace/wscript | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/lib/replace/wscript b/lib/replace/wscript
-index a7fd25d..d6767fc 100644
---- a/lib/replace/wscript
-+++ b/lib/replace/wscript
-@@ -137,6 +137,7 @@ def configure(conf):
- }
- ''',
- 'HAVE_PRCTL',
-+ addmain=False,
- headers='sys/prctl.h',
- msg='Checking for prctl syscall')
-
---
-2.23.0
-
diff --git a/meta-networking/recipes-connectivity/samba/samba/0001-samba-fix-musl-lib-without-innetgr.patch b/meta-networking/recipes-connectivity/samba/samba/0001-samba-fix-musl-lib-without-innetgr.patch
deleted file mode 100644
index fb12a10e26..0000000000
--- a/meta-networking/recipes-connectivity/samba/samba/0001-samba-fix-musl-lib-without-innetgr.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From fcb8ecd530b2d151e373974741601483326f7528 Mon Sep 17 00:00:00 2001
-From: Changqing Li <changqing.li@windriver.com>
-Date: Thu, 27 Jun 2019 11:09:47 +0800
-Subject: [PATCH] samba: fix musl lib without innetgr
-
-Upstream-Status: Pending
-
-Signed-off-by: Changqing Li <changqing.li@windriver.com>
----
- lib/util/access.c | 2 +-
- source3/auth/user_util.c | 2 +-
- 2 file changed, 2 insertion(+), 2 deletion(-)
-
-diff --git a/lib/util/access.c b/lib/util/access.c
-index 7da0573..b94949e 100644
---- a/lib/util/access.c
-+++ b/lib/util/access.c
-@@ -112,7 +112,7 @@ static bool string_match(const char *tok,const char *s)
- return true;
- }
- } else if (tok[0] == '@') { /* netgroup: look it up */
--#ifdef HAVE_NETGROUP
-+#if defined(HAVE_NETGROUP) && defined(HAVE_INNETGR)
- DATA_BLOB tmp;
- char *mydomain = NULL;
- char *hostname = NULL;
-diff --git a/source3/auth/user_util.c b/source3/auth/user_util.c
-index a76b5d4..30f523d 100644
---- a/source3/auth/user_util.c
-+++ b/source3/auth/user_util.c
-@@ -148,7 +148,7 @@ static void store_map_in_gencache(TALLOC_CTX *ctx, const char *from, const char
-
- bool user_in_netgroup(TALLOC_CTX *ctx, const char *user, const char *ngname)
- {
--#ifdef HAVE_NETGROUP
-+#if defined(HAVE_NETGROUP) && defined(HAVE_INNETGR)
- static char *my_yp_domain = NULL;
- char *lowercase_user = NULL;
-
---
-2.7.4
-
diff --git a/meta-networking/recipes-connectivity/samba/samba/0001-waf-add-support-of-cross_compile.patch b/meta-networking/recipes-connectivity/samba/samba/0001-waf-add-support-of-cross_compile.patch
deleted file mode 100644
index 23b35a8145..0000000000
--- a/meta-networking/recipes-connectivity/samba/samba/0001-waf-add-support-of-cross_compile.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From 4b8463ff43f8983a706b181c5292491f9f954be1 Mon Sep 17 00:00:00 2001
-From: Changqing Li <changqing.li@windriver.com>
-Date: Fri, 25 Jan 2019 15:00:59 +0800
-Subject: [PATCH] waf: add support of cross_compile
-
-After upgrade, waf also upgraded
-
-on 1.5.19, for cross_compile, subprocess.Popen is set to be
-samba_cross.cross_Popen, which will not execute testprog on
-host, but only read result from cross-answers.txt which is
-passed by option --cross-answer
-
-part of old code:
- args = Utils.to_list(kw.get('exec_args', []))
- proc = Utils.pproc.Popen([lastprog] + args, stdout=Utils.pproc.PIPE, stderr=Utils.pproc.PIPE)
-
-but on new version, exec_args is not used and cause do_configure
-failed with Exec format error
-
-fixed by append cross anser related args to cmd
-
-Upstream-Status: Submitted [https://gitlab.com/samba-team/samba/merge_requests/211]
-
-Signed-off-by: Changqing Li <changqing.li@windriver.com>
----
- third_party/waf/waflib/Tools/c_config.py | 11 ++++++-----
- 1 file changed, 6 insertions(+), 5 deletions(-)
-
-diff --git a/third_party/waf/waflib/Tools/c_config.py b/third_party/waf/waflib/Tools/c_config.py
-index 7608215..767cf33 100644
---- a/third_party/waf/waflib/Tools/c_config.py
-+++ b/third_party/waf/waflib/Tools/c_config.py
-@@ -660,20 +660,21 @@ class test_exec(Task.Task):
- """
- color = 'PINK'
- def run(self):
-+ args = self.generator.bld.kw.get('exec_args', [])
- if getattr(self.generator, 'rpath', None):
- if getattr(self.generator, 'define_ret', False):
-- self.generator.bld.retval = self.generator.bld.cmd_and_log([self.inputs[0].abspath()])
-- else:
-- self.generator.bld.retval = self.generator.bld.exec_command([self.inputs[0].abspath()])
-+ self.generator.bld.retval = self.generator.bld.cmd_and_log([self.inputs[0].abspath()] + args)
-+ else:
-+ self.generator.bld.retval = self.generator.bld.exec_command([self.inputs[0].abspath()] + args)
- else:
- env = self.env.env or {}
- env.update(dict(os.environ))
- for var in ('LD_LIBRARY_PATH', 'DYLD_LIBRARY_PATH', 'PATH'):
- env[var] = self.inputs[0].parent.abspath() + os.path.pathsep + env.get(var, '')
- if getattr(self.generator, 'define_ret', False):
-- self.generator.bld.retval = self.generator.bld.cmd_and_log([self.inputs[0].abspath()], env=env)
-+ self.generator.bld.retval = self.generator.bld.cmd_and_log([self.inputs[0].abspath()] + args, env=env)
- else:
-- self.generator.bld.retval = self.generator.bld.exec_command([self.inputs[0].abspath()], env=env)
-+ self.generator.bld.retval = self.generator.bld.exec_command([self.inputs[0].abspath()] + args, env=env)
-
- @feature('test_exec')
- @after_method('apply_link')
---
-2.7.4
-
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/0002-do-not-import-target-module-while-cross-compile.patch
index 3f2921ed33..b0ad5c4142 100644
--- a/meta-networking/recipes-connectivity/samba/samba/20-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
@@ -1,4 +1,4 @@
-From cc0576405803bcae45ee353c4333c449cead9207 Mon Sep 17 00:00:00 2001
+From ba492aead265edfd1da2a6c45dd7661c248309cb 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
@@ -6,16 +6,18 @@ 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.
+Upstream-Status: Pending
+
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>
---
buildtools/wafsamba/samba_bundled.py | 27 +++++++++++++++++++--------
- 1 file changed, 18 insertions(+), 8 deletions(-)
+ 1 file changed, 19 insertions(+), 8 deletions(-)
diff --git a/buildtools/wafsamba/samba_bundled.py b/buildtools/wafsamba/samba_bundled.py
-index 60ce7da..5468a36 100644
+index 2300565..26d9e8c 100644
--- a/buildtools/wafsamba/samba_bundled.py
+++ b/buildtools/wafsamba/samba_bundled.py
@@ -4,6 +4,7 @@ import sys
@@ -24,9 +26,9 @@ index 60ce7da..5468a36 100644
from wafsamba import samba_utils
+import importlib.util, os
- def PRIVATE_NAME(bld, name, private_extension, private_library):
+ def PRIVATE_NAME(bld, name):
'''possibly rename a library to include a bundled extension'''
-@@ -249,17 +250,27 @@ def CHECK_BUNDLED_SYSTEM_PYTHON(conf, libname, modulename, minversion='0.0.0'):
+@@ -245,17 +246,27 @@ def CHECK_BUNDLED_SYSTEM_PYTHON(conf, libname, modulename, minversion='0.0.0'):
# versions
minversion = minimum_library_version(conf, libname, minversion)
@@ -63,5 +65,5 @@ index 60ce7da..5468a36 100644
Logs.error('ERROR: Python module %s of version %s not found, and bundling disabled' % (libname, minversion))
sys.exit(1)
--
-2.7.4
+2.25.1
diff --git a/meta-networking/recipes-connectivity/samba/samba/0002-util_sec.c-Move-__thread-variable-to-global-scope.patch b/meta-networking/recipes-connectivity/samba/samba/0002-util_sec.c-Move-__thread-variable-to-global-scope.patch
deleted file mode 100644
index 6fc849337c..0000000000
--- a/meta-networking/recipes-connectivity/samba/samba/0002-util_sec.c-Move-__thread-variable-to-global-scope.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From c62a6f32ab965de2ec77a614f20f04568116835b Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Thu, 5 Sep 2019 21:39:05 -0700
-Subject: [PATCH 2/2] util_sec.c: Move __thread variable to global scope
-
-Make clang happy otherwise it complains about variable scope
-
-fixes
-
-source3/./lib/util_sec.c:470:4: error: '__thread' variables must have global storage
- } __thread cache;
- ^
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- source3/lib/util_sec.c | 19 +++++++++++--------
- 1 file changed, 11 insertions(+), 8 deletions(-)
-
-diff --git a/source3/lib/util_sec.c b/source3/lib/util_sec.c
-index 9408269..7390318 100644
---- a/source3/lib/util_sec.c
-+++ b/source3/lib/util_sec.c
-@@ -444,6 +444,17 @@ void become_user_permanently(uid_t uid, gid_t gid)
- assert_gid(gid, gid);
- }
-
-+#ifdef HAVE___THREAD
-+ struct cache_t {
-+ bool active;
-+ uid_t uid;
-+ gid_t gid;
-+ size_t setlen;
-+ uintptr_t gidset;
-+ };
-+
-+static __thread struct cache_t cache;
-+#endif
- /**********************************************************
- Function to set thread specific credentials. Leave
- saved-set uid/gid alone.Must be thread-safe code.
-@@ -461,14 +472,6 @@ int set_thread_credentials(uid_t uid,
- * available.
- */
- #ifdef HAVE___THREAD
-- static struct {
-- bool active;
-- uid_t uid;
-- gid_t gid;
-- size_t setlen;
-- uintptr_t gidset;
-- } __thread cache;
--
- if (cache.active &&
- cache.uid == uid &&
- cache.gid == gid &&
---
-2.23.0
-
diff --git a/meta-networking/recipes-connectivity/samba/samba/21-add-config-option-without-valgrind.patch b/meta-networking/recipes-connectivity/samba/samba/0003-Add-config-option-without-valgrind.patch
index 46a6f06267..2c9d29c9fe 100644
--- a/meta-networking/recipes-connectivity/samba/samba/21-add-config-option-without-valgrind.patch
+++ b/meta-networking/recipes-connectivity/samba/samba/0003-Add-config-option-without-valgrind.patch
@@ -1,4 +1,4 @@
-From 87bc8e7eafc7d12a1d3a143ebb9e43cf5fbafb72 Mon Sep 17 00:00:00 2001
+From cceee20e91af751469872b71155b23f0dec290a7 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
@@ -9,42 +9,48 @@ 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>
+
+Rebase to 4.19.3
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
---
lib/replace/wscript | 5 +++--
- wscript | 4 ++++
- 2 files changed, 7 insertions(+), 2 deletions(-)
+ wscript | 7 +++++++
+ 2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/lib/replace/wscript b/lib/replace/wscript
-index a7fd25d..a19ae68 100644
+index 37d7759..9dd9b48 100644
--- a/lib/replace/wscript
+++ b/lib/replace/wscript
-@@ -110,8 +110,9 @@ def configure(conf):
+@@ -113,8 +113,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/memcheck.h valgrind/helgrind.h valgrind/callgrind.h')
++ if Options.options.enable_valgrind:
+ conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h')
-+ conf.CHECK_HEADERS('valgrind/memcheck.h valgrind/helgrind.h')
++ conf.CHECK_HEADERS('valgrind/memcheck.h valgrind/helgrind.h valgrind/callgrind.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 e38a8e9..38b7230 100644
+index 95ddd9e..6d9577a 100644
--- a/wscript
+++ b/wscript
-@@ -105,6 +105,10 @@ def options(opt):
- help=("Disable RELRO builds"),
- action="store_false", dest='enable_relro')
+@@ -123,6 +123,13 @@ def options(opt):
+ help=('Disable kernely keyring support for credential storage'),
+ action='store_false', dest='enable_keyring')
++ opt.add_option('--with-valgrind',
++ help=("Enable use of valgrind"),
++ action="store_true", dest='enable_valgrind')
+ opt.add_option('--without-valgrind',
-+ help=("Disable use of the valgrind headers"),
-+ action="store_true", dest='disable_valgrind', default=False)
++ help=("Disable use of valgrind"),
++ action="store_false", dest='enable_valgrind', default=False)
+
gr = opt.option_group('developer options')
opt.load('python') # options for disabling pyc or pyo compilation
--
-2.7.4
+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..c72bd133ee
--- /dev/null
+++ b/meta-networking/recipes-connectivity/samba/samba/0004-Add-options-to-configure-the-use-of-libbsd.patch
@@ -0,0 +1,97 @@
+From d302d9a4ac6eb2bbafd248064a878ba287d636b8 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 30cb366..d167551 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 9dd9b48..a22ae59 100644
+--- a/lib/replace/wscript
++++ b/lib/replace/wscript
+@@ -444,20 +444,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..53ef21948a
--- /dev/null
+++ b/meta-networking/recipes-connectivity/samba/samba/0005-Fix-pyext_PATTERN-for-cross-compilation.patch
@@ -0,0 +1,63 @@
+From d2a2d0f82a37d0bf21123671774b0b03ffa976cf 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 b2dd1a9..2bd3545 100644
+--- a/third_party/waf/waflib/Tools/python.py
++++ b/third_party/waf/waflib/Tools/python.py
+@@ -339,7 +339,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-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..13fbd35950
--- /dev/null
+++ b/meta-networking/recipes-connectivity/samba/samba/0006-smbtorture-skip-test-case-tfork_cmd_send.patch
@@ -0,0 +1,38 @@
+From 4fd04fc7c94d6981f3409d088ab8d32c48460010 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..e3506adfb7
--- /dev/null
+++ b/meta-networking/recipes-connectivity/samba/samba/0007-Deleted-settiong-of-python-to-fix-the-install-confli.patch
@@ -0,0 +1,124 @@
+From bf5552f937c745940081e29ef32d52ae26bfd8c1 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 [embedded specific]
+
+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 b02ad4d..f69ae10 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 69821e2..4037870 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 b421886..5e18ad9 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/cmocka-uintptr_t.patch b/meta-networking/recipes-connectivity/samba/samba/cmocka-uintptr_t.patch
deleted file mode 100644
index 5c299d617b..0000000000
--- a/meta-networking/recipes-connectivity/samba/samba/cmocka-uintptr_t.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From 5bd7b5d04435bd593349825973ce32290f5f604d 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 4fd82a9..5443a08 100644
---- a/third_party/cmocka/cmocka.h
-+++ b/third_party/cmocka/cmocka.h
-@@ -110,7 +110,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;
-@@ -134,9 +134,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.7.4
-
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 d07ec0df18..0000000000
--- a/meta-networking/recipes-connectivity/samba/samba/glibc_only.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 062cf74b498c1d12fd76f9d9bca926ac806e0b99 Mon Sep 17 00:00:00 2001
-From: Changqing Li <changqing.li@windriver.com>
-Date: Thu, 20 Jun 2019 14:15:18 +0800
-Subject: [PATCH] glibc only fix
-
-Signed-off-by: Changqing Li <changqing.li@windriver.com>
----
- ctdb/tests/src/test_mutex_raw.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/ctdb/tests/src/test_mutex_raw.c b/ctdb/tests/src/test_mutex_raw.c
-index 926a525..814343f 100644
---- a/ctdb/tests/src/test_mutex_raw.c
-+++ b/ctdb/tests/src/test_mutex_raw.c
-@@ -291,8 +291,10 @@ int main(int argc, const char **argv)
- "failed\n");
- exit (EXIT_FAILURE);
- }
-+#ifdef __GLIBC__
- } else if (ret == EBUSY) {
- printf("INFO: pid=%u\n", mutex->__data.__owner);
-+#endif
- } else if (ret == 0) {
- pthread_mutex_unlock(mutex);
- }
---
-2.7.4
-
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 a75ac2bbae..0c967be62f 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,4 +1,4 @@
-From 02e0b14d8fa025a5db410d60a7c0dfebd536aaeb Mon Sep 17 00:00:00 2001
+From e5d9527e6b3b386229747f799c725fcd68bc5228 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()
@@ -7,14 +7,15 @@ Subject: [PATCH] Musl does not have _r versions of getent() and getpwent()
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
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
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 2cd6122..04f13c6 100644
+index e911aa2..2b39b74 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,
@@ -33,7 +34,7 @@ index 2cd6122..04f13c6 100644
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 torture_context *tctx,
+@@ -383,6 +383,7 @@ static bool test_enum_r_passwd(struct torture_context *tctx,
return true;
}
@@ -41,7 +42,7 @@ index 2cd6122..04f13c6 100644
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_context *tctx)
+@@ -434,7 +435,7 @@ static bool test_passwd_r(struct torture_context *tctx)
struct passwd *pwd, pwd1, pwd2;
size_t num_pwd;
@@ -50,7 +51,7 @@ index 2cd6122..04f13c6 100644
"failed to enumerate passwd");
for (i=0; i < num_pwd; i++) {
-@@ -460,7 +461,7 @@ static bool test_passwd_r_cross(struct torture_context *tctx)
+@@ -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;
@@ -59,7 +60,7 @@ index 2cd6122..04f13c6 100644
"failed to enumerate passwd");
for (i=0; i < num_pwd; i++) {
-@@ -531,6 +532,7 @@ static bool test_enum_group(struct torture_context *tctx,
+@@ -533,6 +534,7 @@ static bool test_enum_group(struct torture_context *tctx,
return true;
}
@@ -67,7 +68,7 @@ index 2cd6122..04f13c6 100644
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 torture_context *tctx,
+@@ -583,6 +585,7 @@ static bool test_enum_r_group(struct torture_context *tctx,
return true;
}
@@ -75,7 +76,7 @@ index 2cd6122..04f13c6 100644
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_context *tctx)
+@@ -639,7 +642,7 @@ static bool test_group_r(struct torture_context *tctx)
struct group *grp, grp1, grp2;
size_t num_grp;
@@ -84,7 +85,7 @@ index 2cd6122..04f13c6 100644
"failed to enumerate group");
for (i=0; i < num_grp; i++) {
-@@ -663,7 +666,7 @@ static bool test_group_r_cross(struct torture_context *tctx)
+@@ -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;
@@ -93,3 +94,6 @@ index 2cd6122..04f13c6 100644
"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 27b40f2152..4fcbb47572 100644
--- a/meta-networking/recipes-connectivity/samba/samba/samba-pam.patch
+++ b/meta-networking/recipes-connectivity/samba/samba/samba-pam.patch
@@ -1,21 +1,22 @@
-From 54a5279cb33abd23ef7c094d51f16078ece2da0c Mon Sep 17 00:00:00 2001
+From c533bdced677e2104565fc06602e7e63d9c79ac0 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
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
source3/wscript | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/source3/wscript b/source3/wscript
-index 5436db2..864f614 100644
+index b7f96f3..ed12b1e 100644
--- a/source3/wscript
+++ b/source3/wscript
-@@ -879,7 +879,7 @@ msg.msg_accrightslen = sizeof(fd);
+@@ -863,7 +863,7 @@ msg.msg_accrightslen = sizeof(fd);
if conf.env.with_iconv:
conf.DEFINE('HAVE_ICONV', 1)
@@ -24,7 +25,7 @@ index 5436db2..864f614 100644
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'):
-@@ -956,6 +956,17 @@ int i; i = PAM_RADIO_TYPE;
+@@ -940,6 +940,17 @@ int i; i = PAM_RADIO_TYPE;
"or headers not found. Use --without-pam to disable "
"PAM support.");
@@ -42,3 +43,6 @@ index 5436db2..864f614 100644
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
index a0b87c3735..588491ee68 100644
--- a/meta-networking/recipes-connectivity/samba/samba/smb.conf
+++ b/meta-networking/recipes-connectivity/samba/samba/smb.conf
@@ -25,20 +25,13 @@
## 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
-# Windows Internet Name Serving Support Section:
-# WINS Support - Tells the NMBD component of Samba to enable its WINS Server
-# wins support = no
-
-# WINS Server - Tells the NMBD components of Samba to be a WINS Client
-# Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
-; wins server = w.x.y.z
-
-# This will prevent nmbd to search for NetBIOS names through DNS.
- dns proxy = no
-
#### Networking ####
# The specific set of interfaces / networks to bind to
@@ -64,14 +57,9 @@
# Cap the size of the individual log files (in KiB).
max log size = 1000
-# If you want Samba to only log through syslog then set the following
-# parameter to 'yes'.
-# syslog only = no
-
-# We want Samba to log a minimum amount of information to syslog. Everything
-# should go to /var/log/samba/log.{smbd,nmbd} instead. If you want to log
-# through syslog you should set the following parameter to something higher.
- syslog = 0
+# 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
@@ -90,10 +78,6 @@
# new domain.
server role = standalone server
-# If you are using encrypted passwords, Samba will need to know what
-# password database type you are using.
- passdb backend = tdbsam
-
obey pam restrictions = yes
# This boolean parameter controls whether Samba attempts to sync the Unix
@@ -114,13 +98,13 @@
# This option controls how unsuccessful authentication attempts are mapped
# to anonymous connections
- map to guest = bad user
+ map to guest = never
########## Domains ###########
#
-# The following settings only takes effect if 'server role = primary
-# classic domain controller', 'server role = backup domain controller'
+# The following settings only takes effect if 'server role = classic
+# primary domain controller', 'server role = classic backup domain controller'
# or 'domain logons' is set
#
@@ -168,15 +152,17 @@
# Some defaults for winbind (make sure you're not using the ranges
# for something else.)
-; idmap uid = 10000-20000
-; idmap gid = 10000-20000
+; 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 (default) means that usershare is disabled.
-; usershare max shares = 100
+# 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
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 6ae292835b..0000000000
--- a/meta-networking/recipes-connectivity/samba/samba/smb_conf-4.7.0.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From f99b6a8617df6a46f41fb68ffafb2608dbb6681e Mon Sep 17 00:00:00 2001
-From: Joe Slater <joe.slater@windriver.com>
-Date: Wed, 8 Nov 2017 11:58:05 -0800
-Subject: [PATCH] samba: correct log files location
-
-We use /var/log/samba.
-
-Upstream-Status: Pending
-
-Signed-off-by: Joe Slater <joe.slater@windriver.com>
-
----
- examples/smb.conf.default | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/examples/smb.conf.default b/examples/smb.conf.default
-index 2f20720..44c1aa8 100644
---- a/examples/smb.conf.default
-+++ b/examples/smb.conf.default
-@@ -52,7 +52,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