On 04/20/10 04:23 PM, Richard Lowe wrote:
Shawn Walker wrote:
On 04/19/10 08:43 PM, Richard Lowe wrote:
The change I'm making here preserves the permissions of an existing
cfg_cache and uses 0644 as the default. I'm still on the fence about
attempting to preserve the existing permissions, in most cases I've
found the code treats the depot directory structure as entirely its own,
but I'm not sure if this is intent, and I'm also not sure it'd be the
right thing to do with cfg_cache anyway.
Further, should this attempt to preserve ownership? If so, what should
it do if it cannot?
The cfg_cache file is a bit special since the depot allows this file to live
outside of the repository via the --cfg-file option. In light of that,
preserving the permissions seems fine.
Shawn responded to a question I asked off list (that he respond to my
last paragraph) stating that he thinks we should try and preserve
ownership, but not complain if we fail to.
I'm not convinced that's right, because then we clobber ownership (this
also means that write permission to the cfg_cache file is meaningless,
it's permission to the directory contains that's important.)
Am I missing something dumb? Was the change to write to a tempfile and
then rename a bad move in the first place? I'd really rather not screw
this up again, worse, or differently.
I think writing the cfg_cache as a temporary file first and then
renaming into place is necessary to ensure an atomic update. I don't
believe it's the wrong approach at all.
I'm happy with whatever the general consensus is on group ownership.
Cheers,
-Shawn
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss