remove include statement and unveil() rad.

ok?

diff --git usr.sbin/rad/parse.y usr.sbin/rad/parse.y
index bb18c3d9c9c..443cff66065 100644
--- usr.sbin/rad/parse.y
+++ usr.sbin/rad/parse.y
@@ -112,7 +112,7 @@ typedef struct {
 
 %}
 
-%token RA_IFACE YES NO INCLUDE ERROR
+%token RA_IFACE YES NO ERROR
 %token DEFAULT ROUTER HOP LIMIT MANAGED ADDRESS
 %token CONFIGURATION OTHER LIFETIME REACHABLE TIME RETRANS TIMER
 %token AUTO PREFIX VALID PREFERRED LIFETIME ONLINK AUTONOMOUS
@@ -134,21 +134,6 @@ grammar            : /* empty */
                | grammar error '\n'            { file->errors++; }
                ;
 
-include                : INCLUDE STRING                {
-                       struct file     *nfile;
-
-                       if ((nfile = pushfile($2, 0)) == NULL) {
-                               yyerror("failed to include file %s", $2);
-                               free($2);
-                               YYERROR;
-                       }
-                       free($2);
-
-                       file = nfile;
-                       lungetc('\n');
-               }
-               ;
-
 string         : string STRING {
                        if (asprintf(&$$, "%s %s", $1, $2) == -1) {
                                free($1);
@@ -428,7 +413,6 @@ lookup(char *s)
                {"default",             DEFAULT},
                {"dns",                 DNS},
                {"hop",                 HOP},
-               {"include",             INCLUDE},
                {"interface",           RA_IFACE},
                {"lifetime",            LIFETIME},
                {"limit",               LIMIT},
diff --git usr.sbin/rad/rad.c usr.sbin/rad/rad.c
index 93675167b6b..986f0f2b186 100644
--- usr.sbin/rad/rad.c
+++ usr.sbin/rad/rad.c
@@ -200,6 +200,15 @@ main(int argc, char *argv[])
        if (getpwnam(RAD_USER) == NULL)
                errx(1, "unknown user %s", RAD_USER);
 
+        if (unveil(conffile, "r") == -1)
+                err(1, "unveil");
+        if (unveil(csock, "rwc") == -1)
+                err(1, "unveil");
+        if (unveil(saved_argv0, "x") == -1)
+                err(1, "unveil");
+        if (unveil(NULL, NULL) == -1)
+                err(1, "unveil");
+
        log_init(debug, LOG_DAEMON);
        log_setverbose(cmd_opts & OPT_VERBOSE);
 
diff --git usr.sbin/rad/rad.conf.5 usr.sbin/rad/rad.conf.5
index d4ca72f4639..ea0cb95d77e 100644
--- usr.sbin/rad/rad.conf.5
+++ usr.sbin/rad/rad.conf.5
@@ -50,10 +50,6 @@ sends IPv6 router advertisement messages.
 This section defines on which interfaces to advertise prefix information
 and their associated parameters.
 .El
-.Pp
-Additional configuration files can be included with the
-.Ic include
-keyword.
 .Sh MACROS
 Macros can be defined that will later be expanded in context.
 Macro names must start with a letter, digit, or underscore,

Reply via email to