Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2589)

Unified Diff: chrome/installer/mac/app/copy_to_disk.sh

Issue 2243863003: Added authorized install with a script to do the copy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changed to OO design Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« chrome/installer/mac/app/Info.plist ('K') | « chrome/installer/mac/app/Info.plist ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/mac/app/copy_to_disk.sh
diff --git a/chrome/installer/mac/app/copy_to_disk.sh b/chrome/installer/mac/app/copy_to_disk.sh
new file mode 100755
index 0000000000000000000000000000000000000000..152666eb69dbb330ad969d32fac3ada17a82bbb6
--- /dev/null
+++ b/chrome/installer/mac/app/copy_to_disk.sh
@@ -0,0 +1,26 @@
+#!/bin/sh -pe
+
+# Copyright 2016 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# This script will be called by the main application to copy the chrome app
+# into the /Applciations folder. This script assumes it is running as root and
+# will only be called if the program obtains root permissions.
+#
+# When running as root, this script will be invoked with the real user ID set
+# to the user's ID, but the effective user ID set to 0 (root). bash -p is
+# used on the first line to prevent bash from setting the effective user ID to
+# the real user ID (dropping root privileges).
+
+# Lets this program start but hang until parent process gives it input
+# as a flag to continue.
+read -n 1
ivanhernandez 2016/08/16 17:18:39 We want to authenticate as soon as the program lau
Anna Zeng 2016/08/18 15:57:16 Minor correction: "... but we don't want this scri
ivanhernandez 2016/08/22 15:34:49 Hmm seems like 'wait' would need for another proce
+
+SRC=${1}
+DEST=${2}
+FULL_DEST=${3}
+
+rsync -lrpt "${SRC}" "${DEST}" >& /dev/null
+chown -Rh root:admin "${FULL_DEST}" >& /dev/null
+chmod -R a+rX,ug+w,o-w "${FULL_DEST}" >& /dev/null
« chrome/installer/mac/app/Info.plist ('K') | « chrome/installer/mac/app/Info.plist ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698