|
|
1.1 ! root 1: #ifndef lint ! 2: static char sccsid[] = "@(#)anyread.c 5.1 (Berkeley) 7/2/83"; ! 3: #endif ! 4: ! 5: #include "uucp.h" ! 6: #include <sys/types.h> ! 7: #include <sys/stat.h> ! 8: ! 9: ! 10: /******* ! 11: * anyread check if anybody can read ! 12: * return 0 ok: FAIL not ok ! 13: */ ! 14: ! 15: anyread(file) ! 16: char *file; ! 17: { ! 18: struct stat s; ! 19: ! 20: if (stat(subfile(file), &s) != 0) ! 21: /* for security check a non existant file is readable */ ! 22: return(0); ! 23: if (!(s.st_mode & ANYREAD)) ! 24: return(FAIL); ! 25: return(0); ! 26: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.