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

Unified Diff: src/scripts/enable_localaccount.sh

Issue 591001: move enable_localaccount.sh, make pam_offline use it (Closed)
Patch Set: fix comment Created 10 years, 10 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
« no previous file with comments | « src/platform/pam_offline/username_password.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/scripts/enable_localaccount.sh
diff --git a/src/scripts/enable_localaccount.sh b/src/scripts/enable_localaccount.sh
new file mode 100755
index 0000000000000000000000000000000000000000..fc87d82b9a02039b6929f7b3fa8cd6e6edeeebc0
--- /dev/null
+++ b/src/scripts/enable_localaccount.sh
@@ -0,0 +1,41 @@
+#!/bin/bash
+
+set -e
+
+if [ -z $1 ]
+then
+ echo "Usage: $0 localaccount_username"
+ exit 1
+fi
+
+echo "Enabling local account $1@gmail.com."
+echo "Remove ../platform/pam_google/pam_localaccount.h and "
+echo "../platform/pam_offline/pam_localaccount.h to disable."
+
+cat <<EOF > ../platform/pam_google/pam_localaccount.h
+// local username for Chrome OS pam
+// This file is auto-generated by enable_localaccount.sh
+
+#ifndef CHROMEOS_PAM_LOCALACCOUNT_H_
+#define CHROMEOS_PAM_LOCALACCOUNT_H_
+
+namespace chromeos_pam {
+const char kLocalAccount[] = "$1@gmail.com";
+}
+
+#endif // CHROMEOS_PAM_LOCALACCOUNT_H_
+EOF
+
+cat <<EOF > ../platform/pam_offline/pam_localaccount.h
+// local username for Chrome OS pam
+// This file is auto-generated by enable_localaccount.sh
+
+#ifndef CHROMEOS_PAM_LOCALACCOUNT_H_
+#define CHROMEOS_PAM_LOCALACCOUNT_H_
+
+namespace pam_offline {
+const char kLocalAccount[] = "$1@gmail.com";
+}
+
+#endif // CHROMEOS_PAM_LOCALACCOUNT_H_
+EOF
« no previous file with comments | « src/platform/pam_offline/username_password.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698