# 2.11BSD#431 - /usr/src/usr.bin/uucp/anyread.c

##### Functions

    anyread           X

       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: }

#### Defined functions

anyread defined in line 14; used 4 times

- in /usr/src/usr.bin/uucp/cntrl.c line 622
- in /usr/src/usr.bin/uucp/uux.c line 291
- in /usr/src/usr.bin/uucp/uuxqt.c line 220, 661

#### Defined variables

sccsid defined in line 2; never used

Last modified: 1987-02-17 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 541 |