forked from pool/MozillaFirefox
947695d633
* requires NSS 3.20.2 to fix MFSA 2015-150/CVE-2015-7575 (bmo#1158489) MD5 signatures accepted within TLS 1.2 ServerKeyExchange in server signature * various changes to support Windows update (SHA-1 vs. SHA-2) * workaround Youtube user agent detection issue (bmo#1233970) - fix file download regression for multi user systems (bmo#1233434) (mozilla-bmo1233434.patch) OBS-URL: https://build.opensuse.org/package/show/mozilla:Factory/MozillaFirefox?expand=0&rev=475
46 lines
1.4 KiB
Diff
46 lines
1.4 KiB
Diff
|
|
# HG changeset patch
|
|
# User Aidin Gharibnavaz <aidin@aidinhut.com>
|
|
# Date 1450550460 -12600
|
|
# Node ID 07ec362866977f37e638fc88e3079621fd7aef96
|
|
# Parent cb66ffeb6725e8344818e8e2f707ae2eaeb953b4
|
|
Bug 1233434 - Fixing download failure on a multi-user GNU/Linux machine. r?bagder
|
|
|
|
diff -r cb66ffeb6725 -r 07ec36286697 uriloader/exthandler/nsExternalHelperAppService.cpp
|
|
--- a/uriloader/exthandler/nsExternalHelperAppService.cpp Tue Dec 15 14:45:06 2015 +0100
|
|
+++ b/uriloader/exthandler/nsExternalHelperAppService.cpp Sat Dec 19 22:11:00 2015 +0330
|
|
@@ -416,12 +416,12 @@
|
|
const char* userName = PR_GetEnv("USERNAME");
|
|
if (!userName || !*userName) {
|
|
userName = PR_GetEnv("USER");
|
|
- if (!userName || !*userName) {
|
|
- userName = PR_GetEnv("LOGNAME");
|
|
- }
|
|
- else {
|
|
- userName = "mozillaUser";
|
|
- }
|
|
+ }
|
|
+ if (!userName || !*userName) {
|
|
+ userName = PR_GetEnv("LOGNAME");
|
|
+ }
|
|
+ if (!userName || !*userName) {
|
|
+ userName = "mozillaUser";
|
|
}
|
|
|
|
nsAutoString userDir;
|
|
@@ -447,7 +447,12 @@
|
|
rv = finalPath->GetPermissions(&permissions);
|
|
NS_ENSURE_SUCCESS(rv, rv);
|
|
|
|
- if (permissions == PR_IRWXU) {
|
|
+ // Ensuring the path is writable by the current user.
|
|
+ bool isWritable;
|
|
+ rv = finalPath->IsWritable(&isWritable);
|
|
+ NS_ENSURE_SUCCESS(rv, rv);
|
|
+
|
|
+ if (permissions == PR_IRWXU && isWritable) {
|
|
dir = finalPath;
|
|
break;
|
|
}
|
|
|