mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
daemon, lib: Replace deprecated security_context_t with char *.
This gives deprecation warnings. It always was simply a char *, and the recommendation upstream is to replace uses with char *:9eb9c93275(cherry picked from commiteb78e990ac)
This commit is contained in:
@@ -63,8 +63,7 @@ char *
|
||||
do_getcon (void)
|
||||
{
|
||||
#if defined(HAVE_GETCON)
|
||||
security_context_t context;
|
||||
char *r;
|
||||
char *context, *r;
|
||||
|
||||
if (getcon (&context) == -1) {
|
||||
reply_with_perror ("getcon");
|
||||
|
||||
@@ -288,8 +288,7 @@ create_cow_overlay_libvirt (guestfs_h *g, void *datav, struct drive *drv)
|
||||
if (data->selinux_imagelabel) {
|
||||
debug (g, "setting SELinux label on %s to %s",
|
||||
overlay, data->selinux_imagelabel);
|
||||
if (setfilecon (overlay,
|
||||
(security_context_t) data->selinux_imagelabel) == -1)
|
||||
if (setfilecon (overlay, data->selinux_imagelabel) == -1)
|
||||
selinux_warning (g, __func__, "setfilecon", overlay);
|
||||
}
|
||||
#endif
|
||||
@@ -840,7 +839,7 @@ is_custom_hv (guestfs_h *g)
|
||||
static void
|
||||
set_socket_create_context (guestfs_h *g)
|
||||
{
|
||||
security_context_t scon; /* this is actually a 'char *' */
|
||||
char *scon;
|
||||
context_t con;
|
||||
|
||||
if (getcon (&scon) == -1) {
|
||||
|
||||
Reference in New Issue
Block a user