summaryrefslogtreecommitdiffstats
path: root/games/dm/pathnames.h
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>2001-06-11 13:57:54 +0000
committerbde <bde@FreeBSD.org>2001-06-11 13:57:54 +0000
commit5f8a4bf5ab28d162b4d59738aca0f347c6a5f4ba (patch)
tree46f648b9bcd8b6bd904eb0058e3befa6575f8467 /games/dm/pathnames.h
parent3851943e9b5934e21298c7a48a10da449af6ec57 (diff)
downloadFreeBSD-src-5f8a4bf5ab28d162b4d59738aca0f347c6a5f4ba.zip
FreeBSD-src-5f8a4bf5ab28d162b4d59738aca0f347c6a5f4ba.tar.gz
Removed the broken code which claimed to lose the set[ug]id bits in
the !(pflag && setfile()) case for regular files unless the copy is owned by the same user and group. These bits have already been lost (or never gained) in the correct way. The code didn't actually lose the bits; it depended on them being lost already (apparently in all cases) and attempted to gain them as necessary, but it often gained them (and sometimes collateral bits) when wrong: - pflag && setfile() == 0 case (i.e., for a successful cp -p): setfile() copies all the attributes as correctly as possible (as specified by POSIX), and we sometimes messed up the up the mode by setting it again. Also, if the file is immutable, then setting the mode again gave spurious errors (PR 20646). - !pflag case. If the target is created, POSIX requires it to not have the set[ug]id bits, but we sometimes copied them from the source. If the target already exists, POSIX requires its mode to be unchanged, but we sometimes copied the whole mode from the source. PR: 20646 MFC after: 4 weeks
Diffstat (limited to 'games/dm/pathnames.h')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud