Re: possibly security bug in mv ?

Andreas Schwab <[email protected]> Mon, 22 Aug 2005 16:10:43 +0200
Newsgroups gmane.comp.gnu.core-utils.bugs,gmane.comp.gnu.fileutils.bugs
Message-ID <[email protected]>
Nelson Ben=EDtez <[email protected]> writes:

> Hi, on man page of mv it is said:
>
> "When both source and destination are on the same filesystem,  they  ar=
e
> the same file (just the name is changed; owner, mode, timestamps remain
> unchanged).  When they are on different filesystems, the source file is
> copied  and then deleted.  mv will copy modification time, access time,
> user and group ID, and mode if possible. When copying user and/or group
> ID fails, the setuid and setgid bits are cleared in the copy."
>
> The last sentence (clearing setuid,setgid bits) doesn't seem to be true
> in the following testcase:

You should report that to the author of the manual page.  There is no suc=
h
statement in the documentation of coreutils, neither version 5.2.1 nor
5.3.0.

Andreas.

--=20
Andreas Schwab, SuSE Labs, [email protected]
SuSE Linux Products GmbH, Maxfeldstra=DFe 5, 90409 N=FCrnberg, Germany
Key fingerprint =3D 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."