Gentoo Archives: gentoo-commits

From: "Mike Gilbert (floppym)" <floppym@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in www-client/chromium/files: chromium-launcher-r3.sh
Date: Sat, 01 Mar 2014 20:56:04
Message-Id: 20140301205557.0C5462004C@flycatcher.gentoo.org
1 floppym 14/03/01 20:55:56
2
3 Modified: chromium-launcher-r3.sh
4 Log:
5 Add some logic to the launcher to enable execution as root without creating permission problems when using sudo.
6
7 (Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key 0BBEEA1FEA4843A4)
8
9 Revision Changes Path
10 1.3 www-client/chromium/files/chromium-launcher-r3.sh
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/files/chromium-launcher-r3.sh?rev=1.3&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/files/chromium-launcher-r3.sh?rev=1.3&content-type=text/plain
14 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/chromium/files/chromium-launcher-r3.sh?r1=1.2&r2=1.3
15
16 Index: chromium-launcher-r3.sh
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/www-client/chromium/files/chromium-launcher-r3.sh,v
19 retrieving revision 1.2
20 retrieving revision 1.3
21 diff -u -r1.2 -r1.3
22 --- chromium-launcher-r3.sh 17 Mar 2013 17:53:48 -0000 1.2
23 +++ chromium-launcher-r3.sh 1 Mar 2014 20:55:56 -0000 1.3
24 @@ -26,6 +26,13 @@
25 ;;
26 esac
27
28 +if [[ ${EUID} == 0 && -O ${XDG_CONFIG_HOME:-${HOME}} ]]; then
29 + # Running as root with HOME owned by root.
30 + # Pass --user-data-dir to work around upstream failsafe.
31 + CHROMIUM_FLAGS="--user-data-dir=${XDG_CONFIG_HOME:-${HOME}/.config}/chromium
32 + ${CHROMIUM_FLAGS}"
33 +fi
34 +
35 # Set the .desktop file name
36 export CHROME_DESKTOP="chromium-browser-chromium.desktop"