pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/net/samba4



Module Name:    pkgsrc
Committed By:   wiz
Date:           Wed Oct  7 08:53:53 UTC 2026

Modified Files:
        pkgsrc/net/samba4: Makefile PLIST distinfo
        pkgsrc/net/samba4/patches: patch-lib_tsocket_tsocket__bsd.c
            patch-nsswitch_winbind__nss__netbsd.c

Log Message:
samba: update to 4.25.0.

NEW FEATURES/CHANGES
====================

SMB3 Persistent Handles (Experimental)
--------------------------------------

Samba now includes experimental support for SMB3 Persistent Handles,
a fundamental building block for Transparent Failover.

Persistent Handles allow SMB clients to reconnect after a server
restart or outage while retaining valid file handles. Samba persists
all necessary handle state to durable on-disk storage so that open
files can be reconstructed when clients reconnect. This enables
applications that depend on uninterrupted file access, such as virtual
machine storage and clustered database workloads, to tolerate
temporary server failures without having to reopen files.

Persistent Handles are advertised through the SMB3 protocol capability
SMB2_CAP_PERSISTENT_HANDLES. To make use of them on a share, both the
global "persistent handles" option and the per-share
"continuous availability" option must be enabled.

Because Persistent Handles require Samba to maintain SMB state, they
are only available on shares configured for SMB-exclusive
access. Specifically, they require:

kernel oplocks = no
kernel share modes = no
posix locking = no

These settings disable interoperability with local POSIX file access
and NFS clients on the affected share.

Administrators should be aware that Persistent Handles incur a
significant performance cost. File handle metadata is synchronously
persisted to durable storage for every open, update, lease, and close
operation, increasing latency compared to traditional SMB file
serving. For this reason, the feature is intended only for workloads
that require Continuous Availability semantics and is not recommended
for general-purpose file servers.

On a cluster the handle state is kept in a volatile ctdb database that
is replicated to every node, and additionally in a backup copy in a
persistent ctdb database. Only that backup copy makes handles survive
an outage of every node at the same time, for example a maintenance
window in which the whole cluster is shut down and restarted, because
that loses the volatile databases. Maintaining the backup is expensive:
every change to the state of a persistent handle costs an additional
cluster wide transaction, and that transaction is written to stable
storage on every node.

The new global option "persistent handles durability" to choose to
which side of the tradeof, performance or durability, they want to
lean on:

persistent handles durability = full_outage

  The default. The backup copy is maintained and handles survive an
  outage of the whole cluster.

persistent handles durability = partial_outage

  The backup copy is not maintained. Handles survive any outage that
  leaves at least one node running, which covers a node crash, a
  rolling restart and the loss of all but one node, because the handle
  state is still kept on every node of the cluster. Handles are lost if
  every node is down at the same time. In exchange, every open, update,
  lease and close operation becomes noticeably cheaper.

This feature is currently considered experimental.

Cluster-wide rate limiting in vfs_aio_ratelimit
------------------------------------------------

The vfs_aio_ratelimit VFS module has been extended with cluster-wide
coordination. When Samba clustering is enabled, the configured per-share rate
limits are now enforced as a global ceiling across the entire cluster rather than
per-node. Each share's limits are tracked and enforced independently.

Coordination is handled by a new per-node daemon, ratelimitd, which aggregates
activity from all smbd processes on the node and broadcasts node-level summaries
to the rest of the cluster via Samba's messaging layer.

To enable this feature, Samba must be built with --with-ratelimitd.

New Ceph RGW VFS module
-----------------------

Introduced a new VFS module, vfs_ceph_rgw, which uses the librgw APIs to
export Ceph Object Gateway buckets as SMB shares. It provides a hierarchical
view of the objects stored in a bucket, allowing them to be accessed as files
and folders. The module supports standard POSIX uids and gids, as well as most
basic file operations.

JSON Audit logging
------------------

The two leading spaces before the opening '{' on JSON audit log lines have been
removed. And any embedded new line characters '\n' are converted to spaces.

Domain encryption types changed to AES by default
-------------------------------------------------

The default value of the smb.conf option ‘kdc default domain supported enctypes’
now corresponds to ‘aes128-cts-hmac-sha1-96 aes256-cts-hmac-sha1-96’ (both AES
encryption types) if the domain functional level is 2008 or higher. This
addresses CVE-2026-20833.

CTDB changes
------------

* CTDB's locations for locks, PID files and sockets now use ctdb/
  subdirectories of the Samba locations configured at build time.
  This means that the relevant top-level Samba configure options
  (--with-lockdir, --with-piddir, --with-sockets-dir) are now also
  used by CTDB.

  The standalone CTDB build does not support these options.  However,
  it is generally only used for developer/standalone testing.

* The CTDB initscript (ctdb.init) has been moved to ctdb/doc/examples.
  This recognises that it isn't installed by default so it is
  basically unmaintained and untested.

* Monitoring of (infrastructure) hosts is now supported.  A good use
  of this is to monitor DNS servers.  See the NETWORK MONITORING
  section in ctdb-script.options(5) for more details.

* The detect_init_style() script function and associated
  CTDB_INIT_STYLE variable are deprecated, so will be removed in a
  future release.  Use the new, more general CTDB_PLATFORM_STYLE
  variable instead.  This may affect site-local CTDB (event) scripts.
  See ctdb.sysconfig(5) for more details.

Cluster functional level
------------------------

Samba now maintains a cluster functional level, a cluster wide value
that is kept as persistent global state and shared by all nodes. It
is similar in spirit to the domain and forest functional levels known
from Active Directory.

The purpose of the functional level is to allow controlled upgrades
of a cluster. New database formats, new internal messages and other
changes that affect the communication between nodes are gated behind
an explicit raise of the cluster functional level. As long as the
level has not been raised, all nodes keep writing and sending the old
formats, so that nodes running different Samba versions can
interoperate during a rolling upgrade.

A level consists of a major and a minor number, e.g. "1.0". Samba
4.25 implements the initial level 1.0, which is currently also the
only defined level.

On a non-clustered server the highest supported level is always
activated automatically, there is nothing to configure or maintain.

On a cluster the currently active level is stored persistently in
cluster_level.tdb. On a fresh cluster it is initialized with the
highest level supported by the second node that starts up. From then
on the level never changes on its own, it is only raised when an
administrator explicitly asks for it. A node that does not support
the currently active level refuses to start, which keeps a node
running an incompatible Samba version from joining the cluster.

Once all nodes of a cluster have been upgraded to a new Samba
version, the administrator can raise the cluster functional level.
The new 'net clusterlevel' subcommands are available for this:

  net clusterlevel features
        List the cluster functional levels supported by the
        installed binaries.

  net clusterlevel show
        Show the currently active cluster functional level.

  net clusterlevel showall
        Show the levels supported by each node of the cluster,
        together with the currently active level and the highest
        level that could be activated.

  net clusterlevel upgrade [--test] [--apply]
        Raise the active cluster functional level to the highest
        level supported by all nodes. With --test (the default) only
        checks and reports whether the upgrade would be possible,
        --apply performs the actual upgrade.

Note that raising the cluster functional level is a one way
operation, there is no way to lower it again. It should only be done
once all nodes have been upgraded and the new version has proven to
work.

The current implementation is deliberately strict: an upgrade is only
possible if all nodes announce the exact same set of supported
levels, which in practice means that all nodes run the same Samba
version.

Also note that this change only prepares for the future. It
is not designed help with upgrades from older versions before
4.25 to 4.25 as a target. However vendors are free to use their
own backports and use custom levels >= 0.1 and < 1.0.

REMOVED FEATURES
================

smb.conf changes
================

  Parameter Name                          Description     Default
  --------------                          -----------     -------
  allow dcerpc auth level connect         deprecated
  kdc default domain supported enctypes   New default     AES encryption types (if supported by domain)
  getwd cache                             Removed
  persistent handles                      New             no
  persistent handles durability           New             full_outage
  continuous availability                 New             no


To generate a diff of this commit:
cvs rdiff -u -r1.225 -r1.226 pkgsrc/net/samba4/Makefile
cvs rdiff -u -r1.65 -r1.66 pkgsrc/net/samba4/PLIST
cvs rdiff -u -r1.131 -r1.132 pkgsrc/net/samba4/distinfo
cvs rdiff -u -r1.3 -r1.4 \
    pkgsrc/net/samba4/patches/patch-lib_tsocket_tsocket__bsd.c \
    pkgsrc/net/samba4/patches/patch-nsswitch_winbind__nss__netbsd.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/net/samba4/Makefile
diff -u pkgsrc/net/samba4/Makefile:1.225 pkgsrc/net/samba4/Makefile:1.226
--- pkgsrc/net/samba4/Makefile:1.225    Tue Sep 29 06:07:08 2026
+++ pkgsrc/net/samba4/Makefile  Wed Oct  7 08:53:53 2026
@@ -1,8 +1,7 @@
-# $NetBSD: Makefile,v 1.225 2026/09/29 06:07:08 wiz Exp $
+# $NetBSD: Makefile,v 1.226 2026/10/07 08:53:53 wiz Exp $
 
 # XXX: Fails to build when mit-krb5 is installed.
-DISTNAME=      samba-4.24.7
-PKGREVISION=   2
+DISTNAME=      samba-4.25.0
 CATEGORIES=    net
 MASTER_SITES=  https://download.samba.org/pub/samba/stable/
 

Index: pkgsrc/net/samba4/PLIST
diff -u pkgsrc/net/samba4/PLIST:1.65 pkgsrc/net/samba4/PLIST:1.66
--- pkgsrc/net/samba4/PLIST:1.65        Thu Aug 20 08:11:02 2026
+++ pkgsrc/net/samba4/PLIST     Wed Oct  7 08:53:53 2026
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.65 2026/08/20 08:11:02 adam Exp $
+@comment $NetBSD: PLIST,v 1.66 2026/10/07 08:53:53 wiz Exp $
 bin/cifsdd
 bin/dbwrap_tool
 bin/dumpmscat
@@ -199,10 +199,12 @@ ${PYSITELIB}/samba/dcerpc/drsblobs.so
 ${PYSITELIB}/samba/dcerpc/drsuapi.so
 ${PYSITELIB}/samba/dcerpc/echo.so
 ${PYSITELIB}/samba/dcerpc/epmapper.so
+${PYSITELIB}/samba/dcerpc/file_id.so
 ${PYSITELIB}/samba/dcerpc/gkdi.so
 ${PYSITELIB}/samba/dcerpc/gmsa.so
 ${PYSITELIB}/samba/dcerpc/idmap.so
 ${PYSITELIB}/samba/dcerpc/initshutdown.so
+${PYSITELIB}/samba/dcerpc/ioctl.so
 ${PYSITELIB}/samba/dcerpc/irpc.so
 ${PYSITELIB}/samba/dcerpc/keycredlink.so
 ${PYSITELIB}/samba/dcerpc/krb5ccache.so
@@ -643,8 +645,10 @@ ${PYSITELIB}/samba/tests/net_join_no_spn
 ${PYSITELIB}/samba/tests/netbios.py
 ${PYSITELIB}/samba/tests/netcmd.py
 ${PYSITELIB}/samba/tests/netlogonsvc.py
+${PYSITELIB}/samba/tests/nps_echo_test.py
 ${PYSITELIB}/samba/tests/nss/base.py
 ${PYSITELIB}/samba/tests/nss/group.py
+${PYSITELIB}/samba/tests/ntacl_resource_attr_ace.py
 ${PYSITELIB}/samba/tests/ntacls.py
 ${PYSITELIB}/samba/tests/ntacls_backup.py
 ${PYSITELIB}/samba/tests/ntlm_auth.py

Index: pkgsrc/net/samba4/distinfo
diff -u pkgsrc/net/samba4/distinfo:1.131 pkgsrc/net/samba4/distinfo:1.132
--- pkgsrc/net/samba4/distinfo:1.131    Thu Sep 10 08:25:39 2026
+++ pkgsrc/net/samba4/distinfo  Wed Oct  7 08:53:53 2026
@@ -1,8 +1,8 @@
-$NetBSD: distinfo,v 1.131 2026/09/10 08:25:39 adam Exp $
+$NetBSD: distinfo,v 1.132 2026/10/07 08:53:53 wiz Exp $
 
-BLAKE2s (samba-4.24.7.tar.gz) = e0cf44ca449abdb4d6b988c0661f08ccee9b7d7a20e8df7fd8a03f29c649a910
-SHA512 (samba-4.24.7.tar.gz) = f895baf3c06d0d0371052ae48f44ebc9f953441a8d6fbb6eab223bf1b892dab7be429733d46fa2cbd1088b1cefee601cc99ca97f41b985c47b9846c300af8cce
-Size (samba-4.24.7.tar.gz) = 43450847 bytes
+BLAKE2s (samba-4.25.0.tar.gz) = 3a4601a0c931608cc4fd8d23197e39c7fb1602d8f74ceec5bd1cc31f20f39e09
+SHA512 (samba-4.25.0.tar.gz) = cf22b631c1340e0d02c0fa092f7661072fef4fffddb048a4ed6b481edf7bf0df158b33a7330d1ed2e56e20a755e0991121b3123836e5dcf442cb55294e0ca61e
+Size (samba-4.25.0.tar.gz) = 43571277 bytes
 SHA1 (patch-buildtools_wafsamba_samba__conftests.py) = d927db17124d2bb5b382885e70a41f84c3929926
 SHA1 (patch-buildtools_wafsamba_samba__install.py) = d801340617da325e3bb70a90350e45cc8e383c2d
 SHA1 (patch-buildtools_wafsamba_samba__pidl.py) = b9015694b80c0e6382d75c806fd6e0eb92e5f998
@@ -15,7 +15,7 @@ SHA1 (patch-lib_replace_system_passwd.h)
 SHA1 (patch-lib_tdb_common_mutex.c) = 74162bf9dfd440fc0b9782982e83776c9671a983
 SHA1 (patch-lib_tevent_tevent.c) = 109e7a516dc291372e982b9f21c6ce8c0e5d3ca4
 SHA1 (patch-lib_tevent_tevent__threads.c) = e5e82db82cff4d550451cd9290b3a351b25d4de4
-SHA1 (patch-lib_tsocket_tsocket__bsd.c) = 0ac414e02ee3a326d3dd34515bfffce6e8da5e46
+SHA1 (patch-lib_tsocket_tsocket__bsd.c) = ed9d7d1cec0559d0c3b2f1cdc38799e1a2313c04
 SHA1 (patch-lib_util_access.c) = e629aac8b4b36514fc73cf0d31a07b4a912f87c6
 SHA1 (patch-lib_util_charset_charset__macosxfs.c) = 9772fc52fff48aec2a7e279223f73bb791217c26
 SHA1 (patch-lib_util_smb__threads.h) = 817591a2b69f31ac29497a2006fe21f0b4b0aaea
@@ -24,7 +24,7 @@ SHA1 (patch-lib_util_time.h) = 5048614e3
 SHA1 (patch-lib_util_util__crypt.c) = 476e5f501df0b87096a145005480980752109225
 SHA1 (patch-libcli_dns_wscript__build) = e1eae3d78a7a473107d22e41d3cdaa1beb83b3d5
 SHA1 (patch-nsswitch_stress-nss-libwbclient.c) = c546f00184b0d22b6c150e210962cdfc6fc12df2
-SHA1 (patch-nsswitch_winbind__nss__netbsd.c) = 1214bfbd7714b64f3ff3eb97b6f24e3d2629370f
+SHA1 (patch-nsswitch_winbind__nss__netbsd.c) = ce325d85488ed38b6938cee09feafb7b4dc5155a
 SHA1 (patch-nsswitch_wscript__build) = 5be3e07f8a34ae3e2f68126eb6f05f8b65f5be2f
 SHA1 (patch-python_pyglue.c) = ba8b0f7d471f16e603a050f735d4a92a95e0b886
 SHA1 (patch-source3_auth_user__util.c) = c7c1c48974ba9d484ddda657996741e0e5b2a9c4

Index: pkgsrc/net/samba4/patches/patch-lib_tsocket_tsocket__bsd.c
diff -u pkgsrc/net/samba4/patches/patch-lib_tsocket_tsocket__bsd.c:1.3 pkgsrc/net/samba4/patches/patch-lib_tsocket_tsocket__bsd.c:1.4
--- pkgsrc/net/samba4/patches/patch-lib_tsocket_tsocket__bsd.c:1.3      Fri Jul 29 20:33:38 2022
+++ pkgsrc/net/samba4/patches/patch-lib_tsocket_tsocket__bsd.c  Wed Oct  7 08:53:53 2026
@@ -1,19 +1,19 @@
-$NetBSD: patch-lib_tsocket_tsocket__bsd.c,v 1.3 2022/07/29 20:33:38 jperkin Exp $
+$NetBSD: patch-lib_tsocket_tsocket__bsd.c,v 1.4 2026/10/07 08:53:53 wiz Exp $
 
 Avoid s_addr macro.
 
---- lib/tsocket/tsocket_bsd.c.orig     2022-01-24 10:26:58.933306500 +0000
+--- lib/tsocket/tsocket_bsd.c.orig     2026-08-10 19:16:53.014630000 +0000
 +++ lib/tsocket/tsocket_bsd.c
-@@ -457,7 +457,7 @@ int _tsocket_address_inet_from_hostport_
+@@ -441,7 +441,7 @@ int _tsocket_address_inet_from_hostport_strings(TALLOC
        char *buf = NULL;
        uint64_t port = 0;
        int ret;
 -      char *s_addr = NULL;
 +      char *sun_addr = NULL;
        uint16_t s_port = default_port;
-       bool conv_ret;
+       int error = 0;
        bool is_ipv6_by_squares = false;
-@@ -486,7 +486,7 @@ int _tsocket_address_inet_from_hostport_
+@@ -470,7 +470,7 @@ int _tsocket_address_inet_from_hostport_strings(TALLOC
                /* IPv6 possibly with port - squares detected */
                port_sep = pr_sq + 1;
                if (*port_sep == '\0') {
@@ -22,7 +22,7 @@ Avoid s_addr macro.
                        *pr_sq = 0;
                        s_port = default_port;
                        goto get_addr;
-@@ -508,7 +508,7 @@ int _tsocket_address_inet_from_hostport_
+@@ -493,7 +493,7 @@ int _tsocket_address_inet_from_hostport_strings(TALLOC
                s_port = (uint16_t)port;
                *port_sep = 0;
                *pr_sq = 0;
@@ -31,7 +31,7 @@ Avoid s_addr macro.
                *pl_sq = 0;
                goto get_addr;
        } else if (pl_period != NULL && port_sep != NULL) {
-@@ -525,18 +525,18 @@ int _tsocket_address_inet_from_hostport_
+@@ -511,18 +511,18 @@ int _tsocket_address_inet_from_hostport_strings(TALLOC
                }
                s_port = (uint16_t)port;
                *port_sep = 0;
Index: pkgsrc/net/samba4/patches/patch-nsswitch_winbind__nss__netbsd.c
diff -u pkgsrc/net/samba4/patches/patch-nsswitch_winbind__nss__netbsd.c:1.3 pkgsrc/net/samba4/patches/patch-nsswitch_winbind__nss__netbsd.c:1.4
--- pkgsrc/net/samba4/patches/patch-nsswitch_winbind__nss__netbsd.c:1.3 Wed Jan 10 08:39:30 2024
+++ pkgsrc/net/samba4/patches/patch-nsswitch_winbind__nss__netbsd.c     Wed Oct  7 08:53:53 2026
@@ -1,10 +1,10 @@
-$NetBSD: patch-nsswitch_winbind__nss__netbsd.c,v 1.3 2024/01/10 08:39:30 adam Exp $
+$NetBSD: patch-nsswitch_winbind__nss__netbsd.c,v 1.4 2026/10/07 08:53:53 wiz Exp $
 
 Add primary group support
 
---- nsswitch/winbind_nss_netbsd.c.orig 2024-01-08 14:34:28.213466000 +0000
+--- nsswitch/winbind_nss_netbsd.c.orig 2026-08-10 19:16:53.086630600 +0000
 +++ nsswitch/winbind_nss_netbsd.c
-@@ -176,6 +176,7 @@ netbsdwinbind_getgroupmembership(void *n
+@@ -176,6 +176,7 @@ netbsdwinbind_getgroupmembership(void *nsrv, void *nsc
  {
        int             *result = va_arg(ap, int *);
        const char      *uname  = va_arg(ap, const char *);
@@ -12,17 +12,17 @@ Add primary group support
        gid_t           *groups = va_arg(ap, gid_t *);
        int              maxgrp = va_arg(ap, int);
        int             *groupc = va_arg(ap, int *);
-@@ -189,6 +190,13 @@ netbsdwinbind_getgroupmembership(void *n
+@@ -188,6 +189,13 @@ netbsdwinbind_getgroupmembership(void *nsrv, void *nsc
+       };
        gid_t   *wblistv;
        int     wblistc, i, isdup, dupc;
- 
++
 +      /* add the primary group */
 +      if (*groupc < maxgrp)
 +              groups[*groupc] = agroup;
 +      else
 +              *result = -1;
 +      (*groupc)++;
-+
+ 
        strncpy(request.data.username, uname,
                                sizeof(request.data.username) - 1);
-       i = winbindd_request_response(NULL, WINBINDD_GETGROUPS,



Home | Main Index | Thread Index | Old Index