diff options
author | alex <alex@FreeBSD.org> | 1996-06-18 01:46:34 +0000 |
---|---|---|
committer | alex <alex@FreeBSD.org> | 1996-06-18 01:46:34 +0000 |
commit | 26ad2004f9ad2d994e528b2448f065726dfe7ca2 (patch) | |
tree | 9370924e20e2ada579dba2a27a5540adefd191f7 /sbin | |
parent | 097df5e884db7600b452a23b84796190968a7f22 (diff) | |
download | FreeBSD-src-26ad2004f9ad2d994e528b2448f065726dfe7ca2.zip FreeBSD-src-26ad2004f9ad2d994e528b2448f065726dfe7ca2.tar.gz |
Set the program name before trying to use it.
Found by: Aage Robekk <aagero@aage.priv.no>
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/ipfw/ipfw.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/ipfw/ipfw.c b/sbin/ipfw/ipfw.c index a74d62e..2a0c293 100644 --- a/sbin/ipfw/ipfw.c +++ b/sbin/ipfw/ipfw.c @@ -16,7 +16,7 @@ * * NEW command line interface for IP firewall facility * - * $Id: ipfw.c,v 1.24 1996/05/11 20:31:55 phk Exp $ + * $Id: ipfw.c,v 1.25 1996/06/09 23:46:22 alex Exp $ * */ @@ -833,6 +833,8 @@ main(ac, av) int i; FILE *f; + strcpy(progname,*av); + s = socket( AF_INET, SOCK_RAW, IPPROTO_RAW ); if ( s < 0 ) { fprintf(stderr,"%s: Can't open raw socket.\n" @@ -842,8 +844,6 @@ main(ac, av) setbuf(stdout,0); - strcpy(progname,*av); - if (av[1] && !access(av[1], R_OK)) { lineno = 0; f = fopen(av[1], "r"); |