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>
This commit is contained in:
Keith Packard 2014-04-18 14:54:02 -07:00
parent 696e08f8e8
commit 0c0feddbcd

View File

@ -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