]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Make linux stat(2) return the same st_dev for every devfs instance.
authorEdward Tomasz Napierala <trasz@FreeBSD.org>
Sat, 11 Jul 2020 13:08:16 +0000 (13:08 +0000)
committerEdward Tomasz Napierala <trasz@FreeBSD.org>
Sat, 11 Jul 2020 13:08:16 +0000 (13:08 +0000)
commit17f701a3fba1da17bbf3baae8985868aa7710ad5
tree7c87314e60126d28ebc655d7f5ffcba7ba943f68
parentcf7becd216349b9c74c471b94df75b354399fcbc
Make linux stat(2) return the same st_dev for every devfs instance.
The reason for this is to work around an idiosyncrasy of glibc
getttynam(3) implementation: it checks whether st_dev returned for
fd 0 is the same as st_dev returned for the target of /proc/self/fd/0
symlink, and with linux chroots having their own devfs instance,
the check will fail if you chrooted into it.

PR: kern/240767
Reviewed by: kib
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D25559
sys/compat/linux/linux_stats.c