Upgrade wireshark 3.4.16 -> 4.0.8 to address 27 CVEs (#6187)
Address 27 CVEs: CVE-2021-22207 CVE-2021-22222 CVE-2021-22235 CVE-2021-39920 CVE-2021-3992 CVE-2021-39922 CVE-2021-39923 CVE-2021-39924 CVE-2021-39925 CVE-2021-39926 CVE-2021-39928 CVE-2021-39929 CVE-2021-4181 CVE-2021-4182 CVE-2021-4184 CVE-2021-4185 CVE-2021-4186 CVE-2021-4190 CVE-2022-0581 CVE-2022-0582 CVE-2022-0583 CVE-2022-0585 CVE-2022-0586 CVE-2022-3190 CVE-2022-4344 CVE-2023-0667 CVE-2023-2906 Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
This commit is contained in:
parent
29ef7cdbe9
commit
b34b9b2bb3
|
@ -7,11 +7,11 @@ because of permissions.
|
|||
|
||||
Signed-off-by: Jan Safranek <jsafrane@redhat.com>
|
||||
|
||||
diff --git a/capchild/capture_sync.c b/capchild/capture_sync.c
|
||||
index 2f9d2cc..b18e47f 100644
|
||||
--- a/capchild/capture_sync.c
|
||||
+++ b/capchild/capture_sync.c
|
||||
@@ -375,6 +375,7 @@ sync_pipe_start(capture_options *capture_opts, capture_session *cap_session, voi
|
||||
diff --git a/capture/capture_sync.c b/capture/capture_sync.c
|
||||
index 47a30a70c4..84d19568b0 100644
|
||||
--- a/capture/capture_sync.c
|
||||
+++ b/capture/capture_sync.c
|
||||
@@ -336,6 +336,7 @@ sync_pipe_start(capture_options *capture_opts, GPtrArray *capture_comments,
|
||||
gchar *signal_pipe_name;
|
||||
#else
|
||||
char errmsg[1024+1];
|
||||
|
@ -19,21 +19,20 @@ index 2f9d2cc..b18e47f 100644
|
|||
int sync_pipe[2]; /* pipe used to send messages from child to parent */
|
||||
enum PIPES { PIPE_READ, PIPE_WRITE }; /* Constants 0 and 1 for PIPE_READ and PIPE_WRITE */
|
||||
#endif
|
||||
@@ -728,8 +729,11 @@ sync_pipe_start(capture_options *capture_opts, capture_session *cap_session, voi
|
||||
@@ -741,8 +742,10 @@ sync_pipe_start(capture_options *capture_opts, GPtrArray *capture_comments,
|
||||
dup2(sync_pipe[PIPE_WRITE], 2);
|
||||
ws_close(sync_pipe[PIPE_READ]);
|
||||
execv(argv[0], argv);
|
||||
- g_snprintf(errmsg, sizeof errmsg, "Couldn't run %s in child process: %s",
|
||||
- snprintf(errmsg, sizeof errmsg, "Couldn't run %s in child process: %s",
|
||||
- argv[0], g_strerror(errno));
|
||||
+ if (errno == EPERM || errno == EACCES)
|
||||
+ securitymsg = "\nAre you a member of the 'wireshark' group? Try running\n'usermod -a -G wireshark _your_username_' as root.";
|
||||
+ g_snprintf(errmsg, sizeof errmsg, "Couldn't run %s in child process: %s%s",
|
||||
+ argv[0], g_strerror(errno), securitymsg);
|
||||
+
|
||||
+ securitymsg = "\nAre you a member of the 'wireshark' group? Try running\n'usermod -a -G wireshark _your_username_' as root.";
|
||||
+ snprintf(errmsg, sizeof errmsg, "Couldn't run %s in child process: %s%s",
|
||||
+ argv[0], g_strerror(errno), securitymsg);
|
||||
sync_pipe_errmsg_to_parent(2, errmsg, "");
|
||||
|
||||
/* Exit with "_exit()", so that we don't close the connection
|
||||
@@ -826,6 +830,7 @@ sync_pipe_open_command(char** argv, int *data_read_fd,
|
||||
@@ -846,6 +849,7 @@ sync_pipe_open_command(char* const argv[], int *data_read_fd,
|
||||
int i;
|
||||
#else
|
||||
char errmsg[1024+1];
|
||||
|
@ -41,16 +40,15 @@ index 2f9d2cc..b18e47f 100644
|
|||
int sync_pipe[2]; /* pipe used to send messages from child to parent */
|
||||
int data_pipe[2]; /* pipe used to send data from child to parent */
|
||||
#endif
|
||||
@@ -1003,8 +1008,11 @@ sync_pipe_open_command(char** argv, int *data_read_fd,
|
||||
@@ -994,8 +998,10 @@ sync_pipe_open_command(char* const argv[], int *data_read_fd,
|
||||
ws_close(sync_pipe[PIPE_READ]);
|
||||
ws_close(sync_pipe[PIPE_WRITE]);
|
||||
execv(argv[0], argv);
|
||||
- g_snprintf(errmsg, sizeof errmsg, "Couldn't run %s in child process: %s",
|
||||
- snprintf(errmsg, sizeof errmsg, "Couldn't run %s in child process: %s",
|
||||
- argv[0], g_strerror(errno));
|
||||
+ execv(argv[0], (gpointer)argv);
|
||||
+ if (errno == EPERM || errno == EACCES)
|
||||
+ securitymsg = "\nAre you a member of the 'wireshark' group? Try running\n'usermod -a -G wireshark _your_username_' as root.";
|
||||
+ g_snprintf(errmsg, sizeof errmsg, "Couldn't run %s in child process: %s%s",
|
||||
+ if (errno == EPERM || errno == EACCES)
|
||||
+ securitymsg = "\nAre you a member of the 'wireshark' group? Try running\n'usermod -a -G wireshark _your_username_' as root.";
|
||||
+ snprintf(errmsg, sizeof errmsg, "Couldn't run %s in child process: %s%s",
|
||||
+ argv[0], g_strerror(errno), securitymsg);
|
||||
sync_pipe_errmsg_to_parent(2, errmsg, "");
|
||||
|
||||
|
|
|
@ -4,10 +4,10 @@ Subject: [PATCH] fix string overrun in plugins/profinet
|
|||
|
||||
|
||||
diff --git a/plugins/epan/profinet/packet-dcom-cba.c b/plugins/epan/profinet/packet-dcom-cba.c
|
||||
index 0f1658a..f7fd322 100644
|
||||
index 52c5017e1f..fb980269db 100644
|
||||
--- a/plugins/epan/profinet/packet-dcom-cba.c
|
||||
+++ b/plugins/epan/profinet/packet-dcom-cba.c
|
||||
@@ -555,7 +555,7 @@ dissect_ICBAPhysicalDevice_get_LogicalDevice_rqst(tvbuff_t *tvb, int offset,
|
||||
@@ -543,7 +543,7 @@ dissect_ICBAPhysicalDevice_get_LogicalDevice_rqst(tvbuff_t *tvb, int offset,
|
||||
packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep)
|
||||
{
|
||||
guint32 u32Pointer;
|
||||
|
|
|
@ -3,10 +3,10 @@ Date: Fri, 13 Sep 2013 14:36:55 +0400
|
|||
Subject: [PATCH] Restore Fedora-specific groups
|
||||
|
||||
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
|
||||
diff --git a/wireshark.desktop b/wireshark.desktop
|
||||
index 334db48..669c6f1 100644
|
||||
--- a/wireshark.desktop
|
||||
+++ b/wireshark.desktop
|
||||
diff --git a/resources/freedesktop/org.wireshark.Wireshark.desktop b/resources/freedesktop/org.wireshark.Wireshark.desktop
|
||||
index a880a50a33..a25d67d99b 100644
|
||||
--- a/resources/freedesktop/org.wireshark.Wireshark.desktop
|
||||
+++ b/resources/freedesktop/org.wireshark.Wireshark.desktop
|
||||
@@ -108,4 +108,4 @@ Terminal=false
|
||||
MimeType=application/vnd.tcpdump.pcap;application/x-pcapng;application/x-snoop;application/x-iptrace;application/x-lanalyzer;application/x-nettl;application/x-radcom;application/x-etherpeek;application/x-visualnetworks;application/x-netinstobserver;application/x-5view;application/x-tektronix-rf5;application/x-micropross-mplog;application/x-apple-packetlogger;application/x-endace-erf;application/ipfix;application/x-ixia-vwr;
|
||||
# Category entry according to:
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
From: Kenneth Soerensen <knnthsrnsn@gmail.com>
|
||||
Date: Wed, 29 Jan 2014 16:04:12 +0400
|
||||
Subject: [PATCH] Fix paths in a wireshark.desktop file
|
||||
Subject: [PATCH] Fix paths in a org.wireshark.Wireshark.desktop file
|
||||
|
||||
|
||||
diff --git a/wireshark.desktop b/wireshark.desktop
|
||||
index 669c6f1..f7df1f3 100644
|
||||
--- a/wireshark.desktop
|
||||
+++ b/wireshark.desktop
|
||||
diff --git a/resources/freedesktop/org.wireshark.Wireshark.desktop b/resources/freedesktop/org.wireshark.Wireshark.desktop
|
||||
index a880a50a33..54b3595d55 100644
|
||||
--- a/resources/freedesktop/org.wireshark.Wireshark.desktop
|
||||
+++ b/resources/freedesktop/org.wireshark.Wireshark.desktop
|
||||
@@ -102,8 +102,8 @@ Comment[tr]=Ağ trafiği çözümleyicisi
|
||||
Comment[vi]=Trình phân tích giao thông mạng
|
||||
Comment[uk]=Аналізатор мережевого трафіку
|
||||
Icon=wireshark
|
||||
Icon=org.wireshark.Wireshark
|
||||
-TryExec=wireshark
|
||||
-Exec=wireshark %f
|
||||
+TryExec=/usr/bin/wireshark
|
||||
|
|
|
@ -5,45 +5,45 @@ Subject: [PATCH] Move /tmp to /var/tmp
|
|||
|
||||
Fedora is using tmpfs which is limited by the size of RAM, thus we need
|
||||
to use different directory on different filesystem.
|
||||
|
||||
---
|
||||
ui/qt/about_dialog.cpp | 3 +-
|
||||
ui/qt/iax2_analysis_dialog.cpp | 5 +--
|
||||
ui/qt/rtp_analysis_dialog.cpp | 5 +--
|
||||
ui/qt/rtp_audio_stream.cpp | 3 +-
|
||||
wsutil/tempfile.c | 9 +++---
|
||||
wsutil/tempfile.h | 4 +--
|
||||
wsutil/wstmpdir.c | 70 ++++++++++++++++++++++++++++++++++++++++++
|
||||
wsutil/wstmpdir.h | 39 +++++++++++++++++++++++
|
||||
8 files changed, 132 insertions(+), 11 deletions(-)
|
||||
ui/qt/iax2_analysis_dialog.cpp | 5 ++-
|
||||
ui/qt/utils/rtp_audio_file.cpp | 3 +-
|
||||
wsutil/tempfile.c | 18 +++++++-
|
||||
wsutil/tempfile.h | 2 +-
|
||||
wsutil/wstmpdir.c | 71 ++++++++++++++++++++++++++++++++++
|
||||
wsutil/wstmpdir.h | 39 +++++++++++++++++++
|
||||
7 files changed, 134 insertions(+), 7 deletions(-)
|
||||
create mode 100644 wsutil/wstmpdir.c
|
||||
create mode 100644 wsutil/wstmpdir.h
|
||||
|
||||
diff --git a/ui/qt/about_dialog.cpp b/ui/qt/about_dialog.cpp
|
||||
index 31dc581..2f74285 100644
|
||||
index 752b669ac4..42c2be0fca 100644
|
||||
--- a/ui/qt/about_dialog.cpp
|
||||
+++ b/ui/qt/about_dialog.cpp
|
||||
@@ -26,6 +26,7 @@
|
||||
@@ -14,6 +14,7 @@
|
||||
|
||||
#include "wireshark_application.h"
|
||||
#include "main_application.h"
|
||||
#include <wsutil/filesystem.h>
|
||||
+#include <wsutil/wstmpdir.h> /* for get_tmp_dir() */
|
||||
|
||||
#include <QDesktopServices>
|
||||
#include <QUrl>
|
||||
@@ -206,7 +206,7 @@ FolderListModel::FolderListModel(QObject * parent):
|
||||
@@ -185,7 +186,7 @@ FolderListModel::FolderListModel(QObject * parent):
|
||||
appendRow(QStringList() << tr("\"File\" dialogs") << get_last_open_dir() << tr("capture files"));
|
||||
|
||||
/* temp */
|
||||
- appendRow(QStringList() << tr("Temp") << g_get_tmp_dir() << tr("untitled capture files"));
|
||||
+ appendRow(QStringList() << tr("Temp") << get_tmp_dir() << tr("untitled capture files"));
|
||||
- appendRow(QStringList() << tr("Temp") << (global_capture_opts.temp_dir && global_capture_opts.temp_dir[0] ? global_capture_opts.temp_dir : g_get_tmp_dir()) << tr("untitled capture files"));
|
||||
+ appendRow(QStringList() << tr("Temp") << (global_capture_opts.temp_dir && global_capture_opts.temp_dir[0] ? global_capture_opts.temp_dir : get_tmp_dir()) << tr("untitled capture files"));
|
||||
|
||||
/* pers conf */
|
||||
appendRow(QStringList() << tr("Personal configuration")
|
||||
diff --git a/ui/qt/iax2_analysis_dialog.cpp b/ui/qt/iax2_analysis_dialog.cpp
|
||||
index ee4e5fd..fe17a95 100644
|
||||
index 07b9b42e01..fb09de989b 100644
|
||||
--- a/ui/qt/iax2_analysis_dialog.cpp
|
||||
+++ b/ui/qt/iax2_analysis_dialog.cpp
|
||||
@@ -37,6 +37,7 @@
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "ui/rtp_stream.h"
|
||||
#endif
|
||||
#include <wsutil/utf8_entities.h>
|
||||
|
@ -51,7 +51,7 @@ index ee4e5fd..fe17a95 100644
|
|||
|
||||
#include <wsutil/g711.h>
|
||||
#include <wsutil/pint.h>
|
||||
@@ -271,10 +272,10 @@ Iax2AnalysisDialog::Iax2AnalysisDialog(QWidget &parent, CaptureFile &cf) :
|
||||
@@ -255,10 +256,10 @@ Iax2AnalysisDialog::Iax2AnalysisDialog(QWidget &parent, CaptureFile &cf) :
|
||||
|
||||
// We keep our temp files open for the lifetime of the dialog. The GTK+
|
||||
// UI opens and closes at various points.
|
||||
|
@ -64,113 +64,89 @@ index ee4e5fd..fe17a95 100644
|
|||
rev_tempfile_ = new QTemporaryFile(tempname, this);
|
||||
rev_tempfile_->open();
|
||||
|
||||
diff --git a/ui/qt/rtp_analysis_dialog.cpp b/ui/qt/rtp_analysis_dialog.cpp
|
||||
index 5d82e46..8008984 100644
|
||||
--- a/ui/qt/rtp_analysis_dialog.cpp
|
||||
+++ b/ui/qt/rtp_analysis_dialog.cpp
|
||||
@@ -37,6 +37,7 @@
|
||||
diff --git a/ui/qt/utils/rtp_audio_file.cpp b/ui/qt/utils/rtp_audio_file.cpp
|
||||
index 591a63bbf3..203f5c5286 100644
|
||||
--- a/ui/qt/utils/rtp_audio_file.cpp
|
||||
+++ b/ui/qt/utils/rtp_audio_file.cpp
|
||||
@@ -31,6 +31,7 @@
|
||||
|
||||
#include <wsutil/g711.h>
|
||||
#include <wsutil/pint.h>
|
||||
#include "rtp_audio_file.h"
|
||||
#include <ws_attributes.h>
|
||||
+#include <wsutil/wstmpdir.h> /* for get_tmp_dir() */
|
||||
|
||||
#include <QMessageBox>
|
||||
#include <QPushButton>
|
||||
@@ -331,10 +332,10 @@ RtpAnalysisDialog::RtpAnalysisDialog(QWidget &parent, CaptureFile &cf, struct _r
|
||||
|
||||
// We keep our temp files open for the lifetime of the dialog. The GTK+
|
||||
// UI opens and closes at various points.
|
||||
- QString tempname = QString("%1/wireshark_rtp_f").arg(QDir::tempPath());
|
||||
+ QString tempname = QString("%1/wireshark_rtp_f").arg(get_tmp_dir());
|
||||
fwd_tempfile_ = new QTemporaryFile(tempname, this);
|
||||
fwd_tempfile_->open();
|
||||
- tempname = QString("%1/wireshark_rtp_r").arg(QDir::tempPath());
|
||||
+ tempname = QString("%1/wireshark_rtp_r").arg(get_tmp_dir());
|
||||
rev_tempfile_ = new QTemporaryFile(tempname, this);
|
||||
rev_tempfile_->open();
|
||||
|
||||
diff --git a/ui/qt/rtp_audio_stream.cpp b/ui/qt/rtp_audio_stream.cpp
|
||||
index fde66c8..b9531d2 100644
|
||||
--- a/ui/qt/rtp_audio_stream.cpp
|
||||
+++ b/ui/qt/rtp_audio_stream.cpp
|
||||
@@ -37,6 +37,7 @@
|
||||
#include <ui/rtp_stream.h>
|
||||
|
||||
#include <wsutil/nstime.h>
|
||||
+#include <wsutil/wstmpdir.h> /* for get_tmp_dir() */
|
||||
|
||||
#include <QAudioFormat>
|
||||
#include <QAudioOutput>
|
||||
@@ -76,7 +77,7 @@ RtpAudioStream::RtpAudioStream(QObject *parent, _rtp_stream_info *rtp_stream) :
|
||||
visual_sample_rate_, SPEEX_RESAMPLER_QUALITY_MIN, NULL);
|
||||
speex_resampler_skip_zeros(visual_resampler_);
|
||||
|
||||
- QString tempname = QString("%1/wireshark_rtp_stream").arg(QDir::tempPath());
|
||||
+ QString tempname = QString("%1/wireshark_rtp_stream").arg(get_tmp_dir());
|
||||
tempfile_ = new QTemporaryFile(tempname, this);
|
||||
tempfile_->open();
|
||||
RtpAudioFile::RtpAudioFile(bool use_disk_for_temp, bool use_disk_for_frames):
|
||||
real_pos_(0)
|
||||
@@ -45,7 +46,7 @@ RtpAudioFile::RtpAudioFile(bool use_disk_for_temp, bool use_disk_for_frames):
|
||||
|
||||
tempname = "memory";
|
||||
if (use_disk_for_temp) {
|
||||
- tempname = QString("%1/wireshark_rtp_stream").arg(QDir::tempPath());
|
||||
+ tempname = QString("%1/wireshark_rtp_stream").arg(get_tmp_dir());
|
||||
sample_file_ = new QTemporaryFile(tempname, this);
|
||||
} else {
|
||||
sample_file_ = new QBuffer(this);
|
||||
diff --git a/wsutil/tempfile.c b/wsutil/tempfile.c
|
||||
index 5082452..f751a7c 100644
|
||||
index f93f96d538..73964a1def 100644
|
||||
--- a/wsutil/tempfile.c
|
||||
+++ b/wsutil/tempfile.c
|
||||
@@ -12,10 +12,12 @@
|
||||
|
||||
#include <glib.h>
|
||||
@@ -14,10 +14,12 @@
|
||||
|
||||
#include "tempfile.h"
|
||||
#include "file_util.h"
|
||||
+#include <wsutil/file_util.h>
|
||||
+#include <wsutil/wstmpdir.h> /* for get_tmp_dir() */
|
||||
|
||||
|
||||
/**
|
||||
* Create a tempfile with the given prefix (e.g. "wireshark"). The path
|
||||
- * is created using g_file_open_tmp.
|
||||
+ * is created using get_tmp_dir.
|
||||
*
|
||||
* @param tempdir [in] If not NULL, the directory in which to create the file.
|
||||
* @param namebuf [in,out] If not NULL, receives the full path of the temp file.
|
||||
* Must be freed.
|
||||
@@ -30,6 +31,9 @@ create_tempfile(gchar **namebuf, const char *pfx, const char *sfx, GError **err)
|
||||
@@ -33,6 +33,9 @@ create_tempfile(const char *tempdir, gchar **namebuf, const char *pfx, const cha
|
||||
{
|
||||
int fd;
|
||||
gchar *safe_pfx = NULL;
|
||||
+ gchar *tmp_file;
|
||||
+ const char *tmp_dir;
|
||||
+ int old_mask;
|
||||
|
||||
|
||||
if (pfx) {
|
||||
/* The characters in "delimiters" come from:
|
||||
@@ -49,7 +53,15 @@ create_tempfile(gchar **namebuf, const char *pfx, const char *sfx, GError **err)
|
||||
gchar* filetmpl = g_strdup_printf("%sXXXXXX%s", safe_pfx ? safe_pfx : "", sfx ? sfx : "");
|
||||
g_free(safe_pfx);
|
||||
|
||||
- fd = g_file_open_tmp(filetmpl, namebuf, err);
|
||||
+ tmp_dir = get_tmp_dir();
|
||||
+ tmp_file = g_strconcat(tmp_dir, "/", filetmpl, NULL);
|
||||
@@ -54,7 +57,16 @@ create_tempfile(const char *tempdir, gchar **namebuf, const char *pfx, const cha
|
||||
gchar* filetmpl = ws_strdup_printf("%sXXXXXX%s", safe_pfx ? safe_pfx : "", sfx ? sfx : "");
|
||||
g_free(safe_pfx);
|
||||
|
||||
- fd = g_file_open_tmp(filetmpl, namebuf, err);
|
||||
+ tmp_dir = get_tmp_dir();
|
||||
+ tmp_file = g_strconcat(tmp_dir, "/", filetmpl, NULL);
|
||||
+
|
||||
+ if (namebuf)
|
||||
+ *namebuf = tmp_file;
|
||||
+ if (namebuf)
|
||||
+ *namebuf = tmp_file;
|
||||
+
|
||||
+ old_mask = ws_umask(0077);
|
||||
+ fd = mkstemps(tmp_file, sfx ? (int) strlen(sfx) : 0);
|
||||
+ ws_umask(old_mask);
|
||||
|
||||
g_free(filetmpl);
|
||||
return fd;
|
||||
+ old_mask = ws_umask(0077);
|
||||
+ fd = mkstemps(tmp_file, sfx ? (int) strlen(sfx) : 0);
|
||||
+ ws_umask(old_mask);
|
||||
+
|
||||
g_free(filetmpl);
|
||||
}
|
||||
else {
|
||||
diff --git a/wsutil/tempfile.h b/wsutil/tempfile.h
|
||||
index 1dca2df..bb3160c 100644
|
||||
index 70031b5419..72011e265a 100644
|
||||
--- a/wsutil/tempfile.h
|
||||
+++ b/wsutil/tempfile.h
|
||||
@@ -45,7 +45,7 @@ WS_DLL_PUBLIC char *get_tempfile_path(const char *filename);
|
||||
@@ -23,7 +23,7 @@ extern "C" {
|
||||
|
||||
/**
|
||||
* Create a tempfile with the given prefix (e.g. "wireshark"). The path
|
||||
- * is created using g_file_open_tmp.
|
||||
+ * is created using get_tmp_dir and mkstemp.
|
||||
*
|
||||
* @param tempdir [in] If not NULL, the directory in which to create the file.
|
||||
* @param namebuf [in,out] If not NULL, receives the full path of the temp file.
|
||||
* Must be freed.
|
||||
diff --git a/wsutil/wstmpdir.c b/wsutil/wstmpdir.c
|
||||
new file mode 100644
|
||||
index 0000000..d8b733b
|
||||
index 0000000000..9128d354ce
|
||||
--- /dev/null
|
||||
+++ b/wsutil/wstmpdir.c
|
||||
@@ -0,0 +1,71 @@
|
||||
|
@ -247,7 +223,7 @@ index 0000000..d8b733b
|
|||
+}
|
||||
diff --git a/wsutil/wstmpdir.h b/wsutil/wstmpdir.h
|
||||
new file mode 100644
|
||||
index 0000000..07ac583
|
||||
index 0000000000..07ac5837ac
|
||||
--- /dev/null
|
||||
+++ b/wsutil/wstmpdir.h
|
||||
@@ -0,0 +1,39 @@
|
||||
|
@ -291,5 +267,5 @@ index 0000000..07ac583
|
|||
+
|
||||
+#endif
|
||||
--
|
||||
2.13.0
|
||||
2.37.3
|
||||
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
diff --git a/wsutil/CMakeLists.txt b/wsutil/CMakeLists.txt
|
||||
index 0367cd1..6382a2c 100644
|
||||
index a55086c..0149801 100644
|
||||
--- a/wsutil/CMakeLists.txt
|
||||
+++ b/wsutil/CMakeLists.txt
|
||||
@@ -69,6 +69,7 @@ set(WSUTIL_PUBLIC_HEADERS
|
||||
ws_mempbrk_int.h
|
||||
ws_pipe.h
|
||||
ws_printf.h
|
||||
@@ -80,6 +80,7 @@ set(WSUTIL_PUBLIC_HEADERS
|
||||
ws_roundup.h
|
||||
ws_return.h
|
||||
wsgcrypt.h
|
||||
+ wstmpdir.h
|
||||
wsjson.h
|
||||
wslog.h
|
||||
xtea.h
|
||||
)
|
||||
@@ -118,6 +118,7 @@ set(WSUTIL_COMMON_FILES
|
||||
unicode-utils.c
|
||||
@@ -135,6 +136,7 @@ set(WSUTIL_COMMON_FILES
|
||||
ws_mempbrk.c
|
||||
ws_pipe.c
|
||||
+ wstmpdir.c
|
||||
wsgcrypt.c
|
||||
+ wstmpdir.c
|
||||
wsjson.c
|
||||
wslog.c
|
||||
xtea.c
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
diff --git a/ui/qt/wireshark_main_window_slots.cpp b/ui/qt/wireshark_main_window_slots.cpp
|
||||
index 0594ff6..3068797 100644
|
||||
--- a/ui/qt/wireshark_main_window_slots.cpp
|
||||
+++ b/ui/qt/wireshark_main_window_slots.cpp
|
||||
@@ -2513,7 +2513,7 @@ void WiresharkMainWindow::showHideMainWidgets(QAction *action)
|
||||
if (widget == toolbar) {
|
||||
GList *entry = g_list_find_custom(recent.interface_toolbars, action->text().toUtf8(), (GCompareFunc)strcmp);
|
||||
if (show && !entry) {
|
||||
- recent.interface_toolbars = g_list_append(recent.interface_toolbars, g_strdup(action->text().toUtf8()));
|
||||
+ recent.interface_toolbars = g_list_append(recent.interface_toolbars, g_strdup(action->text().toUtf8().constData()));
|
||||
} else if (!show && entry) {
|
||||
recent.interface_toolbars = g_list_remove(recent.interface_toolbars, entry->data);
|
||||
}
|
|
@ -0,0 +1,213 @@
|
|||
From 601bf39e6b2eaff9e77588ff1b1a8a987dad404d Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Jo=C3=A3o=20Valverde?= <j@v6e.pt>
|
||||
Date: Fri, 26 May 2023 14:16:06 +0100
|
||||
Subject: [PATCH] CMake: Remove module LocatePythonModule.cmake
|
||||
|
||||
This module is unnecessary and frequently causes hard-to-debug
|
||||
issues during CMake's configure run. Nuke it.
|
||||
---
|
||||
cmake/modules/LocatePythonModule.cmake | 53 --------------------------
|
||||
cmake/modules/UseAsn2Wrs.cmake | 13 ++-----
|
||||
cmake/modules/UseMakePluginReg.cmake | 7 +---
|
||||
3 files changed, 6 insertions(+), 67 deletions(-)
|
||||
delete mode 100644 cmake/modules/LocatePythonModule.cmake
|
||||
|
||||
diff --git a/cmake/modules/LocatePythonModule.cmake b/cmake/modules/LocatePythonModule.cmake
|
||||
deleted file mode 100644
|
||||
index 3fbe0c7..0000000
|
||||
--- a/cmake/modules/LocatePythonModule.cmake
|
||||
+++ /dev/null
|
||||
@@ -1,53 +0,0 @@
|
||||
-#LOCATE_PYTHON_MODULE(<module> [PATHS <path1> ... <pathN>] [REQUIRED])
|
||||
-#
|
||||
-# This function tries to find the given python module.
|
||||
-# If found the path is provided in <PY_<module> and <<module>_FOUND> is set to TRUE.
|
||||
-#
|
||||
-# After PATHS additional paths for python to search can be provided.
|
||||
-# When REQUIRED is set, the function will abort the cmake execution is the module is not found
|
||||
-function(LOCATE_PYTHON_MODULE module)
|
||||
- if(NOT PYTHON_EXECUTABLE)
|
||||
- find_package(PythonInterp)
|
||||
- endif()
|
||||
-
|
||||
- # Parse (additional) arguments
|
||||
- set(options REQUIRED)
|
||||
- set(multiValueArgs PATHS)
|
||||
- cmake_parse_arguments(LPM "${options}" "" "${multiValueArgs}" ${ARGN})
|
||||
-
|
||||
- string(TOUPPER ${module} module_upper)
|
||||
- if(NOT PY_${module_upper})
|
||||
-
|
||||
- if(LPM_PATHS)
|
||||
- # Append LPM_PATHS to PYTHONPATH to search at provided location (first)
|
||||
- file(TO_CMAKE_PATH "$ENV{PYTHONPATH}" CMAKE_PATH)
|
||||
- list(INSERT CMAKE_PATH 0 ${LPM_PATHS})
|
||||
- file(TO_NATIVE_PATH "${CMAKE_PATH}" NATIVE_PATH)
|
||||
- if(UNIX)
|
||||
- string(REPLACE ";" ":" NATIVE_PATH "${NATIVE_PATH}")
|
||||
- endif(UNIX)
|
||||
- set(ENV{PYTHONPATH} "${NATIVE_PATH}")
|
||||
- endif(LPM_PATHS)
|
||||
-
|
||||
- # Use the (native) python impl module to find the location of the requested module
|
||||
- execute_process(COMMAND "${PYTHON_EXECUTABLE}" "-c"
|
||||
- "import imp; print(imp.find_module('${module}')[1])"
|
||||
- RESULT_VARIABLE _${module}_status
|
||||
- OUTPUT_VARIABLE _${module}_location
|
||||
- ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
-
|
||||
- if(NOT _${module}_status)
|
||||
- set(PY_${module_upper} ${_${module}_location} CACHE STRING
|
||||
- "Location of Python module ${module}")
|
||||
- set(${module_upper}_FOUND TRUE)
|
||||
- message(STATUS "Found python module ${module}: ${PY_${module_upper}}")
|
||||
- else(NOT _${module}_status)
|
||||
- set(${module_upper}_FOUND FALSE)
|
||||
- if(LPM_REQUIRED)
|
||||
- message(FATAL_ERROR "Could NOT find python module ${module}")
|
||||
- else(LPM_REQUIRED)
|
||||
- message(STATUS "Could NOT find python module ${module}")
|
||||
- endif(LPM_REQUIRED)
|
||||
- endif(NOT _${module}_status)
|
||||
- endif(NOT PY_${module_upper})
|
||||
-endfunction(LOCATE_PYTHON_MODULE)
|
||||
diff --git a/cmake/modules/UseMakePluginReg.cmake b/cmake/modules/UseMakePluginReg.cmake
|
||||
index e6e6a91..fe57381 100644
|
||||
--- a/cmake/modules/UseMakePluginReg.cmake
|
||||
+++ b/cmake/modules/UseMakePluginReg.cmake
|
||||
@@ -1,20 +1,17 @@
|
||||
#
|
||||
function(register_plugin_files _outputfile _registertype)
|
||||
- include(LocatePythonModule)
|
||||
- locate_python_module(make-plugin-reg REQUIRED PATHS ${CMAKE_SOURCE_DIR}/tools)
|
||||
-
|
||||
file(RELATIVE_PATH output "${CMAKE_BINARY_DIR}" "${CMAKE_CURRENT_BINARY_DIR}/${_outputfile}")
|
||||
add_custom_command(
|
||||
OUTPUT
|
||||
${_outputfile}
|
||||
COMMAND ${PYTHON_EXECUTABLE}
|
||||
- ${PY_MAKE-PLUGIN-REG}
|
||||
+ ${CMAKE_SOURCE_DIR}/tools/make-plugin-reg.py
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${_registertype}
|
||||
${ARGN}
|
||||
COMMENT "Generating ${output}"
|
||||
DEPENDS
|
||||
${ARGN}
|
||||
- ${PY_MAKE-PLUGIN-REG}
|
||||
+ ${CMAKE_SOURCE_DIR}/tools/make-plugin-reg.py
|
||||
)
|
||||
endfunction()
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 6db2e46..21e71e8 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -3825,7 +3825,6 @@ install(
|
||||
${WS_CMAKE_MODULE_PATH}/FindWSLibrary.cmake
|
||||
${WS_CMAKE_MODULE_PATH}/FindWSWinLibs.cmake
|
||||
${WS_CMAKE_MODULE_PATH}/UseAsn2Wrs.cmake
|
||||
- ${WS_CMAKE_MODULE_PATH}/LocatePythonModule.cmake
|
||||
${WS_CMAKE_MODULE_PATH}/UseMakePluginReg.cmake
|
||||
DESTINATION
|
||||
${WIRESHARK_INSTALL_CMAKEDIR}
|
||||
diff --git a/cmake/modules/FindAsciidoctor.cmake b/cmake/modules/FindAsciidoctor.cmake
|
||||
index 67cbc8d..929a4eb 100644
|
||||
--- a/cmake/modules/FindAsciidoctor.cmake
|
||||
+++ b/cmake/modules/FindAsciidoctor.cmake
|
||||
@@ -124,7 +124,7 @@ if(ASCIIDOCTOR_EXECUTABLE)
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT
|
||||
${_output_txt}
|
||||
- COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/tools/html2text.py
|
||||
+ COMMAND ${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/tools/html2text.py
|
||||
${_output_html}
|
||||
> ${_output_txt}
|
||||
DEPENDS
|
||||
diff --git a/cmake/modules/UseMakePluginReg.cmake b/cmake/modules/UseMakePluginReg.cmake
|
||||
index fe57381..0c7198d 100644
|
||||
--- a/cmake/modules/UseMakePluginReg.cmake
|
||||
+++ b/cmake/modules/UseMakePluginReg.cmake
|
||||
@@ -4,7 +4,7 @@ function(register_plugin_files _outputfile _registertype)
|
||||
add_custom_command(
|
||||
OUTPUT
|
||||
${_outputfile}
|
||||
- COMMAND ${PYTHON_EXECUTABLE}
|
||||
+ COMMAND ${Python3_EXECUTABLE}
|
||||
${CMAKE_SOURCE_DIR}/tools/make-plugin-reg.py
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${_registertype}
|
||||
diff --git a/cmake/modules/UseMakeTaps.cmake b/cmake/modules/UseMakeTaps.cmake
|
||||
index aed9318..56fd628 100644
|
||||
--- a/cmake/modules/UseMakeTaps.cmake
|
||||
+++ b/cmake/modules/UseMakeTaps.cmake
|
||||
@@ -5,7 +5,7 @@ MACRO(REGISTER_TAP_FILES _outputfile)
|
||||
OUTPUT
|
||||
${_outputfile}
|
||||
COMMAND
|
||||
- ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/tools/make-regs.py taps ${_outputfile} ${_sources}
|
||||
+ ${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/tools/make-regs.py taps ${_outputfile} ${_sources}
|
||||
DEPENDS
|
||||
${CMAKE_SOURCE_DIR}/tools/make-regs.py
|
||||
${_sources}
|
||||
diff --git a/cmake/modules/UseAsn2Wrs.cmake b/cmake/modules/UseAsn2Wrs.cmake
|
||||
index 9d7cdfe..6b0c46c 100644
|
||||
--- a/cmake/modules/UseAsn2Wrs.cmake
|
||||
+++ b/cmake/modules/UseAsn2Wrs.cmake
|
||||
@@ -6,11 +6,6 @@
|
||||
# absolute path (e.g. "${CMAKE_CURRENT_SOURCE_DIR}").
|
||||
|
||||
function(ASN2WRS)
|
||||
- if(NOT PY_ASN2WRS)
|
||||
- include(LocatePythonModule)
|
||||
- locate_python_module(asn2wrs REQUIRED PATHS "${CMAKE_SOURCE_DIR}/tools")
|
||||
- endif()
|
||||
-
|
||||
if(NOT PROTO_OPT)
|
||||
set(PROTO_OPT -p ${PROTOCOL_NAME})
|
||||
elseif(PROTO_OPT STREQUAL "_EMPTY_")
|
||||
@@ -38,8 +33,8 @@ function(ASN2WRS)
|
||||
# Creates a dissector in the source directory and store the timestamp.
|
||||
add_custom_command(
|
||||
OUTPUT packet-${PROTOCOL_NAME}-stamp
|
||||
- COMMAND "${PYTHON_EXECUTABLE}"
|
||||
- ${PY_ASN2WRS}
|
||||
+ COMMAND "${Python3_EXECUTABLE}"
|
||||
+ ${CMAKE_SOURCE_DIR}/tools/asn2wrs.py
|
||||
${A2W_FLAGS}
|
||||
${PROTO_OPT}
|
||||
-c "${CMAKE_CURRENT_SOURCE_DIR}/${PROTOCOL_NAME}.cnf"
|
||||
@@ -48,12 +43,12 @@ function(ASN2WRS)
|
||||
-O "${A2W_OUTPUT_DIR}"
|
||||
${EXT_ASN_FILE_LIST} ${ASN_FILE_LIST} ${EXT_ASN_FILE_LIST_LATE}
|
||||
COMMAND
|
||||
- "${PYTHON_EXECUTABLE}" -c
|
||||
+ "${Python3_EXECUTABLE}" -c
|
||||
"import shutil, sys; x,s,d=sys.argv; open(d, 'w'); shutil.copystat(s, d)"
|
||||
"${A2W_OUTPUT_DIR}/packet-${PROTOCOL_NAME}.c"
|
||||
packet-${PROTOCOL_NAME}-stamp
|
||||
DEPENDS
|
||||
- "${PY_ASN2WRS}"
|
||||
+ ${CMAKE_SOURCE_DIR}/tools/asn2wrs.py
|
||||
${SRC_FILES}
|
||||
${EXTRA_CNF_targets}
|
||||
${EXTRA_CNF}
|
||||
@@ -67,8 +62,8 @@ function(ASN2WRS)
|
||||
foreach(_asn2wrs_export_file IN LISTS EXPORT_FILES)
|
||||
add_custom_command(
|
||||
OUTPUT ${_asn2wrs_export_file}
|
||||
- COMMAND "${PYTHON_EXECUTABLE}"
|
||||
- "${PY_ASN2WRS}"
|
||||
+ COMMAND "${Python3_EXECUTABLE}"
|
||||
+ ${CMAKE_SOURCE_DIR}/tools/asn2wrs.py
|
||||
-E
|
||||
${A2W_FLAGS}
|
||||
${PROTO_OPT}
|
||||
@@ -76,7 +71,7 @@ function(ASN2WRS)
|
||||
-D "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
${EXT_ASN_FILE_LIST} ${ASN_FILE_LIST} ${EXT_ASN_FILE_LIST_LATE}
|
||||
DEPENDS
|
||||
- "${PY_ASN2WRS}"
|
||||
+ ${CMAKE_SOURCE_DIR}/tools/asn2wrs.py
|
||||
${SRC_FILES}
|
||||
${EXPORT_DEPENDS_targets}
|
||||
${EXPORT_DEPENDS}
|
|
@ -0,0 +1,164 @@
|
|||
diff --git a/capinfos.c b/capinfos.c
|
||||
index 3c7866befd..da576f88c5 100644
|
||||
--- a/capinfos.c
|
||||
+++ b/capinfos.c
|
||||
@@ -141,7 +141,6 @@ static gboolean cap_file_hashes = TRUE; /* Calculate file hashes */
|
||||
|
||||
// Strongest to weakest
|
||||
#define HASH_SIZE_SHA256 32
|
||||
-#define HASH_SIZE_RMD160 20
|
||||
#define HASH_SIZE_SHA1 20
|
||||
|
||||
#define HASH_STR_SIZE (65) /* Max hash size * 2 + '\0' */
|
||||
@@ -743,7 +742,6 @@ print_stats(const gchar *filename, capture_info *cf_info)
|
||||
}
|
||||
if (cap_file_hashes) {
|
||||
printf ("SHA256: %s\n", file_sha256);
|
||||
- printf ("RIPEMD160: %s\n", file_rmd160);
|
||||
printf ("SHA1: %s\n", file_sha1);
|
||||
}
|
||||
if (cap_order) printf ("Strict time order: %s\n", order_string(cf_info->order));
|
||||
@@ -857,7 +855,6 @@ print_stats_table_header(void)
|
||||
if (cap_packet_rate) print_stats_table_header_label("Average packet rate (packets/sec)");
|
||||
if (cap_file_hashes) {
|
||||
print_stats_table_header_label("SHA256");
|
||||
- print_stats_table_header_label("RIPEMD160");
|
||||
print_stats_table_header_label("SHA1");
|
||||
}
|
||||
if (cap_order) print_stats_table_header_label("Strict time order");
|
||||
@@ -1182,7 +1179,6 @@ calculate_hashes(const char *filename)
|
||||
}
|
||||
gcry_md_final(hd);
|
||||
hash_to_str(gcry_md_read(hd, GCRY_MD_SHA256), HASH_SIZE_SHA256, file_sha256);
|
||||
- hash_to_str(gcry_md_read(hd, GCRY_MD_RMD160), HASH_SIZE_RMD160, file_rmd160);
|
||||
hash_to_str(gcry_md_read(hd, GCRY_MD_SHA1), HASH_SIZE_SHA1, file_sha1);
|
||||
}
|
||||
if (fh) fclose(fh);
|
||||
@@ -1489,7 +1485,7 @@ print_usage(FILE *output)
|
||||
fprintf(output, " -E display the capture file encapsulation\n");
|
||||
fprintf(output, " -I display the capture file interface information\n");
|
||||
fprintf(output, " -F display additional capture file information\n");
|
||||
- fprintf(output, " -H display the SHA256, RIPEMD160, and SHA1 hashes of the file\n");
|
||||
+ fprintf(output, " -H display the SHA256 and SHA1 hashes of the file\n");
|
||||
fprintf(output, " -k display the capture comment\n");
|
||||
fprintf(output, "\n");
|
||||
fprintf(output, "Size infos:\n");
|
||||
@@ -1842,10 +1838,9 @@ main(int argc, char *argv[])
|
||||
if (cap_file_hashes) {
|
||||
gcry_check_version(NULL);
|
||||
gcry_md_open(&hd, GCRY_MD_SHA256, 0);
|
||||
- if (hd) {
|
||||
- gcry_md_enable(hd, GCRY_MD_RMD160);
|
||||
+ if (hd)
|
||||
gcry_md_enable(hd, GCRY_MD_SHA1);
|
||||
- }
|
||||
+
|
||||
hash_buf = (char *)g_malloc(HASH_BUF_SIZE);
|
||||
}
|
||||
|
||||
diff --git a/doc/capinfos.adoc b/doc/capinfos.adoc
|
||||
index 16ed2e300a..124fb56694 100644
|
||||
--- a/doc/capinfos.adoc
|
||||
+++ b/doc/capinfos.adoc
|
||||
@@ -200,7 +200,7 @@ Prints the help listing and exits.
|
||||
-H::
|
||||
+
|
||||
--
|
||||
-Displays the SHA256, RIPEMD160, and SHA1 hashes for the file.
|
||||
+Displays the SHA256 and SHA1 hashes for the file.
|
||||
SHA1 output may be removed in the future.
|
||||
--
|
||||
|
||||
diff --git a/capinfos.c b/capinfos.c
|
||||
index f0059f4e54..e153097219 100644
|
||||
--- a/capinfos.c
|
||||
+++ b/capinfos.c
|
||||
@@ -148,7 +148,6 @@ static gboolean cap_file_hashes = TRUE; /* Calculate file hashes */
|
||||
|
||||
|
||||
static gchar file_sha256[HASH_STR_SIZE];
|
||||
-static gchar file_rmd160[HASH_STR_SIZE];
|
||||
static gchar file_sha1[HASH_STR_SIZE];
|
||||
|
||||
static char *hash_buf = NULL;
|
||||
@@ -1024,11 +1023,6 @@ print_stats_table(const gchar *filename, capture_info *cf_info)
|
||||
printf("%s", file_sha256);
|
||||
putquote();
|
||||
|
||||
- putsep();
|
||||
- putquote();
|
||||
- printf("%s", file_rmd160);
|
||||
- putquote();
|
||||
-
|
||||
putsep();
|
||||
putquote();
|
||||
printf("%s", file_sha1);
|
||||
@@ -1168,7 +1162,6 @@ calculate_hashes(const char *filename)
|
||||
size_t hash_bytes;
|
||||
|
||||
(void) g_strlcpy(file_sha256, "<unknown>", HASH_STR_SIZE);
|
||||
- (void) g_strlcpy(file_rmd160, "<unknown>", HASH_STR_SIZE);
|
||||
(void) g_strlcpy(file_sha1, "<unknown>", HASH_STR_SIZE);
|
||||
|
||||
if (cap_file_hashes) {
|
||||
diff --git a/ui/qt/capture_file_properties_dialog.cpp b/ui/qt/capture_file_properties_dialog.cpp
|
||||
index 9e5b86a7fd..c77056818c 100644
|
||||
--- a/ui/qt/capture_file_properties_dialog.cpp
|
||||
+++ b/ui/qt/capture_file_properties_dialog.cpp
|
||||
@@ -175,11 +175,6 @@ QString CaptureFilePropertiesDialog::summaryToHtml()
|
||||
<< table_data_tmpl.arg(summary.file_sha256)
|
||||
<< table_row_end;
|
||||
|
||||
- out << table_row_begin
|
||||
- << table_vheader_tmpl.arg(tr("Hash (RIPEMD160)"))
|
||||
- << table_data_tmpl.arg(summary.file_rmd160)
|
||||
- << table_row_end;
|
||||
-
|
||||
out << table_row_begin
|
||||
<< table_vheader_tmpl.arg(tr("Hash (SHA1)"))
|
||||
<< table_data_tmpl.arg(summary.file_sha1)
|
||||
diff --git a/ui/summary.c b/ui/summary.c
|
||||
index 127698fd5c..58c7cd68a4 100644
|
||||
--- a/ui/summary.c
|
||||
+++ b/ui/summary.c
|
||||
@@ -21,7 +21,6 @@
|
||||
|
||||
// Strongest to weakest
|
||||
#define HASH_SIZE_SHA256 32
|
||||
-#define HASH_SIZE_RMD160 20
|
||||
#define HASH_SIZE_SHA1 20
|
||||
|
||||
#define HASH_BUF_SIZE (1024 * 1024)
|
||||
@@ -213,12 +212,10 @@ summary_fill_in(capture_file *cf, summary_tally *st)
|
||||
g_free(idb_info);
|
||||
|
||||
(void) g_strlcpy(st->file_sha256, "<unknown>", HASH_STR_SIZE);
|
||||
- (void) g_strlcpy(st->file_rmd160, "<unknown>", HASH_STR_SIZE);
|
||||
(void) g_strlcpy(st->file_sha1, "<unknown>", HASH_STR_SIZE);
|
||||
|
||||
gcry_md_open(&hd, GCRY_MD_SHA256, 0);
|
||||
if (hd) {
|
||||
- gcry_md_enable(hd, GCRY_MD_RMD160);
|
||||
gcry_md_enable(hd, GCRY_MD_SHA1);
|
||||
}
|
||||
hash_buf = (char *)g_malloc(HASH_BUF_SIZE);
|
||||
@@ -230,7 +227,6 @@ summary_fill_in(capture_file *cf, summary_tally *st)
|
||||
}
|
||||
gcry_md_final(hd);
|
||||
hash_to_str(gcry_md_read(hd, GCRY_MD_SHA256), HASH_SIZE_SHA256, st->file_sha256);
|
||||
- hash_to_str(gcry_md_read(hd, GCRY_MD_RMD160), HASH_SIZE_RMD160, st->file_rmd160);
|
||||
hash_to_str(gcry_md_read(hd, GCRY_MD_SHA1), HASH_SIZE_SHA1, st->file_sha1);
|
||||
}
|
||||
if (fh) fclose(fh);
|
||||
diff --git a/ui/summary.h b/ui/summary.h
|
||||
index 9063b99b77..95a51a38c0 100644
|
||||
--- a/ui/summary.h
|
||||
+++ b/ui/summary.h
|
||||
@@ -56,7 +56,6 @@ typedef struct _summary_tally {
|
||||
const char *filename; /**< path of capture file */
|
||||
gint64 file_length; /**< file length in bytes */
|
||||
gchar file_sha256[HASH_STR_SIZE]; /**< SHA256 hash of capture file */
|
||||
- gchar file_rmd160[HASH_STR_SIZE]; /**< RIPEMD160 hash of capture file */
|
||||
gchar file_sha1[HASH_STR_SIZE]; /**< SHA1 hash of capture file */
|
||||
int file_type; /**< wiretap file type */
|
||||
wtap_compression_type compression_type; /**< compression type of file, or uncompressed */
|
|
@ -0,0 +1,74 @@
|
|||
From 2d55e5672b07a8a102024e0af66e821bba51213b Mon Sep 17 00:00:00 2001
|
||||
From: Gerald Combs <gerald@wireshark.org>
|
||||
Date: Sun, 27 Aug 2023 14:47:52 -0700
|
||||
Subject: [PATCH] Qt: Fix ManageInterfacesDialog cleanup
|
||||
|
||||
Handle our ManageInterfacesDialog cleanup tasks inside our destructor.
|
||||
If we try to handle them in on_buttonBox_accepted we run into a race
|
||||
condition with WA_DeleteOnClose.
|
||||
|
||||
Fixes #19287
|
||||
---
|
||||
ui/qt/manage_interfaces_dialog.cpp | 25 ++++++++++++-------------
|
||||
ui/qt/manage_interfaces_dialog.h | 2 --
|
||||
2 files changed, 12 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/ui/qt/manage_interfaces_dialog.cpp b/ui/qt/manage_interfaces_dialog.cpp
|
||||
index cb9da8697b5..a8529e265a9 100644
|
||||
--- a/ui/qt/manage_interfaces_dialog.cpp
|
||||
+++ b/ui/qt/manage_interfaces_dialog.cpp
|
||||
@@ -209,6 +209,18 @@ ManageInterfacesDialog::ManageInterfacesDialog(QWidget *parent) :
|
||||
|
||||
ManageInterfacesDialog::~ManageInterfacesDialog()
|
||||
{
|
||||
+ if (result() == QDialog::Accepted) {
|
||||
+#ifdef HAVE_LIBPCAP
|
||||
+ sourceModel->save();
|
||||
+#endif
|
||||
+#ifdef HAVE_PCAP_REMOTE
|
||||
+ remoteAccepted();
|
||||
+#endif
|
||||
+ prefs_main_write();
|
||||
+ mainApp->refreshLocalInterfaces();
|
||||
+ emit ifsChanged();
|
||||
+ }
|
||||
+
|
||||
delete ui;
|
||||
}
|
||||
|
||||
@@ -252,19 +264,6 @@ void ManageInterfacesDialog::updateWidgets()
|
||||
ui->hintLabel->setText(hint);
|
||||
}
|
||||
|
||||
-void ManageInterfacesDialog::on_buttonBox_accepted()
|
||||
-{
|
||||
-#ifdef HAVE_LIBPCAP
|
||||
- sourceModel->save();
|
||||
-#endif
|
||||
-#ifdef HAVE_PCAP_REMOTE
|
||||
- remoteAccepted();
|
||||
-#endif
|
||||
- prefs_main_write();
|
||||
- mainApp->refreshLocalInterfaces();
|
||||
- emit ifsChanged();
|
||||
-}
|
||||
-
|
||||
#ifdef HAVE_LIBPCAP
|
||||
void ManageInterfacesDialog::on_addPipe_clicked()
|
||||
{
|
||||
diff --git a/ui/qt/manage_interfaces_dialog.h b/ui/qt/manage_interfaces_dialog.h
|
||||
index 80b78afbe7a..79e9d0d9bfa 100644
|
||||
--- a/ui/qt/manage_interfaces_dialog.h
|
||||
+++ b/ui/qt/manage_interfaces_dialog.h
|
||||
@@ -59,8 +59,6 @@ signals:
|
||||
private slots:
|
||||
void updateWidgets();
|
||||
|
||||
- void on_buttonBox_accepted();
|
||||
-
|
||||
#ifdef HAVE_LIBPCAP
|
||||
void on_addPipe_clicked();
|
||||
void on_delPipe_clicked();
|
||||
--
|
||||
GitLab
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"Signatures": {
|
||||
"90-wireshark-usbmon.rules": "31310c5e45835563ee9daba99bc09849cc004e8d9c712d0860211d5fa5563bcb",
|
||||
"wireshark-3.4.16.tar.xz": "6acb3155b89b65bcdbcdac7a9e6a59013a6e21d8ae6a8249a9af4fe9ce3d91ba"
|
||||
}
|
||||
"Signatures": {
|
||||
"90-wireshark-usbmon.rules": "31310c5e45835563ee9daba99bc09849cc004e8d9c712d0860211d5fa5563bcb",
|
||||
"wireshark-4.0.8.tar.xz": "16663585c0ffefd5593a6628d4a20cc8241b9703b11283cfe71ead2b750888c8"
|
||||
}
|
||||
}
|
|
@ -1,37 +1,30 @@
|
|||
%global with_lua 1
|
||||
%global with_maxminddb 1
|
||||
%global plugins_version 3.4
|
||||
%global plugins_version 4.0
|
||||
|
||||
Summary: Network traffic analyzer
|
||||
Name: wireshark
|
||||
Version: 4.0.8
|
||||
Release: 1%{?dist}
|
||||
License: BSD-1-Clause AND BSD-2-Clause AND BSD-3-Clause AND MIT AND GPL-2.0-or-later AND LGPL-2.0-or-later AND Zlib AND ISC AND (BSD-3-Clause OR GPL-2.0-only) AND (GPL-2.0-or-later AND Zlib)
|
||||
Vendor: Microsoft Corporation
|
||||
Distribution: Mariner
|
||||
Version: 3.4.16
|
||||
Release: 1%{?dist}
|
||||
License: BSD and GPLv2
|
||||
Url: https://www.wireshark.org/
|
||||
Source0: https://2.na.dl.wireshark.org/src/all-versions/%{name}-%{version}.tar.xz
|
||||
URL: https://www.wireshark.org/
|
||||
Source0: https://wireshark.org/download/src/%{name}-%{version}.tar.xz
|
||||
Source1: 90-wireshark-usbmon.rules
|
||||
|
||||
# Fedora-specific
|
||||
Patch2: wireshark-0002-Customize-permission-denied-error.patch
|
||||
# Will be proposed upstream
|
||||
Patch3: wireshark-0003-fix-string-overrun-in-plugins-profinet.patch
|
||||
# Fedora-specific
|
||||
Patch4: wireshark-0004-Restore-Fedora-specific-groups.patch
|
||||
# Fedora-specific
|
||||
Patch5: wireshark-0005-Fix-paths-in-a-wireshark.desktop-file.patch
|
||||
# Fedora-specific
|
||||
Patch6: wireshark-0006-Move-tmp-to-var-tmp.patch
|
||||
Patch7: wireshark-0007-cmakelists.patch
|
||||
|
||||
#install tshark together with wireshark GUI
|
||||
|
||||
|
||||
BuildRequires: bzip2-devel
|
||||
Patch8: wireshark-0008-glib2-g_strdup-build.patch
|
||||
Patch9: wireshark-0009-fix-asn2wrs-cmake.patch
|
||||
Patch10: wireshark-0010-ripemd-fips-core-dump.patch
|
||||
Patch11: wireshark-0011-manage-interfaces-crash.patch
|
||||
BuildRequires: bison
|
||||
BuildRequires: bzip2-devel
|
||||
BuildRequires: c-ares-devel
|
||||
Buildrequires: cmake
|
||||
BuildRequires: cmake
|
||||
BuildRequires: elfutils-devel
|
||||
BuildRequires: flex
|
||||
BuildRequires: gcc-c++
|
||||
|
@ -41,28 +34,30 @@ BuildRequires: gnutls-devel
|
|||
BuildRequires: krb5-devel
|
||||
BuildRequires: libcap-devel
|
||||
BuildRequires: libgcrypt-devel
|
||||
BuildRequires: libnl3-devel
|
||||
BuildRequires: libnghttp2-devel
|
||||
BuildRequires: libnl3-devel
|
||||
BuildRequires: libpcap-devel >= 0.9
|
||||
BuildRequires: libselinux-devel
|
||||
BuildRequires: libsmi-devel
|
||||
BuildRequires: libssh-devel
|
||||
BuildRequires: openssl-devel
|
||||
BuildRequires: pcre-devel
|
||||
BuildRequires: pcre2-devel
|
||||
BuildRequires: python3
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: systemd-devel
|
||||
BuildRequires: xdg-utils
|
||||
BuildRequires: zlib-devel
|
||||
BuildRequires: perl(English)
|
||||
BuildRequires: perl(Pod::Html)
|
||||
BuildRequires: perl(Pod::Man)
|
||||
BuildRequires: perl(open)
|
||||
BuildRequires: python3
|
||||
Buildrequires: python3-devel
|
||||
BuildRequires: systemd-devel
|
||||
BuildRequires: xdg-utils
|
||||
BuildRequires: zlib-devel
|
||||
#install tshark together with wireshark GUI
|
||||
Requires: %{name}-cli = %{version}-%{release}
|
||||
Requires: c-ares
|
||||
Requires: glib2
|
||||
Requires: systemd-libs
|
||||
Requires: zlib
|
||||
Requires: %{name}-cli = %{version}-%{release}
|
||||
|
||||
%description
|
||||
Wireshark allows you to examine protocol data stored in files or as it is
|
||||
|
@ -76,24 +71,25 @@ example, view a complete TCP stream, save the contents of a file which was
|
|||
transferred over HTTP or CIFS, or play back an RTP audio stream.
|
||||
|
||||
%package cli
|
||||
Summary: Network traffic analyzer
|
||||
Requires(pre): shadow-utils
|
||||
Requires(post): systemd-udev
|
||||
Summary: Network traffic analyzer
|
||||
Requires(post): systemd-udev
|
||||
Requires(pre): shadow-utils
|
||||
|
||||
%description cli
|
||||
This package contains command-line utilities, plugins, and documentation for
|
||||
Wireshark.
|
||||
|
||||
%package devel
|
||||
Summary: Development headers and libraries for wireshark
|
||||
Requires: %{name} = %{version}-%{release} glibc-devel glib2-devel
|
||||
Summary: Development headers and libraries for wireshark
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: glib2-devel
|
||||
Requires: glibc-devel
|
||||
|
||||
%description devel
|
||||
The wireshark-devel package contains the header files, developer
|
||||
documentation, and libraries required for development of wireshark scripts
|
||||
and plugins.
|
||||
|
||||
|
||||
%prep
|
||||
%autosetup -S git
|
||||
|
||||
|
@ -101,7 +97,7 @@ and plugins.
|
|||
%cmake -G "Unix Makefiles" \
|
||||
-DCMAKE_INSTALL_PREFIX="%{_prefix}" \
|
||||
-DDISABLE_WERROR=ON \
|
||||
-DENABLE_LUA=OFF \
|
||||
-DENABLE_LUA=ON \
|
||||
-DENABLE_LIBXML2=ON \
|
||||
-DENABLE_NETLINK=ON \
|
||||
-DENABLE_NGHTTP2=ON \
|
||||
|
@ -115,10 +111,10 @@ and plugins.
|
|||
-DBUILD_wireshark=OFF \
|
||||
.
|
||||
|
||||
make %{?_smp_mflags}
|
||||
%cmake_build
|
||||
|
||||
%install
|
||||
make DESTDIR=%{buildroot} install
|
||||
%cmake_install
|
||||
|
||||
|
||||
#install devel files (inspired by debian/wireshark-dev.header-files)
|
||||
|
@ -135,23 +131,20 @@ mkdir -p "${IDIR}/wsutil"
|
|||
mkdir -p %{buildroot}%{_udevrulesdir}
|
||||
install -m 644 config.h epan/register.h "${IDIR}/"
|
||||
install -m 644 cfile.h file.h "${IDIR}/"
|
||||
install -m 644 ws_symbol_export.h "${IDIR}/"
|
||||
install -m 644 epan/*.h "${IDIR}/epan/"
|
||||
install -m 644 epan/crypt/*.h "${IDIR}/epan/crypt"
|
||||
install -m 644 epan/ftypes/*.h "${IDIR}/epan/ftypes"
|
||||
install -m 644 epan/dfilter/*.h "${IDIR}/epan/dfilter"
|
||||
install -m 644 epan/dissectors/*.h "${IDIR}/epan/dissectors"
|
||||
install -m 644 epan/wmem/*.h "${IDIR}/epan/wmem"
|
||||
install -m 644 wiretap/*.h "${IDIR}/wiretap"
|
||||
install -m 644 wsutil/*.h "${IDIR}/wsutil"
|
||||
install -m 644 ws_diag_control.h "${IDIR}/"
|
||||
install -m 644 %{SOURCE1} %{buildroot}%{_udevrulesdir}
|
||||
|
||||
|
||||
touch %{buildroot}%{_bindir}/%{name}
|
||||
|
||||
# Remove libtool archives and static libs
|
||||
find %{buildroot} -type f -name "*.la" -delete
|
||||
find %{buildroot} -type f -name "*.la" -delete -print
|
||||
|
||||
%pre cli
|
||||
getent group wireshark >/dev/null || groupadd -r wireshark
|
||||
|
@ -162,14 +155,14 @@ getent group usbmon >/dev/null || groupadd -r usbmon
|
|||
# skip triggering if udevd isn't even accessible, e.g. containers or
|
||||
# rpm-ostree-based systems
|
||||
if [ -S /run/udev/control ]; then
|
||||
/usr/bin/udevadm trigger --subsystem-match=usbmon
|
||||
%{_bindir}/udevadm trigger --subsystem-match=usbmon
|
||||
fi
|
||||
|
||||
%ldconfig_postun cli
|
||||
|
||||
%files
|
||||
%{_bindir}/wireshark
|
||||
%{_mandir}/man1/wireshark.*
|
||||
#%{_mandir}/man1/wireshark.*
|
||||
|
||||
%files cli
|
||||
%license COPYING
|
||||
|
@ -192,6 +185,7 @@ fi
|
|||
%dir %{_libdir}/wireshark/plugins
|
||||
%{_libdir}/wireshark/extcap/ciscodump
|
||||
%{_libdir}/wireshark/extcap/udpdump
|
||||
%{_libdir}/wireshark/extcap/wifidump
|
||||
%{_libdir}/wireshark/extcap/sshdump
|
||||
%{_libdir}/wireshark/extcap/sdjournal
|
||||
%{_libdir}/wireshark/extcap/dpauxmon
|
||||
|
@ -205,29 +199,29 @@ fi
|
|||
%{_libdir}/wireshark/plugins/%{plugins_version}/epan/*.so
|
||||
%{_libdir}/wireshark/plugins/%{plugins_version}/wiretap/*.so
|
||||
%{_libdir}/wireshark/plugins/%{plugins_version}/codecs/*.so
|
||||
%{_mandir}/man1/editcap.*
|
||||
%{_mandir}/man1/tshark.*
|
||||
%{_mandir}/man1/mergecap.*
|
||||
%{_mandir}/man1/text2pcap.*
|
||||
%{_mandir}/man1/capinfos.*
|
||||
%{_mandir}/man1/dumpcap.*
|
||||
%{_mandir}/man4/wireshark-filter.*
|
||||
%{_mandir}/man1/rawshark.*
|
||||
%{_mandir}/man1/dftest.*
|
||||
%{_mandir}/man1/randpkt.*
|
||||
%{_mandir}/man1/reordercap.*
|
||||
%{_mandir}/man1/sshdump.*
|
||||
%{_mandir}/man1/udpdump.*
|
||||
%{_mandir}/man1/androiddump.*
|
||||
%{_mandir}/man1/captype.*
|
||||
%{_mandir}/man1/ciscodump.*
|
||||
%{_mandir}/man1/randpktdump.*
|
||||
%{_mandir}/man1/dpauxmon.*
|
||||
%{_mandir}/man1/sdjournal.*
|
||||
%{_mandir}/man4/extcap.*
|
||||
#%{_mandir}/man1/editcap.*
|
||||
#%{_mandir}/man1/tshark.*
|
||||
#%{_mandir}/man1/mergecap.*
|
||||
#%{_mandir}/man1/text2pcap.*
|
||||
#%{_mandir}/man1/capinfos.*
|
||||
#%{_mandir}/man1/dumpcap.*
|
||||
#%{_mandir}/man4/wireshark-filter.*
|
||||
#%{_mandir}/man1/rawshark.*
|
||||
#%{_mandir}/man1/dftest.*
|
||||
#%{_mandir}/man1/randpkt.*
|
||||
#%{_mandir}/man1/reordercap.*
|
||||
#%{_mandir}/man1/sshdump.*
|
||||
#%{_mandir}/man1/udpdump.*
|
||||
#%{_mandir}/man1/androiddump.*
|
||||
#%{_mandir}/man1/captype.*
|
||||
#%{_mandir}/man1/ciscodump.*
|
||||
#%{_mandir}/man1/randpktdump.*
|
||||
#%{_mandir}/man1/dpauxmon.*
|
||||
#%{_mandir}/man1/sdjournal.*
|
||||
#%{_mandir}/man4/extcap.*
|
||||
%dir %{_datadir}/wireshark
|
||||
%{_datadir}/wireshark/*
|
||||
%{_docdir}/wireshark/*.html
|
||||
#%{_docdir}/wireshark/*.html
|
||||
|
||||
%files devel
|
||||
%doc doc/README.* ChangeLog
|
||||
|
@ -236,6 +230,18 @@ fi
|
|||
%{_libdir}/pkgconfig/%{name}.pc
|
||||
|
||||
%changelog
|
||||
* Thu Sep 07 2023 Muhammad Falak R Wani <mwani@microsoft.com> - 4.0.8-1
|
||||
- Upgrade version to address 27 CVEs
|
||||
- Address CVE-2021-22207, CVE-2021-22222, CVE-2021-22235, CVE-2021-39920, CVE-2021-39921,
|
||||
CVE-2021-39922, CVE-2021-39923, CVE-2021-39924, CVE-2021-39925, CVE-2021-39926,
|
||||
CVE-2021-39928, CVE-2021-39929, CVE-2021-4181, CVE-2021-4182, CVE-2021-4184,
|
||||
CVE-2021-4185, CVE-2021-4186, CVE-2021-4190, CVE-2022-0581, CVE-2022-0582,
|
||||
CVE-2022-0583, CVE-2022-0585, CVE-2022-0586, CVE-2022-3190, CVE-2022-4344,
|
||||
CVE-2023-0667, CVE-2023-2906
|
||||
- Swith to SPDX identifiers
|
||||
- Fix source URL
|
||||
- Lint spec
|
||||
|
||||
* Thu Oct 13 2022 CBL-Mariner Servicing Account <cblmargh@microsoft.com> - 3.4.16-1
|
||||
- Upgrade to 3.4.16
|
||||
|
||||
|
@ -245,7 +251,6 @@ fi
|
|||
- Removed unused/disabled features.
|
||||
- Fixed Formatting.
|
||||
|
||||
|
||||
* Wed Feb 16 2022 Pawel Winogrodzki <pawelwi@microsoft.com> - 3.4.4-5
|
||||
- License verified.
|
||||
|
||||
|
@ -865,7 +870,6 @@ fi
|
|||
- upgrade to 1.6.2
|
||||
- see https://www.wireshark.org/docs/relnotes/wireshark-1.6.2.html
|
||||
|
||||
|
||||
* Thu Jul 21 2011 Jan Safranek <jsafrane@redhat.com> - 1.6.1-1
|
||||
- upgrade to 1.6.1
|
||||
- see https://www.wireshark.org/docs/relnotes/wireshark-1.6.1.html
|
||||
|
|
|
@ -29597,8 +29597,8 @@
|
|||
"type": "other",
|
||||
"other": {
|
||||
"name": "wireshark",
|
||||
"version": "3.4.16",
|
||||
"downloadUrl": "https://2.na.dl.wireshark.org/src/all-versions/wireshark-3.4.16.tar.xz"
|
||||
"version": "4.0.8",
|
||||
"downloadUrl": "https://wireshark.org/download/src/wireshark-4.0.8.tar.xz"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue