Re: copyfile(3) copies the posix "owner" for *some* files only
Re: copyfile(3) copies the posix "owner" for *some* files only
- Subject: Re: copyfile(3) copies the posix "owner" for *some* files only
- From: Steve Checkoway <email@hidden>
- Date: Thu, 29 Jul 2010 14:18:00 -0700
On Jul 28, 2010, at 21:28 , Jerry Krinock wrote:
Just to give the resolution on this thread, wrapping chown with
fts_xxx() was not difficult. This seems to work…
I think there's a bug.
int chown_recursive(char * const path, uid_t uid, uid_t gid) {
// See man fts(3) for these. Your mileage may vary.
int fts_options = FTS_PHYSICAL | FTS_NOCHDIR | FTS_XDEV |
FTS_SEEDOT ;
I don't think you want FTS_SEEDOT here or the FTS_DOT below. If you
give it /foo/bar, it's going to attempt to chown /foo/bar/.. which is
not what you asked for. There also seems to be no need to chown each
directory twice.
--
Steve Checkoway
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden