The branch, v4-19-stable has been updated
       via  b7921852ad6 VERSION: Disable GIT_SNAPSHOT for the 4.19.0 release.
       via  a21e09363fc WHATSNEW: Add release notes for Samba 4.19.0.
       via  8a34b378932 vfs_aio_pthread: use SMB_VFS_NEXT_OPENAT() in 
aio_pthread_openat_fn()
       via  1af8a09966a ctdb-common: Set immediate mode for pcap capture
       via  58e7d6a9451 ctdb-common: Replace pcap_open_live() by lower level 
calls
       via  9f57371128d ctdb-common: Improve error handling
       via  087e7cdc4d1 VERSION: Bump version up to Samba 4.19.0rc5...
      from  0e9c171f5f6 VERSION: Disable GIT_SNAPSHOT for the 4.19.0rc4 release.

https://git.samba.org/?p=samba.git;a=shortlog;h=v4-19-stable


- Log -----------------------------------------------------------------
-----------------------------------------------------------------------

Summary of changes:
 VERSION                           |  2 +-
 WHATSNEW.txt                      | 31 +++++++++++++++++------------
 ctdb/common/system_socket.c       | 42 +++++++++++++++++++++++++++++++++++----
 ctdb/wscript                      |  1 +
 source3/modules/vfs_aio_pthread.c | 28 +++++++++++++-------------
 5 files changed, 72 insertions(+), 32 deletions(-)


Changeset truncated at 500 lines:

diff --git a/VERSION b/VERSION
index 1a2b292e111..e37fdc9cde9 100644
--- a/VERSION
+++ b/VERSION
@@ -87,7 +87,7 @@ SAMBA_VERSION_PRE_RELEASE=
 # e.g. SAMBA_VERSION_RC_RELEASE=1                      #
 #  ->  "3.0.0rc1"                                      #
 ########################################################
-SAMBA_VERSION_RC_RELEASE=4
+SAMBA_VERSION_RC_RELEASE=
 
 ########################################################
 # To mark SVN snapshots this should be set to 'yes'    #
diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index 97eaec57b1e..439556605ca 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -1,17 +1,10 @@
-Release Announcements
-=====================
-
-This is the fourth release candidate of Samba 4.19.  This is *not*
-intended for production environments and is designed for testing
-purposes only.  Please report any defects via the Samba bug reporting
-system at https://bugzilla.samba.org/.
-
-Samba 4.19 will be the next version of the Samba suite.
-
-
-UPGRADING
-=========
+                   ==============================
+                   Release Notes for Samba 4.19.0
+                         September 04, 2023
+                   ==============================
 
+This is the first stable release of the Samba 4.19 release series.
+Please read the release notes carefully before upgrading.
 
 NEW FEATURES/CHANGES
 ====================
@@ -252,6 +245,18 @@ smb.conf changes
   directory name cache size               Removed
 
 
+CHANGES SINCE 4.19.0rc4
+=======================
+
+o  MikeLiu <mike...@qnap.com>
+   * BUG 15453: File doesn't show when user doesn't have permission if
+     aio_pthread is loaded.
+
+o  Martin Schwenke <mschwe...@ddn.com>
+   * BUG 15451: ctdb_killtcp fails to work with --enable-pcap and libpcap ≥
+     1.9.1.
+
+
 CHANGES SINCE 4.19.0rc3
 =======================
 
diff --git a/ctdb/common/system_socket.c b/ctdb/common/system_socket.c
index 06dc558eb22..273b9c3400e 100644
--- a/ctdb/common/system_socket.c
+++ b/ctdb/common/system_socket.c
@@ -980,15 +980,45 @@ int ctdb_sys_open_capture_socket(const char *iface, void 
**private_data)
        int pcap_packet_type;
        const char *t = NULL;
        int fd;
+       int ret;
 
-       pt = pcap_open_live(iface, 100, 0, 0, errbuf);
+       pt = pcap_create(iface, errbuf);
        if (pt == NULL) {
                DBG_ERR("Failed to open pcap capture device %s (%s)\n",
                        iface,
                        errbuf);
                return -1;
        }
-       *((pcap_t **)private_data) = pt;
+       /*
+        * pcap isn't very clear about defaults...
+        */
+       ret = pcap_set_snaplen(pt, 100);
+       if (ret < 0) {
+               DBG_ERR("Failed to set snaplen for pcap capture\n");
+               goto fail;
+       }
+       ret = pcap_set_promisc(pt, 0);
+       if (ret < 0) {
+               DBG_ERR("Failed to unset promiscuous mode for pcap capture\n");
+               goto fail;
+       }
+       ret = pcap_set_timeout(pt, 0);
+       if (ret < 0) {
+               DBG_ERR("Failed to set timeout for pcap capture\n");
+               goto fail;
+       }
+#ifdef HAVE_PCAP_SET_IMMEDIATE_MODE
+       ret = pcap_set_immediate_mode(pt, 1);
+       if (ret < 0) {
+               DBG_ERR("Failed to set immediate mode for pcap capture\n");
+               goto fail;
+       }
+#endif
+       ret = pcap_activate(pt);
+       if (ret < 0) {
+               DBG_ERR("Failed to activate pcap capture\n");
+               goto fail;
+       }
 
        pcap_packet_type = pcap_datalink(pt);
        switch (pcap_packet_type) {
@@ -1005,8 +1035,7 @@ int ctdb_sys_open_capture_socket(const char *iface, void 
**private_data)
 #endif /* DLT_LINUX_SLL2 */
        default:
                DBG_ERR("Unknown pcap packet type %d\n", pcap_packet_type);
-               pcap_close(pt);
-               return -1;
+               goto fail;
        }
 
        fd = pcap_get_selectable_fd(pt);
@@ -1014,7 +1043,12 @@ int ctdb_sys_open_capture_socket(const char *iface, void 
**private_data)
                  t,
                  fd);
 
+       *((pcap_t **)private_data) = pt;
        return fd;
+
+fail:
+       pcap_close(pt);
+       return -1;
 }
 
 int ctdb_sys_close_capture_socket(void *private_data)
diff --git a/ctdb/wscript b/ctdb/wscript
index 88e42439f5a..a7b04541014 100644
--- a/ctdb/wscript
+++ b/ctdb/wscript
@@ -221,6 +221,7 @@ def configure(conf):
         if not conf.CHECK_FUNCS_IN('pcap_open_live', 'pcap', headers='pcap.h'):
             Logs.error('Need libpcap')
             sys.exit(1)
+        conf.CHECK_FUNCS_IN('pcap_set_immediate_mode', 'pcap', 
headers='pcap.h')
 
     if not conf.CHECK_FUNCS_IN('backtrace backtrace_symbols', 'execinfo',
                                checklibc=True, headers='execinfo.h'):
diff --git a/source3/modules/vfs_aio_pthread.c 
b/source3/modules/vfs_aio_pthread.c
index 0303ff04bc9..b099a6b5b52 100644
--- a/source3/modules/vfs_aio_pthread.c
+++ b/source3/modules/vfs_aio_pthread.c
@@ -483,28 +483,28 @@ static int aio_pthread_openat_fn(vfs_handle_struct 
*handle,
                aio_allow_open = false;
        }
 
-       if (!aio_allow_open) {
-               /* aio opens turned off. */
-               return openat(fsp_get_pathref_fd(dirfsp),
-                             smb_fname->base_name,
-                             how->flags,
-                             how->mode);
+       if (fsp->fsp_flags.is_pathref) {
+               /* Use SMB_VFS_NEXT_OPENAT() to call openat() with O_PATH. */
+               aio_allow_open = false;
        }
 
        if (!(how->flags & O_CREAT)) {
                /* Only creates matter. */
-               return openat(fsp_get_pathref_fd(dirfsp),
-                             smb_fname->base_name,
-                             how->flags,
-                             how->mode);
+               aio_allow_open = false;
        }
 
        if (!(how->flags & O_EXCL)) {
                /* Only creates with O_EXCL matter. */
-               return openat(fsp_get_pathref_fd(dirfsp),
-                             smb_fname->base_name,
-                             how->flags,
-                             how->mode);
+               aio_allow_open = false;
+       }
+
+       if (!aio_allow_open) {
+               /* aio opens turned off. */
+               return SMB_VFS_NEXT_OPENAT(handle,
+                             dirfsp,
+                             smb_fname,
+                             fsp,
+                             how);
        }
 
        /*


-- 
Samba Shared Repository

Reply via email to