openat: detect Solaris fchownat bug
Solaris 9 fchownat(dir,"name/",uid,gid,flag) has same bugs as
chown and lchown.
* lib/fchownat.c (rpl_fchownat): Work around Solaris bug. Avoid
penalizing glibc chownat when only lchownat is broken.
* m4/openat.m4 (gl_FUNC_FCHOWNAT): Replace fchownat if there are
trailing slash bugs.
* doc/posix-functions/fchownat.texi (fchownat): Document the bug.
* modules/openat-tests (Files): Include more files.
(Depends-on): Add mgetgroups, sleep, stat-time.
(configure.ac): Add additional checks.
(Makefile.am): Build new test.
* tests/test-fchownat.c: New file.
Signed-off-by: Eric Blake <ebb9@byu.net>