1 #ifndef lint 2 static char sccsid[] = "@(#)anyread.c 5.3 (Berkeley) 04/10/85"; 3 #endif 4 5 #include "uucp.h" 6 #include <sys/stat.h> 7 8 /* 9 * anyread check if anybody can read 10 * return SUCCESS ok: FAIL not ok 11 */ 12 anyread(file) 13 char *file; 14 { 15 struct stat s; 16 17 if (stat(subfile(file), &s) < 0) 18 /* for security check a non existant file is readable */ 19 return SUCCESS; 20 if (!(s.st_mode & ANYREAD)) 21 return FAIL; 22 return SUCCESS; 23 } 24