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

Side by Side Diff: chrome/browser/cocoa/keystone_promote_postflight.sh

Issue 437053: In-application Keystone ticket promotion (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years 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 unified diff | Download patch | Annotate | Revision Log
Property Changes:
Added: svn:executable
+ *
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 #!/bin/bash -p
2
3 # Copyright (c) 2009 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 # Called as root after Keystone ticket promotion to change the owner, group,
8 # and permissions on the application. The application bundle and its contents
9 # are set to owner root, group wheel, and to be writable only by root, but
10 # readable and executable (when appropriate) by everyone.
11 #
12 # Note that this script will be invoked with the real user ID set to the
13 # user's ID, but the effective user ID set to 0 (root). bash -p is used on
14 # the first line to prevent bash from setting the effective user ID to the
15 # real user ID (dropping root privileges).
16
17 set -e
18
19 # This script runs as root, so be paranoid about things like ${PATH}.
20 export PATH="/usr/bin:/usr/sbin:/bin:/sbin"
21
22 # Output the pid to stdout before doing anything else. See
23 # chrome/browser/cocoa/authorization_util.h.
24 echo "${$}"
25
26 if [ ${#} -ne 1 ] ; then
27 echo "usage: ${0} APP" >& 2
28 exit 2
29 fi
30
31 APP="${1}"
32
33 # Make sure that APP is an absolute path and that it exists.
34 if [ -z "${APP}" ] || [ "${APP:0:1}" != "/" ] || [ ! -d "${APP}" ] ; then
35 echo "${0}: must provide an absolute path naming an extant directory" >& 2
36 exit 3
37 fi
38
39 OWNER_GROUP="root:wheel"
40 chown -Rh "${OWNER_GROUP}" "${APP}" >& /dev/null
41
42 CHMOD_MODE="a+rX,u+w,go-w"
43 chmod -R "${CHMOD_MODE}" "${APP}" >& /dev/null
44
45 # On the Mac, or at least on HFS+, symbolic link permissions are significant,
46 # but chmod -R and -h can't be used together. Do another pass to fix the
47 # permissions on any symbolic links.
48 find "${APP}" -type l -exec chmod -h "${CHMOD_MODE}" {} + >& /dev/null
49
50 exit 0
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/keystone_infobar.mm ('k') | chrome/browser/cocoa/keystone_promote_preflight.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698