| 444 | available, DIRFD+NAME otherwise. */ |
| 445 | |
| 446 | static int |
| 447 | fchmod_or_lchmod (int desc, int dirfd, char const *name, mode_t mode) |
| 448 | { |
| 449 | #if HAVE_FCHMOD |
| 450 | if (0 <= desc) |
| 451 | return fchmod (desc, mode); |
| 452 | #endif |
| 453 | return lchmodat (dirfd, name, mode); |
| 454 | } |
| 455 | |
| 456 | /* Change the ownership of the file identified by DESC or |
| 457 | DIRFD+NAME to UID+GID. Use DESC if DESC is valid and fchown is |