samba4: update to 4.17.0

Signed-off-by: Andrew Sim <andrewsimz@gmail.com>
This commit is contained in:
Andrew Sim
2022-10-06 22:44:23 +02:00
committed by Rosen Penev
parent 8d94bb6797
commit 402f4ba4ef
26 changed files with 90 additions and 139 deletions

View File

@@ -1,29 +0,0 @@
--- a/source3/wscript
+++ b/source3/wscript
@@ -885,7 +885,7 @@ msg.msg_accrightslen = sizeof(fd);
if conf.env.with_iconv:
conf.DEFINE('HAVE_ICONV', 1)
- if Options.options.with_pam:
+ if Options.options.with_pam != False:
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'):
@@ -962,6 +962,17 @@ int i; i = PAM_RADIO_TYPE;
"or headers not found. Use --without-pam to disable "
"PAM support.");
+ else:
+ Logs.warn("PAM disabled")
+ use_pam=False
+ conf.undefine('WITH_PAM')
+ conf.undefine('WITH_PAM_MODULES')
+ conf.undefine('HAVE_SECURITY_PAM_APPL_H')
+ conf.undefine('PAM_RHOST')
+ conf.undefine('PAM_TTY')
+ conf.undefine('HAVE_PAM_PAM_APPL_H')
+
+
seteuid = False
#

View File

@@ -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',

View File

@@ -1,17 +0,0 @@
--- a/nsswitch/wins.c
+++ b/nsswitch/wins.c
@@ -40,6 +40,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,

View File

@@ -15,9 +15,9 @@ Signed-off-by: Changqing Li <changqing.li@windriver.com>
--- a/lib/tevent/tevent.h
+++ b/lib/tevent/tevent.h
@@ -32,6 +32,8 @@
#include <talloc.h>
@@ -33,6 +33,8 @@
#include <sys/time.h>
#include <sys/types.h>
#include <stdbool.h>
+#include <sys/stat.h>
+#include <sys/types.h>

View File

@@ -1,9 +1,9 @@
--- a/wscript_configure_embedded_heimdal
+++ b/wscript_configure_embedded_heimdal
@@ -2,3 +2,14 @@ if not conf.env['FLEX']:
conf.fatal("Embedded Heimdal build requires flex but it was not found. Install flex or use --with-system-mitkrb5 or --with-system-heimdalkrb5")
@@ -6,3 +6,14 @@ if not conf.env['BISON']:
conf.RECURSE('source4/heimdal_build')
conf.define('USING_EMBEDDED_HEIMDAL', 1)
conf.RECURSE('third_party/heimdal_build')
+
+def check_system_heimdal_binary(name):
+ if conf.LIB_MAY_BE_BUNDLED(name):
@@ -32,11 +32,13 @@
check_system_heimdal_lib("com_err", "com_right_r com_err", "com_err.h")
if check_system_heimdal_lib("roken", "rk_socket_set_reuseaddr", "roken.h"):
@@ -96,7 +88,4 @@ finally:
@@ -86,9 +78,6 @@ finally:
#if conf.CHECK_BUNDLED_SYSTEM('tommath', checkfunctions='mp_init', headers='tommath.h'):
# conf.define('USING_SYSTEM_TOMMATH', 1)
-check_system_heimdal_binary("compile_et")
-check_system_heimdal_binary("asn1_compile")
-
conf.env.KRB5_VENDOR = 'heimdal'
conf.define('USING_SYSTEM_KRB5', 1)
conf.define('USING_SYSTEM_HEIMDAL', 1)

View File

@@ -1,12 +1,13 @@
--- a/lib/util/util_paths.c
+++ b/lib/util/util_paths.c
@@ -26,6 +26,9 @@
#include "dynconfig/dynconfig.h"
#include "lib/util/util_paths.h"
@@ -28,6 +28,10 @@
#include "system/passwd.h"
#include "system/filesys.h"
+#if !defined(__GLIBC__)
+ #define NSS_BUFLEN_PASSWD 1024
+#endif
+
/**
* @brief Returns an absolute path to a file in the Samba modules directory.
*

View File

@@ -1,8 +1,8 @@
--- a/python/wscript
+++ b/python/wscript
@@ -73,9 +73,9 @@ def configure(conf):
for module, package in selftest_pkgs.items():
find_third_party_module(conf, module, package)
@@ -90,9 +90,9 @@ def configure(conf):
"'python3-iso8601'. Please install "
"one of the packages.")
- if not Options.options.without_ad_dc:
- for module, package in ad_dc_pkgs.items():

View File

@@ -1,6 +1,6 @@
--- a/source3/lib/messages.c
+++ b/source3/lib/messages.c
@@ -507,7 +507,7 @@ static NTSTATUS messaging_init_internal(
@@ -500,7 +500,7 @@ static NTSTATUS messaging_init_internal(
return NT_STATUS_ACCESS_DENIED;
}
@@ -9,7 +9,7 @@
if (priv_path == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -670,7 +670,7 @@ NTSTATUS messaging_reinit(struct messagi
@@ -663,7 +663,7 @@ NTSTATUS messaging_reinit(struct messagi
msg_ctx->per_process_talloc_ctx,
msg_ctx->event_ctx,
&msg_ctx->id.unique_id,

View File

@@ -1,30 +0,0 @@
From: https://gitlab.com/samba-team/samba/-/commit/29f11005f56ebc2202e7883ea4d9ca7e7a46d9bb
From 29f11005f56ebc2202e7883ea4d9ca7e7a46d9bb Mon Sep 17 00:00:00 2001
From: "Sergey V. Lobanov" <sergey@lobanov.in>
Date: Thu, 10 Feb 2022 00:02:17 +0300
Subject: [PATCH] wafsamba: replace 'echo -n' with printf
This patch makes samba_cross.py compatible with old bash (e.g. 3.2)
Signed-off-by: Sergey V. Lobanov <sergey@lobanov.in>
Reviewed-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri Feb 11 07:58:57 UTC 2022 on sn-devel-184
---
buildtools/wafsamba/samba_cross.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/buildtools/wafsamba/samba_cross.py
+++ b/buildtools/wafsamba/samba_cross.py
@@ -134,7 +134,7 @@ class cross_Popen(Utils.subprocess.Popen
cross_answers_incomplete = True
add_answer(ca_file, msg, ans)
(retcode, retstring) = ans
- args = ['/bin/sh', '-c', "echo -n '%s'; exit %d" % (retstring, retcode)]
+ args = ['/bin/sh', '-c', "printf %%s '%s'; exit %d" % (retstring, retcode)]
real_Popen.__init__(*(obj, args), **kw)

View File

@@ -1,6 +1,6 @@
--- a/lib/replace/wscript
+++ b/lib/replace/wscript
@@ -416,22 +416,13 @@ def configure(conf):
@@ -436,22 +436,13 @@ def configure(conf):
conf.CHECK_FUNCS('prctl dirname basename')
@@ -29,7 +29,7 @@
conf.CHECK_CODE('''
struct ucred cred;
@@ -817,9 +808,6 @@ syscall(SYS_copy_file_range,0,NULL,0,NUL
@@ -834,9 +825,6 @@ syscall(SYS_copy_file_range,0,NULL,0,NUL
# look for a method of finding the list of network interfaces
for method in ['HAVE_IFACE_GETIFADDRS', 'HAVE_IFACE_AIX', 'HAVE_IFACE_IFCONF', 'HAVE_IFACE_IFREQ']:
@@ -39,7 +39,7 @@
if conf.CHECK_CODE('''
#define %s 1
#define NO_CONFIG_H 1
@@ -832,7 +820,7 @@ syscall(SYS_copy_file_range,0,NULL,0,NUL
@@ -849,7 +837,7 @@ syscall(SYS_copy_file_range,0,NULL,0,NUL
#include "tests/getifaddrs.c"
''' % method,
method,
@@ -48,7 +48,7 @@
addmain=False,
execute=True):
break
@@ -880,7 +868,6 @@ def build(bld):
@@ -897,7 +885,6 @@ def build(bld):
break
extra_libs = ''

View File

@@ -1,23 +1,31 @@
--- a/lib/util/wscript_configure
+++ b/lib/util/wscript_configure
@@ -11,13 +11,13 @@ conf.CHECK_FUNCS_IN('backtrace backtrace
@@ -12,17 +12,17 @@ conf.CHECK_FUNCS_IN('backtrace backtrace
conf.CHECK_HEADERS('execinfo.h')
conf.SET_TARGET_TYPE('LIBUNWIND', 'EMPTY')
-if conf.check_cfg(package='libunwind-generic',
- args='--cflags --libs',
- msg='Checking for libunwind',
- uselib_store='LIBUNWIND',
- mandatory=False):
- if conf.CHECK_HEADERS('libunwind.h'):
- conf.SET_TARGET_TYPE('LIBUNWIND', 'SYSLIB')
+# if conf.check_cfg(package='libunwind-generic',
+ # args='--cflags --libs',
+ # msg='Checking for libunwind',
+ # uselib_store='LIBUNWIND',
+ # mandatory=False):
+ # if conf.CHECK_HEADERS('libunwind.h'):
+ # conf.SET_TARGET_TYPE('LIBUNWIND', 'SYSLIB')
conf.CHECK_STRUCTURE_MEMBER('struct statvfs', 'f_frsize', define='HAVE_FRSIZE', headers='sys/statvfs.h')
-if Options.options.with_libunwind:
- if conf.check_cfg(package='libunwind-generic',
- args='--cflags --libs',
- msg='Checking for libunwind',
- uselib_store='LIBUNWIND',
- mandatory=False):
- if conf.CHECK_HEADERS('libunwind.h'):
- conf.SET_TARGET_TYPE('LIBUNWIND', 'SYSLIB')
- else:
- raise Errors.WafError('--with-libunwind specified but libunwind not found')
-elif Options.options.with_libunwind == None:
+#if Options.options.with_libunwind:
+ #if conf.check_cfg(package='libunwind-generic',
+ #args='--cflags --libs',
+ #msg='Checking for libunwind',
+ #uselib_store='LIBUNWIND',
+ #mandatory=False):
+ #if conf.CHECK_HEADERS('libunwind.h'):
+ #conf.SET_TARGET_TYPE('LIBUNWIND', 'SYSLIB')
+ #else:
+ #raise Errors.WafError('--with-libunwind specified but libunwind not found')
+if Options.options.with_libunwind == None:
if not conf.CONFIG_SET('HAVE_BACKTRACE_SYMBOLS') \
and not Options.options.disable_fault_handling:
raise Errors.WafError(

View File

@@ -0,0 +1,20 @@
--- a/third_party/heimdal/cf/make-proto.pl
+++ b/third_party/heimdal/cf/make-proto.pl
@@ -4,7 +4,7 @@
use Getopt::Std;
use File::Compare;
-use JSON;
+use JSON::PP;
my $comment = 0;
my $doxygen = 0;
@@ -70,7 +70,7 @@ if($opt_x) {
my $EXP;
local $/;
open(EXP, '<', $opt_x) || die "open ${opt_x}";
- my $obj = JSON->new->utf8->decode(<EXP>);
+ my $obj = JSON::PP->new->utf8->decode(<EXP>);
close $EXP;
foreach my $x (keys %$obj) {