OLD | NEW |
1 // Copyright (c) 2009-2010 The Chromium OS Authors. All rights reserved. | 1 // Copyright (c) 2009-2010 The Chromium OS Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <errno.h> | 5 #include <errno.h> |
6 #include <stdlib.h> | 6 #include <stdlib.h> |
7 #include <sys/types.h> | 7 #include <sys/types.h> |
8 #include <unistd.h> | 8 #include <unistd.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 scoped_refptr<login_manager::SessionManagerService> manager = | 121 scoped_refptr<login_manager::SessionManagerService> manager = |
122 new login_manager::SessionManagerService(child_jobs); | 122 new login_manager::SessionManagerService(child_jobs); |
123 | 123 |
124 string magic_chrome_file = | 124 string magic_chrome_file = |
125 cl->GetSwitchValueASCII(switches::kDisableChromeRestartFile); | 125 cl->GetSwitchValueASCII(switches::kDisableChromeRestartFile); |
126 if (magic_chrome_file.empty()) | 126 if (magic_chrome_file.empty()) |
127 magic_chrome_file.assign(switches::kDisableChromeRestartFileDefault); | 127 magic_chrome_file.assign(switches::kDisableChromeRestartFileDefault); |
128 manager->set_file_checker(new login_manager::FileChecker(magic_chrome_file)); | 128 manager->set_file_checker(new login_manager::FileChecker(magic_chrome_file)); |
129 manager->set_mitigator( | 129 manager->set_mitigator( |
130 new login_manager::WipeMitigator(new login_manager::SystemUtils())); | 130 new login_manager::WipeMitigator(new login_manager::SystemUtils())); |
| 131 if (uid_set) |
| 132 manager->set_uid(uid); |
131 | 133 |
132 LOG_IF(FATAL, !manager->Initialize()) << "Failed"; | 134 LOG_IF(FATAL, !manager->Initialize()) << "Failed"; |
133 LOG_IF(FATAL, !manager->Register(chromeos::dbus::GetSystemBusConnection())) | 135 LOG_IF(FATAL, !manager->Register(chromeos::dbus::GetSystemBusConnection())) |
134 << "Failed"; | 136 << "Failed"; |
135 LOG_IF(FATAL, !manager->Run()) << "Failed"; | 137 LOG_IF(FATAL, !manager->Run()) << "Failed"; |
136 return 0; | 138 return 0; |
137 } | 139 } |
OLD | NEW |