2016-06-22 15:17:53 +00:00
|
|
|
/* $OpenBSD: doas.h,v 1.8 2016/06/19 19:29:43 martijn 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 **);
|
|
|
|
|
|
|
|
char **prepenv(struct rule *);
|
|
|
|
|
|
|
|
#define PERMIT 1
|
|
|
|
#define DENY 2
|
|
|
|
|
|
|
|
#define NOPASS 0x1
|
2016-06-22 15:21:34 +00:00
|
|
|
#define KEEPENV 0x2
|
|
|
|
|
2016-06-26 14:41:31 +00:00
|
|
|
#ifndef UID_MAX
|
|
|
|
#define UID_MAX 65535
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef GID_MAX
|
|
|
|
#define GID_MAX 65535
|
|
|
|
#endif
|
|
|
|
|
2016-06-26 19:24:42 +00:00
|
|
|
#ifndef ROOT_UID
|
|
|
|
#define ROOT_UID 0
|
|
|
|
#endif
|
|
|
|
|
2016-06-22 15:21:34 +00:00
|
|
|
#ifndef _PW_NAME_LEN
|
|
|
|
#define _PW_NAME_LEN 32
|
|
|
|
#endif
|
|
|
|
|
2016-06-24 11:29:08 +00:00
|
|
|
void *reallocarray(void *ptr, size_t nmemb, size_t size);
|
2016-06-22 15:21:34 +00:00
|
|
|
|
|
|
|
#if !defined(HAVE_EXECVPE)
|
|
|
|
int execvpe(const char *file, char * const *argv, char * const *envp);
|
|
|
|
#endif /* !HAVE_EXECVPE */
|
|
|
|
|
2016-06-26 14:41:31 +00:00
|
|
|
#ifdef linux
|
|
|
|
void errc(int eval, int code, const char *format);
|
|
|
|
#endif
|