Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
f5834e88cb !17 [sync] PR-15: remove unuse files
From: @openeuler-sync-bot
Reviewed-by: @zhang__3125
Signed-off-by: @zhang__3125
2021-12-03 09:37:52 +00:00
cherry530
ade513f709 remove unuse files
(cherry picked from commit 07dc252a5c4ab6dac7e706db61a4a44a344dcd95)
2021-12-03 17:01:55 +08:00
openeuler-ci-bot
e869833ea4 !16 [sync] PR-14: Package init
From: @openeuler-sync-bot
Reviewed-by: @zhang__3125
Signed-off-by: @zhang__3125
2021-12-03 09:01:03 +00:00
cherry530
6d28ede91a Package init
(cherry picked from commit c5664e2bcea0638a08f6b50d01137babcac34eeb)
2021-12-03 16:37:14 +08:00
openeuler-ci-bot
c577dfb20e !13 Fix BuildRequires
From: @zhang__3125
Reviewed-by: @dwl301,@dwl301
Signed-off-by: @dwl301
2021-08-06 01:38:44 +00:00
zhang__3125
d4a4c61333 Fix BuildRequires: pkgconfig(libxfce4ui-1) pkgconfig(libxfce4panel-1.0) pkgconfig(exo-1) 2021-08-05 17:05:07 +08:00
openeuler-ci-bot
cef50de52d !3 update to 1.8.17-1 for fix CVE-2021-32563
From: @zhang__3125
Reviewed-by: @dwl301
Signed-off-by: @dwl301
2021-05-21 14:12:41 +08:00
linz
baf9f2bf1a update to 1.8.17-1 for fix CVE-2021-32563 2021-05-21 13:46:12 +08:00
openeuler-ci-bot
6b2c0c0dd1 !2 20201127 add yaml file
From: @zhang__3125
Reviewed-by: @dwl301
Signed-off-by: @dwl301
2020-12-01 11:29:18 +08:00
张琳
dc9de7ef70 update Thunar.yaml. 2020-12-01 10:52:07 +08:00
3 changed files with 168 additions and 4 deletions

View File

@ -3,7 +3,7 @@
Name: Thunar
Version: 1.8.15
Release: 2
Release: 3
Summary: Thunar File Manager
#Group: Development/Libraries
License: GPLv2+
@ -13,6 +13,7 @@ Source1: thunar-sendto-gnome-bluetooth.desktop
Source2: thunar-sendto-audacious-playlist.desktop
Source3: thunar-sendto-quodlibet-playlist.desktop
Source4: thunar-sendto-blueman.desktop
Patch0: fix-CVE-2021-32563.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
#BuildArch: noarch
BuildRequires: gcc-c++
@ -63,8 +64,8 @@ Requires: %{name} = %{version}-%{release}
Thunarx GTK documentation files for the Thunar file manager.
%prep
%autosetup -n thunar-%{version}
%setup -n thunar-%{version}
%patch0 -p1
# fix icon in thunar-sendto-email.desktop
sed -i 's!internet-mail!mail-message-new!' \
plugins/thunar-sendto-email/thunar-sendto-email.desktop.in.in
@ -173,5 +174,8 @@ done
%{_datadir}/gtk-doc/html/thunarx/*
%changelog
* Fri May 21 2021 lin.zhang <lin.zhang@turbolinux.com.cn> - 1.8.15-3
- add fix-CVE-2021-32563.patch
* Thu Jul 9 2020 Dillon Chen<dillon.chen@turbolinux.com.cn> - 1.8.15-1
- Init package

View File

@ -1,4 +1,4 @@
version_control: git
src_repo:
src_repo: https://gitlab.xfce.org/xfce/thunar.git
tag_prefix: "Thunar-"
seperator: "."

160
fix-CVE-2021-32563.patch Normal file
View File

@ -0,0 +1,160 @@
diff -uNr thunar-1.8.15.orig/docs/Thunar.xml thunar-1.8.15/docs/Thunar.xml
--- thunar-1.8.15.orig/docs/Thunar.xml 2020-05-10 17:54:14.000000000 +0800
+++ thunar-1.8.15/docs/Thunar.xml 2021-05-21 16:07:29.326702880 +0800
@@ -48,9 +48,9 @@
<refsect1>
<title>Invocation</title>
<para>
- <command>Thunar</command> takes a list of <replaceable>URI</replaceable>s for folders that should be
- opened in new file manager windows or files that should be run using the default application for their
- types. The <replaceable>URI</replaceable>s may be specified as either <emphasis role="bold">file:</emphasis>
+ <command>Thunar</command> takes a list of <replaceable>URI</replaceable>s for files/folders that should be
+ opened in new file manager windows.
+ The <replaceable>URI</replaceable>s may be specified as either <emphasis role="bold">file:</emphasis>
or <emphasis role="bold">trash:</emphasis> URIs, absolute paths or paths relative to the current directory
from which <command>Thunar</command> is being invoked. If no <replaceable>URI</replaceable>s are specified,
the current folder will be opened in a new file manager window.
diff -uNr thunar-1.8.15.orig/thunar/thunar-application.c thunar-1.8.15/thunar/thunar-application.c
--- thunar-1.8.15.orig/thunar/thunar-application.c 2020-05-24 20:27:08.000000000 +0800
+++ thunar-1.8.15/thunar/thunar-application.c 2021-05-21 16:15:06.977921451 +0800
@@ -207,6 +207,7 @@
#endif
GList *files_to_launch;
+ ThunarApplicationProcessAction process_file_action;
guint dbus_owner_id_xfce;
guint dbus_owner_id_fdo;
@@ -276,6 +277,7 @@
* in the primary instance anyways */
application->files_to_launch = NULL;
+ application->process_file_action = THUNAR_APPLICATION_SELECT_FILES;
application->progress_dialog = NULL;
application->preferences = NULL;
@@ -529,7 +531,7 @@
}
else if (filenames != NULL)
{
- if (!thunar_application_process_filenames (application, cwd, filenames, NULL, NULL, &error))
+ if (!thunar_application_process_filenames (application, cwd, filenames, NULL, NULL, &error,THUNAR_APPLICATION_SELECT_FILES))
{
/* we failed to process the filenames or the bulk rename failed */
g_application_command_line_printerr (command_line, "Thunar: %s\n", error->message);
@@ -537,7 +539,7 @@
}
else if (!daemon)
{
- if (!thunar_application_process_filenames (application, cwd, cwd_list, NULL, NULL, &error))
+ if (!thunar_application_process_filenames (application, cwd, cwd_list, NULL, NULL, &error,THUNAR_APPLICATION_SELECT_FILES))
{
/* we failed to process the filenames or the bulk rename failed */
g_application_command_line_printerr (command_line, "Thunar: %s\n", error->message);
@@ -1507,8 +1509,27 @@
}
else
{
- /* try to open the file or directory */
- thunar_file_launch (target_file, screen, startup_id, &error);
+ if (application->process_file_action == THUNAR_APPLICATION_LAUNCH_FILES)
+ {
+ /* try to launch the file / open the directory */
+ thunar_file_launch (target_file, screen, startup_id, &error);
+ }
+ else if (thunar_file_is_directory (file))
+ {
+ thunar_application_open_window (application, file, screen, startup_id, FALSE);
+ }
+ else
+ {
+ /* Note that for security reasons we do not execute files passed via command line */
+ /* Lets rather open the containing directory */
+ ThunarFile *parent = thunar_file_get_parent (file, NULL);
+
+ if (G_LIKELY (parent != NULL))
+ {
+ thunar_application_open_window (application, parent, screen, startup_id, FALSE);
+ g_object_unref (parent);
+ }
+ }
/* remove the file from the list */
application->files_to_launch = g_list_delete_link (application->files_to_launch,
@@ -1577,18 +1598,20 @@
* @startup_id : startup id to finish startup notification and properly focus the
* window when focus stealing is enabled or %NULL.
* @error : return location for errors or %NULL.
+ * @action : action to invoke on the files
*
* Tells @application to process the given @filenames and launch them appropriately.
*
* Return value: %TRUE on success, %FALSE if @error is set.
**/
gboolean
-thunar_application_process_filenames (ThunarApplication *application,
- const gchar *working_directory,
- gchar **filenames,
- GdkScreen *screen,
- const gchar *startup_id,
- GError **error)
+thunar_application_process_filenames (ThunarApplication *application,
+ const gchar *working_directory,
+ gchar **filenames,
+ GdkScreen *screen,
+ const gchar *startup_id,
+ GError **error,
+ ThunarApplicationProcessAction action)
{
ThunarFile *file;
GError *derror = NULL;
@@ -1660,7 +1683,10 @@
/* start processing files if we have any to launch */
if (application->files_to_launch != NULL)
- thunar_application_process_files (application);
+ {
+ application->process_file_action = action;
+ thunar_application_process_files (application);
+ }
/* free the file list */
g_list_free (file_list);
diff -uNr thunar-1.8.15.orig/thunar/thunar-application.h thunar-1.8.15/thunar/thunar-application.h
--- thunar-1.8.15.orig/thunar/thunar-application.h 2020-05-10 17:54:14.000000000 +0800
+++ thunar-1.8.15/thunar/thunar-application.h 2021-05-21 16:18:56.761466323 +0800
@@ -31,6 +31,12 @@
typedef struct _ThunarApplicationClass ThunarApplicationClass;
typedef struct _ThunarApplication ThunarApplication;
+typedef enum
+{
+ THUNAR_APPLICATION_LAUNCH_FILES,
+ THUNAR_APPLICATION_SELECT_FILES
+} ThunarApplicationProcessAction;
+
#define THUNAR_TYPE_APPLICATION (thunar_application_get_type ())
#define THUNAR_APPLICATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), THUNAR_TYPE_APPLICATION, ThunarApplication))
#define THUNAR_APPLICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), THUNAR_TYPE_APPLICATION, ThunarApplicationClass))
@@ -74,7 +80,8 @@
gchar **filenames,
GdkScreen *screen,
const gchar *startup_id,
- GError **error);
+ GError **error,
+ ThunarApplicationProcessAction action);
void thunar_application_rename_file (ThunarApplication *application,
ThunarFile *file,
diff -uNr thunar-1.8.15.orig/thunar/thunar-dbus-service.c thunar-1.8.15/thunar/thunar-dbus-service.c
--- thunar-1.8.15.orig/thunar/thunar-dbus-service.c 2020-05-10 17:54:14.000000000 +0800
+++ thunar-1.8.15/thunar/thunar-dbus-service.c 2021-05-21 16:19:54.537347954 +0800
@@ -991,7 +991,7 @@
{
/* let the application process the filenames */
application = thunar_application_get ();
- thunar_application_process_filenames (application, working_directory, filenames, screen, startup_id, &error);
+ thunar_application_process_filenames (application, working_directory, filenames, screen, startup_id, &error,THUNAR_APPLICATION_LAUNCH_FILES);
g_object_unref (G_OBJECT (application));
/* release the screen */