OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 CHROME_COMMON_SANDBOX_MAC_H_ | 5 #ifndef CHROME_COMMON_SANDBOX_MAC_H_ |
6 #define CHROME_COMMON_SANDBOX_MAC_H_ | 6 #define CHROME_COMMON_SANDBOX_MAC_H_ |
7 | 7 |
8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
9 | 9 |
10 namespace sandbox { | 10 namespace sandbox { |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 // profile that supports this is SANDBOX_TYPE_UTILITY . | 43 // profile that supports this is SANDBOX_TYPE_UTILITY . |
44 // | 44 // |
45 // |allowed_dir| must be a "simple" string since it's placed as is in a regex | 45 // |allowed_dir| must be a "simple" string since it's placed as is in a regex |
46 // i.e. it must not contain quotation characters, escaping or any characters | 46 // i.e. it must not contain quotation characters, escaping or any characters |
47 // that might have special meaning when blindly substituted into a regular | 47 // that might have special meaning when blindly substituted into a regular |
48 // expression - crbug.com/26492 . | 48 // expression - crbug.com/26492 . |
49 // Returns true on success, false if an error occurred enabling the sandbox. | 49 // Returns true on success, false if an error occurred enabling the sandbox. |
50 bool EnableSandbox(SandboxProcessType sandbox_type, | 50 bool EnableSandbox(SandboxProcessType sandbox_type, |
51 const FilePath& allowed_dir); | 51 const FilePath& allowed_dir); |
52 | 52 |
| 53 // Convert provided path into a "canonical" path matching what the Sandbox |
| 54 // expects i.e. one without symlinks. |
| 55 // This path is not necessarily unique e.g. in the face of hardlinks. |
| 56 void GetCanonicalSandboxPath(FilePath* path); |
| 57 |
53 } // namespace sandbox | 58 } // namespace sandbox |
54 | 59 |
55 #endif // CHROME_COMMON_SANDBOX_MAC_H_ | 60 #endif // CHROME_COMMON_SANDBOX_MAC_H_ |
OLD | NEW |