Assume fchmod(2) exists
It is required by POSIX.1-2001. Cc: Christian Göttsche <cgzones@googlemail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
This commit is contained in:
committed by
Serge Hallyn
parent
55c62b663f
commit
9c86e07067
@ -261,15 +261,10 @@ static /*@null@*/ /*@dependent@*/FILE *fopen_set_perms (
|
||||
}
|
||||
#endif /* !HAVE_FCHOWN */
|
||||
|
||||
#ifdef HAVE_FCHMOD
|
||||
if (fchmod (fileno (fp), sb->st_mode & 0664) != 0) {
|
||||
goto fail;
|
||||
}
|
||||
#else /* !HAVE_FCHMOD */
|
||||
if (chmod (name, sb->st_mode & 0664) != 0) {
|
||||
goto fail;
|
||||
}
|
||||
#endif /* !HAVE_FCHMOD */
|
||||
|
||||
return fp;
|
||||
|
||||
fail:
|
||||
|
Reference in New Issue
Block a user