mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-26 20:22:11 +01:00
Merge branch 'selinux-warning' into 'master'
gio: ‘security_context_t’ is deprecated See merge request GNOME/glib!1776
This commit is contained in:
commit
9a519c8bf0
@ -2714,12 +2714,14 @@ set_selinux_context (char *filename,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (is_selinux_enabled ()) {
|
||||
security_context_t val_s;
|
||||
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;
|
||||
}
|
||||
|
||||
val_s = g_strdup (val);
|
||||
|
||||
if (setfilecon_raw (filename, val_s) < 0)
|
||||
if (setfilecon_raw (filename, val) < 0)
|
||||
{
|
||||
int errsv = errno;
|
||||
|
||||
@ -2729,12 +2731,6 @@ set_selinux_context (char *filename,
|
||||
g_strerror (errsv));
|
||||
return FALSE;
|
||||
}
|
||||
g_free (val_s);
|
||||
} 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;
|
||||
}
|
||||
|
@ -2063,7 +2063,7 @@ endif
|
||||
|
||||
selinux_dep = []
|
||||
if host_system == 'linux'
|
||||
selinux_dep = dependency('libselinux', required: get_option('selinux'))
|
||||
selinux_dep = dependency('libselinux', version: '>=2.2', required: get_option('selinux'))
|
||||
|
||||
glib_conf.set('HAVE_SELINUX', selinux_dep.found())
|
||||
endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user