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

Side by Side Diff: chrome/browser/ui/webui/about_ui.cc

Issue 10829156: Linux: add BPF sandbox status in about:sandbox (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | content/common/sandbox_linux.cc » ('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) 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 #include "chrome/browser/ui/webui/about_ui.h" 5 #include "chrome/browser/ui/webui/about_ui.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 957 matching lines...) Expand 10 before | Expand all | Expand 10 after
968 const int status = content::ZygoteHost::GetInstance()->GetSandboxStatus(); 968 const int status = content::ZygoteHost::GetInstance()->GetSandboxStatus();
969 969
970 data.append("<table>"); 970 data.append("<table>");
971 971
972 AboutSandboxRow(&data, "", IDS_ABOUT_SANDBOX_SUID_SANDBOX, 972 AboutSandboxRow(&data, "", IDS_ABOUT_SANDBOX_SUID_SANDBOX,
973 status & content::kSandboxLinuxSUID); 973 status & content::kSandboxLinuxSUID);
974 AboutSandboxRow(&data, "&nbsp;&nbsp;", IDS_ABOUT_SANDBOX_PID_NAMESPACES, 974 AboutSandboxRow(&data, "&nbsp;&nbsp;", IDS_ABOUT_SANDBOX_PID_NAMESPACES,
975 status & content::kSandboxLinuxPIDNS); 975 status & content::kSandboxLinuxPIDNS);
976 AboutSandboxRow(&data, "&nbsp;&nbsp;", IDS_ABOUT_SANDBOX_NET_NAMESPACES, 976 AboutSandboxRow(&data, "&nbsp;&nbsp;", IDS_ABOUT_SANDBOX_NET_NAMESPACES,
977 status & content::kSandboxLinuxNetNS); 977 status & content::kSandboxLinuxNetNS);
978 AboutSandboxRow(&data, "", IDS_ABOUT_SANDBOX_SECCOMP_SANDBOX, 978 AboutSandboxRow(&data, "", IDS_ABOUT_SANDBOX_SECCOMP_LEGACY_SANDBOX,
979 status & content::kSandboxLinuxSeccomp); 979 status & content::kSandboxLinuxSeccompLegacy);
980 AboutSandboxRow(&data, "", IDS_ABOUT_SANDBOX_SECCOMP_BPF_SANDBOX,
981 status & content::kSandboxLinuxSeccompBpf);
980 982
981 data.append("</table>"); 983 data.append("</table>");
982 984
985 // We do not consider the seccomp-bpf status here as the renderers
986 // policy is weak at the moment.
987 // TODO(jln): fix when whe have better renderer policies.
983 bool good = ((status & content::kSandboxLinuxSUID) && 988 bool good = ((status & content::kSandboxLinuxSUID) &&
984 (status & content::kSandboxLinuxPIDNS)) || 989 (status & content::kSandboxLinuxPIDNS)) ||
985 (status & content::kSandboxLinuxSeccomp); 990 (status & content::kSandboxLinuxSeccompLegacy);
986 if (good) { 991 if (good) {
987 data.append("<p style=\"color: green\">"); 992 data.append("<p style=\"color: green\">");
988 data.append(l10n_util::GetStringUTF8(IDS_ABOUT_SANDBOX_OK)); 993 data.append(l10n_util::GetStringUTF8(IDS_ABOUT_SANDBOX_OK));
989 } else { 994 } else {
990 data.append("<p style=\"color: red\">"); 995 data.append("<p style=\"color: red\">");
991 data.append(l10n_util::GetStringUTF8(IDS_ABOUT_SANDBOX_BAD)); 996 data.append(l10n_util::GetStringUTF8(IDS_ABOUT_SANDBOX_BAD));
992 } 997 }
993 data.append("</p>"); 998 data.append("</p>");
994 999
995 AppendFooter(&data); 1000 AppendFooter(&data);
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
1391 ThemeSource* theme = new ThemeSource(profile); 1396 ThemeSource* theme = new ThemeSource(profile);
1392 ChromeURLDataManager::AddDataSource(profile, theme); 1397 ChromeURLDataManager::AddDataSource(profile, theme);
1393 #endif 1398 #endif
1394 1399
1395 ChromeURLDataManager::DataSource* source = 1400 ChromeURLDataManager::DataSource* source =
1396 new AboutUIHTMLSource(name, profile); 1401 new AboutUIHTMLSource(name, profile);
1397 if (source) { 1402 if (source) {
1398 ChromeURLDataManager::AddDataSource(profile, source); 1403 ChromeURLDataManager::AddDataSource(profile, source);
1399 } 1404 }
1400 } 1405 }
OLDNEW
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | content/common/sandbox_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698