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

Unified Diff: chrome/installer/mac/dmgdiffer.sh

Issue 10377173: Do Keychain reauthorization at update time (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 7 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
Index: chrome/installer/mac/dmgdiffer.sh
===================================================================
--- chrome/installer/mac/dmgdiffer.sh (revision 137420)
+++ chrome/installer/mac/dmgdiffer.sh (working copy)
@@ -1,6 +1,6 @@
#!/bin/bash -p
-# Copyright (c) 2011 The Chromium Authors. All rights reserved.
+# Copyright (c) 2012 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.
@@ -142,6 +142,7 @@
readonly APP_NAME_RE="${product_name}\\.app"
readonly APP_PLIST="Contents/Info"
readonly APP_VERSION_KEY="CFBundleShortVersionString"
+ readonly APP_BUNDLEID_KEY="CFBundleIdentifier"
readonly KS_VERSION_KEY="KSVersion"
readonly KS_PRODUCT_KEY="KSProductID"
readonly KS_CHANNEL_KEY="KSChannelID"
@@ -168,6 +169,13 @@
fi
local old_app_version_build="${BASH_REMATCH[1]}"
+ local old_app_bundleid
+ if ! old_app_bundleid="$(defaults read "${old_app_plist}" \
+ "${APP_BUNDLEID_KEY}")"; then
+ err "could not read old app bundle ID"
+ exit 10
+ fi
+
local old_ks_plist="${old_app_plist}"
local old_ks_version
if ! old_ks_version="$(defaults read "${old_ks_plist}" \
@@ -235,6 +243,18 @@
exit 13
fi
+ local patch_keychain_reauthorize_dir="${patch_fs}/.keychain_reauthorize"
+ if ! mkdir "${patch_keychain_reauthorize_dir}"; then
+ err "could not mkdir patch_keychain_reauthorize_dir"
+ exit 13
+ fi
+
+ if ! cp -p "${SCRIPT_DIR}/keychain_reauthorize_signed" \
+ "${patch_keychain_reauthorize_dir}/${old_app_bundleid}"; then
+ err "could not copy keychain_reauthorize"
+ exit 13
+ fi
+
local patch_dotpatch_dir="${patch_fs}/.patch"
if ! mkdir "${patch_dotpatch_dir}"; then
err "could not mkdir patch_dotpatch_dir"

Powered by Google App Engine
This is Rietveld 408576698