aboutsummaryrefslogtreecommitdiffstats
path: root/ports/darwin
diff options
context:
space:
mode:
authorPeter Seebach <peter.seebach@windriver.com>2015-08-21 20:26:42 -0500
committerPeter Seebach <peter.seebach@windriver.com>2015-08-24 12:01:52 -0500
commit5de87663775e46aed24b15a894491413513a5d92 (patch)
tree69da72fec4427bfc4be8eea89744669668ecd9f4 /ports/darwin
parentcb1326a6f3f802405d873b6c0e4cac3207457f32 (diff)
downloadpseudo-5de87663775e46aed24b15a894491413513a5d92.tar.gz
pseudo-5de87663775e46aed24b15a894491413513a5d92.tar.bz2
pseudo-5de87663775e46aed24b15a894491413513a5d92.zip
xattrdb bug fixes
When xattr emulation is used to store extended attributes, dummy entries get made in the db using whatever UID/GID were in the real stat buffer if no entry already existed. Change these to -1, and treat -1 uid/gid as a missing entry for stat purposes. xattrdb was not merging existing uid/gid values. Change this by loading existing values to merge them in when executing chown/chmod commands. Newly-created files could end up with a filesystem mode of 0 if you used umask, but this breaks xattrdb. Signed-off-by: Peter Seebach <peter.seebach@windriver.com>
Diffstat (limited to 'ports/darwin')
-rw-r--r--ports/darwin/guts/open.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ports/darwin/guts/open.c b/ports/darwin/guts/open.c
index afe19a2..0979c54 100644
--- a/ports/darwin/guts/open.c
+++ b/ports/darwin/guts/open.c
@@ -41,6 +41,7 @@
if (stat_rc != -1) {
buf.st_mode = PSEUDO_DB_MODE(buf.st_mode, mode);
if (!existed) {
+ real_fchmod(rc, PSEUDO_FS_MODE(0600, 0));
pseudo_client_op(OP_CREAT, 0, -1, -1, path, &buf);
}
pseudo_client_op(OP_OPEN, PSEUDO_ACCESS(flags), rc, -1, path, &buf);