]> git.armaanb.net Git - opendoas.git/commitdiff
prepenv can take a const rule
authortedu <tedu>
Thu, 6 Apr 2017 21:12:06 +0000 (21:12 +0000)
committerDuncaen <mail@duncano.de>
Mon, 11 Dec 2017 15:28:56 +0000 (16:28 +0100)
doas.h
env.c

diff --git a/doas.h b/doas.h
index a371eb6244499467e7c70056b6e82320aa3c47a1..48069dbbace38d37580d61f6257398c9253a449f 100644 (file)
--- 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 23a95f297e8f5f04ce0cc97b203acbc819fbdceb..3e8b95d44c7c5c67096f3438278fc0fa4f26982c 100644 (file)
--- 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",