X-Git-Url: https://git.armaanb.net/?a=blobdiff_plain;f=env.c;h=3e8b95d44c7c5c67096f3438278fc0fa4f26982c;hb=8872767adddd36c58d2fd3ec5f2d1b35fe37c399;hp=42a0d2e1856f8c766c87338ef95b5bd33d74bf3f;hpb=5e9d76849fdad47f59b11993ee8ca319bd11414d;p=opendoas.git diff --git a/env.c b/env.c index 42a0d2e..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; @@ -82,7 +82,7 @@ createenv(struct rule *rule) env->count = 0; if (rule->options & KEEPENV) { - extern const char **environ; + extern char **environ; for (i = 0; environ[i] != NULL; i++) { struct envnode *node; @@ -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", @@ -195,7 +195,7 @@ prepenv(struct rule *rule) NULL }; struct env *env; - + env = createenv(rule); /* if we started with blank, fill some defaults then apply rules */