aboutsummaryrefslogtreecommitdiffstats
path: root/ports/linux
diff options
context:
space:
mode:
Diffstat (limited to 'ports/linux')
-rw-r--r--ports/linux/guts/fopen64.c1
-rw-r--r--ports/linux/guts/freopen64.c1
-rw-r--r--ports/linux/guts/mkstemp64.c1
-rw-r--r--ports/linux/guts/openat.c1
4 files changed, 4 insertions, 0 deletions
diff --git a/ports/linux/guts/fopen64.c b/ports/linux/guts/fopen64.c
index ac3fde1..32539ea 100644
--- a/ports/linux/guts/fopen64.c
+++ b/ports/linux/guts/fopen64.c
@@ -20,6 +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));
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 bb69b34..b6ff0a6 100644
--- a/ports/linux/guts/freopen64.c
+++ b/ports/linux/guts/freopen64.c
@@ -19,6 +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));
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/mkstemp64.c b/ports/linux/guts/mkstemp64.c
index cbeda0e..48be612 100644
--- a/ports/linux/guts/mkstemp64.c
+++ b/ports/linux/guts/mkstemp64.c
@@ -30,6 +30,7 @@
save_errno = errno;
if (real___fxstat64(_STAT_VER, rc, &buf) != -1) {
+ real_fchmod(rc, PSEUDO_FS_MODE(0600, 0));
pseudo_client_op(OP_CREAT, 0, -1, -1, tmp_template, &buf);
pseudo_client_op(OP_OPEN, PSA_READ | PSA_WRITE, rc, -1, tmp_template, &buf);
} else {
diff --git a/ports/linux/guts/openat.c b/ports/linux/guts/openat.c
index 87fa466..338bd45 100644
--- a/ports/linux/guts/openat.c
+++ b/ports/linux/guts/openat.c
@@ -75,6 +75,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, dirfd, path, &buf);
}
pseudo_client_op(OP_OPEN, PSEUDO_ACCESS(flags), rc, dirfd, path, &buf);