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

Unified Diff: session_manager.sh

Issue 479011: Scripts to use chrome as a login manager (Closed)
Patch Set: revert to /dev/urandom 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « debian/rules ('k') | start_login.sh » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: session_manager.sh
diff --git a/session_manager.sh b/session_manager.sh
index 6c58d7ec8e8a995970669437a52b63d16002ba04..b30b35b0db65ae09585852888d230aa0120e3d18 100644
--- a/session_manager.sh
+++ b/session_manager.sh
@@ -13,17 +13,17 @@ user1_handler () {
}
trap user1_handler USR1
-MCOOKIE=$(head -c 8 /dev/random | openssl md5)
+MCOOKIE=$(head -c 8 /dev/urandom | openssl md5) # speed this up?
/usr/bin/xauth -q -f ${XAUTH_FILE} add :0 . ${MCOOKIE}
-/etc/init.d/xstart.sh ${XAUTH_FILE} $$&
+/etc/init.d/xstart.sh ${XAUTH_FILE} &
while [ -z ${SERVER_READY} ]; do
sleep .1
done
-# TODO: move this to a more appropriate place, once we actually start
-# doing login for real in this code pathway.
-/sbin/initctl emit login-prompt-ready &
-su chronos -c "/etc/init.d/start_login.sh ${MCOOKIE}"
+export USER=chronos
+export DATA_DIR=/home/${USER}
+mkdir -p ${DATA_DIR} && chown ${USER}:admin ${DATA_DIR}
+exec su ${USER} -c "/etc/init.d/start_login.sh ${MCOOKIE}"
« no previous file with comments | « debian/rules ('k') | start_login.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698