comparison configure.in @ 8226:3e493fd3a9fa HEAD

configure: create test files with mode 0600.
author Timo Sirainen <tss@iki.fi>
date Sun, 05 Oct 2008 13:47:31 +0300
parents 6dd0c6755afe
children 9886bf0a4c40
comparison
equal deleted inserted replaced
8225:fe97a84145f9 8226:3e493fd3a9fa
1148 #include <unistd.h> 1148 #include <unistd.h>
1149 #include <fcntl.h> 1149 #include <fcntl.h>
1150 #include <sys/mman.h> 1150 #include <sys/mman.h>
1151 int main() { 1151 int main() {
1152 /* return 0 if we're signed */ 1152 /* return 0 if we're signed */
1153 int f = open("conftest.mmap", O_RDWR|O_CREAT|O_TRUNC); 1153 int f = open("conftest.mmap", O_RDWR|O_CREAT|O_TRUNC, 0600);
1154 void *mem; 1154 void *mem;
1155 if (f == -1) { 1155 if (f == -1) {
1156 perror("open()"); 1156 perror("open()");
1157 return 1; 1157 return 1;
1158 } 1158 }
1203 { 1203 {
1204 int fd[2], send_fd, recv_fd, status; 1204 int fd[2], send_fd, recv_fd, status;
1205 struct stat st, st2; 1205 struct stat st, st2;
1206 char data; 1206 char data;
1207 1207
1208 send_fd = open("conftest.fdpass", O_CREAT|O_WRONLY); 1208 send_fd = creat("conftest.fdpass", 0600);
1209 if (send_fd == -1) return 2; 1209 if (send_fd == -1) return 2;
1210 unlink("conftest.fdpass"); 1210 unlink("conftest.fdpass");
1211 if (fstat(send_fd, &st) < 0) return 2; 1211 if (fstat(send_fd, &st) < 0) return 2;
1212 if (socketpair(AF_UNIX, SOCK_STREAM, 0, fd) < 0) return 2; 1212 if (socketpair(AF_UNIX, SOCK_STREAM, 0, fd) < 0) return 2;
1213 1213