diff options
-rw-r--r-- | ChangeLog.txt | 5 | ||||
-rw-r--r-- | Makefile.in | 2 | ||||
-rw-r--r-- | ports/linux/guts/fopen64.c | 2 | ||||
-rw-r--r-- | ports/linux/guts/freopen64.c | 2 | ||||
-rw-r--r-- | ports/unix/guts/fopen.c | 2 | ||||
-rw-r--r-- | ports/unix/guts/freopen.c | 2 |
6 files changed, 9 insertions, 6 deletions
diff --git a/ChangeLog.txt b/ChangeLog.txt index c96166b..5431f1e 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,10 +1,13 @@ +2015-09-22: + * (seebs) Fix modes after fopen/fopen64. + 2015-09-04: * (seebs) add return value printing to wrapper debug! * (seebs) make mkdirat() restore errno, also don't pass AT_SYMLINK_NOFOLLOW to fchmodat() since it is ignored, and we know that if the thing exists at all, it is a directory and thus AT_SYMLINK_NOFOLLOW would be irrelevant anyway. - * (seedbs) and 1.7.3, of course. + * (seebs) and 1.7.3, of course. 2015-09-03: * (seebs) Use original mode, not 0600, for the chmods used to diff --git a/Makefile.in b/Makefile.in index 1c34824..7fa5149 100644 --- a/Makefile.in +++ b/Makefile.in @@ -44,7 +44,7 @@ BITS=@BITS@ ARCH_FLAGS=@ARCH_FLAGS@ MARK64=@MARK64@ RPATH=@RPATH@ -VERSION=1.7.3 +VERSION=1.7.4 LIB=@LIB@ BIN=bin diff --git a/ports/linux/guts/fopen64.c b/ports/linux/guts/fopen64.c index 32539ea..b243345 100644 --- a/ports/linux/guts/fopen64.c +++ b/ports/linux/guts/fopen64.c @@ -20,7 +20,7 @@ pseudo_debug(PDBGF_FILE, "fopen64 '%s': fd %d <FILE %p>\n", path, fd, (void *) rc); if (real___fxstat64(_STAT_VER, fd, &buf) != -1) { if (!existed) { - real_fchmod(fd, PSEUDO_FS_MODE(0600, 0)); + real_fchmod(fd, PSEUDO_FS_MODE(0666 & ~pseudo_umask, 0)); pseudo_client_op(OP_CREAT, 0, -1, -1, path, &buf); } pseudo_client_op(OP_OPEN, pseudo_access_fopen(mode), fd, -1, path, &buf); diff --git a/ports/linux/guts/freopen64.c b/ports/linux/guts/freopen64.c index b6ff0a6..4bad533 100644 --- a/ports/linux/guts/freopen64.c +++ b/ports/linux/guts/freopen64.c @@ -19,7 +19,7 @@ pseudo_debug(PDBGF_FILE, "freopen64 '%s': fd %d\n", path, fd); if (real___fxstat64(_STAT_VER, fd, &buf) != -1) { if (!existed) { - real_fchmod(fd, PSEUDO_FS_MODE(0600, 0)); + real_fchmod(fd, PSEUDO_FS_MODE(0666 & ~pseudo_umask, 0)); pseudo_client_op(OP_CREAT, 0, -1, -1, path, &buf); } pseudo_client_op(OP_OPEN, pseudo_access_fopen(mode), fd, -1, path, &buf); diff --git a/ports/unix/guts/fopen.c b/ports/unix/guts/fopen.c index 4214980..87c7d78 100644 --- a/ports/unix/guts/fopen.c +++ b/ports/unix/guts/fopen.c @@ -19,7 +19,7 @@ pseudo_debug(PDBGF_OP, "fopen '%s': fd %d <FILE %p>\n", path, fd, (void *) rc); if (base_fstat(fd, &buf) != -1) { if (!existed) { - real_fchmod(fd, PSEUDO_FS_MODE(0600, 0)); + real_fchmod(fd, PSEUDO_FS_MODE(0666 & ~pseudo_umask, 0)); pseudo_client_op(OP_CREAT, 0, -1, -1, path, &buf); } pseudo_client_op(OP_OPEN, pseudo_access_fopen(mode), fd, -1, path, &buf); diff --git a/ports/unix/guts/freopen.c b/ports/unix/guts/freopen.c index 09219be..e706d9f 100644 --- a/ports/unix/guts/freopen.c +++ b/ports/unix/guts/freopen.c @@ -19,7 +19,7 @@ pseudo_debug(PDBGF_OP, "freopen '%s': fd %d\n", path, fd); if (base_fstat(fd, &buf) != -1) { if (!existed) { - real_fchmod(fd, PSEUDO_FS_MODE(0600, 0)); + real_fchmod(fd, PSEUDO_FS_MODE(0666 & ~pseudo_umask, 0)); pseudo_client_op(OP_CREAT, 0, -1, -1, path, &buf); } pseudo_client_op(OP_OPEN, pseudo_access_fopen(mode), fd, -1, path, &buf); |