Annotation of 43BSDReno/usr.bin/uucp/anyread.c, revision 1.1.1.1

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

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.