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

Side by Side Diff: signaller.cc

Issue 553016: port to use centralized constants files, and add input validation (Closed)
Patch Set: address shell injection, otehr comments (per wad) Created 10 years, 11 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 unified diff | Download patch
« no previous file with comments | « session_manager_unittest.cc ('k') | system_utils.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009-2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009-2010 The Chromium 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 // Not intended for use on the system, this is a handy helper binary for 5 // Not intended for use on the system, this is a handy helper binary for
6 // manually testing the session_manager. It may find its way into 6 // manually testing the session_manager. It may find its way into
7 // autotest-based tests of this component. 7 // autotest-based tests of this component.
8 8
9 #include <sys/types.h> 9 #include <sys/types.h>
10 #include <sys/wait.h> 10 #include <sys/wait.h>
11 #include <signal.h> 11 #include <signal.h>
12 #include <stdio.h> 12 #include <stdio.h>
13 #include <unistd.h> 13 #include <unistd.h>
14 14
15 #include <base/basictypes.h> 15 #include <base/basictypes.h>
16 #include <base/command_line.h> 16 #include <base/command_line.h>
17 #include <base/logging.h> 17 #include <base/logging.h>
18 #include <chromeos/dbus/dbus.h> 18 #include <chromeos/dbus/dbus.h>
19 #include <chromeos/dbus/service_constants.h>
19 #include "login_manager/ipc_channel.h" 20 #include "login_manager/ipc_channel.h"
20 #include "login_manager/bindings/client.h" 21 #include "login_manager/bindings/client.h"
21 #include "login_manager/constants.h"
22 22
23 namespace switches { 23 namespace switches {
24 static const char kExitSad[] = "exit-sad"; 24 static const char kExitSad[] = "exit-sad";
25 static const char kSuicide[] = "suicide"; 25 static const char kSuicide[] = "suicide";
26 static const char kSessionPipe[] = "session-manager-pipe"; 26 static const char kSessionPipe[] = "session-manager-pipe";
27 } 27 }
28 28
29 int main(int argc, char* argv[]) { 29 int main(int argc, char* argv[]) {
30 CommandLine::Init(argc, argv); 30 CommandLine::Init(argc, argv);
31 logging::InitLogging(NULL, 31 logging::InitLogging(NULL,
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 errptr)) { 71 errptr)) {
72 // TODO(cmasone): make a util function in for this error-message check. 72 // TODO(cmasone): make a util function in for this error-message check.
73 LOG(WARNING) << "StopSession failed: " 73 LOG(WARNING) << "StopSession failed: "
74 << (error->message ? error->message : "Unknown Error."); 74 << (error->message ? error->message : "Unknown Error.");
75 } 75 }
76 LOG_IF(ERROR, !done) << "stop did not complete?"; 76 LOG_IF(ERROR, !done) << "stop did not complete?";
77 LOG_IF(INFO, done) << "Call completed"; 77 LOG_IF(INFO, done) << "Call completed";
78 78
79 exit(exit_val); 79 exit(exit_val);
80 } 80 }
OLDNEW
« no previous file with comments | « session_manager_unittest.cc ('k') | system_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698