/*
 * 5799-WZQ (C) COPYRIGHT = NONE
 * LICENSED MATERIALS - PROPERTY OF IBM
 */
/* $Header:anyread.c 12.0$ */
/* $ACIS:anyread.c 12.0$ */
/* $Source: /ibm/acis/usr/src/usr.bin/uucp/RCS/anyread.c,v $ */

#ifndef lint
static char *rcsid = "$Header:anyread.c 12.0$";
#endif

#ifndef lint
static char sccsid[] = "@(#)anyread.c	5.4 (Berkeley) 6/19/85";
#endif

#include "uucp.h"
#include <sys/stat.h>

/*LINTLIBRARY*/

/*
 *	anyread		check if anybody can read
 *	return SUCCESS ok: FAIL not ok
 */
anyread(file)
char *file;
{
	struct stat s;

	if (stat(subfile(file), &s) < 0)
		/* for security check a non existant file is readable */
		return SUCCESS;
	if (!(s.st_mode & ANYREAD))
		return FAIL;
	return SUCCESS;
}
