Add cpdup feature - allow uid/gid/flags changes to fail if running as user
authorMatthew Dillon <dillon@apollo.backplane.com>
Sat, 25 Apr 2009 18:39:45 +0000 (11:39 -0700)
committerJordan Gordeev <jgordeev@dir.bg>
Sun, 26 Apr 2009 19:18:10 +0000 (22:18 +0300)
commitc065129d9b559c4dda62925b43d5d08c7c33abd5
treefe02a57cb76518d7e194b8f7ddba6f84f8ae1a79
parent1769ec9d9b811583744354ba90b55ffc668807f8
Add cpdup feature - allow uid/gid/flags changes to fail if running as user

If running as a user instead of root uid, gid, and flags changes are allowed
to fail and also, if running as a user, no longer force a copy if they
differ but the mtime and size are the same.  Generate a single warning
instead.

Reorder the call to setutimes to occur after chown/chmod instead of before,
and to occur after a chflags call if IMMUTABLE is not set.
bin/cpdup/cpdup.c
bin/cpdup/cpdup.h
bin/cpdup/hcproto.c