OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 #ifndef SANDBOX_LINUX_SERVICES_CREDENTIALS_H_ | 5 #ifndef SANDBOX_LINUX_SERVICES_CREDENTIALS_H_ |
6 #define SANDBOX_LINUX_SERVICES_CREDENTIALS_H_ | 6 #define SANDBOX_LINUX_SERVICES_CREDENTIALS_H_ |
7 | 7 |
8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
9 // Link errors are tedious to track, raise a compile-time error instead. | 9 // Link errors are tedious to track, raise a compile-time error instead. |
10 #if defined(OS_ANDROID) | 10 #if defined(OS_ANDROID) |
11 #error "Android is not supported." | 11 #error "Android is not supported." |
12 #endif // defined(OS_ANDROID). | 12 #endif // defined(OS_ANDROID). |
13 | 13 |
14 #include <string> | 14 #include <string> |
15 #include <vector> | 15 #include <vector> |
16 | 16 |
17 #include "base/compiler_specific.h" | 17 #include "base/compiler_specific.h" |
18 #include "base/macros.h" | 18 #include "base/macros.h" |
19 #include "base/memory/scoped_ptr.h" | |
20 #include "sandbox/linux/system_headers/capability.h" | 19 #include "sandbox/linux/system_headers/capability.h" |
21 #include "sandbox/sandbox_export.h" | 20 #include "sandbox/sandbox_export.h" |
22 | 21 |
23 namespace sandbox { | 22 namespace sandbox { |
24 | 23 |
25 // This class should be used to manipulate the current process' credentials. | 24 // This class should be used to manipulate the current process' credentials. |
26 // It is currently a stub used to manipulate POSIX.1e capabilities as | 25 // It is currently a stub used to manipulate POSIX.1e capabilities as |
27 // implemented by the Linux kernel. | 26 // implemented by the Linux kernel. |
28 class SANDBOX_EXPORT Credentials { | 27 class SANDBOX_EXPORT Credentials { |
29 public: | 28 public: |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 // Forks and drops capabilities in the child. | 97 // Forks and drops capabilities in the child. |
99 static pid_t ForkAndDropCapabilitiesInChild(); | 98 static pid_t ForkAndDropCapabilitiesInChild(); |
100 | 99 |
101 private: | 100 private: |
102 DISALLOW_IMPLICIT_CONSTRUCTORS(Credentials); | 101 DISALLOW_IMPLICIT_CONSTRUCTORS(Credentials); |
103 }; | 102 }; |
104 | 103 |
105 } // namespace sandbox. | 104 } // namespace sandbox. |
106 | 105 |
107 #endif // SANDBOX_LINUX_SERVICES_CREDENTIALS_H_ | 106 #endif // SANDBOX_LINUX_SERVICES_CREDENTIALS_H_ |
OLD | NEW |