OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // http://code.google.com/p/chromium/wiki/LinuxSUIDSandbox | 5 // http://code.google.com/p/chromium/wiki/LinuxSUIDSandbox |
6 | 6 |
7 #include "common/sandbox.h" | 7 #include "common/sandbox.h" |
8 | 8 |
9 #define _GNU_SOURCE | 9 #define _GNU_SOURCE |
10 #include <asm/unistd.h> | 10 #include <asm/unistd.h> |
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
493 if (!DropRoot()) | 493 if (!DropRoot()) |
494 return 1; | 494 return 1; |
495 if (!SetupChildEnvironment()) | 495 if (!SetupChildEnvironment()) |
496 return 1; | 496 return 1; |
497 | 497 |
498 execv(argv[1], &argv[1]); | 498 execv(argv[1], &argv[1]); |
499 FatalError("execv failed"); | 499 FatalError("execv failed"); |
500 | 500 |
501 return 1; | 501 return 1; |
502 } | 502 } |
503 | |
504 // goto fail; | |
OLD | NEW |