Page MenuHomeFreeBSD

D20972.id.diff
No OneTemporary

D20972.id.diff

Index: head/contrib/netbsd-tests/lib/libc/gen/t_ftok.c
===================================================================
--- head/contrib/netbsd-tests/lib/libc/gen/t_ftok.c
+++ head/contrib/netbsd-tests/lib/libc/gen/t_ftok.c
@@ -65,7 +65,7 @@
key_t k1, k2, k3;
int fd;
- fd = open(path, O_RDONLY | O_CREAT);
+ fd = open(path, O_RDONLY | O_CREAT, 0600);
ATF_REQUIRE(fd >= 0);
(void)close(fd);
Index: head/contrib/netbsd-tests/lib/libc/stdio/t_fopen.c
===================================================================
--- head/contrib/netbsd-tests/lib/libc/stdio/t_fopen.c
+++ head/contrib/netbsd-tests/lib/libc/stdio/t_fopen.c
@@ -58,7 +58,7 @@
* used to fdopen(3) a stream is
* closed once the stream is closed.
*/
- fd = open(path, O_RDWR | O_CREAT);
+ fd = open(path, O_RDWR | O_CREAT, 0600);
ATF_REQUIRE(fd >= 0);
@@ -85,7 +85,7 @@
{
int fd;
- fd = open(path, O_RDONLY | O_CREAT);
+ fd = open(path, O_RDONLY | O_CREAT, 0600);
ATF_REQUIRE(fd >= 0);
errno = 0;
@@ -126,7 +126,7 @@
* with the stream corresponds with the offset
* set earlier for the file descriptor.
*/
- fd = open(path, O_RDWR | O_CREAT);
+ fd = open(path, O_RDWR | O_CREAT, 0600);
ATF_REQUIRE(fd >= 0);
ATF_REQUIRE(write(fd, "garbage", 7) == 7);
Index: head/contrib/netbsd-tests/lib/libc/sys/t_access.c
===================================================================
--- head/contrib/netbsd-tests/lib/libc/sys/t_access.c
+++ head/contrib/netbsd-tests/lib/libc/sys/t_access.c
@@ -62,7 +62,7 @@
size_t i;
int fd;
- fd = open(path, O_RDONLY | O_CREAT);
+ fd = open(path, O_RDONLY | O_CREAT, 0600);
if (fd < 0)
return;
Index: head/contrib/netbsd-tests/lib/libc/sys/t_mprotect.c
===================================================================
--- head/contrib/netbsd-tests/lib/libc/sys/t_mprotect.c
+++ head/contrib/netbsd-tests/lib/libc/sys/t_mprotect.c
@@ -116,7 +116,7 @@
size_t i;
int fd;
- fd = open(path, O_RDONLY | O_CREAT);
+ fd = open(path, O_RDONLY | O_CREAT, 0600);
ATF_REQUIRE(fd >= 0);
/*
Index: head/contrib/netbsd-tests/lib/libc/sys/t_stat.c
===================================================================
--- head/contrib/netbsd-tests/lib/libc/sys/t_stat.c
+++ head/contrib/netbsd-tests/lib/libc/sys/t_stat.c
@@ -64,7 +64,7 @@
(void)memset(&sa, 0, sizeof(struct stat));
(void)memset(&sb, 0, sizeof(struct stat));
- fd = open(path, O_RDONLY | O_CREAT);
+ fd = open(path, O_RDONLY | O_CREAT, 0600);
ATF_REQUIRE(fd != -1);
ATF_REQUIRE(stat(path, &sa) == 0);
@@ -210,7 +210,7 @@
(void)memset(&sa, 0, sizeof(struct stat));
(void)memset(&sb, 0, sizeof(struct stat));
- fd[i] = open(path, O_WRONLY | O_CREAT);
+ fd[i] = open(path, O_WRONLY | O_CREAT, 0600);
ATF_REQUIRE(fd[i] != -1);
ATF_REQUIRE(write(fd[i], "X", 1) == 1);
@@ -254,7 +254,7 @@
uid = getuid();
gid = getgid();
- fd = open(path, O_RDONLY | O_CREAT);
+ fd = open(path, O_RDONLY | O_CREAT, 0600);
ATF_REQUIRE(fd != -1);
ATF_REQUIRE(fstat(fd, &sa) == 0);
@@ -288,7 +288,7 @@
size_t i;
int fd;
- fd = open(path, O_WRONLY | O_CREAT);
+ fd = open(path, O_WRONLY | O_CREAT, 0600);
ATF_REQUIRE(fd >= 0);
for (i = 0; i < n; i++) {
@@ -377,7 +377,7 @@
(void)memset(&sa, 0, sizeof(struct stat));
(void)memset(&sb, 0, sizeof(struct stat));
- fd = open(path, O_WRONLY | O_CREAT);
+ fd = open(path, O_WRONLY | O_CREAT, 0600);
ATF_REQUIRE(fd >= 0);
ATF_REQUIRE(symlink(path, pathlink) == 0);
Index: head/contrib/netbsd-tests/lib/libc/sys/t_write.c
===================================================================
--- head/contrib/netbsd-tests/lib/libc/sys/t_write.c
+++ head/contrib/netbsd-tests/lib/libc/sys/t_write.c
@@ -69,7 +69,7 @@
errno = 0;
ATF_REQUIRE_ERRNO(EBADF, write(-1, wbuf, sizeof(wbuf)) == -1);
- fd = open(path, O_RDWR | O_CREAT);
+ fd = open(path, O_RDWR | O_CREAT, 0600);
if (fd >= 0) {
@@ -141,7 +141,7 @@
size_t i;
int fd;
- fd = open(path, O_RDWR | O_CREAT);
+ fd = open(path, O_RDWR | O_CREAT, 0600);
ATF_REQUIRE(fd >= 0);
for (i = 0; i < n; i++) {
@@ -171,7 +171,7 @@
size_t i, j;
int fd;
- fd = open(path, O_WRONLY | O_CREAT);
+ fd = open(path, O_WRONLY | O_CREAT, 0600);
ATF_REQUIRE(fd >= 0);
(void)memset(buf, 'x', sizeof(buf));

File Metadata

Mime Type
text/plain
Expires
Thu, Jun 18, 8:51 PM (20 h, 59 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34057127
Default Alt Text
D20972.id.diff (4 KB)

Event Timeline