summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sbin/ipfw/ipfw.810
-rw-r--r--sbin/ipfw/ipfw.c2
2 files changed, 7 insertions, 5 deletions
diff --git a/sbin/ipfw/ipfw.8 b/sbin/ipfw/ipfw.8
index 234c1d3..3e50043 100644
--- a/sbin/ipfw/ipfw.8
+++ b/sbin/ipfw/ipfw.8
@@ -20,7 +20,7 @@
.Oc
.Op Fl U Ar macro
.Oc
-.Ar file
+.Ar pathname
.Nm ipfw
.Op Fl f | q
.Cm flush
@@ -207,8 +207,10 @@ To ease configuration, rules can be put into a file which is
processed using
.Nm
as shown in the first synopsis line.
-The
-.Ar file
+An absolute
+.Ar pathname
+must be used.
+The file
will be read line by line and applied as arguments to the
.Nm
utility.
@@ -216,7 +218,7 @@ utility.
Optionally, a preprocessor can be specified using
.Fl p Ar preproc
where
-.Ar file
+.Ar pathname
is to be piped through.
Useful preprocessors include
.Xr cpp 1
diff --git a/sbin/ipfw/ipfw.c b/sbin/ipfw/ipfw.c
index 27012eb..0c0f02a 100644
--- a/sbin/ipfw/ipfw.c
+++ b/sbin/ipfw/ipfw.c
@@ -2363,7 +2363,7 @@ main(ac, av)
* directory, things will fail miserably.
*/
- if (ac > 1 && access(av[ac - 1], R_OK) == 0) {
+ if (ac > 1 && av[ac - 1][0] == '/' && access(av[ac - 1], R_OK) == 0) {
qflag = pflag = i = 0;
lineno = 0;
OpenPOWER on IntegriCloud