From: tedu Date: Thu, 6 Apr 2017 21:12:06 +0000 (+0000) Subject: prepenv can take a const rule X-Git-Tag: v6.6~64 X-Git-Url: https://git.armaanb.net/?p=opendoas.git;a=commitdiff_plain;h=7413704e222d69771ba3c70356695d0f15857f66 prepenv can take a const rule --- diff --git a/doas.h b/doas.h index a371eb6..48069db 100644 --- a/doas.h +++ b/doas.h @@ -29,7 +29,7 @@ extern struct rule **rules; extern int nrules; extern int parse_errors; -char **prepenv(struct rule *); +char **prepenv(const struct rule *); #define PERMIT 1 #define DENY 2 diff --git a/env.c b/env.c index 23a95f2..3e8b95d 100644 --- a/env.c +++ b/env.c @@ -70,7 +70,7 @@ freenode(struct envnode *node) } static struct env * -createenv(struct rule *rule) +createenv(const struct rule *rule) { struct env *env; u_int i; @@ -187,7 +187,7 @@ fillenv(struct env *env, const char **envlist) } char ** -prepenv(struct rule *rule) +prepenv(const struct rule *rule) { static const char *safeset[] = { "DISPLAY", "HOME", "LOGNAME", "MAIL",