Index: head/lib/libc/tests/sys/sendfile_test.c =================================================================== --- head/lib/libc/tests/sys/sendfile_test.c +++ head/lib/libc/tests/sys/sendfile_test.c @@ -781,7 +781,7 @@ hdtr3.trl_cnt = 1; hdtr3.trailers = (struct iovec*)-1; - fd = open(SOURCE_FILE, O_CREAT|O_RDWR); + fd = open(SOURCE_FILE, O_CREAT|O_RDWR, 0600); ATF_REQUIRE_MSG(fd != -1, "open failed: %s", strerror(errno)); server_sock = setup_tcp_server(domain, port); @@ -836,7 +836,7 @@ server_sock = setup_tcp_server(domain, port); client_sock = setup_tcp_client(domain, port); - fd = open(SOURCE_FILE, O_CREAT|O_RDWR); + fd = open(SOURCE_FILE, O_CREAT|O_RDWR, 0600); ATF_REQUIRE_MSG(fd != -1, "open failed: %s", strerror(errno)); error = sendfile(fd, client_sock, -1, 0, NULL, NULL, SF_FLAGS(0, 0)); @@ -985,7 +985,7 @@ port = generate_random_port(__LINE__ + domain); client_sock = setup_tcp_server(domain, port); - fd = open(SOURCE_FILE, O_CREAT|O_RDWR); + fd = open(SOURCE_FILE, O_CREAT|O_RDWR, 0600); ATF_REQUIRE_MSG(fd != -1, "open failed: %s", strerror(errno)); error = sendfile(fd, client_sock, 0, 0, NULL, NULL, SF_FLAGS(0, 0)); @@ -1037,7 +1037,7 @@ client_sock = -1; - fd = open(SOURCE_FILE, O_CREAT|O_RDWR); + fd = open(SOURCE_FILE, O_CREAT|O_RDWR, 0600); ATF_REQUIRE_MSG(fd != -1, "open failed: %s", strerror(errno)); error = sendfile(fd, client_sock, 0, 0, NULL, NULL, SF_FLAGS(0, 0)); @@ -1058,7 +1058,7 @@ { int client_sock, error, fd; - fd = open(SOURCE_FILE, O_CREAT|O_RDWR); + fd = open(SOURCE_FILE, O_CREAT|O_RDWR, 0600); ATF_REQUIRE_MSG(fd != -1, "open failed: %s", strerror(errno)); client_sock = open(_PATH_DEVNULL, O_WRONLY); @@ -1079,7 +1079,7 @@ port = generate_random_port(__LINE__ + domain); client_sock = setup_client(domain, SOCK_DGRAM, port); - fd = open(SOURCE_FILE, O_CREAT|O_RDWR); + fd = open(SOURCE_FILE, O_CREAT|O_RDWR, 0600); ATF_REQUIRE_MSG(fd != -1, "open failed: %s", strerror(errno)); error = sendfile(fd, client_sock, 0, 0, NULL, NULL, SF_FLAGS(0, 0));