Accepting request 966828 from GNOME:Factory
(forwarded request 966519 from iznogood) OBS-URL: https://build.opensuse.org/request/show/966828 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gnome-control-center?expand=0&rev=212
This commit is contained in:
commit
f5022bd4e3
48
gnome-control-center-42.0-fix-sharing-panel-crash.patch
Normal file
48
gnome-control-center-42.0-fix-sharing-panel-crash.patch
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
From c2f088ac5220f3a64edc2c15e60fc0d7f1dfc9e5 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Hu Jialun <hujialun@comp.nus.edu.sg>
|
||||||
|
Date: Mon, 28 Mar 2022 14:35:21 +0800
|
||||||
|
Subject: [PATCH] sharing/remote-desktop: Fallback when getlogin() fails
|
||||||
|
|
||||||
|
getlogin() can fail for several reasons as detailed in the man page, and
|
||||||
|
the current behaviour is a segmentation fault when it fails and returns
|
||||||
|
NULL.
|
||||||
|
|
||||||
|
Make it fallback to getpwuid(getuid())->pw_name when that happens to
|
||||||
|
prevent crashing.
|
||||||
|
---
|
||||||
|
panels/sharing/cc-sharing-panel.c | 11 +++++++++--
|
||||||
|
1 file changed, 9 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/panels/sharing/cc-sharing-panel.c b/panels/sharing/cc-sharing-panel.c
|
||||||
|
index d126a2236..e65ebf92d 100644
|
||||||
|
--- a/panels/sharing/cc-sharing-panel.c
|
||||||
|
+++ b/panels/sharing/cc-sharing-panel.c
|
||||||
|
@@ -45,6 +45,9 @@
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
|
||||||
|
+#include <unistd.h>
|
||||||
|
+#include <pwd.h>
|
||||||
|
+
|
||||||
|
static void cc_sharing_panel_setup_label_with_hostname (CcSharingPanel *self, GtkWidget *label);
|
||||||
|
static GtkWidget *cc_sharing_panel_new_media_sharing_row (const char *uri_or_path,
|
||||||
|
CcSharingPanel *self);
|
||||||
|
@@ -1372,9 +1375,13 @@ cc_sharing_panel_setup_remote_desktop_dialog (CcSharingPanel *self)
|
||||||
|
G_CALLBACK (remote_desktop_credentials_changed),
|
||||||
|
self);
|
||||||
|
|
||||||
|
- if (username == NULL)
|
||||||
|
+ if (username == NULL) {
|
||||||
|
+ username = getlogin ();
|
||||||
|
+ if (username == NULL)
|
||||||
|
+ username = getpwuid (getuid ())->pw_name;
|
||||||
|
gtk_editable_set_text (GTK_EDITABLE (self->remote_desktop_username_entry),
|
||||||
|
- getlogin ());
|
||||||
|
+ username);
|
||||||
|
+ }
|
||||||
|
if (password == NULL)
|
||||||
|
gtk_editable_set_text (GTK_EDITABLE (self->remote_desktop_password_entry),
|
||||||
|
pw_generate ());
|
||||||
|
--
|
||||||
|
GitLab
|
||||||
|
|
@ -1,3 +1,12 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Mar 30 05:25:34 UTC 2022 - Luciano Santos <luc14n0@opensuse.org>
|
||||||
|
|
||||||
|
- Add gnome-control-center-42.0-fix-sharing-panel-crash.patch,
|
||||||
|
based on commit c2f088ac5220f3a64edc2c15e60fc0d7f1dfc9e5, to fix
|
||||||
|
Sharing panel segfaulting due to getlogin() returning NULL rather
|
||||||
|
than the username (boo#1197529,
|
||||||
|
glgo#GNOME/gnome-control-center!1727).
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Mar 29 13:54:31 UTC 2022 - Atri Bhattacharya <badshah400@gmail.com>
|
Tue Mar 29 13:54:31 UTC 2022 - Atri Bhattacharya <badshah400@gmail.com>
|
||||||
|
|
||||||
|
@ -37,9 +37,15 @@ Source0: https://download.gnome.org/sources/gnome-control-center/42/%{nam
|
|||||||
# PATCH-NEEDS-REBASE gnome-control-center-disable-error-message-for-NM.patch bsc#989801 sckang@suse.com -- network: Improve the check for whether NM or wicked is running Was:PATCH-FIX-OPENSUSE
|
# PATCH-NEEDS-REBASE gnome-control-center-disable-error-message-for-NM.patch bsc#989801 sckang@suse.com -- network: Improve the check for whether NM or wicked is running Was:PATCH-FIX-OPENSUSE
|
||||||
Patch0: gnome-control-center-disable-error-message-for-NM.patch
|
Patch0: gnome-control-center-disable-error-message-for-NM.patch
|
||||||
# PATCH-FIX-UPSTREAM gnome-control-center-reload-vpn-plugins.patch glgo#GNOME/gnome-control-center!1263 sckang@suse.com -- network/connection-editor: always load all available VPN plugins
|
# PATCH-FIX-UPSTREAM gnome-control-center-reload-vpn-plugins.patch glgo#GNOME/gnome-control-center!1263 sckang@suse.com -- network/connection-editor: always load all available VPN plugins
|
||||||
Patch3: gnome-control-center-reload-vpn-plugins.patch
|
Patch1: gnome-control-center-reload-vpn-plugins.patch
|
||||||
# PATCH-FIX_UPSTREAM gnome-control-center-goa-helper-on-X11.patch glgo#GNOME/gnome-control-center!1651 badshah400@gmail.com -- Fix GOA helper not showing up on X11
|
# PATCH-FIX_UPSTREAM gnome-control-center-goa-helper-on-X11.patch glgo#GNOME/gnome-control-center!1651 badshah400@gmail.com -- Fix GOA helper not showing up on X11
|
||||||
Patch4: gnome-control-center-goa-helper-on-X11.patch
|
Patch2: gnome-control-center-goa-helper-on-X11.patch
|
||||||
|
# PATCH-FIX-UPSTREAM gnome-control-center-42.0-fix-sharing-panel-crash.patch -- luc14n0@opensuse.org
|
||||||
|
# Sharing panel crashes when inicialized due to getlogin() returning NULL rather than the username.
|
||||||
|
# Upstream issue: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1727
|
||||||
|
# Bug report: https://bugzilla.opensuse.org/show_bug.cgi?id=1197529
|
||||||
|
# Based on commit: c2f088ac5220f3a64edc2c15e60fc0d7f1dfc9e5
|
||||||
|
Patch3: gnome-control-center-42.0-fix-sharing-panel-crash.patch
|
||||||
|
|
||||||
### patches for Leap >= 15 plus SLE >= 15, but not TW
|
### patches for Leap >= 15 plus SLE >= 15, but not TW
|
||||||
# PATCH-FEATURE-SLE gnome-control-center-info-never-use-gnome-software.patch bsc#999336 fezhang@suse.com -- info: Never search for gnome-software as an option when checking for updates on SLE and Leap 42.2, because we use gpk-update-viewer.
|
# PATCH-FEATURE-SLE gnome-control-center-info-never-use-gnome-software.patch bsc#999336 fezhang@suse.com -- info: Never search for gnome-software as an option when checking for updates on SLE and Leap 42.2, because we use gpk-update-viewer.
|
||||||
@ -104,6 +110,15 @@ BuildRequires: pkgconfig(x11)
|
|||||||
BuildRequires: pkgconfig(xcursor)
|
BuildRequires: pkgconfig(xcursor)
|
||||||
BuildRequires: pkgconfig(xft)
|
BuildRequires: pkgconfig(xft)
|
||||||
BuildRequires: pkgconfig(xi) >= 1.2
|
BuildRequires: pkgconfig(xi) >= 1.2
|
||||||
|
## CONDITIONAL BUILD REQUIREMENTS
|
||||||
|
%if %{with wacom}
|
||||||
|
BuildRequires: pkgconfig(clutter-1.0) >= 1.11.3
|
||||||
|
BuildRequires: pkgconfig(libwacom) >= 0.7
|
||||||
|
%endif
|
||||||
|
%if %{with ibus}
|
||||||
|
BuildRequires: pkgconfig(ibus-1.0) >= 1.5.2
|
||||||
|
%endif
|
||||||
|
##
|
||||||
Requires: gnome-settings-daemon >= 41
|
Requires: gnome-settings-daemon >= 41
|
||||||
# needed for universal access panel
|
# needed for universal access panel
|
||||||
Requires: gnome-themes-accessibility
|
Requires: gnome-themes-accessibility
|
||||||
@ -122,13 +137,6 @@ Recommends: dbus(com.intel.dleyna-server)
|
|||||||
Recommends: system-config-printer-dbus-service
|
Recommends: system-config-printer-dbus-service
|
||||||
# For the power panel
|
# For the power panel
|
||||||
Recommends: power-profiles-daemon
|
Recommends: power-profiles-daemon
|
||||||
%if %{with wacom}
|
|
||||||
BuildRequires: pkgconfig(clutter-1.0) >= 1.11.3
|
|
||||||
BuildRequires: pkgconfig(libwacom) >= 0.7
|
|
||||||
%endif
|
|
||||||
%if %{with ibus}
|
|
||||||
BuildRequires: pkgconfig(ibus-1.0) >= 1.5.2
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
The control center is GNOME's main interface for configuration of
|
The control center is GNOME's main interface for configuration of
|
||||||
@ -182,8 +190,9 @@ GNOME control center.
|
|||||||
%setup -q
|
%setup -q
|
||||||
# Patch needs rebase
|
# Patch needs rebase
|
||||||
#%%patch0 -p1
|
#%%patch0 -p1
|
||||||
|
%patch1 -p1
|
||||||
|
%patch2 -p1
|
||||||
%patch3 -p1
|
%patch3 -p1
|
||||||
%patch4 -p1
|
|
||||||
|
|
||||||
# patches for Leap >= 15 plus SLE >= 15, but not TW
|
# patches for Leap >= 15 plus SLE >= 15, but not TW
|
||||||
%if 0%{?sle_version} >= 150000
|
%if 0%{?sle_version} >= 150000
|
||||||
|
Loading…
Reference in New Issue
Block a user