summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2014-04-18 14:54:02 -0700
committerKeith Packard <keithp@keithp.com>2014-04-18 16:30:17 -0700
commit0c0feddbcda238efa82a47f456ef3008ffa53195 (patch)
tree8be62f22d560cb59b5587111897c03f0f7502e8c
parent696e08f8e820449bb4b0ce7a60bf5b5bc5097935 (diff)
kdrive: Ignore failure to chown console tty to current user
I'm not sure what we'd do in this case anyways, other than fatal error. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Jamey Sharp <jamey@minilop.net>
-rw-r--r--hw/kdrive/linux/linux.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/hw/kdrive/linux/linux.c b/hw/kdrive/linux/linux.c
index 6284de576..73a8169bf 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