diff options
Diffstat (limited to 'src/regress/lib/libc/sys/t_stat.c')
-rw-r--r-- | src/regress/lib/libc/sys/t_stat.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/regress/lib/libc/sys/t_stat.c b/src/regress/lib/libc/sys/t_stat.c index ea7f4b24a2..73350c0e6a 100644 --- a/src/regress/lib/libc/sys/t_stat.c +++ b/src/regress/lib/libc/sys/t_stat.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* $OpenBSD: t_stat.c,v 1.1.1.1 2019/11/19 19:57:04 bluhm Exp $ */ | 1 | /* $OpenBSD: t_stat.c,v 1.2 2019/11/22 15:59:53 bluhm Exp $ */ |
2 | /* $NetBSD: t_stat.c,v 1.5 2017/01/13 20:06:50 christos Exp $ */ | 2 | /* $NetBSD: t_stat.c,v 1.6 2019/07/16 17:29:18 martin Exp $ */ |
3 | 3 | ||
4 | /*- | 4 | /*- |
5 | * Copyright (c) 2011 The NetBSD Foundation, Inc. | 5 | * Copyright (c) 2011 The NetBSD Foundation, Inc. |
@@ -33,7 +33,7 @@ | |||
33 | #include "macros.h" | 33 | #include "macros.h" |
34 | 34 | ||
35 | #include <sys/cdefs.h> | 35 | #include <sys/cdefs.h> |
36 | __RCSID("$NetBSD: t_stat.c,v 1.5 2017/01/13 20:06:50 christos Exp $"); | 36 | __RCSID("$NetBSD: t_stat.c,v 1.6 2019/07/16 17:29:18 martin Exp $"); |
37 | 37 | ||
38 | #include <sys/stat.h> | 38 | #include <sys/stat.h> |
39 | #include <sys/socket.h> | 39 | #include <sys/socket.h> |
@@ -214,7 +214,7 @@ ATF_TC_BODY(stat_mtime, tc) | |||
214 | (void)memset(&sa, 0, sizeof(struct stat)); | 214 | (void)memset(&sa, 0, sizeof(struct stat)); |
215 | (void)memset(&sb, 0, sizeof(struct stat)); | 215 | (void)memset(&sb, 0, sizeof(struct stat)); |
216 | 216 | ||
217 | fd[i] = open(path, O_WRONLY | O_CREAT); | 217 | fd[i] = open(path, O_WRONLY | O_CREAT, 0600); |
218 | 218 | ||
219 | ATF_REQUIRE(fd[i] != -1); | 219 | ATF_REQUIRE(fd[i] != -1); |
220 | ATF_REQUIRE(write(fd[i], "X", 1) == 1); | 220 | ATF_REQUIRE(write(fd[i], "X", 1) == 1); |
@@ -292,7 +292,7 @@ ATF_TC_BODY(stat_size, tc) | |||
292 | size_t i; | 292 | size_t i; |
293 | int fd; | 293 | int fd; |
294 | 294 | ||
295 | fd = open(path, O_WRONLY | O_CREAT); | 295 | fd = open(path, O_WRONLY | O_CREAT, 0600); |
296 | ATF_REQUIRE(fd >= 0); | 296 | ATF_REQUIRE(fd >= 0); |
297 | 297 | ||
298 | for (i = 0; i < n; i++) { | 298 | for (i = 0; i < n; i++) { |
@@ -381,7 +381,7 @@ ATF_TC_BODY(stat_symlink, tc) | |||
381 | (void)memset(&sa, 0, sizeof(struct stat)); | 381 | (void)memset(&sa, 0, sizeof(struct stat)); |
382 | (void)memset(&sb, 0, sizeof(struct stat)); | 382 | (void)memset(&sb, 0, sizeof(struct stat)); |
383 | 383 | ||
384 | fd = open(path, O_WRONLY | O_CREAT); | 384 | fd = open(path, O_WRONLY | O_CREAT, 0600); |
385 | 385 | ||
386 | ATF_REQUIRE(fd >= 0); | 386 | ATF_REQUIRE(fd >= 0); |
387 | ATF_REQUIRE(symlink(path, pathlink) == 0); | 387 | ATF_REQUIRE(symlink(path, pathlink) == 0); |