OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Re: overwriting and copying keeps original setuid bit

From: George Georgalis (georgegalis.org)
Date: Mon May 14 2007 - 14:27:46 CDT


On Fri, May 11, 2007 at 03:07:55PM -0500, Jeremy C. Reed wrote:
>Keeping a previous file's setuid (or setgid) is wrong.

I hear you, but the -p flag does address that, cp and preserve
permissions vs copy data not attributes.

but it reminds me of something I've wondered about. is there
a place for a atomic copy in base, eg copy to tmp file and
rename to target? That would accomplish copy with respect to
uid/gid/umask/etc.

// George

--
George Georgalis, information systems scientist <IXOYE><