mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-08 20:05:49 +01:00
gio: fix set_selinux_context coding style
Mostly for cosmetic and readability, follow more closely the glib-style. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
This commit is contained in:
parent
f9cc77da73
commit
3f18b77fb3
@ -2714,7 +2714,13 @@ set_selinux_context (char *filename,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (is_selinux_enabled ()) {
|
||||
if (!is_selinux_enabled ())
|
||||
{
|
||||
g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_INVALID_ARGUMENT,
|
||||
_("SELinux is not enabled on this system"));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (setfilecon_raw (filename, val) < 0)
|
||||
{
|
||||
int errsv = errno;
|
||||
@ -2725,11 +2731,6 @@ set_selinux_context (char *filename,
|
||||
g_strerror (errsv));
|
||||
return FALSE;
|
||||
}
|
||||
} else {
|
||||
g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_INVALID_ARGUMENT,
|
||||
_("SELinux is not enabled on this system"));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user