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:
parent
696e08f8e8
commit
0c0feddbcd
|
@ -68,13 +68,16 @@ LinuxCheckChown(const char *file)
|
||||||
struct stat st;
|
struct stat st;
|
||||||
__uid_t u;
|
__uid_t u;
|
||||||
__gid_t g;
|
__gid_t g;
|
||||||
|
int r;
|
||||||
|
|
||||||
if (stat(file, &st) < 0)
|
if (stat(file, &st) < 0)
|
||||||
return;
|
return;
|
||||||
u = getuid();
|
u = getuid();
|
||||||
g = getgid();
|
g = getgid();
|
||||||
if (st.st_uid != u || st.st_gid != g)
|
if (st.st_uid != u || st.st_gid != g) {
|
||||||
chown(file, u, g);
|
r = chown(file, u, g);
|
||||||
|
(void) r;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
|
Loading…
Reference in New Issue
Block a user