[PATCH 3/8] kdrive: Ignore failure to chown console tty to current user

Keith Packard keithp at keithp.com
Fri Apr 18 15:21:50 PDT 2014


I'm not sure what we'd do in this case anyways, other than fatal
error.

Signed-off-by: Keith Packard <keithp at keithp.com>
---
 hw/kdrive/linux/linux.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/hw/kdrive/linux/linux.c b/hw/kdrive/linux/linux.c
index 6284de5..73a8169 100644
--- a/hw/kdrive/linux/linux.c
+++ b/hw/kdrive/linux/linux.c
@@ -68,13 +68,16 @@ LinuxCheckChown(const char *file)
     struct stat st;
     __uid_t u;
     __gid_t g;
+    int r;
 
     if (stat(file, &st) < 0)
         return;
     u = getuid();
     g = getgid();
-    if (st.st_uid != u || st.st_gid != g)
-        chown(file, u, g);
+    if (st.st_uid != u || st.st_gid != g) {
+        r = chown(file, u, g);
+        (void) r;
+    }
 }
 
 static int
-- 
1.9.2



More information about the xorg-devel mailing list