acl.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
#pragma ident "%Z%%M% %I% %E% SMI"
/****************************************************************************
Copyright (c) 1999,2000 WU-FTPD Development Group.
All rights reserved.
Portions Copyright (c) 1980, 1985, 1988, 1989, 1990, 1991, 1993, 1994
The Regents of the University of California.
Portions Copyright (c) 1993, 1994 Washington University in Saint Louis.
Portions Copyright (c) 1996, 1998 Berkeley Software Design, Inc.
Portions Copyright (c) 1989 Massachusetts Institute of Technology.
Portions Copyright (c) 1998 Sendmail, Inc.
Portions Copyright (c) 1983, 1995, 1996, 1997 Eric P. Allman.
Portions Copyright (c) 1997 by Stan Barber.
Portions Copyright (c) 1997 by Kent Landfield.
Portions Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996, 1997
Free Software Foundation, Inc.
Use and distribution of this software and its source code are governed
by the terms and conditions of the WU-FTPD Software License ("LICENSE").
If you did not receive a copy of the license, it may be obtained online
$Id: acl.c,v 1.9 2000/07/01 18:17:38 wuftpd Exp $
****************************************************************************/
#include "config.h"
#include <stdio.h>
#include <errno.h>
#include <string.h>
#ifdef HAVE_SYS_SYSLOG_H
#endif
#include <syslog.h>
#endif
#ifdef HAVE_PATHS_H
#include <paths.h>
#endif
#include "pathnames.h"
#include "extensions.h"
#include "proto.h"
static struct aclmember *aclmembers;
/*************************************************************************/
/* FUNCTION : getaclentry */
/* PURPOSE : Retrieve a named entry from the ACL */
/* ARGUMENTS : pointer to the keyword and a handle to the acl members */
/* RETURNS : pointer to the acl member containing the keyword or NULL */
/*************************************************************************/
{
do {
if (!*next)
*next = aclmembers;
else
return (*next);
}
/*************************************************************************/
/* FUNCTION : parseacl */
/* PURPOSE : Parse the acl buffer into its components */
/* ARGUMENTS : A pointer to the acl file */
/* RETURNS : nothing */
/*************************************************************************/
void parseacl(void)
{
int cnt;
return;
while (*aclptr != '\0') {
aclptr++;
/* deal with comments */
/* allowed escaped '#' chars for path-filter (DiB) */
*ptr = '\0';
if (ptr) {
exit(1);
}
cnt = 0;
"Too many args (>%d) in ftpaccess: %s %s %s %s %s ...",
break;
}
}
if (acltail)
if (!aclmembers)
aclmembers = member;
}
}
}
/*************************************************************************/
/* FUNCTION : readacl */
/* PURPOSE : Read the acl into memory */
/* ARGUMENTS : The pathname of the acl */
/* RETURNS : 0 if error, 1 if no error */
/*************************************************************************/
{
extern int use_accessfile;
if (!use_accessfile)
return (0);
while (aclmembers) {
aclmembers = member;
}
if (aclbuf) {
}
return (0);
}
return (0);
}
}
else {
return (0);
}
return (0);
}
}
return (1);
}