- if ((fd ?
- fchown(fd, fs->st_uid, -1) : chown(to.p_path, fs->st_uid, -1))) {
- if (errno != EPERM)
- error(to.p_path);
- if (fs->st_mode & S_ISUID)
- fs->st_mode &= ~(S_ISUID|S_ISGID);
- }
- if ((fd ?
- fchown(fd, -1, fs->st_gid) : chown(to.p_path, -1, fs->st_gid))) {
+ if (fd ? fchown(fd, fs->st_uid, fs->st_gid) :
+ chown(to.p_path, fs->st_uid, fs->st_gid)) {