Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 #!/bin/sh -pe | |
| 2 | |
| 3 # Copyright 2016 The Chromium Authors. All rights reserved. | |
| 4 # Use of this source code is governed by a BSD-style license that can be | |
| 5 # found in the LICENSE file. | |
| 6 | |
| 7 # This script will be called by the main application to copy the chrome app | |
| 8 # into the /Applciations folder. This script assumes it is running as root and | |
| 9 # will only be called if the program obtains root permissions. | |
| 10 # | |
| 11 # When running as root, this script will be invoked with the real user ID set | |
| 12 # to the user's ID, but the effective user ID set to 0 (root). bash -p is | |
| 13 # used on the first line to prevent bash from setting the effective user ID to | |
| 14 # the real user ID (dropping root privileges). | |
| 15 | |
| 16 # Lets this program start but hang until parent process gives it input | |
| 17 # as a flag to continue. | |
| 18 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
| |
| 19 | |
| 20 SRC=${1} | |
| 21 DEST=${2} | |
| 22 FULL_DEST=${3} | |
| 23 | |
| 24 rsync -lrpt "${SRC}" "${DEST}" >& /dev/null | |
| 25 chown -Rh root:admin "${FULL_DEST}" >& /dev/null | |
| 26 chmod -R a+rX,ug+w,o-w "${FULL_DEST}" >& /dev/null | |
| OLD | NEW |