include $(TOPDIR)/rules.mk
PKG_NAME:=samba
-PKG_VERSION:=4.11.6
+PKG_VERSION:=4.12.3
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
http://www.nic.funet.fi/index/samba/pub/samba/stable/ \
http://samba.mirror.bit.nl/samba/ftp/stable/ \
https://download.samba.org/pub/samba/stable/
-PKG_HASH:=91438f4d7b71f673421435fa7f26b03b613f214139636ce50af35bc2ff09ef38
+PKG_HASH:=3fadbca4504937820d0d8a34e500a1efdcc35e0c554f05bd0a844916ae528727
PKG_MAINTAINER:=Andy Walsh <andy.walsh44+github@gmail.com>
PKG_LICENSE:=GPL-3.0-only
PKG_CPE_ID:=cpe:/a:samba:samba
# samba4=(asn1_compile,compile_et) rpcsvc-proto=(rpcgen)
-HOST_BUILD_DEPENDS:=python3/host perl/host rpcsvc-proto/host
+HOST_BUILD_DEPENDS:=python3/host rpcsvc-proto/host perl/host perl-parse-yapp/host
PKG_BUILD_DEPENDS:=samba4/host libtasn1/host
PKG_CONFIG_DEPENDS:= \
include $(INCLUDE_DIR)/version.mk
include ../../lang/python/python3-host.mk
include ../../lang/python/python3-package.mk
+include ../../lang/perl/perlver.mk
define Package/samba4/Default
SECTION:=net
--disable-cephfs \
--disable-fault-handling \
--disable-glusterfs \
+ --disable-spotlight \
--enable-fhs \
--without-automount \
--without-iconv \
--disable-cephfs \
--disable-fault-handling \
--disable-glusterfs \
+ --disable-spotlight \
--disable-rpath \
--disable-rpath-install \
--disable-rpath-private-install \
CONFIGURE_ARGS += --disable-avahi
endif
+CONFIGURE_VARS += \
+ PERL="$(STAGING_DIR_HOSTPKG)/usr/bin/perl$(PERL_VERSION3)"
+
# NOTE: We need host python-bin, but target python-config here!
CONFIGURE_VARS += python_LDFLAGS="" python_LIBDIR=""
ifeq ($(CONFIG_SAMBA4_SERVER_AD_DC),y)
endif
SAMBA4_PDB_MODULES :=pdb_smbpasswd,pdb_tdbsam,
-SAMBA4_AUTH_MODULES :=auth_builtin,auth_sam,auth_unix,auth_script,
+SAMBA4_AUTH_MODULES :=auth_builtin,auth_sam,auth_unix,
SAMBA4_VFS_MODULES :=vfs_default,
-SAMBA4_VFS_MODULES_SHARED :=
+SAMBA4_VFS_MODULES_SHARED :=auth_script,
ifeq ($(CONFIG_SAMBA4_SERVER_VFS),y)
SAMBA4_VFS_MODULES_SHARED :=$(SAMBA4_VFS_MODULES_SHARED)vfs_fruit,vfs_shadow_copy2,vfs_recycle,vfs_fake_perms,vfs_readonly,vfs_cap,vfs_offline,vfs_crossrename,vfs_catia,vfs_streams_xattr,vfs_xattr_tdb,vfs_default_quota,
ifeq ($(CONFIG_PACKAGE_kmod-fs-btrfs),y)
export COMPILE_ET=$(STAGING_DIR_HOSTPKG)/bin/compile_et_samba
export ASN1_COMPILE=$(STAGING_DIR_HOSTPKG)/bin/asn1_compile_samba
-# we dont need GnuTLS for the host helpers
+# need to find host 'yapp'
+HOST_CONFIGURE_VARS+= \
+ PATH="$(STAGING_DIR_HOSTPKG)/usr/bin:$(PATH)"
+CONFIGURE_VARS += \
+ PATH="$(PATH):$(STAGING_DIR_HOSTPKG)/usr/bin"
+
+# we dont need GnuTLS/Yapp for the host helpers
define Host/Prepare
$(call Host/Prepare/Default)
$(SED) 's,mandatory=True,mandatory=False,g' $(HOST_BUILD_DIR)/wscript_configure_system_gnutls
+ $(SED) 's,gnutls_version =.*,gnutls_version = gnutls_min_required_version,g' $(HOST_BUILD_DIR)/wscript_configure_system_gnutls
endef
define Host/Compile
(cd $(HOST_BUILD_DIR); \
# NOTE: special answers for freeBSD/CircleCI
echo 'Checking whether POSIX capabilities are available: OK' >> $(PKG_BUILD_DIR)/cross-answers.txt
echo 'checking for clnt_create(): OK' >> $(PKG_BUILD_DIR)/cross-answers.txt
+ # HACK: need to update WAF/qemu values (set to NO for now)
+ echo 'Checking value of GNUTLS_CIPHER_AES_128_CFB8: NO' >> $(PKG_BUILD_DIR)/cross-answers.txt
+ echo 'Checking value of GNUTLS_MAC_AES_CMAC_128: NO' >> $(PKG_BUILD_DIR)/cross-answers.txt
+ echo 'Checking whether fcntl supports flags to send direct I/O availability signals: NO' >> $(PKG_BUILD_DIR)/cross-answers.txt
+ echo 'Checking whether fcntl supports setting/geting hints: NO' >> $(PKG_BUILD_DIR)/cross-answers.txt
$(call Build/Configure/Default)
endef
printf "\n######### Dynamic written config options #########\n"
if [ "$DISABLE_NETBIOS" -eq 1 ] || [ ! -x /usr/sbin/nmbd ]; then
printf "\tdisable netbios = yes\n"
+ # note: samba opens port 139 even if netbios is disabled via option above, so adjust listening ports
+ printf "\tsmb ports = 445\n"
fi
if [ "$DISABLE_ASYNC_IO" -eq 1 ]; then
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;
}
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;
"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;
"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;
}
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;
}
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;
"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;
index 303d0ae..a2bfc40 100644
--- a/third_party/cmocka/cmocka.h
+++ b/third_party/cmocka/cmocka.h
-@@ -110,7 +110,7 @@
+@@ -111,7 +111,7 @@
((LargestIntegralType)(value))
/* Smallest integral type capable of holding a pointer. */
# if defined(_WIN32)
/* WIN32 is an ILP32 platform */
typedef unsigned int uintptr_t;
-@@ -136,6 +136,8 @@
+@@ -137,6 +137,8 @@
# define _UINTPTR_T
# define _UINTPTR_T_DEFINED
+++ /dev/null
-diff --git a/source4/dsdb/samdb/ldb_modules/count_attrs.c b/source4/dsdb/samdb/ldb_modules/count_attrs.c
-index b0d1b22..29f1b94 100644
---- a/source4/dsdb/samdb/ldb_modules/count_attrs.c
-+++ b/source4/dsdb/samdb/ldb_modules/count_attrs.c
-@@ -222,7 +222,7 @@ static const char **get_sorted_attrs(TALLOC_CTX *mem_ctx,
- attrs[i] = a;
- }
-
-- qsort(attrs, n_attrs, sizeof(char *), (__compar_fn_t)strcasecmp_ptr);
-+ qsort(attrs, n_attrs, sizeof(char *), (int (*)(const void *, const void *))strcasecmp_ptr);
- return attrs;
- }
-
-@@ -313,7 +313,7 @@ static int count_attrs_search_callback(struct ldb_request *req,
- }
-
- qsort(found_attrs, msg->num_elements, sizeof(char *),
-- (__compar_fn_t)strcasecmp_ptr);
-+ (int (*)(const void *, const void *))strcasecmp_ptr);
-
-
- /* find and report duplicates */
---- a/source3/lib/messages.c
-+++ b/source3/lib/messages.c
-@@ -518,7 +518,7 @@ static NTSTATUS messaging_init_internal(
+--- a/source3/lib/messages.c 2020-02-28 09:59:35.000000000 +0100
++++ b/source3/lib/messages.c 2020-05-19 13:35:11.814566657 +0200
+@@ -507,7 +507,7 @@ static NTSTATUS messaging_init_internal(
return NT_STATUS_ACCESS_DENIED;
}
if (priv_path == NULL) {
return NT_STATUS_NO_MEMORY;
}
-@@ -662,7 +662,7 @@ NTSTATUS messaging_reinit(struct messagi
-
- msg_ctx->msg_dgm_ref = messaging_dgm_ref(
- msg_ctx, msg_ctx->event_ctx, &msg_ctx->id.unique_id,
-- private_path("msg.sock"), lck_path,
-+ lock_path(talloc_tos(), "msg.sock"), lck_path,
- messaging_recv_cb, msg_ctx, &ret);
-
- if (msg_ctx->msg_dgm_ref == NULL) {
+@@ -670,7 +670,7 @@ NTSTATUS messaging_reinit(struct messagi
+ msg_ctx->per_process_talloc_ctx,
+ msg_ctx->event_ctx,
+ &msg_ctx->id.unique_id,
+- private_path("msg.sock"),
++ lock_path(talloc_tos(), "msg.sock"),
+ lck_path,
+ messaging_recv_cb,
+ msg_ctx,
+++ /dev/null
---- a/source3/modules/vfs_fruit.c 2019-07-09
-+++ b/source3/modules/vfs_fruit.c 2019-07-09
-@@ -6995,12 +6995,12 @@ static bool fruit_tmsize_do_dirent(vfs_h
- return true;
- }
-
-- if (bandsize > SIZE_MAX/nbands) {
-- DBG_ERR("tmsize overflow: bandsize [%zu] nbands [%zu]\n",
-- bandsize, nbands);
-- return false;
-- }
-- tm_size = bandsize * nbands;
-+ // if (bandsize > SIZE_MAX/nbands) {
-+ // DBG_ERR("tmsize overflow: bandsize [%zu] nbands [%zu]\n",
-+ // bandsize, nbands);
-+ // return false;
-+ // }
-+ tm_size = (off_t)bandsize * (off_t)nbands;
-
- if (state->total_size + tm_size < state->total_size) {
- DBG_ERR("tmsize overflow: bandsize [%zu] nbands [%zu]\n",