* update samba to 2:4.21.2-2

This commit is contained in:
Alexander Baldeck 2024-12-07 08:58:33 +01:00
parent a0b34f6dd1
commit d112f2aff5
4 changed files with 158 additions and 17 deletions

View File

@ -1,13 +1,9 @@
pkgbase = samba
pkgver = 4.21.1
pkgrel = 1
pkgver = 4.21.2
pkgrel = 2
epoch = 2
url = https://www.samba.org
arch = x86_64
arch = powerpc64le
arch = powerpc64
arch = powerpc
arch = riscv64
license = GPL-3.0-or-later
makedepends = acl
makedepends = dateutils
@ -41,13 +37,13 @@ pkgbase = samba
optdepends = python-dnspython: samba_dnsupdate and samba_upgradedns in AD setup
optdepends = python-markdown: for samba-tool domain schemeupgrade
optdepends = glusterfs: for vfs_glusterfs support
source = https://us1.samba.org/samba/ftp/stable/samba-4.21.1.tar.gz
source = https://us1.samba.org/samba/ftp/stable/samba-4.21.1.tar.asc
source = https://us1.samba.org/samba/ftp/stable/samba-4.21.2.tar.gz
source = https://us1.samba.org/samba/ftp/stable/samba-4.21.2.tar.asc
source = samba.logrotate
source = samba.pam
source = samba.conf
validpgpkeys = 81F5E2832BD2545A1897B713AA99442FB680B620
b2sums = e99c6d45758d50195a634d2a2ebdbe324ca3f205d8013fb8fb2160c2581d7551bbff946f3413b2782648470e922d84d8a2f9c3d33e32c46db6391b749ba30000
b2sums = f9c297f4ed0c00b7887e637beb6ab7f4e17882e0ed5a3d1f1faf1ae1c2d6b064ada53cf65a86f11237813197c043961735e8aad641630baa48ec259482bdab2a
b2sums = SKIP
b2sums = 72ecb413ca3499af984a0bb391f96e678a24a19d8e5c96050ba227878f0770f03466ac7a0ee328416e08204e92e9d16ec22d63ef25b53c20d957a17221cd3a98
b2sums = 3eab84d332d96678fe6e435ee243c8f1a82b838f601d61d3604d11e918aed7a62202edca5e476c4b9031ed284570e6fcd6c659cfdbd9624aa0019d3233755f81
@ -109,7 +105,7 @@ pkgname = samba
depends = libwbclient
depends = popt
depends = python
depends = smbclient>=4.21.1
depends = smbclient>=4.21.2
depends = talloc
depends = tdb
optdepends = python-dnspython: netads_dns.py, dnsresolver.py and traffic_packets.py

View File

@ -10,8 +10,8 @@
pkgbase=samba
pkgname=('libwbclient' 'ldb' 'smbclient' 'samba')
pkgver=4.21.1
pkgrel=1
pkgver=4.21.2
pkgrel=2
arch=(x86_64 powerpc64le powerpc64 powerpc riscv64)
url="https://www.samba.org"
license=('GPL-3.0-or-later')
@ -65,7 +65,7 @@ source=(
samba.conf
)
validpgpkeys=('81F5E2832BD2545A1897B713AA99442FB680B620') #Samba Distribution Verification Key <samba-bugs@samba.org>
b2sums=('e99c6d45758d50195a634d2a2ebdbe324ca3f205d8013fb8fb2160c2581d7551bbff946f3413b2782648470e922d84d8a2f9c3d33e32c46db6391b749ba30000'
b2sums=('f9c297f4ed0c00b7887e637beb6ab7f4e17882e0ed5a3d1f1faf1ae1c2d6b064ada53cf65a86f11237813197c043961735e8aad641630baa48ec259482bdab2a'
'SKIP'
'72ecb413ca3499af984a0bb391f96e678a24a19d8e5c96050ba227878f0770f03466ac7a0ee328416e08204e92e9d16ec22d63ef25b53c20d957a17221cd3a98'
'3eab84d332d96678fe6e435ee243c8f1a82b838f601d61d3604d11e918aed7a62202edca5e476c4b9031ed284570e6fcd6c659cfdbd9624aa0019d3233755f81'
@ -175,6 +175,7 @@ _ldb_headers=(
provides=(libldb.so)
_pkgsrc="${srcdir}"/samba-pkg
local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
install -d -m755 "${pkgdir}"/usr/bin
for bin in ${_ldb_bins[@]}; do
mv "${_pkgsrc}"/usr/bin/${bin} "${pkgdir}"/usr/bin/
@ -191,9 +192,9 @@ _pkgsrc="${srcdir}"/samba-pkg
for headers in ${_ldb_headers[@]}; do
mv "${_pkgsrc}"/usr/include/samba-4.0/${headers} "${pkgdir}"/usr/include/samba-4.0/
done
install -d -m755 "${pkgdir}"/usr/lib/python3.12/site-packages/
mv "${_pkgsrc}"/usr/lib/python3.12/site-packages/{_ldb_text.py,ldb.cpython-312-$CARCH-linux-gnu.so} \
"${pkgdir}"/usr/lib/python3.12/site-packages/
install -d -m755 "${pkgdir}${site_packages}/"
mv "${_pkgsrc}${site_packages}/"{_ldb_text.py,ldb.cpython-$(python -c 'import sys; print("".join(map(str, sys.version_info[:2])))')-$CARCH-linux-gnu.so} \
"${pkgdir}${site_packages}/"
install -d -m755 "${pkgdir}"/usr/share/man/man1
for bin in ${_ldb_bins[@]}; do
@ -317,6 +318,7 @@ backup=(
)
install=samba.install
local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
_pkgsrc="${srcdir}"/samba-pkg
# Everything that libwbclient and smbclient didn't install goes
# into the samba package...
@ -327,7 +329,7 @@ _pkgsrc="${srcdir}"/samba-pkg
for script in bin/samba_dnsupdate bin/samba_kcc bin/samba_spnupdate \
bin/samba_upgradedns bin/samba-tool
do
sed -i "/^sys\.path\.insert/ asys.path.insert(0, '/usr/lib/python${_pyver}/site-packages')" \
sed -i "/^sys\.path\.insert/ asys.path.insert(0, '$site_packages')" \
"${pkgdir}"/usr/${script}
done

View File

@ -0,0 +1,86 @@
diff --git a/source3/libsmb/libsmb_file.c b/source3/libsmb/libsmb_file.c
index fa301b9fa18..98750754036 100644
--- a/source3/libsmb/libsmb_file.c
+++ b/source3/libsmb/libsmb_file.c
@@ -464,6 +464,7 @@ SMBC_getatr(SMBCCTX * context,
struct timespec access_time_ts = {0};
struct timespec write_time_ts = {0};
struct timespec change_time_ts = {0};
+ struct timespec w_time_ts = {0};
time_t write_time = 0;
SMB_INO_T ino = 0;
struct cli_credentials *creds = NULL;
@@ -506,6 +507,7 @@ SMBC_getatr(SMBCCTX * context,
}
if (!srv->no_pathinfo2) {
+ bool not_supported_error = false;
status = cli_qpathinfo2(targetcli,
targetpath,
&create_time_ts,
@@ -518,11 +520,21 @@ SMBC_getatr(SMBCCTX * context,
if (NT_STATUS_IS_OK(status)) {
goto setup_stat;
}
+ if (NT_STATUS_EQUAL(status, NT_STATUS_INVALID_LEVEL) ||
+ NT_STATUS_EQUAL(status, NT_STATUS_NOT_SUPPORTED)) {
+ not_supported_error = true;
+ }
+ if (!not_supported_error) {
+ /* "Normal error". Just return it to caller. */
+ TALLOC_FREE(frame);
+ return status;
+ }
}
srv->no_pathinfo2 = True;
if (!srv->no_pathinfo3) {
+ bool not_supported_error = false;
status = cli_qpathinfo3(targetcli,
targetpath,
&create_time_ts,
@@ -535,6 +547,15 @@ SMBC_getatr(SMBCCTX * context,
if (NT_STATUS_IS_OK(status)) {
goto setup_stat;
}
+ if (NT_STATUS_EQUAL(status, NT_STATUS_INVALID_LEVEL) ||
+ NT_STATUS_EQUAL(status, NT_STATUS_NOT_SUPPORTED)) {
+ not_supported_error = true;
+ }
+ if (!not_supported_error) {
+ /* "Normal error". Just return it to caller. */
+ TALLOC_FREE(frame);
+ return status;
+ }
}
srv->no_pathinfo3 = True;
@@ -545,14 +566,11 @@ SMBC_getatr(SMBCCTX * context,
}
status = cli_getatr(targetcli, targetpath, &attr, &size, &write_time);
- if (NT_STATUS_IS_OK(status)) {
- struct timespec w_time_ts =
- convert_time_t_to_timespec(write_time);
-
- access_time_ts = change_time_ts = write_time_ts = w_time_ts;
-
- goto setup_stat;
+ if (!NT_STATUS_IS_OK(status)) {
+ goto all_failed;
}
+ w_time_ts = convert_time_t_to_timespec(write_time);
+ access_time_ts = change_time_ts = write_time_ts = w_time_ts;
setup_stat:
setup_stat(sb,
@@ -573,7 +591,7 @@ all_failed:
srv->no_pathinfo3 = False;
TALLOC_FREE(frame);
- return NT_STATUS_ACCESS_DENIED;
+ return status;
}
/*

View File

@ -0,0 +1,57 @@
From eee9ff0228f52008bfc565241f6dfe07ae7a7044 Mon Sep 17 00:00:00 2001
From: Andreas Schneider <asn@samba.org>
Date: Tue, 2 Aug 2022 07:55:46 +0200
Subject: [PATCH] lib:replace: Only include <sys/mount.h> on non-Linux systems
Details at:
https://sourceware.org/glibc/wiki/Release/2.36#Usage_of_.3Clinux.2Fmount.h.3E_and_.3Csys.2Fmount.h.3E
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15132
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
(cherry picked from commit 766151bf5b7ef95ae4c8c98b8994e5c21c5bbec0)
---
lib/replace/system/filesys.h | 4 +++-
lib/replace/wscript | 3 +++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/lib/replace/system/filesys.h b/lib/replace/system/filesys.h
index 034e5d5886c..bb9482c69af 100644
--- a/lib/replace/system/filesys.h
+++ b/lib/replace/system/filesys.h
@@ -36,7 +36,8 @@
#include <sys/param.h>
#endif
-#ifdef HAVE_SYS_MOUNT_H
+/* This include is required on UNIX (*BSD, AIX, ...) for statfs() */
+#if !defined(LINUX) && defined(HAVE_SYS_MOUNT_H)
#include <sys/mount.h>
#endif
@@ -44,6 +45,7 @@
#include <mntent.h>
#endif
+/* This include is required on Linux for statfs() */
#ifdef HAVE_SYS_VFS_H
#include <sys/vfs.h>
#endif
diff --git a/lib/replace/wscript b/lib/replace/wscript
index e4c2d513076..0db93d8caf1 100644
--- a/lib/replace/wscript
+++ b/lib/replace/wscript
@@ -31,6 +31,9 @@ def configure(conf):
conf.env.standalone_replace = conf.IN_LAUNCH_DIR()
+ if sys.platform.rfind('linux') > -1:
+ conf.DEFINE('LINUX', '1')
+
conf.DEFINE('BOOL_DEFINED', 1)
conf.DEFINE('HAVE_LIBREPLACE', 1)
conf.DEFINE('LIBREPLACE_NETWORK_CHECKS', 1)
--
2.37.1