[BACK]Return to doas.h CVS log [TXT][DIR] Up to [local] / src / usr.bin / doas

File: [local] / src / usr.bin / doas / doas.h (download)

Revision 1.4, Fri Jul 24 06:36:42 2015 UTC (8 years, 10 months ago) by zhuk
Branch: MAIN
CVS Tags: OPENBSD_5_9_BASE, OPENBSD_5_9, OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.3: +2 -1 lines

Further improve syntax error reporting in doas:

  - teach parser to recover after error, allowing to report many errors
    instead of the first one only;
  - fix remaining error printouts without exact position.

Some ideas were taken from diff sent by dlg@ earlier, thanks!

okay tedu@, dlg@

/* $OpenBSD: doas.h,v 1.4 2015/07/24 06:36:42 zhuk Exp $ */

struct rule {
	int action;
	int options;
	const char *ident;
	const char *target;
	const char *cmd;
	const char **cmdargs;
	const char **envlist;
};

extern struct rule **rules;
extern int nrules, maxrules;
extern int parse_errors;

size_t arraylen(const char **);

#define PERMIT	1
#define DENY	2

#define NOPASS		0x1
#define KEEPENV		0x2