From 7a96f9302919494eb28de79b1f7beb4b162738f6 Mon Sep 17 00:00:00 2001 From: tedu Date: Thu, 6 Apr 2017 21:12:06 +0000 Subject: [PATCH] prepenv can take a const rule --- usr.bin/doas/doas.h | 4 ++-- usr.bin/doas/env.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/usr.bin/doas/doas.h b/usr.bin/doas/doas.h index ba54c3f71df..cbeb3399419 100644 --- a/usr.bin/doas/doas.h +++ b/usr.bin/doas/doas.h @@ -1,4 +1,4 @@ -/* $OpenBSD: doas.h,v 1.12 2016/10/05 17:40:25 tedu Exp $ */ +/* $OpenBSD: doas.h,v 1.13 2017/04/06 21:12:06 tedu Exp $ */ /* * Copyright (c) 2015 Ted Unangst * @@ -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/usr.bin/doas/env.c b/usr.bin/doas/env.c index fd671b0c29f..957883c5e0c 100644 --- a/usr.bin/doas/env.c +++ b/usr.bin/doas/env.c @@ -1,4 +1,4 @@ -/* $OpenBSD: env.c,v 1.5 2016/09/15 00:58:23 deraadt Exp $ */ +/* $OpenBSD: env.c,v 1.6 2017/04/06 21:12:06 tedu Exp $ */ /* * Copyright (c) 2016 Ted Unangst * @@ -69,7 +69,7 @@ freenode(struct envnode *node) } static struct env * -createenv(struct rule *rule) +createenv(const struct rule *rule) { struct env *env; u_int i; @@ -186,7 +186,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", -- 2.20.1