From ed597f19fdc3017dde6d1452b5cdf8ddcd69a5b1 Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 25 Nov 2008 19:36:31 -0500 Subject: [PATCH] xselinux: use "raw context" variants of getpeercon() and getcon(). --- Xext/xselinux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Xext/xselinux.c b/Xext/xselinux.c index 0e8f25468..93ea05b92 100644 --- a/Xext/xselinux.c +++ b/Xext/xselinux.c @@ -472,7 +472,7 @@ SELinuxLabelClient(ClientPtr client) sidput(obj->sid); /* Try to get a context from the socket */ - if (fd < 0 || getpeercon(fd, &ctx) < 0) { + if (fd < 0 || getpeercon_raw(fd, &ctx) < 0) { /* Otherwise, fall back to a default context */ if (selabel_lookup(label_hnd, &ctx, "remote", SELABEL_X_CLIENT) < 0) FatalError("SELinux: failed to look up remote-client context\n"); @@ -537,7 +537,7 @@ SELinuxLabelInitial(void) sidput(subj->sid); /* Use the context of the X server process for the serverClient */ - if (getcon(&ctx) < 0) + if (getcon_raw(&ctx) < 0) FatalError("SELinux: couldn't get context of X server process\n"); /* Get a SID from the context */