Mageia Bugzilla – Attachment 9150 Details for
Bug 9386
mgaapplet always asks to add a repository when urpmi.cfg is not readable
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
[patch]
fix file permissions
urpmi_config.diff (text/plain), 1.23 KB, created by
Frédéric "LpSolit" Buclin
on 2017-03-24 20:16:48 CET
(
hide
)
Description:
fix file permissions
Filename:
MIME Type:
Creator:
Frédéric "LpSolit" Buclin
Created:
2017-03-24 20:16:48 CET
Size:
1.23 KB
patch
obsolete
>From ae6bccffe34f6709fc984bd5cffb2270d890e0d4 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Buclin?= <LpSolit@netscape.net> >Date: Fri, 24 Mar 2017 20:06:01 +0100 >Subject: [PATCH] Make sure that urpmi.cfg is world-readable so that mgaapplet > can read it (mga#9386) > >--- > NEWS | 2 ++ > urpm/media.pm | 4 ++++ > 2 files changed, 6 insertions(+) > >diff --git a/NEWS b/NEWS >index d9772de..9081ccf 100644 >--- a/NEWS >+++ b/NEWS >@@ -1,3 +1,5 @@ >+- Make sure that urpmi.cfg is world-readable (mga#9386) >+ > Version 8.106 - 6 December 2016 > > - skip kernel-firmware-nonfree too when considering real kernels >diff --git a/urpm/media.pm b/urpm/media.pm >index 453e7ed..9dac029 100644 >--- a/urpm/media.pm >+++ b/urpm/media.pm >@@ -551,6 +551,10 @@ sub write_urpmi_cfg { > }; > remove_passwords_and_write_private_netrc($urpm, $config); > >+ # urpmi.cfg must be world-readable, else mgaapplet won't be able to read it >+ # as it is executed from the user session. We enforce umask here in the case >+ # where the msec security level is set to 'secure' (which means umask 077). >+ umask 0022; > urpm::cfg::dump_config($urpm->{config}, $config) > or $urpm->{fatal}(6, N("unable to write config file [%s]", $urpm->{config})); > >-- >2.10.2 >
From ae6bccffe34f6709fc984bd5cffb2270d890e0d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Buclin?= <LpSolit@netscape.net> Date: Fri, 24 Mar 2017 20:06:01 +0100 Subject: [PATCH] Make sure that urpmi.cfg is world-readable so that mgaapplet can read it (mga#9386) --- NEWS | 2 ++ urpm/media.pm | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/NEWS b/NEWS index d9772de..9081ccf 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,5 @@ +- Make sure that urpmi.cfg is world-readable (mga#9386) + Version 8.106 - 6 December 2016 - skip kernel-firmware-nonfree too when considering real kernels diff --git a/urpm/media.pm b/urpm/media.pm index 453e7ed..9dac029 100644 --- a/urpm/media.pm +++ b/urpm/media.pm @@ -551,6 +551,10 @@ sub write_urpmi_cfg { }; remove_passwords_and_write_private_netrc($urpm, $config); + # urpmi.cfg must be world-readable, else mgaapplet won't be able to read it + # as it is executed from the user session. We enforce umask here in the case + # where the msec security level is set to 'secure' (which means umask 077). + umask 0022; urpm::cfg::dump_config($urpm->{config}, $config) or $urpm->{fatal}(6, N("unable to write config file [%s]", $urpm->{config})); -- 2.10.2
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 9386
:
7390
|
7469
|
7470
|
7732
|
7735
| 9150