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