summaryrefslogtreecommitdiff
path: root/src/selinux.cpp
diff options
context:
space:
mode:
authorinfirit <[email protected]>2014-12-18 00:23:57 +0100
committerinfirit <[email protected]>2014-12-18 00:23:57 +0100
commit12975909c589880030db6125ad6dcbea889edcdc (patch)
treefc374a8a3b855b5024d09f9edb2e47ca755cb7ac /src/selinux.cpp
parent0dea7ab1931fb33f35eceab66dffcd56f4550f68 (diff)
downloadmate-system-monitor-12975909c589880030db6125ad6dcbea889edcdc.tar.bz2
mate-system-monitor-12975909c589880030db6125ad6dcbea889edcdc.tar.xz
Make indentation uniform across source files
No more tabs, 4 spaces instead. And remove trailing whitespace.
Diffstat (limited to 'src/selinux.cpp')
-rw-r--r--src/selinux.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/src/selinux.cpp b/src/selinux.cpp
index 6bfee5a..f9eaddf 100644
--- a/src/selinux.cpp
+++ b/src/selinux.cpp
@@ -15,11 +15,11 @@ static gboolean has_selinux;
static gboolean load_selinux(void)
{
- return load_symbols("libselinux.so.1",
- "getpidcon", &getpidcon,
- "freecon", &freecon,
- "is_selinux_enabled", &is_selinux_enabled,
- NULL);
+ return load_symbols("libselinux.so.1",
+ "getpidcon", &getpidcon,
+ "freecon", &freecon,
+ "is_selinux_enabled", &is_selinux_enabled,
+ NULL);
}
@@ -27,12 +27,12 @@ static gboolean load_selinux(void)
void
get_process_selinux_context (ProcInfo *info)
{
- char *con;
+ char *con;
- if (has_selinux && !getpidcon (info->pid, &con)) {
- info->security_context = g_strdup (con);
- freecon (con);
- }
+ if (has_selinux && !getpidcon (info->pid, &con)) {
+ info->security_context = g_strdup (con);
+ freecon (con);
+ }
}
@@ -40,25 +40,25 @@ get_process_selinux_context (ProcInfo *info)
gboolean
can_show_security_context_column (void)
{
- if (!(has_selinux = load_selinux()))
- return FALSE;
+ if (!(has_selinux = load_selinux()))
+ return FALSE;
- switch (is_selinux_enabled()) {
- case 1:
- /* We're running on an SELinux kernel */
- return TRUE;
+ switch (is_selinux_enabled()) {
+ case 1:
+ /* We're running on an SELinux kernel */
+ return TRUE;
- case -1:
- /* Error; hide the security context column */
+ case -1:
+ /* Error; hide the security context column */
- case 0:
- /* We're not running on an SELinux kernel:
- hide the security context column */
+ case 0:
+ /* We're not running on an SELinux kernel:
+ hide the security context column */
- default:
- g_warning("SELinux was found but is not enabled.\n");
- return FALSE;
- }
+ default:
+ g_warning("SELinux was found but is not enabled.\n");
+ return FALSE;
+ }
}