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

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

Issue 189093005: Linux Sandbox: show Yama status in about:sandbox (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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/sandbox_linux.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) 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 808 matching lines...) Expand 10 before | Expand all | Expand 10 after
819 IDS_ABOUT_SANDBOX_SUID_SANDBOX, 819 IDS_ABOUT_SANDBOX_SUID_SANDBOX,
820 status & content::kSandboxLinuxSUID); 820 status & content::kSandboxLinuxSUID);
821 AboutSandboxRow(&data, "&nbsp;&nbsp;", IDS_ABOUT_SANDBOX_PID_NAMESPACES, 821 AboutSandboxRow(&data, "&nbsp;&nbsp;", IDS_ABOUT_SANDBOX_PID_NAMESPACES,
822 status & content::kSandboxLinuxPIDNS); 822 status & content::kSandboxLinuxPIDNS);
823 AboutSandboxRow(&data, "&nbsp;&nbsp;", IDS_ABOUT_SANDBOX_NET_NAMESPACES, 823 AboutSandboxRow(&data, "&nbsp;&nbsp;", IDS_ABOUT_SANDBOX_NET_NAMESPACES,
824 status & content::kSandboxLinuxNetNS); 824 status & content::kSandboxLinuxNetNS);
825 AboutSandboxRow(&data, 825 AboutSandboxRow(&data,
826 std::string(), 826 std::string(),
827 IDS_ABOUT_SANDBOX_SECCOMP_BPF_SANDBOX, 827 IDS_ABOUT_SANDBOX_SECCOMP_BPF_SANDBOX,
828 status & content::kSandboxLinuxSeccompBPF); 828 status & content::kSandboxLinuxSeccompBPF);
829 AboutSandboxRow(&data,
830 std::string(),
831 IDS_ABOUT_SANDBOX_YAMA_LSM,
832 status & content::kSandboxLinuxYama);
829 833
830 data.append("</table>"); 834 data.append("</table>");
831 835
832 // The setuid sandbox is required as our first-layer sandbox. 836 // The setuid sandbox is required as our first-layer sandbox.
833 bool good_layer1 = status & content::kSandboxLinuxSUID && 837 bool good_layer1 = status & content::kSandboxLinuxSUID &&
834 status & content::kSandboxLinuxPIDNS && 838 status & content::kSandboxLinuxPIDNS &&
835 status & content::kSandboxLinuxNetNS; 839 status & content::kSandboxLinuxNetNS;
836 // A second-layer sandbox is also required to be adequately sandboxed. 840 // A second-layer sandbox is also required to be adequately sandboxed.
837 bool good_layer2 = status & content::kSandboxLinuxSeccompBPF; 841 bool good_layer2 = status & content::kSandboxLinuxSeccompBPF;
838 bool good = good_layer1 && good_layer2; 842 bool good = good_layer1 && good_layer2;
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
1087 Profile* profile = Profile::FromWebUI(web_ui); 1091 Profile* profile = Profile::FromWebUI(web_ui);
1088 1092
1089 #if defined(ENABLE_THEMES) 1093 #if defined(ENABLE_THEMES)
1090 // Set up the chrome://theme/ source. 1094 // Set up the chrome://theme/ source.
1091 ThemeSource* theme = new ThemeSource(profile); 1095 ThemeSource* theme = new ThemeSource(profile);
1092 content::URLDataSource::Add(profile, theme); 1096 content::URLDataSource::Add(profile, theme);
1093 #endif 1097 #endif
1094 1098
1095 content::URLDataSource::Add(profile, new AboutUIHTMLSource(name, profile)); 1099 content::URLDataSource::Add(profile, new AboutUIHTMLSource(name, profile));
1096 } 1100 }
OLDNEW
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | content/common/sandbox_linux/sandbox_linux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698