diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1996-08-22 20:33:25 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1996-08-22 20:33:25 +0000 |
commit | 92c01dd3234ebed386e6bec16b670a3af88bdb13 (patch) | |
tree | cf117c1dbdcf46642534ac9c526777a3e3c414a7 /usr.bin/oldrdist/main.c | |
parent | 83401538373dbe9ae9dc907fffe379a27ceed105 (diff) |
NetBSD changes: use POSIX regex routines and fix more buff oflow
Can't use mkstemp() so go back to mktemp and open(2) with sane flags.
Now uses rcmdsh and fixes memory leak in NetBSD POSIX regex support
(leak fixed by Charles Amos <amos@umiacs.umd.edu>).
Diffstat (limited to 'usr.bin/oldrdist/main.c')
-rw-r--r-- | usr.bin/oldrdist/main.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/usr.bin/oldrdist/main.c b/usr.bin/oldrdist/main.c index cb6960b15b4..2fe055fc013 100644 --- a/usr.bin/oldrdist/main.c +++ b/usr.bin/oldrdist/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.4 1996/07/30 20:34:55 millert Exp $ */ +/* $OpenBSD: main.c,v 1.5 1996/08/22 20:33:22 millert Exp $ */ /* * Copyright (c) 1983, 1993 @@ -41,7 +41,7 @@ static char copyright[] = #ifndef lint /* from: static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/9/93"; */ -static char *rcsid = "$OpenBSD: main.c,v 1.4 1996/07/30 20:34:55 millert Exp $"; +static char *rcsid = "$OpenBSD: main.c,v 1.5 1996/08/22 20:33:22 millert Exp $"; #endif /* not lint */ #include "defs.h" @@ -84,7 +84,7 @@ main(argc, argv) char *argv[]; { register char *arg; - int cmdargs = 0; + int cmdargs = 0, fd; char *dhosts[NHOSTS], **hp = dhosts; pw = getpwuid(userid = getuid()); @@ -198,6 +198,9 @@ main(argc, argv) } #endif /* DIRECT_RCMD */ + if (mktemp(tempfile) == NULL) + fatal("cannot get temp file\n"); + if (iamremote) { server(); exit(nerrs != 0); |